Introduction: Raspberry Pi Sous Vide WIP

This project is to build a Raspberry Pi sous vide machine that can be controlled via the web or via a walk up GUI interface. The main goal is to get something fully functional for cheaper than most commercially available solutions, which start at about $200, but also be extensible.

The main functionality of this Raspberry Pi is to turn off and on an external device, like a rice cooker or hot plate, via a solid state relay. A small screen and tactile controls provide for a walk up interface, and the power of the raspberry Pi is utilized for it to run a website that can control the sous vide machine.

Parts list for this project:

Raspberry Pi Kit, $85:

This may be able to be assembled for cheaper depending on any sales going on at the time, but your mileage may vary.

Rotary Encoders, $6.50:

12v power supply for screen, $10:

3.5 inch screen, $17.57:

Cable to hook up to screen, $2:

40 amp solid state relay, $7.99:

Heatsink for relay, $5.37:

Thermal paste, $3:

Screws for relay/heatsink, $3:

Temperature sensor, $11.99:

Food safe heat shrink: $10:

Outlet, $1.19:

Tupperware or other container (Suggest using one bought locally), $15:

A lot of these could be scavenged for cheaper than buying, for example using a CPU heatsink and metal screws as a heatsink instead of buying a custom made one. I also might have chosen a nicer, bigger screen in hindsight considering how much of a pain this all was.

Step 1: The Raspberry Pi 2: Introduction

First, the Raspberry Pi 2 will be the brains of our operation. You can use this as an emulator for old systems up to the Playstation and Nintendo 64, a full linux home computer, or to control low level hardware and input. These can be bought for $35, though expect the raspberry pi, breadboard, wireless dongle, power supply and SD card to cost at least double that.

The specific kit I got and used can be found here:

Once you get this kit, place the SD card in the slot, put the Raspberry Pi heatsinks on (I suggest cleaning the chips first with an alcohol swap), and put the Raspberry Pi inside of the enclosure. There is an included ribbon cable, which you will plug in to the raspberry pi and then to the breadboard adapter. Finally, plug the breadboard adapter in to the included breadboard. The power supply goes in to the micro USB slot, and while you can use any power supply try to make sure it is at least a 2 amp supply. Finally, plug in the wireless USB dongle.

You will need to image an SD card and hook the raspberry Pi 2 up to a keyboard, mouse and monitor via HDMI.

A complete guide of setting up the raspberry Pi can be found here:

I highly suggest purchasing an SD card already imaged with NOOBS, new out of box software. You can find the guide on using NOOBS here:

Choose Raspian as your OS of choice, and once that is installed be sure to set your timezone and your keyboard nationality.

Step 2: Wiring Up the Raspberry Pi

For the purposes of testing, you are going to want to leave a USB mouse, wireless dongle (if you are using one), keyboard and monitor plugged in.

I used two rotary encoders that also featured push button for the input. The specific one I bought is here:

You will then solder these to a solderable breadboard:

The temperature sensor used is a DS18B20, which was also purchased from Amazon. It is important to note that this sensor is not food safe out of the box, the sheathing used is normal PVC wrap and would not be safe at high temperatures. You need to add a layer of food safe heat shrink.

Temperature sensor:

Heat shrink:

You will also need a 4.7k ohm resistor to pull up the data signal. This is probably best bought locally, though here is one on Amazon:

You only need one to be 1/4 watt.

You will also want some wire to hook everything up and extend things where needed.

Something like these will work:

The wire will generally be cheaper in a brick and mortar store, so your mileage may vary. 22 AWG solid wire will work for all of our purposes.

Lastly, you will want some pins in order to hook everything up to the breadboard:

This shows the final breadboard layout. The temperature sensor yellow (data) is connected to GPIO 4, with the black wire (ground) connected to the ground and the red (power) is connected to the 3.3 v header. A pull up 4.7k ohm resistor is required in order for the data to be read. GPIO 23 and 24 are the timer rotary pins, with GPIO 25 being used as the timer switch. GPIO 27 and 22 are used as the temperature rotary potentiometer pins and the TDX pin is repurposed as a GPIO pin for the temperature switch. When I saw switch, I refer to the push button feature of the knobs, as either knob can be clicked in.

Remember that there are multiple different wiring standards for the raspberry pi. Just to make it confusing, different software libraries will refer to the GPIO pin number or the physical pin number at times. Refer to the above graphic if you are having trouble matching up the pins.

Step 3: Set Up the Software

This software is still very much a work in progress, but there is a Git page for all of this software:

You will want to clone from this URL:

So in the raspberry pi, go to a terminal and type in:

git clone /home/sousvide

Change target /home/sousvide to something different if you want this project in a different folder.

Inside this git repository are a few other pages and config you will want.

The boot config.txt I used is in here, but note this already has a lot of the settings needed for the particular display I bought. You may want to edit these as necessary for your chosen display.

You will want to move the config.txt to your /boot folder, so user

sudo mv /boot/config.txt /boot/config.txtbak

To back up the config, and then

sudo mv /home/sousvide/config.txt /boot/config.txt

In order to copy the config I used. The main important thing the config does is set up device tree and additionally sets up the display settings.

rc.local is used to start up scripts, though this initial commit doesn't work for the python GUI, you still have to start that manually.

sudo mv /etc/rc.local /etc/rc.localbak

sudo mv /home/sousvide/rc.local /etc/rc.local

You will need to install some other components to get the web interface working for this.

Simply use the following commands to get Apache, MySQL and php installed:

sudo su
apt-get update && apt-get upgrade

apt-get install apache2 php5 mysql-client mysql-server tomcat6 vsftpd

This includes a lot of things we will not use in this project, but it represents a "standard" lamp setup. You can read a more full guide here:

Once you have done this, you will want to copy the index.php we have created and pulled from Git

mv /var/www/index.html /var/www/indexbak.html

mv /home/sousvide/index.php /var/www/index.php

Now, you should be able to reboot the machine and visit the IP of your machine in a web browser in order to see the web interface.

Step 4: Attach Other External Peripherals

First, a reminder that 120 volts can absolutely kill you if mishandled. We are using a relay, but you still have to be extremely careful to not touch or be near the current once it is plugged in.

Please always double and triple check that everything is unplugged and unpowered before you go messing around with this.

The clean the heatsink and relay with alcohol swaps or with a microfiber cloth, apply the thermal paste and carefully spread with a credit card. Once you have a uniform thin layer, place the relay on the heatsink and screw it down.

Note that you want to be attaching this to the flat side of the heatsink, the two ends with a U shaped hole at the bottom are where the heatsink will screw into the enclosure.

All of the color guides that follow will be for US cords and outlets, please modify where appropriate for your country!

You will need a thick grounded power cable, which should be lying around your house. An extension cord will work if it is rated for at least 15 amps, or you can use a computer power cable of a similar rating.

You will want to cut and strip the power cable at a nice short length and strip about 1/2 inch or a little over 1 cm of the wire. You will also need to remove a bit of spare wire to hook up to the relay. The green wire is the ground, which will go to the bottom offset screw.

The 12v power supply can be fed with any power cable you have lying around, I stripped and used an old computer power cable. Just be sure to feed the black to the negative and white to the positive if you are in the US, and the green (if you have a grounded connector) gets fed to the ground symbol. You will screw in the power adapter for the screen at this step to, and the red is positive/black negative for this peripheral.

For the video cable, the 3.5mm metal headphone jack goes into the raspberry pi and the Red will actually put out the video. So connect the red RCA female jack coming from the Pi to the yellow coming from the screen.


rdavis184 made it!(author)2016-01-01

Thanks for writing about this.
I need to control an attic exhaust fan to prevent attic temperature from going above freezing when there's snow on the roof and it's below freezing outside. I already have the identical parts collection.

I had terrible ice dam problems last winter when the ridge vents on my roof were buried under two feet of snow for a few weeks. I've since installed gable vents and a big fan. While this has nothing to do with sous vide, the process is nearly identical (turn on SSR when temperature goes above a certain range, turn it off when it goes below, provide interface on Pi web page) and I think I can use your software with only minor modification.

MarkG10 made it!(author)2015-08-17

I'm getting the appropriate parts to try this myself! Can't wait to see if it will work for our SmartBlocks!

MarkG10 made it!(author)2015-08-14

Hi Drew- awesome project! I'd like to know if you might be interested in modifying the script a bit for use in a project I am working on. Please email me at your convenience at .

denis.salmon made it!(author)2015-04-24

Awesome project mate. i'm starting it today.

tomatoskins made it!(author)2015-04-01

This is great! Thanks for sharing your project!