søndag den 19. juni 2016

The Logic Behind my Temperature and Humidity Control

Hello again.

Well no matter how good the intentions are, reality has its way of kicking in, and I never got around to do an “as we go” blog on the build. Now a year, and some, later, the build is done.


Figure 1 and 2

I ended up adding a load cell as well. This will allow me to log changes in weight, humidity and temperature, for easy comparison and trouble shooting. 

In this blog I want to go a little further into how I control the environment inside the curing chamber.

For controlling the temperature, the cooling circuit of the fridge was connected to one of the relays. Also, an incandescent lightning bulb was painted black, hooked up with a relay, and hung inside the fridge, for heating. The control scheme used, is simple hysteresis control. See figure 3 below.


Figure 3 The basic temperature and humidity control scheme

Using temperature as an example; If the chamber is situated in a cold room and the chamber temperature drops below the minimum setting the heater will turn on, and keep running until the temperature goes above the set point. Alternately if the ambient temperature is high, causing the chamber temperature to rise above the Max level, then the cooler will turn on and keep running until the temperature falls below the set point.
This solution was chosen due to its simplicity, and because it quite easy to implement in the code as well.

To define the different parameter boundaries, I have set the bands for the controller illustrated in figure 3, with the blue circles. These are used in the code itself, as well as to ease communication here.

For humidification, a small desktop USB humidifier was installed in the fridge. For this small space the capacity of this humidifier is plenty big. So as shown with the temperature, the humidity spectrum was also divided into four bands, centred on the set point. For the humidifier the control logic was as simple as for the heater, shown in the previous example. It would turn on, when the current humidity crosses from band 1 into band 0, and turn off again when crossing from band 1 to band 2. The rest of the time, it is off.

Since the fridge available to me wasn’t very roomy, I didn’t want to cramp it any further, by adding a huge dehumidifier in there. I had earlier tried to dehumidify by adding a fan, for circulating outside air through the chamber, but for most of the year, this actually worsened the humidity. So another method had to be applied.

During the tests of the chamber we had observed that condensation on the cooling element, made the humidity drop drastically during cooling. So this gave an obvious way to keep the humidity in the chamber down. But since this now made the dehumidification controller intertwine with the temperature control, close mind had to be paid.

So what I did was to add two humidity dependent conditions to the logic of the heater controller.
The conditions are quite simple. If the current humidity is above humidity band 2 and the current temperature is within temperature bands 0, 1 or 2, the heater turns on. This will drive the temperature up into temperature band 3. Here the cooler will engage, and stay engaged until the temperature falls below band 2. This fall in temperature will happen slower than usual due to the fact that the heating element is turned on as well. I have tried to illustrate the scheme in figure 4.

Figure 4 This Temperature control scheme will run, as long as the current humidity is above humidity band 2.

Since the heating element now forces the cooler to be running more frequently and for longer periods of time, the humidity should be driven down below humidity band 3. And the temperature control scheme should return to normal one shown in figure 3.

As an example of the code in action I will show you a graph from a curing a few legs of venison. See figure 5.

Figure 5 An excerpt from ½ a days curing


So what we see in the figure is temperature fluctuations within approximately 3 degrees Celsius. And humidity fluctuations within 10% RH. In figure 6 I have taken a detailed view of a 1½ hour span, and included an I/O indication for the heater and cooler. The humidifier was left out, since it wasn’t on at all during the time span.

Figure 6 Detail of figure 5. This figure also includes indications of when the cooler and heater turns on and off.

So in this detailed view it is very easy to see how the heater turns on whenever the humidity rises above band 2. We can also see how this increase in temperature actually causes the RH to fall. This is because of the temperature dependence between the relative humidity, absolute humidity and temperature.  So when the temperature rises faster than the absolute humidity we will see a fall in RH.

Well guys this was a small presentation of the logic which I have built in to my curing chamber control unit. I hope that you find it use full!

And of course, if you have any questions to what you have just read, or any general questions to the blog or curing chamber unit, please feel free to put them in the comments section. You might help someone else out there having the same doubts or questions.

Until next time! Have a good one!

Niels

mandag den 23. februar 2015

Arduino controlled meat curing chamber

Hi everyone!

Well I have never made more than a few small attempts at blogging before, so this project will be my proper blog debut. About a year ago I started looking into creating a meat curing chamber for some sausage projects my father and I were planning. I ended up building an Arduino based controller, for an old fridge, allowing me to control the temperature and humidity. My first build of the hardware was very much an on the fly design, meaning that I ended up with a lot of semi loose wires going to and from different components and a breadboard. Therefore I have decided to rebuild the entire thing. In this review it will be built inside a cabinet, with the intention of keeping everything neat and tidy.



Some pictures of the not so neat and tidy first build.


So this blog will be a documentation of the building process, taking you though the different steps.

When the project first started, I quickly decided that combining an Arduino with an old refrigerator would be the way to go. So I started surfing the interweb for someone doing a similar project, but I couldn’t find anyone who was. Taking the imaginations and diversity of people doing Arduino projects all over the world, this surprised me quite a bit. After some time, though, I found Franz Evert’s project over at MeatGeek, where he and a friend had started building a controller unit for a curing fridge. But as far as I know they haven’t finished the software part of it. I have chatted a bit with Franz discussing back and forth, on how he and his friend are approaching their project, and I have stolen a few ideas from them as well :)

But since I haven’t found any description of a finished project I decided to make one and give a little back to the internet.

When starting the project the first thing I did was setting up a list of requirements, which the controller had to meet.
The first two points were quite obvious;
 • Control temperature
 • Control Humidity
Then there was the nice to have’s;
 • Instant visual readout of humidity and temperature
 • Logging capability
 • The capability to change control parameters continuously

The later three are somewhere in between need to have’s and nice to have’s. I believe that in order for the finished product to be as good as possible the operator has to have the best tools at hand, in order to make informed decisions on, for example dropping or raising the humidity a few percent. Therefore it is important to be able to interact with the controller.

The list of requirements builds an easy transition to the list of components needed in order to ensure that they are met.

For the control part sensors and relays are needed. Four standard made in china 10A 250V relays were chosen. For sensing a DHT 22 sensor were bought. Together with an Arduino as a base, this should be sufficient to meet the two first requirements. For the instant visual read out, a 16x2 standard LCD display was chosen. In order to limit its demand for pins, an i2c interface was also bought.

To meet the two last requirements I have chosen to use a SD card reader. This will allow me to continuously log temperature and humidity to a .txt file. But more importantly it can also be used to store curing programs, with different settings for the controllers to use as time progresses. This is quite a neat feature if I am to say myself. Though I must admit, that it probably takes quite a while before one can set parameters for the next 30 days of curing, without evaluating them once. But I sort of like the industrial production feel that it adds to the build.

Some of the components for the build.


So these are the basic components required for the build to meet with stated demands. Off course a lot of circumferential components will be needed for connecting it all as well, but the ones mentioned here will only be the essential ones.

But I think that I have written enough for now, in order for you to get an idea of what the project will be all about. In the next blog I will present some of the experience that we have already gathered with the last build of the setup, including some graphs, and nice pictures.

lørdag den 25. maj 2013

They are coming!

Reports have arrived, telling us that the mackerel has been caught in the Oslo fjord! That means that they soon will be in the inner waters of Denmark as well. Until then, there is this little film from Hooked showing fishermen catching their first mackerels of the year!

torsdag den 23. maj 2013

Rune Westphal hitting the jackpot!

Hi guys!

Rune Westphal over at seatroutfisher has uploaded a video where he's fighting a very large seatrout. It's a wonderfull film, which will  make you jealous. Check it out:


On his webpage Rune has a set of very good tying guides for his advanced fly patterns, as well as some nice comments on fly casting techniques.

onsdag den 22. maj 2013

Fish

Even though I am all caught up in exams, there is still room for a little daydreaming.


mandag den 20. maj 2013

Opstart.

Så er den i luften, mit lille forsøg på at lave en blog. Jeg vil bruge den til at uploade billeder og fortælle små historier, fra forskellige projekter.