abstract engineer blogspot

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 17 April 2011

TAE's DIY Arduino Sous Vide Cooker - Part V: The Software

Posted on 13:33 by hony
Here's a graph of my temperature curve and stability at 130 degrees over about 4 hours. If you look closely you can see that upon reaching 130, it actually only needed to kick on the heat for 30 seconds about once an hour. The average temperature over the whole 4 hour run was 130.7 degrees. That's pretty damn cool, if you ask me. Click on it for a larger version.

Alright, without further ado, in the spirit of open source, here's my code. No PID control on this one, that's my Steve Jobs code, so I won't be sharing it. But as the graph above shows, this version works pretty well. Also, it includes a pretty handy serial out so you can data log the temperature as you go.

Control the temperature of a Sous-Vide Cooker. Set the temperature and minimum cook time in this program.
 
 The circuit:
 * Digital Pin 13 controls the relay for the heating element.
 * Digial Pin 12 is the heating element status indicator LED.
 * Digital Pin 11 controls the relay for the circulating fan.
 * Digital Pin 10 is the circulating fan indicator LED.
 * Analog Input Pin A0 is the first LM34 temperature sensor.
 * Analog Input Pin A1 is the second LM34 temperature sensor.
 
 
 * Note: This is an extremely simple temperature controller. For PID temperature control, look elsewhere. Perhaps v2.0.
 
 
 Created 19 Sept 2010
 By Alex Waller
 
 http://abstractedengineer.blogspot.com/2010/09/arduino-projects-1-sous-vide-cooking.html
 
 */

const int HeatingRelay =  13;    // 5V input to AC relay controlling heating element
const int HeatingLED = 12;      // LED indicating AC relay is closed
const int CircFan = 11;        // 5V input to AC relay controlling circulating fan
const int CircFanLED = 10;      // LED indicating AC relay is closed
int sensor1Pin = 0;      // Set pin for LM34 Sensor 1
int val1 = 0;            // Value 1 from LM34 Sensor 1
int sensor2Pin = 1;      // Set pin for LM34 Sensor 2
int val2 = 0;            // Value 2 from LM34 Sensor 2
double val3 = 0;         // This is the average value of val 1 and val 2

float Temp = 130;          // THIS IS WHERE YOU PICK YOUR SET TEMPERATURE
int Time = 24;            //THIS IS THE NUMBER OF HOURS YOU WANT TO RUN AT SET TEMP
float DigitalTemp = Temp;      //This is the initial value that will be replaced by the calc later
int RunTime = 0;
int OnTime = Time * 60;

void setup()   {               
  // initialize the digital pins as an output:
  pinMode(HeatingRelay, OUTPUT); 
  pinMode(HeatingLED, OUTPUT);
  pinMode(CircFan, OUTPUT);
  pinMode(CircFanLED, OUTPUT);
  Serial.begin(9600);
}

void loop()                    
{
    
  while (RunTime < OnTime)
  {
    val1 = analogRead(sensor1Pin);
    val2 = analogRead(sensor2Pin);
    val3 = (val1 + val2) / 2 *.48828125;
  if (val3 < DigitalTemp)
    {
      digitalWrite(HeatingRelay, HIGH);
      digitalWrite(HeatingLED, HIGH);
      digitalWrite(CircFan, HIGH);
      digitalWrite(CircFanLED, HIGH);
      Serial.print(DigitalTemp, DEC);
      Serial.print("\t");
      Serial.println(val3, DEC);
     
      delay(60000);
     
    }
   
  else if ( val3 >= DigitalTemp)
    {
      digitalWrite(HeatingRelay, LOW);
      digitalWrite(HeatingLED, LOW);
      digitalWrite(CircFan, LOW);
      digitalWrite(CircFanLED, LOW);
      Serial.print(DigitalTemp, DEC);
      Serial.print("\t");
      Serial.println(val3, DEC);
     
      delay(30000);
     
    }
  }
 
  RunTime++;
 
}


Good luck to you!

Recipes and images of cooked food to come.


_
Email ThisBlogThis!Share to XShare to Facebook
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • In which I criticize the antiquated feelings of Ye Olde Mechanikal Engineer
    In a Lawrence Journal World blog, Dave Klamet writes about changing trends in education, especially the increasing competitiveness of non-A...
  • The End of an Era
    Last night, the beginning of the end of the laptop officially began . Sure the iPad has been around...but with nearly 30 tablets debuting at...
  • I promise to stop writing about STEM soon. Just not yet.
    Imagine you are a tech company that makes widgets. You've gotten a factory in China to make the parts for the widgets for a tiny amount....
  • Schadenfreude
    Ran into a kid that bullied me from elementary school all the way up through my junior year of high school. He's really fat now, and dri...
  • Ross Vs. Gay Marriage
    Listening to Ross Douthat (a Catholic) try to explain that the institution of marriage will be damaged by allowing gays to marry just seems...
  • Links
    I've been terribly swamped with work the last week, and when I wasn't working, I was loudly defending gun rights. Subsequently, the ...
  • Staying abreast of technology
    TAE thinks that it is a good idea to embrace every new technology that emerges, be it Twitter, Facebook, mp3s, tablet PCs, and now the new M...
  • flash on the Droid
    made posting this much easier.
  • Being Randomly At A Movie Isn't "True Heroism'
    Now I realize I am probably making no friends when I post this, but I did feel strongly about it. What exactly makes the victims of the Auro...
  • Apex Predator Predation
    So it's a tragedy if African Lions are being massively depopulated, and "there has to be a political commitment to protect wildlif...

Blog Archive

  • ►  2013 (41)
    • ►  July (4)
    • ►  June (7)
    • ►  May (4)
    • ►  April (6)
    • ►  March (8)
    • ►  February (8)
    • ►  January (4)
  • ►  2012 (91)
    • ►  December (8)
    • ►  November (5)
    • ►  October (11)
    • ►  September (8)
    • ►  August (8)
    • ►  July (3)
    • ►  June (10)
    • ►  May (12)
    • ►  April (3)
    • ►  March (9)
    • ►  February (10)
    • ►  January (4)
  • ▼  2011 (205)
    • ►  December (11)
    • ►  November (14)
    • ►  October (10)
    • ►  September (18)
    • ►  August (18)
    • ►  July (10)
    • ►  June (15)
    • ►  May (11)
    • ▼  April (32)
      • Evolutionary Difficulties
      • TAE's DIY Arduino Sous Vide Cooker - Part VI: Ambr...
      • Your Phone vs. Occam's Razor
      • Because it's "4/20" - A quick word on drug legaliz...
      • Quote for the Day
      • Deep Thought
      • TAE's DIY Arduino Sous Vide Cooker - Part V: The S...
      • TAE's DIY Arduino Sous Vide Cooker - Part IV: Images
      • On Birtherism, Ctd
      • Curbing College Costs by Ending University Athletics
      • On Birtherism
      • The Future Loses
      • A Better Way To Cut College Costs
      • Curbing College Costs
      • TAE's DIY Arduino Sous Vide Cooker - An Update
      • In which I have to disagree with Jonah Lehrer, yet...
      • The Giving Tree/Charlie Bucket's Grandpa
      • TAE's DIY Arduino Sous Vide Cooker - Part III: The...
      • Vanity
      • Emo Moment of the Day
      • Matt Yglesias
      • Gas Tax, Ctd
      • Holy Cow What A Pinhead: Gas Tax Edition
      • The Fallacy of Oil Prices Spurring Mass Transit
      • TAE's DIY Steampunk Goggles
      • The Ethics of (not) Voting, Ctd
      • The Ryan Plan
      • Modern Non-fiction
      • The Internet on Your Brain
      • A New Environmental Policy
      • Why I'm Quitting Blogging, Ctd.
      • Why I'm Quitting Blogging
    • ►  March (24)
    • ►  February (16)
    • ►  January (26)
  • ►  2010 (163)
    • ►  December (20)
    • ►  November (20)
    • ►  October (23)
    • ►  September (28)
    • ►  August (28)
    • ►  July (29)
    • ►  June (15)
Powered by Blogger.

About Me

hony
View my complete profile