Happy HolidaySs Giveaway - Winners Re-Re-Re-Re-Drawn - 24 hours to Claim!

Get your HBT Growlers, Shirts and Membership before the Rush!


Home Brew Forums > Home Brewing Beer > DIY Projects > Fermenters > My Ugly *but kinda sexy* temp controller
Reply
 
LinkBack Thread Tools
Old 09-15-2009, 08:27 PM   #1
thegreathoe
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2009
Location: poconos
Posts: 24
Default My Ugly *but kinda sexy* temp controller

well it's only ugly until i get it all hidden away in some kind of box. so here it is currently scattered on my lil beer fridge:



it consists of:
1 x arduino *blueish thing in the center*
1 x serial lcd *green thing on bottom*
1 x sparkfun relay kit *red item towards the top*
2 x 1-wire thermometers
tons of misc. cabeling and a few resistors and such



this pic shows the nice basic readout i currently have set on the display... it tells me temp inside the fridge and if the fridge is switched on of off on the top line, and on the bottom line is shows the room temp. to the left of the wire monster, you see a cat6 jack that i have conveniently plugged into an old patch cable that i decided to splice my internal therm to. i have it currently set to turn on when > 44deg and off when <= 41deg.



the final pic shows the nice ghetto shrink tube job i did on the therm inside the fridge.. its just temp of course. well that's basically it for now... until i get it all cleaned up and in a box. the nice thing about this is if i want to add another fridge or like 10 more, its only gonna cost me about $7 in parts and a tiny bit more code to set up each.

total price into the project sofar:
arduino = 30ish i think... idk i had it laying around
terms = 3ish each
relay setup *= at max 10 for everyhting there
serial lcd = bout 25... you can go cheap here i jsut like teh ease of only needing 1 wire instead of a bunch.
other stuff = idk.. most was laring around

code to come in a sec:

EDIT!!! schematics are on page 3!!!!!!

__________________

thegreathoe is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 08:29 PM   #2
thegreathoe
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2009
Location: poconos
Posts: 24
Default

here's teh code... basically i just snipped up some sections of code from the examples:

Code:
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.

// This is an example of how to use the DallasTemperature with two temperature
// sensors. For more information see the README.

#include <DallasTemperature.h>
#define RELAY_PIN 3


// Data wire is plugged into port 2 on the Arduino
static const int ONE_WIRE_PIN = 2;
NewOneWire oneWire(ONE_WIRE_PIN);
DallasTemperature tempSensor0(oneWire, 0);
DallasTemperature tempSensor1(oneWire, 1);

void setup(void) {
    // initialize inputs/outputs
    pinMode(RELAY_PIN, OUTPUT);
    // start serial port
    delay(2000);
    Serial.begin(9600);
    clearLCD();
    delay(500);
    Serial.print("Joe's Kegerator");
    selectLineTwo();
    Serial.print("Yup It's Kewl!");
    delay(5000);
    clearLCD();
    tempSensor0.begin();
    tempSensor1.begin();
    
    
    
}

void printId(DallasTemperature &sensor) {
    for (uint8_t i = 0; i < 8; i++) {
        Serial.print(sensor.getSlaveAddr()[i], HEX);
    }
}

void display(DallasTemperature &sensor) {
    // Ask the library whether the device is valid
    
    switch(sensor.isValid())
    {
        case 1:
            Serial.println("Invalid CRC");
            sensor.reset(); // Attempts to redetect IC
            return;
        case 2:
            Serial.println("Not a valid device");
            sensor.reset(); // Attempts to redetect IC
            return;
    }
    
 
    // getTemperature returns a float. 
    float temperature = sensor.getTemperature();     
    Serial.print(DallasTemperature::toFahrenheit(temperature)); // Use the inbuild Celcius to Fahrenheit conversion. Returns a float
    Serial.print("F ");

}

void displaywithrelay(DallasTemperature &sensor) {
    // Ask the library whether the device is valid
    
    switch(sensor.isValid())
    {
        case 1:
            Serial.println("Invalid CRC");
            sensor.reset(); // Attempts to redetect IC
            return;
        case 2:
            Serial.println("Not a valid device");
            sensor.reset(); // Attempts to redetect IC
            return;
    }
    
 
    // getTemperature returns a float. 
    float temperature = sensor.getTemperature();     
    Serial.print(DallasTemperature::toFahrenheit(temperature)); // Use the inbuild Celcius to Fahrenheit conversion. Returns a float
    Serial.print("F ");
    if (DallasTemperature::toFahrenheit(temperature) > 44 ){
      RelayHigh();
      Serial.print("On ");
    }
    if (DallasTemperature::toFahrenheit(temperature) <= 41){
      RelayLow();
      Serial.print("Off");
    }

}

void loop(void) {
    selectLineOne();
    Serial.print("In:  ");
    displaywithrelay(tempSensor0);
    selectLineTwo();
    Serial.print("Out: ");
    display(tempSensor1);
    
}


void RelayHigh(){
 digitalWrite(RELAY_PIN, HIGH);
}

void RelayLow(){
digitalWrite(RELAY_PIN, LOW);
}

void selectLineOne(){  //puts the cursor at line 0 char 0.
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(128, BYTE);    //position
}
void selectLineTwo(){  //puts the cursor at line 1 char 0.
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(192, BYTE);    //position
}
void goTo(int position) { //position = line 1: 0-15, line 2: 16-31, 31+ defaults back to 0
if (position<16){ Serial.print(0xFE, BYTE);   //command flag
              Serial.print((position+128), BYTE);    //position
}else if (position<32){Serial.print(0xFE, BYTE);   //command flag
              Serial.print((position+48+128), BYTE);    //position 
} else { goTo(0); }
}

void clearLCD(){
   Serial.print(0xFE, BYTE);   //command flag
   Serial.print(0x01, BYTE);   //clear command.
}
void backlightOn(){  //turns on the backlight
    Serial.print(0x7C, BYTE);   //command flag for backlight stuff
    Serial.print(157, BYTE);    //light level.
}
void backlightOff(){  //turns off the backlight
    Serial.print(0x7C, BYTE);   //command flag for backlight stuff
    Serial.print(128, BYTE);     //light level for off.
}
void serCommand(){   //a general function to call the command flag for issuing all other commands   
  Serial.print(0xFE, BYTE);
}
enjoy!
__________________
thegreathoe is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 08:34 PM   #3
Picobrew
Biscuit Enthusiast
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
Picobrew's Avatar
Recipes 
 
Join Date: Jan 2009
Location: NW Portland, OR
Posts: 1,109
Liked 7 Times on 5 Posts
Likes Given: 4

Default

This is sweet! Looks fun to build. I have been wanting to play with arduino.

Do you think you could post some instructions for this type of build?

__________________

Picobrew is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 08:43 PM   #4
thegreathoe
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2009
Location: poconos
Posts: 24
Default

um.. i can try... i'm not really the best instructor... and i basically learned while jsut doing a bunch of reading and trying some code out... i havnt really programmed for a good 7 years, minus some php. i just got the stuff to play around with on some free time.... i could disassemble most of it and show ya step by step if you wanted.... kinda have to do that anyways since i didnt take the time to solder everything down yet. but if you do decided to try this, i def recommend the 1-wire devices... thermistors were a pain in the ass to get all set up, and these are all precalibrated.

__________________
thegreathoe is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 10:04 PM   #5
Picobrew
Biscuit Enthusiast
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
Picobrew's Avatar
Recipes 
 
Join Date: Jan 2009
Location: NW Portland, OR
Posts: 1,109
Liked 7 Times on 5 Posts
Likes Given: 4

Default

I am a programmer so that part doesn't worry me, it's all this hardware stuff! Don't worry yet, as I'm not close to building this yet. I'll do some investigation on my own and come back with questions. thanks.

__________________
Picobrew is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 10:41 PM   #6
thegreathoe
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2009
Location: poconos
Posts: 24
Default

well cost is very minimal to get started in playing with the arduino... i think i got a package from adafruit that basically had a bunch of lil tiny starter projects in it... after i outgrew those i just started to tinker some... i say pull the trigger and go for it... you can find all sorts of nifty projects out there to do with the little board

__________________
thegreathoe is offline
 
Reply With Quote Quick reply to this message
Old 09-15-2009, 10:47 PM   #7
TwoHeadsBrewing
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2008
Location: Chico, CA
Posts: 3,930
Liked 28 Times on 25 Posts
Likes Given: 2

Default

Wow, very cool. Is this a single or dual stage temp controller?

__________________

Fermenting: ESB
Kegged: Extra IPA, Brown Ale, American Wheat, Blackheart Stout
Coming Up: Dunkleweizen, 3C Pale Ale


DIY Fermentation Chamber
More Brew Stuff
TwoHeadsBrewing is offline
 
Reply With Quote Quick reply to this message
Old 09-16-2009, 02:21 AM   #8
android
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2009
Location: Ames, Iowa
Posts: 3,117
Liked 40 Times on 32 Posts
Likes Given: 3

Default

thanks for posting this. the arduino boards look like a lot of fun to play with (great, i smell another hobby in the making!)... if you're so inclined, i would be interested to see pictures of the wire assembly and whatnot, but i imagine it would be kinda time consuming... looks really cool though, nice work. just an idea for you, I ended up pulling apart an old meat thermometer we had so i could cover my thermistor with a stainless steel probe, just kinda electrical taped the top to the wire coming out of it... makes it look tough.

one question, is that a power strip you're using for switched outlet(s)?

__________________
primary: APA

ebay temp controller | thermostat temp controller
android is offline
 
Reply With Quote Quick reply to this message
Old 09-16-2009, 02:51 AM   #9
Chumley
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2009
Location: Madison
Posts: 42
Default

Nice setup!

I've done something similar, although I just have my arduino connected to an old laptop and it's just sitting there logging the temperature of my fermentation chamber.
For the other folks that are curious about the arduino there is an awesome webpage at:
Arduino - HomePage

To wire up my thermistor I used a circuit pretty much identical to this:
Arduino playground - Thermistor

__________________
Chumley is offline
 
Reply With Quote Quick reply to this message
Old 09-16-2009, 03:11 AM   #10
cell
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2008
Location: Montreal, Canada
Posts: 102
Liked 2 Times on 2 Posts

Default

This is cool! Will you build a pcb and everything?

I'm actually building something similar using a PIC 16F877A. My LCD and my peltier unit are on its way from ebay. Meanwhile, I simulate my hardware using Isis 7; it's a ucontroller simulation software. Here's a screenshot of my project!



(I use 2x LM35 temperature sensor, 3x push-button (up,down,ok button), 1x 4-bit lcd, 1x pwm controlled peltier unit and a few LED for system information.)

__________________
cell 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
DIY Temp Controller wlampe Fermenters 1 09-14-2009 12:12 AM
Which Temp Controller To Buy Scut_Monkey Equipment/Sanitation 3 07-01-2009 07:06 PM
Attic Fan Temp Controller = Inexpensive Fermentation Controller???? Beernip General Techniques 5 06-16-2009 05:30 PM
DIY temp controller PintOfBitter Fermenters 22 12-19-2008 04:59 PM
Temp controller help Aleforge Equipment/Sanitation 10 02-04-2008 05:39 PM



Newest Threads

LATEST SPONSOR DEALS