Tag Archives: cooking

Arduino Sous Vide, Version 2.0

I previously built a sous vide machine based off Seattle Food Geek’s plans but with an arduino + relay in place of the PID. It ran off a shoddy script I wrote in Python to be used with Pyfirmata. The recommended Norpro heating devices in the Seattle Food Geek blog failed within 10 uses and the Pyfirmata script required a computer to be plugged into the arduino. It worked but was hardly optimal. This new sketch is written in C and doesn’t require Pyfirmata or an additional computer to be plugged into the arduino.

Very simple, works great!

The Sketch

// A simple arduino sous vide machine sketch

void setup() {

void loop() {

// set pins and mode
// set relay pin and relay status to off
const int relay_pin = 2; 
int relay_status = LOW;
pinMode(relay_pin, OUTPUT);

int analogValue = analogRead(A0); // read the raw value for thermistor via analog pin0

// assign variables
float temperature; // the current temperature
float upper;       // the upper limit at which the relay & heat source shut off
float setpoint;    // the desired setpoint cooking temperature
float lower;       // opposite of upper
float steinhartA;  // steinhart-hart equation coefficients
float steinhartB;
float steinhartC;
float rt;          // thermistor resistance

setpoint = 60.0;   // desired cooking temperature in degrees C 
lower = setpoint - 1.0; // can manually edit cutoff values to affect hysteresis curve
upper = setpoint + 1.0;
steinhartA = 1.137699953e-3; // replace with your thermistor's unique steinhart-hart coefficients
steinhartB = 2.325339915e-4;
steinhartC = 0.9547893220e-7;

rt = 9910*(1023/float(analogValue)-1.0);
temperature = steinhartA + steinhartB*log(rt) + steinhartC*(log(rt)*log(rt)*log(rt));
temperature = (1.0/temperature)-273.15; // convert from K

Serial.println(temperature); // debug, print temp to serial

if (temperature >= upper)
relay_status = LOW; 
digitalWrite(relay_pin, relay_status);
Serial.println("RELAY OFF"); // debug, print status to serial

else if (temperature <= lower)
relay_status = HIGH;
digitalWrite(relay_pin, relay_status);
Serial.println("RELAY ON");

delay(30000);        //  30s delay between temperature reads

How to use

Use it with a thermistor, relay, and a heating device of your choice. Edit the setpoint temperature to your desired temp and be sure to edit the Steinhart-Hart values to reflect those of your thermistor. If you wish to change the temperature, you will need to upload an updated sketch (for now….).

My current setup

A few things have changed since my previous posts. Since my immersion heaters have failed, I had to find a new heating source. A commenter recommended a turkey roaster which sounds like a fantastic idea (and they look very similar to lab water baths which is a plus). I was averse to spending any more money on this project though so I scavenged around the house and am currently using a hot plate with a large stockpot on top. The stockpot holds an excess of water which helps maintain a more constant temperature and the pot + large volume of water retains heat better than the thin sterilite container used previously. Its greater size allows me to fit larger cuts of meat in it also which is a big plus. Getting heat up to the setpoint temperature no longer takes a century with the hotplate which is also very nice.

I am using a 10k ohm thermistor that I had laying around as I misplaced the old 4.7k ohm thermistor. I only mention it in case someone looks at any old posts and is left scratching their head over the sudden change in equation values.

I am using the same relay setup as described previously.


I am waiting on an Amazon shipment to come with an LCD screen. Once that arrives (hopefully within another 3 weeks… I live in a remote location!), I will feature creep this sketch to include a live temperature readout and the ability to configure setpoint temperature without needing to modify the sketch and reupload.

Further resources:

My other posts on arduino sous vide

How to use a relay with an arduino

Seattle Food Geek sous vide machine

Everything you would ever want to know about using a thermistor with an arduino

Thermistor calculator


The (sort of) Return of Good Eats

The Situation

The host and creator of the Food Network series Good Eats, Alton Brown, has been busy these last few years. From continuing his job as host of Iron Chef America and mentor on The Next Food Network Star, publishing periodical podcasts  and interviews with notable chefs and authors (Alton Browncasts), starting a new series Cutthroat Kitchen, continuing to bemuse his fans with his ridiculous post it note twitter account, and going on a nation wide food & music tour. You can say he’s been very busy and this is all well and good, but none of it compares to the pure bliss of Good Eats. It was a Bill Nye meets Julia Child mashup where the foundational science of cooking had an equal footing and airtime with the process and techniques involved in producing the episode’s dish. On a channel starved of any programs that actually taught cooking or offered any intellectual stimulation, Good Eats was king.

It was something unlike any other cooking show on the Food Network or elsewhere on television. It had no reality show theatrics and it taught you more than how to replicate a recipe, it taught you about why that recipe works and how to think about food. As someone who can assuredly say they learned how to cook nearly everything from the show, I really miss Good Eats.

Brown with his (in)famous yeast puppets
Brown with his (in)famous yeast puppets

The Rebirth of “Good Eats”

You can imagine my excitement when I stumbled across two new videos under the moniker ‘Cook Smart’ on the Alton Brown YouTube page. Looks like this is the Good Eats-esque project Brown has been hinting about for the last year. So far there are only two short web clips, one on cooking eggs in the oven and another on refrigerator organization.

Worth keeping an eye on and periodically checking for updates if you’re a ‘food fan’. Who knows, maybe even the yeast puppets will return for a clip.