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

  • 5 Years
    Five years ago tomorrow I started this blog. I was working at a job I didn't particularly like nor found mentally fulfilling, and the bl...
  • This Tesla Love-Fest Has Got To End
    Over at The Oatmeal, a popular online comic, there's a sprawling, gushing graphic about Nikola Tesla. Inside it, Edison is referred to ...
  • 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....
  • The Worst Science Idea of 2010 - Genspace Now Open For Disaster
    Here's the idea : Let's build a lab where anyone, literally anyone, can come and tinker with microorganisms. Better yet, let's m...
  • A Single Button
    When your grandchildren see F-35 fighter jets streaking through the skies above our fair country, probably at air shows and hopefully not ...
  • Hack The Body
    I have a short lunch today so I must be brief, but I wanted to point to these two articles, both published today: Monkey controls robot hand...
  • Engineering: A Bubble?
    One of the things about engineers that people forget (or don't) is that we have a really high employment rate, an average salary that ea...
  • Vaporware In It's Purest Form
    So a "small British company" claims to have built a jet engine that is going to make jet engines look like propellor engines [ re...
  • The Hero Project
    Jonah Lehrer reports on Phil Zimbardo's latest project (remember the Stanford Prison Experiment?) in San Fransisco: a school for heroes...
  • Competing Interests in Environmental Friendliness
    Bike lanes encourage cities to be more environmentally friendly. So do driverless cars. But to me they seem competing in interest. A city wi...

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