Home 

Turn your crock pot into a PID controlled sous vide cooker for $25

I’ve been wanting to try sous vide cooking for a long time, but my stove top efforts failed and I was put off by the price of a dedicated cooker.  The inner nerd in me could not justify spending $160 on a Sous Vide Magic when I knew it could be done with parts laying around my desk.

Here is the basic parts list. In addition to this, you would need a way to program the micro, a board to mount all this on, a 5V power supply, and a way to waterproof the sensor. All these parts are available at sparkfun.com

QTY    NAME              $$ $$
1        atmega328p           4.30
1        16MHz crystal       0.95
2        22pF cap                0.5
1        10k resistor           0.25
1        5k resistor             0.25
1        1k resistor             0.25
1        led                          0.25
1        16×2 lcd               12.00
1       relay                        4.00
1       diode                       0.25
2       buttons                   1.00
1        2N3904                  0.75
1        Dallas DS18B20     4.25
TOTAL                             24.75

This parts list does not include a power supply(5V) or a board to mount all that on, but I figure anyone that wants to take this project on has extra wall warts, and likely a bread board or some protoboard.

To waterproof my sensor I used some adhesive lined heatshrink tube I found on amazon http://www.amazon.com/gp/product/B0013HSQXW/ref=oss_product.

To use the controller you can either slice one line of your crock pot’s cord and stick the relay inline with it, or get a short extension cord and do the same. Using the extension cord doesn’t damage your crock pot, and allows you to move the controller to another crock pot… or whatever else you want to control. I set my crock pot on low and just plug the controller in. This could depend on your controller, so you may need to use a different setting.  With the PID control, once my temps settled, I never saw them vary more than +/-.5F.

Here are the results of the first time I used it. It was a roast I picked up at Costco that was cooked at 133F for 8 hours. Mmmmm

 

Sources

Eagle schematic and board layout are available on github

UPDATE: I had some boards spun up, still waiting on testing them, but here is the source.

https://github.com/fiveohhh/marleyController_Board

Code

https://github.com/fiveohhh/sousVide

20 Comments

  1. Comment by Bobby:

    I’m looking into building this, but I don’t have much experience with Arduino’s. Did you use a 328p or a 168? You’re schematic shows the 168, but you say to buy a 328.

  2. Comment by Andy:

    The pin outs for them are the same. I used a 328p, but I used a the 168 part since I couldn’t find a 328p. Either of them should work just fine.

  3. Comment by Bobby:

    N/m I should’ve realized they have the same pinout.

    However, I’m still not sure how the Dallas sensor gets connected.

  4. Comment by Bobby:

    Thanks for your response, it wasn’t coming up earlier.

  5. Comment by Jon:

    You don’t need PID to do this. That’s overkill and you’re really getting nothing from it since all you’re doing is setting the cooker on or off… You’re not giving the controller controller over the power to the heating element. The temperature will vary throughout the bath without something to churn it.

    Much easier and lighter to just make the relay turn the power on when the temp is less than the target by, say, 0.5c. Either than or come up with a way to control the element, a stirrer,

    I use a simple switch like that and I can verify that it does a great job without the complicated algorithms of PID.

    • Comment by Andy:

      Thanks for the input Jon. If I had to write the PID library or if space was limited on my micro, I would completely agree with you. But luckily, someone else went through that trouble for me and there is plenty of room left on the micro.

      Of course you could also say that using a micro, digital temp sensor, and LCD at all is overkill. As this could be done much easier and cheaper with a few op amps, a pot and $.99 thermistor:)

  6. Comment by Jon:

    You can always scale down or up, sure.

    I’m just saying from personal experience, unless you couple the micro to the heating element, the PID won’t create a present error closer than a switch based one using a on/off on a switch. The LCD and being able to set the temp digitally *does* make it easier to use.

    I’m trying constantly to work on better ways to precisely control temperatures, but I haven’t had any problem with sous vide. With mashing grains to make beer, however, in a 60 quart pot (something else I do) I’m sure I could benefit from a PID and more sensors.

  7. Comment by Andy:

    I just want to point out that I am, in a sense, giving the controller control of the heating element through PWM. It runs on an 8 second period and the controller controls the duty cycle.

    Again I agree that this is very overkill, as a simple switch with a small amount of hysteresis would be nearly as accurate. If I had the slightest idea of how to tune a PID controller the accuracy could be improved, but I basically picked a number out of a hat and used that:) I’m certain +/- .5 is plenty accurate for the purpose of this device. But I couldn’t call myself an engineer if I didn’t overly complicate a simple system… Correct?

    On a side note, I admire your all-grain brewing prowess, I myself just buy extracts:(

  8. Comment by Kevin:

    Is there a reason why I can’t see anything except the word ‘#include’ on the #include lines (it doesn’t show any .h)

  9. Comment by ahecht:

    Where is MINIMUM_ON_OFF_TIME used in the code? Is there some rounding logic missing?

    Also, I noticed a potentiometer in your picture. What was that for?

    • Comment by Andy:

      Looks like I had a thought of implementing it, but never did. Mine is currently torn apart on my desk as I was planning on rewiring it… Haven’t gotten around to it yet.

      As for the pot, that was used for contrast on the lcd.

      • Comment by ahecht:

        I finally got around to making my own crock pot sous vide system based on your example. I used an Arduino Nano instead of the bare Atmega chip, and I added a timer feature. I also tuned my PID loop a bit differently (I only used P and I) and managed to get it stable to within 0.1 degrees. I posted some details and my code at http://zansstuff.com/sous-vide

        Thanks for the inspiration!

        • Comment by Andy:

          Looks good Zan! I dropped this project awhile ago, but need to pick it back up, there is an error somewhere in my schematic… of course I pulled my working prototype apart already…. As Jon had mentioned earlier, the PID is a bit overkill. But as you said in your blog post, it was fun learning!

Leave a Reply

Your email address will not be published. Required fields are marked *