Ss Brewing Technologies Giveaway!

Home Brew Forums > Home Brewing Beer > DIY Projects > Arduino Controlled Fermentation Fridge
Reply
 
LinkBack Thread Tools
Old 08-11-2013, 07:27 PM   #1
JimmyN
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2012
Location: Bethlehem, PA
Posts: 18
Liked 7 Times on 4 Posts

Default Arduino Controlled Fermentation Fridge

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.

Components:

Arduino
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

2013-08-11-15.08.29.jpg   2013-08-11-15.07.22.jpg   2013-08-11-15.07.39.jpg   2013-08-11-15.07.51.jpg   2013-08-11-15.08.46.jpg  

__________________
JimmyN is offline
 
Reply With Quote Quick reply to this message
Old 08-11-2013, 08:22 PM   #2
RockfordWhite
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2007
Posts: 437
Liked 4 Times on 4 Posts

Default

A fermenting bucket fits in there fine?

__________________
RockfordWhite is offline
 
Reply With Quote Quick reply to this message
Old 08-11-2013, 08:55 PM   #3
JimmyN
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2012
Location: Bethlehem, PA
Posts: 18
Liked 7 Times on 4 Posts

Default

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.

2013-08-11-16.46.15.jpg  
__________________
JimmyN is offline
bgeek Likes This 
Reply With Quote Quick reply to this message
Old 08-12-2013, 08:07 PM   #4
Abhitchc
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2013
Location: Jackson, MS
Posts: 41
Liked 3 Times on 2 Posts
Likes Given: 11

Default

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.

__________________
Abhitchc is offline
 
Reply With Quote Quick reply to this message
Old 08-13-2013, 06:31 PM   #5
JimmyN
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2012
Location: Bethlehem, PA
Posts: 18
Liked 7 Times on 4 Posts

Default

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);
//Serial.begin(9600);
lcd.print("starting up");

attachInterrupt(buttonInterruptUp, tempUp, RISING);
attachInterrupt(buttonInterruptDown, tempDown, RISING);
sensors.begin();
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;

getTemp();
lcdPrint();

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);
delay(2000);
cool_count = 0;
fridge_status = COOLING;
}
rest_count++;
}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);
delay(2000);
rest_count = 0;
fridge_status = RESTING;
}
cool_count++;
}
delay(1000);
}


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;
lcdPrint();
}
}
}

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


void getTemp(){
sensors.requestTemperatures();
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.clear();
lcd.setCursor(0,0);
lcd.print("TEMP:");
lcd.setCursor(8,0);
lcd.print(tbuff);

lcd.setCursor(1,1);
lcd.print("SET:");
lcd.setCursor(8,1);
lcd.print(sbuff);
lcd.print(" ");

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

}




/************************************************** ************
LCD WIRING
http://arduino.cc/en/uploads/Tutorial/LCD_schem.png

Interrupt Debouncing
http://meandmyarduino.blogspot.com/2...nterrupts.html
better:
http://dduino.blogspot.com/2012/10/a...-tutorial.html

*/

__________________
JimmyN is offline
3
People Like This 
Reply With Quote Quick reply to this message
Old 08-13-2013, 06:44 PM   #6
JimmyN
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2012
Location: Bethlehem, PA
Posts: 18
Liked 7 Times on 4 Posts

Default

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

2013-08-13-10.39.40.jpg  
__________________
JimmyN is offline
2
People Like This 
Reply With Quote Quick reply to this message
Old 08-14-2013, 11:51 AM   #7
Abhitchc
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2013
Location: Jackson, MS
Posts: 41
Liked 3 Times on 2 Posts
Likes Given: 11

Default

Awesome. Awesome, man!

__________________
Abhitchc is offline
 
Reply With Quote Quick reply to this message
Old 01-09-2014, 02:35 AM   #8
itsbobbyagain
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2014
Posts: 16
Likes Given: 3

Default

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!

__________________
itsbobbyagain is offline
 
Reply With Quote Quick reply to this message
Old 01-09-2014, 01:51 PM   #9
VonRunkel
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2011
Location: Rotterdam, NY
Posts: 185
Liked 7 Times on 7 Posts
Likes Given: 3

Default

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

__________________
VonRunkel is offline
 
Reply With Quote Quick reply to this message
Old 01-09-2014, 02:17 PM   #10
Rockn_M
HBT_SUPPORTER.png
Feedback Score: 1 reviews
 
Rockn_M's Avatar
Recipes 
 
Join Date: Jan 2013
Location: Dallas, Tx
Posts: 844
Liked 128 Times on 99 Posts
Likes Given: 9

Default

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?

__________________
Rockn_M is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino Controlled Homebrew Stir Plate ericxjbrewer DIY Projects 3 11-14-2013 01:42 AM
JBrew's Computer + Arduino Controlled Mashing System jbrewkeggin Automated Brewing Forum 12 07-02-2013 04:05 PM
Arduino controlled fermentation chamber xrattiracer DIY Projects 31 01-20-2013 08:38 PM
Old Fridge Turned Computer Controlled Fermentation Chamber jcdillin DIY Projects 22 05-17-2011 09:39 PM
IDEA: Arduino controlled Wort Boiler dwmcqueen DIY Projects 1 10-25-2007 06:52 PM