Thursday, 26 July 2012

Sous Vide cooker with Arduino

Filed under: Uncategorized — Michael @ 15:28

A while back I came across Sous Vide cooking. (I also occasionally cook, among my other interests.) Sous Vide is French for “under vacuum” and refers to a style of cooking where the food is sealed in a bag and cooked at a controlled temperature in a water bath. I tried a couple of experiments using a pot of water on the stove with me as the temperature controller, switching the stove on/off while watching a thermometer. The results were certainly worthwhile and prompted me to explore the possibility of building a temperature controller using the Arduino, a very capable micro-controller hardware/software platform, and a hot plate. A search of the inter-tubes quickly showed that I was not alone and that many had traveled this or a similar road. (One reason for DIY is the relatively high cost of commercial Sous Vide appliances. At least in my case it was. And besides, hacking something together would be fun.) Most of the existing DIY attempts were either pretty crude or too sophisticated for me (and my budget). And I’m kind of a re-invent the wheel sort, anyway.
I figured a good first place to start would be to get a sketch going that would read the temperature. (‘Sketch’ is an application program in Arduino-speak.) The result is the library I described in the last post.
I knew I wanted the end result to be stand-alone and that meant some kind of user interface. The great folks at Adafruit had just introduced their LCD Shield with a 16×2 display and input buttons. I ordered one and started work on a display/menu system. Soon, I was able to set the desired temperature and display the actual vs. goal temperatures. It was easy enough, then, to send a control signal, based on the water temperature difference, to the hot plate.
Now, I needed to turn on/off the 230V mains using a 5V signal from the Arduino. The answer was a solid state relay but they aren’t cheap so I built one. I used the MOC3041M triac driver and a BT139/600 triac using the basic circuit described in the Fairchild Semi MOC3041M datasheet. The triac is mounted to a processor heatsink (way bigger than necessary) salvaged from an old PC. It easily controls power to the 230V, 1800W hot plate I am using.
Putting it all together, the first tests showed that, in concept, everything worked! But the hysteresis of the system was way too large, swinging 15-20 degrees over the goal temperature. So, simple on/off control was not going to work. A post to the Adafruit forums and within minutes I learned that what I needed was a PID control algorithm. That’s Proportional/Integral/Derivative and it’s a basic concept in systems control. I had something new to learn about! The Arduino Playground page had a couple of implementations of PID. I chose the PID Library written by Brett Beauregard. (For this purpose, it is slightly modified and is the PID_SV library in the attached code.)
I added to the menu/display code to allow setting the PID parameters and monitoring the PID output on the display. It is still just in the breadboard stage but all is working very well allowing temperature control within a couple of tenths of a degree. Here is a picture of the system spread out on my workbench.

The next step is to package this all up. For the electronics, I have a chassis that is just the right size for the hot plate to sit on. And I’ll make a separate unit to place in the pot that holds the temperature sensor and a circulation motor/propeller.
If you want to see the current state of the code, click here to download a zip file with the sketch and the necessary libraries. I have run this on the Arduino Duemilanove and Uno.

2 Comments »

  1. I am new to Arduino and I love to cook. I would like to build an arduino Sous Vide controller like you did but I need a little more information.

    Do you have a schematic, fritzing file, or larger photo of how you hooked up the arduino board to the LCD, the triac, the heater, the optoisolator, the circulation pump, and thermocouple, resistors switches etc that you would be willing to share?

    Comment by John — Sunday, 29 December 2013 @ 0:58

  2. Hi John,
    I am glad you are interested in my Sous Vide cooker and happy to share more details. I should caution you, however, that this was made ‘on the cheap’ and as much as possible from parts I had on hand. So, it doesn’t represent the best design. 😉 I would even do things differently now. For example, using a hot plate has just too much hysteresis. A better design would be to use some kind of immersion heater, I think. The software would be basically the same. You can use what I have done as a springboard and inspiration for something better, I am sure.
    Also, it is important to state that even though I consider this to be well made and safe for what I use it for, my hardware does not meet any standards for electrical safety and may actually violate regulations by just being plugged in. You have been warned.
    So, on to some details…
    First, here are a couple of pictures of the unit, front and back. (Click the links to see the images.)
    Sous Vide cooker – front
    Sous Vide cooker – rear
    The first shows the lower chassis (from an old external CD-ROM player that just happened to be the right size), the hot plate and the pot.
    The second shows the back with an IEC connector for the line cord, a 5-pin DIN connector (from old MIDI stuff) for the pump power and temperature lines and a USB connector to the Arduino. You can see the pump and temperature sensor in the pot. During use, I just use the pump’s suction feet to stick it to the side of the pot.
    The Arduino basically just monitors the temperature in the pot and turns on the hot plate for an appropriate percentage of the cycle time to hold the temperature.The cycle I use (in the software) is ten seconds and when holding the temperature the hot plate is on for less than one second out of the ten.
    Sous Vide cooker – circuitry
    In this picture, you can see the inside of the chassis. The Arduino is obvious. The Adafruit LCD/Button panel is on the left with a little buzzer above it. The main board is just a proto-board with the TRIAC controllers for the hot plate and pump (the hot plate TRIAC is on the heatsink) and a small transformer power supply for (makes about 10 volts, the Arduino regulated 5 volts is used for the LCD panel as well).
    Here is the schematic for the TRIAC controllers.
    Sous Vide cooker – TRIAC schematic
    I hope this helps. Don’t hesitate to ask any questions and keep us updated on your progress.
    Thanks,
    Michael

    Comment by Michael — Sunday, 29 December 2013 @ 18:27

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> .