Introduction: Multiple Fermenter Temperature Control With Arduino
Temperature control is often considered one of the top five steps towards brewing better beer. (http://beerandwinejournal.com/10-better-1/) There are numerous methods for keeping fermenting wort at the optimum temperatures from wrapping a carboy in a blanket to keep it warm in the winter to a wet towel to keep the carboy cool in the summer.
One of the challenges a fellow brewer and I encountered was how to keep two different sized carboys warm during the winter. Most fermentation temperature controllers available through the local homebrew shops have only a single temperature probe and one electric switch.
But what about multiple fermenters with different temperature requirements? It can get expensive with single probe fermentation controller for every carboy. This is where micro controllers like the Arduino, can provide extensibility to manage temperature control on multiple fermenters and grow to include a variety of other functions such as remote monitoring while still keeping cost within the range of a commercial single probe fermenter temperature control.
This Instructable is based on a presentation given to the local homebrew club a couple of months ago. While focusing primarily on keeping multiple carboys warm during the winter with heating wraps, the same methods will work for keeping carboys cool with a keezer, or even a combination the two.
Step 1: Whats Needed on the Hardware Side
(Images courtesy of Adafruit, http://www.adafruit.com and Sainsmart, http://www.sainsmart.com)
For a basic setup:
1- Arduino or similar board
2 or more - DS18B20 Digital Temperature Sensors (prewired in a stainless steel case)
1 - 4.7k resistor (for the sensors)
1 - two channel relay board
1 - LCD Display, 20x4 I2C
2 or more - carboy heat wraps, heat belts or heat pads (or other electric heat/cooling sources)
Various electric bits and piece
The DS18B20 Digital Temperature Sensors are a "one-wire" addressable sensor where all the data lines can be combined into one wire data wire to the Arduino. Other temperature sensors and probes can be used with multiple data lines.
Important note: While the DS18B20 probes are sealed in a stainless steel case and basically waterproof, it's best to use a thermowell in the carboy due to the acidic nature of fermenting wort.
Other shields can be added to the Arduino such as an Ethernet or Wi-Fi shield for remote monitoring and control.
Step 2: The Basic Setup
For the initial basic setup, it's best to use a breadboard and jumpers with the Arduino before "committing to solder".
1. With all of the DB18B20 sensors, connect all the black wires to GND and connect all the red wires to 5V. Connect all the data lines (might be green, yellow or white) to one of the Digital pins. I used Digital pin 4.
2. Connect the 4.7k pull-up resistor between the 5V and the data line. One resistor will work for all combined lines of the sensors.
3. On the 2 channel relay, connect the VCC to 5V and GND to GND on the Arduino.
4. On the 2 channel relay, connect the relay inputs, usually marked "IN1" and "IN2" to Digital pins on the Arduino. I used Digital pins 5 and 6. (Don't use 0 and 1).
Step 3: Initial Startup
- Download and import the needed One-wire Library, (http://www.pjrc.com/teensy/td_libs_OneWire.html) and DallasTemperature Library for the DS18B20 sensors, (http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library) into your Arduino IDE
- Download the "MultipleDS18B20SwitchLCD-Instructable01.zip Arduino sketch, unzip and open in the Arduino IDE.
- Upload and run the sketch on the Arduino
- Test the probes by heating or cooling each probe (place in hot or cold water.) Watch for the relay board status lights to turn on and off on the relays. There might be audio clicks as the relays open and close.
- When everything is working as expected, it time to wire in the electric sockets.
Step 4: Wire Up the Electrical Sockets
Caution: If you are uncomfortable working with household electric currents, 120v to 220v, please seek help from an electrician or a friend with experience in the safe working with higher voltages.
1. On a duplex socket, break the tab between the two brass posts (not the silver posts)
2. From the power cable, connect the ground wire, usually green, to the ground post, usually green on the duplex socket.
3. From the power cable, connect the neutral wire, usually white, to the neutral, "silver" posts on the duplex socket.
4. From the power cable, connect the "hot" usually black wire to both centre terminals of the relay. Splice wire in as needed.
5. On the relay board, connect the "open" terminal for relay 1 to the brass "hot" post of the top duplex socket. Use a red wire or black wire.
6. On the relay board, connect the "open" terminal for relay 2 to the brass "hot" post of the bottom duplex socket. Use a red wire or black wire.
7. Insulate everything and enclose in an appropriate electrical box to avoid any shocking experiences.
8. Use a multimeter or continuity tester to check all the connections and relays before applying "Full Power".
(Thanks for Fuzze Logic Brewing for a segment of the picture, http://fuzzelogicbrewing.blogspot.ca/2014/04/diy-...
Step 5: Time to Brew...
Now it's time to brew some beer, filled the carboys, connect either heating or cooling and watch the bubbles.
Instructable learning assignments
1. Add an Ethernet shield or Wireless shield to send the temperature and relay status to another display.
2. Add a keypad to the Arduino such as a LCD 16X2 display with keypad (Example: https://www.adafruit.com/products/772) to adjust temperatures and control the relays
3. With the Ethernet shield or Wireless shield, adjust the temperatures and control the relays from a web browser
4. Connect the Arduino to a Raspberry Pi for advanced data logging
5. Build a full brewing and fermentation control system.
Two resources that have helped in developing my Arduino project
Arduino Step by Step: Your Complete Guide Udemy course
Peter Dalmaris, Tech Explorer
DIY BrewPi Fermentation Controller Cheap
Fuzzy Logic Brewing
Participated in the
Digital Life 101 Challenge
Question 1 year ago
Do we have to use two probes for one fermenter? That is the only confusing thing for me right now. I plan on making this and will share images of it
6 years ago
This will be very useful to me. I don't brew beer anymore but I'm making an egg incubator and this is almost exactly what I need.
One problem. Either I've missed it on every read-through or you never mention what to do with the LCD. I assume it's connect to the same points as the sensors. Correct?
Also, was having issues with the LCD library, had to change to the following:
Just in case anyone else had issues.
Thanks a bunch.
Reply 6 years ago
Thanks for the update. For the original project described in the instructable, I used a "SainSmart 2004 20x4 LCD I2C Module" with guidance (aka "code snipping") from the Arduino Step by Step Udemy course. Like most other I2C modules, it was connected to SDA on pin A4 and SCL on pin A5 on the Arduino.
Since then I've used other LCD and OLED displays, each with their own slightly different LCD libraries that needed to be swapped in with adjustments in the code.
7 years ago
Great tips for those talented enough to brewer their own beer! Thanks for sharing!!
Reply 7 years ago
Thanks, Brewing beer (or wine) is very much like baking bread. (Beer is sometimes called "liquid bread"). You can get wort (partially baked bread), add water and yeast, wait two weeks and have beer. Or you can go "all grain" to grind the grain (mill the flour), mash, boil and ferment. Enjoy!