Basic arduino questions.

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
My current plans involve 5 sensors in the chamber to run the controls, plus a sensor in my ice chamber and one on the outside of the entire chamber for data logging. I don't have the parts I need for a thermowell, and I'll be filling my conical tomorrow, so that'll have to wait for a few weeks until the IPA is done dry hopping
I must say, the choice of old school ice box tech with a modern control system is an interesting mash up- almost steam punk if you use some exposed mechanical actuators for doors an such.

I only bring this up because you seem to be interested in very fine temp control- using a single thermowell to control temp in a ferm vessel, conical or otherwise, can result in radial stratification during later stages, unless the location is almost ideal. From other threads, that location is very close to the wall, and about mid-way on height, but that location is variable, especially depending on how it is chilled- air, jacket(s), immersed coil, etc.

Also, controlling the vessel temp without using the actual vessel temp in the control loop borders on the impossible. This method is difficult even with passive objects if the air temp sensor is not close to the vessel.

Are you planning on have one large chamber, or multiple small ones with separate fans? I ask because it is impossible to control multiple active ferments in one chamber with only one control input. More precisely, to control n fermenters, you would need at least n+1 control inputs. If you could guarantee one vessel would always generate more heat than all others, you would only need n inputs.

A real world example is a guy who uses a single fridge and 4 heat wraps to control 4 fermenters. The fridge is set to a temp low enough to keep any active ferment in check.

The elephant in the room is why you sprang for a conical, and don't drop some coin (<$50 or free) for a Craig's list fridge to put it in, or at least use as a cooling source.

When people talk about building chambers, I always think of this thread:
https://www.homebrewtalk.com/f51/fu...lled-fermentation-chamber-about-200-a-175456/

The punch line is here:
https://www.homebrewtalk.com/f51/fu...ation-chamber-about-200-a-175456/#post2616114

But what is even funnier, is that the thread continues with people asking all kinds of questions about how to do it.
 
So I'd want something that would take a faulty sensor out of the equation? Like if it returns an obviously wrong value, it stops using that sensor to cycle the heater and cooler?

Hi

What sort of sensor are you using? If it's one of the one wire gizmos, it will return junk data from time to time. Some sensor setups get "jammed" buy nearby cell phones. It's a pretty good bet that your system has a range that's reasonable for a reading. Tossing out data past that range is the first step. Counting how much you have tossed is the next. Deciding weather you are in trouble and what to do about it is the fun part.

Most systems cluster data as it's collected. Taking 5 or more data points, sorting them, tossing out the high and low, averaging the remaining three is normal. How that interacts with a toss out process is a "that depends" sort of thing. Usually the discard high / low only gets done if there are >= 5 points left after the discard.

That's all fine if you are running a fairly slow moving system with lots of data collection. If you have a slow sensor and a fast moving gizmo, you may need to do it a bit differently.

Bob

Bob
 
I must say, the choice of old school ice box tech with a modern control system is an interesting mash up- almost steam punk if you use some exposed mechanical actuators for doors an such.

I only bring this up because you seem to be interested in very fine temp control- using a single thermowell to control temp in a ferm vessel, conical or otherwise, can result in radial stratification during later stages, unless the location is almost ideal. From other threads, that location is very close to the wall, and about mid-way on height, but that location is variable, especially depending on how it is chilled- air, jacket(s), immersed coil, etc.

Also, controlling the vessel temp without using the actual vessel temp in the control loop borders on the impossible. This method is difficult even with passive objects if the air temp sensor is not close to the vessel.

Are you planning on have one large chamber, or multiple small ones with separate fans? I ask because it is impossible to control multiple active ferments in one chamber with only one control input. More precisely, to control n fermenters, you would need at least n+1 control inputs. If you could guarantee one vessel would always generate more heat than all others, you would only need n inputs.

A real world example is a guy who uses a single fridge and 4 heat wraps to control 4 fermenters. The fridge is set to a temp low enough to keep any active ferment in check.

The elephant in the room is why you sprang for a conical, and don't drop some coin (<$50 or free) for a Craig's list fridge to put it in, or at least use as a cooling source.

When people talk about building chambers, I always think of this thread:
https://www.homebrewtalk.com/f51/fu...lled-fermentation-chamber-about-200-a-175456/

The punch line is here:
https://www.homebrewtalk.com/f51/fu...ation-chamber-about-200-a-175456/#post2616114

But what is even funnier, is that the thread continues with people asking all kinds of questions about how to do it.

I wish I could say I planned this project to be some sort of tech mashup. I chose not to go with a fridge quite simply because my conical is too big to fit in any standard fridge that I've seen. My ferm chamber is about 60 cf, it's sized to fit 3 of the 15g Minibrew conicals. Using the guts out of one for cooling, however, is something that I might do, depending on how the icebox works. Where I live, I'll be heating it about 90% of the time, so I don't feel like I need a cooling source with a lot of juice anyways. Originally, I bought an STC-1000 for the project, but once I started reading about Arduino and everything it does, I decided to go that route. I've learned all sorts of thing about programming that I never would have otherwise, so I'm pretty happy about that. I might use the STC-1000 to power another fridge if I ever decide to do any more lagers. As far as separate chambers, I'd be lying if I said I'd thought that far down the road yet. If I went with the idea you mentioned of having one heater blanket per fermenter and keeping the ambient temp cooler, would I really need to? As far as fine temp controls, I'll be pretty happy if my chamber can control the beer temp to +/- 2 deg F.
 
I wish I could say I planned this project to be some sort of tech mashup. I chose not to go with a fridge quite simply because my conical is too big to fit in any standard fridge that I've seen. My ferm chamber is about 60 cf, it's sized to fit 3 of the 15g Minibrew conicals. Using the guts out of one for cooling, however, is something that I might do, depending on how the icebox works. Where I live, I'll be heating it about 90% of the time, so I don't feel like I need a cooling source with a lot of juice anyways. Originally, I bought an STC-1000 for the project, but once I started reading about Arduino and everything it does, I decided to go that route. I've learned all sorts of thing about programming that I never would have otherwise, so I'm pretty happy about that. I might use the STC-1000 to power another fridge if I ever decide to do any more lagers. As far as separate chambers, I'd be lying if I said I'd thought that far down the road yet. If I went with the idea you mentioned of having one heater blanket per fermenter and keeping the ambient temp cooler, would I really need to? As far as fine temp controls, I'll be pretty happy if my chamber can control the beer temp to +/- 2 deg F.

Read the ferm chamber thread I linked. That one used fridge guts, and he still had the wood disintegrate. Using ice? Depends on your build materials.

For your setup, using a small window A/C unit is a much more appropriate solution. There are threads on how to do it. Most involve a simple trick to override the factory control/sensor. Your STC-1000 would be a good choice for controlling the A/C unit

Unless your ambient temp <50F 90% of the time, you will be using cooling much more than 90% of the time. A 15G batch can probably crank out ~60W at peak, but that is only a rough guess based on the 40W number I have heard bandied about for peak on a 5G batch. 40W actually sounds high to me, but I can't find much other info. The rule of thumb is your fermenter will be ~10F higher than ambient during peak.

The cold chamber with heat wraps for each fermenter is perfectly functional, but a little wasteful of energy. This method can give very tight control because the wraps are not limited to on/off setpoint control, although that approach would easily give ~1F variance. Search for the DIY fermwrap threads. The raw material is plastic sheeting with heating elements embedded, and pinch-on connectors to make your own on the cheap. Your arduino would be a good fit for controlling the wraps using any number of control methods- that is the beauty of software based control systems.
 
Hi

What sort of sensor are you using? If it's one of the one wire gizmos, it will return junk data from time to time. Some sensor setups get "jammed" buy nearby cell phones. It's a pretty good bet that your system has a range that's reasonable for a reading. Tossing out data past that range is the first step. Counting how much you have tossed is the next. Deciding weather you are in trouble and what to do about it is the fun part.

Most systems cluster data as it's collected. Taking 5 or more data points, sorting them, tossing out the high and low, averaging the remaining three is normal. How that interacts with a toss out process is a "that depends" sort of thing. Usually the discard high / low only gets done if there are >= 5 points left after the discard.

That's all fine if you are running a fairly slow moving system with lots of data collection. If you have a slow sensor and a fast moving gizmo, you may need to do it a bit differently.

Bob

Bob

I'm using DS18B20's
 
Read the ferm chamber thread I linked. That one used fridge guts, and he still had the wood disintegrate. Using ice? Depends on your build materials.

For your setup, using a small window A/C unit is a much more appropriate solution. There are threads on how to do it. Most involve a simple trick to override the factory control/sensor. Your STC-1000 would be a good choice for controlling the A/C unit

Unless your ambient temp <50F 90% of the time, you will be using cooling much more than 90% of the time. A 15G batch can probably crank out ~60W at peak, but that is only a rough guess based on the 40W number I have heard bandied about for peak on a 5G batch. 40W actually sounds high to me, but I can't find much other info. The rule of thumb is your fermenter will be ~10F higher than ambient during peak.

The cold chamber with heat wraps for each fermenter is perfectly functional, but a little wasteful of energy. This method can give very tight control because the wraps are not limited to on/off setpoint control, although that approach would easily give ~1F variance. Search for the DIY fermwrap threads. The raw material is plastic sheeting with heating elements embedded, and pinch-on connectors to make your own on the cheap. Your arduino would be a good fit for controlling the wraps using any number of control methods- that is the beauty of software based control systems.

That is precisely what I do with this: http://www.restlesscellars.com/data/storage/attachments/50a27af64511aff5db9f34b8ec850e53.jpg

I keep the upper chamber cooled to 35-40F depending on whether I am lagering anything or just serving.

My fermentors get wrapped with FermWrap and are controlled by their own STC-1000. This allows me to do lagers and ales together in the same chamber while still being able to serve or lager existing batches.

It does waste some energy but monitoring is minimal and control is very good.
 
Well, work took me out of the country for a bit, but I'm back and ready to get back to work on my project. Today I scored a free freezer on Craigslist, so I'll be using that, powered by my STC-1000 to cool the chamber, and the arduino to power heat wraps for the individual fermenters. Hopefully I can get it going this weekend. The way the weather has been lately, I doubt I'll need the heat yet anyways. This brings me to my next question. How do you get the data from your sensors to show up on those fancy graphs?
 
How do you get the data from your sensors to show up on those fancy graphs?

Graphing means historical data and thus logging. You would need to store the data somewhere and then find a way to graph it (either via a web request or something more manual like importing a CSV into Excel). Several options, some by storing the data on an SD card on the Arduino, others by sending the data externally to a server of your own or one out on the Internet.

The Cosm (formerly Pachube) Arduino example is a start: http://arduino.cc/en/Tutorial/CosmClient
 
Some friends and I have done something very similar at a local hackerspace (Pumping Station: One) in Chicago.

First suggestion: Ditch the Arduino, use a Raspberry Pi. I've worked with both, and while I love the Arduino, getting it on the Internet is a pain. By comparison, a Raspberry Pi is a fully functioning Linux box on a board the size of a credit card. So you can run a web server on it, a SQL database to store historical data, and you can access it remotely. You've also got a wider choice of programming or scripting languages.

We used a Raspberry Pi running a PID loop we coded in Python. Temperature came from analog TMP36 sensors and an MCP3008 ADC. This is nowhere near as accurate as you can get with a DS18B20. (The Pi CAN do OneWire and can support DS18B20s; you need the Occidentalis Linux distribution Adafruit released which includes a OneWire kernel driver.) The Python code also broadcast data on a message bus to a web server which drew a graph on a web page, as well as the P, I, and D components, and it would also act as a bot on an IRC channel to inform people of the temperatures when someone asked it. We used hardwired ethernet; WiFi is possible, but you will probably need a powered USB hub because I don't think the Pi can power a USB WiFi dongle.

We chilled the fermenting chamber with a window air conditioner. The Pi can only provide 50 mA on its GPIO pins, so a solid state relay powered a much larger relay which powered the air conditioner. We used a 5 minute duty cycle with a minimum 2 minute off time time protect the compressor. Because the air temperature swings wildly, we averaged it every second over the five minute period, and used that to determine the error for the next 5 minutes. The resulting average at the end of each period was pretty tightly regulated by PID.

I've just designed a circuit board for the Pi to do this, and am releasing it as open hardware. I'm still waiting to get the board back from the board house, so I haven't debugged it. More info here.
 
Actually, you can use (unfortunately) only FEW unpowered usb wifi dongles. Just check RaspberryPi forum for detailed specs :)
 
Some friends and I have done something very similar at a local hackerspace (Pumping Station: One) in Chicago.

We chilled the fermenting chamber with a window air conditioner. The Pi can only provide 50 mA on its GPIO pins, so a solid state relay powered a much larger relay which powered the air conditioner. We used a 5 minute duty cycle with a minimum 2 minute off time time protect the compressor. Because the air temperature swings wildly, we averaged it every second over the five minute period, and used that to determine the error for the next 5 minutes. The resulting average at the end of each period was pretty tightly regulated by PID.
Your control system approach seems a bit twisted. You might try controlling the liquid temperature by placing a sensor on the outside of the fermenting vessel with some insulation over the side exposed to ambient. There is a bit of ambient temp influence on the sensor, which is beneficial when using on/off contollers and fridges/freezers because it minimizes overshoot, though you might have to retune/rewrite your PID loop (which isn't really necessary, since the thermal mass of the vessel is so much greater than the air). This will much more accurately control the temp of the actual stuff fermenting, instead of the cabinet ambient temp. Also, it will greatly prolong the life of the AC unit.

Cycling freq should be kept to a minimum, and controlling to an air temp will do the opposite. Your duty cycle should be governed by the temp diff value. A good cycle freq is 1-2/hour. You should be able to get this with .5 or 1 F as a temp diff, which is plenty tight for beer. There should be a guaranteed 'off time', as you mentioned, to protect the compressor. In practice, this limit shouldn't be in play in normal operation, so setting to 10-15 min is a much safer bet, and might save your AC unit if something starts causing rapid cooling calls. Also, if you don't have it already, some averaging/delay before triggering will prevent jitter of the sensor causing a false 'on'.

If you read the previous posts about using heat wraps for each vessel to control multiple vessels, you could easily build a system ORing all the cooling calls (in SW or HW). This would allow for only calling for cooling when needed, as opposed to a maintaining a worse case temp much colder than needed for the majority of the time. The wraps could be PID controlled, if you really want to, but the time constant is so large, the tuning essentially reverts to on/off with maybe a tiny bit of D.
 
Back
Top