Arduino Controlled Fermentation Fridge - Home Brew Forums
Register Now For Free!

Home Brew Forums > Home Brewing Beer > DIY Projects > Fermenters > Arduino Controlled Fermentation Fridge

Thread Tools
Old 08-11-2013, 07:27 PM   #1
Jul 2012
Bethlehem, PA
Posts: 19
Liked 12 Times on 5 Posts

Its finally done! After our mid-summer heat wave and temperatures in my basement (where I normally ferment) reached 85+, I decided it was time to make a fermentation chamber. I really wanted to make my own temperature controller rather than just buy one.

I started with a magic chef mini/dorm fridge that I used in college solely for natural light- I think this is a better use. Removing the door shelving was a pain, and made a lot of foam dust. I hollowed out a small well in the remaining foam for the display, arduino, and breadboard. Yes, I used a solder-less breadboard, and know this is a dumb idea. I will eventually solder everything together. The inside of the fridge door is lined with corrugated plastic- the stuff election signs are made from. I painted the outside of the door with chalkboard paint- I love this stuff and hopefully it will encourage me to be better about recording brew date, fermentation temps, and OG's.

The relay that turns the fridge on and off is located in the back by the compressor, as well as the power brick for arduino power. Rather than tapping into the internals of the fridge, I just cranked down the factory temperature knob to max, which allows the fridge to reach ~30 degrees. I could then tap into the fridge's power cord and splice in the relay to turn it on and off. I programmed in a minimum cycle-on time of 2 minutes, which hopefully will be enough to avoid short cycling.

Overall, it keeps a temperature very well, and looks pretty awesome. I have the ability to adjust the temperature in 0.5 degree increments. It can fit two 3 gallon better bottles, or a single 6.5 gallon pail or carboy.


Arduino LCD- ebay
Sainsmart Arduino 4 channel Relays- amazon (I didn't realize they made less than 4 channel modules)
Random Resistors
Temperature Probe- DS18B20- ebay
Momentary Pushbuttons- radioshack
12v 1amp power brick- amazon
2x 80mm pc fans
Click image for larger version

Name:	2013-08-11 15.08.29.jpg
Views:	3032
Size:	36.6 KB
ID:	141175   Click image for larger version

Name:	2013-08-11 15.07.22.jpg
Views:	3142
Size:	34.0 KB
ID:	141180   Click image for larger version

Name:	2013-08-11 15.07.39.jpg
Views:	3024
Size:	42.5 KB
ID:	141181   Click image for larger version

Name:	2013-08-11 15.07.51.jpg
Views:	2884
Size:	26.1 KB
ID:	141182   Click image for larger version

Name:	2013-08-11 15.08.46.jpg
Views:	3091
Size:	33.6 KB
ID:	141183  

CameronReaper Likes This 
Reply With Quote
Old 08-11-2013, 08:22 PM   #2
Dec 2007
Posts: 449
Liked 8 Times on 7 Posts

A fermenting bucket fits in there fine?

Reply With Quote
Old 08-11-2013, 08:55 PM   #3
Jul 2012
Bethlehem, PA
Posts: 19
Liked 12 Times on 5 Posts

It fits fine. Without the door shelves, there is enough clearance for the door to shut- which is the main reason i cut them out.
Click image for larger version

Name:	2013-08-11 16.46.15.jpg
Views:	2901
Size:	38.2 KB
ID:	141207  

People Like This 
Reply With Quote
Old 08-12-2013, 08:07 PM   #4
Jan 2013
Jackson, MS
Posts: 43
Liked 3 Times on 2 Posts

Very nice. Care to share your code? I am capable of using the LCD display, but incorporating the push-button coding and menus, and adding the PID temp libraries is a little above my realm of understanding.

Reply With Quote
Old 08-13-2013, 06:31 PM   #5
Jul 2012
Bethlehem, PA
Posts: 19
Liked 12 Times on 5 Posts

I'm not sure what the best way to attach code would be, so I'm just copying and pasting. The pushbuttons don't control menus or anything, they simply increment or decrement the set temperature and then re-load the display. This is accomplished with interrupts. I was also too lazy to implement the arduino PID, so for now I just turn the compressor on when the temp gets too high, and turn it off when it gets too low.

#include <LiquidCrystal.h>
#include <OneWire.h>
#include <DallasTemperature.h>

volatile long lastDebounceTimeU = 0;
volatile long lastDebounceTimeD = 0;
#define ONE_WIRE_BUS 4
#define debounceDelay 300

byte buttonInterruptUp = 0;
byte buttonInterruptDown = 1;

LiquidCrystal lcd(12, 11, 10, 9, 8, 6);
double currentTemp = 99.0;
double setTemp = 70.00;

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

const int COOLING = 1;
const int RESTING = 0;
const double precision = 0.3; //.5 degrees precision

int minOn = 120; //2 mins
int maxOn = 3600; //1h
int minOff = 600; //10m

int rest_count;
int cool_count;
int fridge_status;
int startup_time = 10000;

const int fridge_relay = 5;

boolean tooWarm(){
return (currentTemp >= (setTemp+precision));

boolean restLongEnough(){
return (rest_count >= minOff);

boolean tooCold(){
return (currentTemp <= setTemp); //temp keeps dropping after temp is reached

boolean onLongEnough(){
return(cool_count >= minOn);

boolean onTooLong(){
return (cool_count >= maxOn);

void setup() {
digitalWrite(fridge_relay, HIGH); //start with fridge off, relay is active low

lcd.begin(16, 2);
lcd.print("starting up");

attachInterrupt(buttonInterruptUp, tempUp, RISING);
attachInterrupt(buttonInterruptDown, tempDown, RISING);
pinMode(fridge_relay, OUTPUT);
fridge_status = RESTING;
rest_count = minOff;
cool_count = 0;

void loop() {
delay(startup_time); //allow lcd to be initialized first
startup_time = 0;


if(fridge_status == RESTING){
if(tooWarm() && restLongEnough()){
//turn fridge on after temp has risen and waiting for compressor to cool down
digitalWrite(fridge_relay, LOW);
cool_count = 0;
fridge_status = COOLING;
}else{//fridge status is COOLING

if(onTooLong() || (onLongEnough() && tooCold()))
//turn the fridge off if its cool enough or compressor on too long
digitalWrite(fridge_relay, HIGH);
rest_count = 0;
fridge_status = RESTING;

void tempUp(){//dont feel like adding a debouncing circuit.. this is good enough
if((millis()-lastDebounceTimeU) > debounceDelay){
lastDebounceTimeU = millis();
if(setTemp < 100.00){
setTemp += 0.5;

void tempDown(){
if((millis()-lastDebounceTimeD) > debounceDelay){
lastDebounceTimeD = millis();
if(setTemp > 30.00){
setTemp -= 0.5;

void getTemp(){
double t = sensors.getTempFByIndex(0);
if(t > 0 && t < 120){ //faulty wiring causes weird temperatures..
currentTemp = t;

void lcdPrint(){
lcd.begin(16,2); //sometimes lcd goes blank, i guess this fixes it....
char tbuff[6];
tbuff[0] = '0'+((int)currentTemp/10%10);
tbuff[1] = '0'+((int)currentTemp%10);
tbuff[2] = '.';
tbuff[3] = '0'+((int)(currentTemp*10)%10);
tbuff[4] = '0'+((int)(currentTemp*100)%10);
tbuff[5] = '\0';

char sbuff[6];
sbuff[0] = '0'+((int)setTemp/10%10);
sbuff[1] = '0'+((int)setTemp%10);
sbuff[2] = '.';
sbuff[3] = '0'+((int)(setTemp*10)%10);
sbuff[4] = '\0';

lcd.print(" ");

//print a "*" on the display if the fridge is on
if(fridge_status == COOLING){
}else lcd.print(" ");


/************************************************** ************

Interrupt Debouncing


People Like This 
Reply With Quote
Old 08-13-2013, 06:44 PM   #6
Jul 2012
Bethlehem, PA
Posts: 19
Liked 12 Times on 5 Posts

Also, here's a pic of it's maiden voyage: fermenting a 2.5gal blonde ale featuring citra and mosaic at 68F.
Click image for larger version

Name:	2013-08-13 10.39.40.jpg
Views:	3054
Size:	39.6 KB
ID:	141556  

People Like This 
Reply With Quote
Old 08-14-2013, 11:51 AM   #7
Jan 2013
Jackson, MS
Posts: 43
Liked 3 Times on 2 Posts

Awesome. Awesome, man!

Reply With Quote
Old 01-09-2014, 03:35 AM   #8
Jan 2014
Posts: 16

Great work. Can you give us an update on how its working out for you? I've been working on this same type of project for a while, but in a simpler fashion. I'm thinking to just buy the same parts you have used and give it a go.

Thanks for posting your project!

Reply With Quote
Old 01-09-2014, 02:51 PM   #9
Jul 2011
Menands, NY
Posts: 203
Liked 11 Times on 10 Posts

This is more or less what I want to do.. . Well done man.

Reply With Quote
Old 01-09-2014, 03:17 PM   #10
Rockn_M's Avatar
Jan 2013
Dallas, Tx
Posts: 1,751
Liked 378 Times on 277 Posts

Bought my parts this morning so I can do this. Let us know how it's working.

Did you wire it directly into the fridge or is it wired into a seperate plug that the andruino contorls and the fridge plugs into that power source?

Reply With Quote
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino controlled fermentation chamber xrattiracer Fermenters 32 06-12-2015 04:13 PM
Arduino Controlled Homebrew Stir Plate ericxjbrewer Chillers & Stir Plates 3 11-14-2013 02:42 AM
JBrew's Computer + Arduino Controlled Mashing System jbrewkeggin Automated Brewing Forum 12 07-02-2013 04:05 PM
Old Fridge Turned Computer Controlled Fermentation Chamber jcdillin Fermenters 22 05-17-2011 09:39 PM
IDEA: Arduino controlled Wort Boiler dwmcqueen Brew Stands 1 10-25-2007 06:52 PM

Forum Jump