Sous-vide is a way to cook food so that the item is cooked evenly throughout and exactly at the desired temperature.  The way that sous vide achieves this is by putting the item in a plastic bag and then placing it in water that is heated to the target final temperature.  This allows the item to come up to the specified temperature, but not above since the heat being applied to the item is set exactly to the target temperature.


One of the tricks to sous vide is to be able to heat water to a desired temperature and keep it there for a long period of time.  In order to achieve this goal, we are going to use an OLinuXino, a temperature sensor, and a relay.  The OLinuXino is going to be the brains behind the operation.  It is going to use the temperature sensor to measure the temperature of the water and then interpret this information to decide whether or not to turn on the heating element connected to the relay.




Omron G2R-1 RelayOmron G2R-1 Relay

Heating Element

12 Quart Pot




Extension Cord



1k Resistor (x2)1k Resistor (x2)

100k Resistor100k Resistor

USB to One Wire Converter


OLinuXino Image

The first thing that we are going to need to do is get an operating system for the OLinuXino.  I order to interface with the temperature sensor, we are going to need a kernel that has FTDI support enabled, so that we can talk to the temperature sensor. There aren’t many images that have this enabled.  Luckily, on the olimex forum, there is one posted that does:


With R18, there is FTDI support.


Connecting the Temperature Sensor

First, start by connecting the temperature sensor to the USB to One Wire Converter like this:

IMG_1647 (1024x768).jpg

Once that is attached, then you can type in:



And you should see an entry in there like:



Excellent, that’s the USB to One Wire Converter.  Now if you list the contents of /dev, you should see an entry in there like:




That’s where the device got mapped to.  If you don’t see an entry like this, check to make sure that your kernel has FTDI support.


Reading the Temperature Using DigiTemp

We are going to read the temperature from the sensor two ways: using DigiTemp and using OWFS.  Both work just fine, so it is your choice which one to use.


Before installing any new software, it is always a good idea to update/upgrade:




To install digitemp, type in:



Before we can use digitemp, we need to create a configuration file:



Once the configuration file is created, then we can get the temperature by doing:



This should print something like:



Reading the Temperature Using OWFS

The second way to read the temperature is by using OWFS.  This method is different because it maps the sensor to the file system. Then you can read the temperature like you are reading a file.


To install OWFS, type:



Then we need to mount the sensor to the file system:




This will create a couple of directories in /mnt/1wire.  If you are using the waterproof DS18B20 temperature sensor, it should show up as 28.XXXXXXXXXXXX.  Mine showed up as 28.11175605000.  Then to read the temperature:



This should show the same temperature (in Celsius) that digitemp displayed.


(As a side note, the temperature sensor that came with the USB to One Wire Converter showed up as 10.XXXXXXXXXXXX.)


Mounting the Temperature Sensor

Now that we know how to get temperature measurements, it is time to mount it in the pot so that we can measure the temperature of the water that is inside.  To do this, start by drilling a hole in the side of the pot. From what I gather, it is best to drill the hole close towards the bottom because this gives the most accurate view into the current temperature of the water.

IMG_1649 (1024x768).jpg

A couple of tips on drilling the hole in the pot.  First, use a center punch to start the hole.  If you don’t then the drill will tend to wander.  If you don’t have one, a deck screw will work in a pinch. Second, remember to remove all of the burrs from the side of the hole.  If you don’t have a tool to do that, then use a very large drill bit and go over it lightly.  (You don’t even need a drill, you can just spin the bit with your hands.)


In order to prevent leaks, there are two things that you need to do.  First is to put an o-ring between the nut on the temperature sensor and the side of the pot.  The second thing is to use PFT tape to cover the threads.  If you do these two things your pots should not leak.  Not even a drop.

IMG_1648 (1024x768).jpg


Wiring Up the Relay

Since we are going to be dealing with 110V electricity, be extremely careful.  I’ll admit that I’m not an expert in this area, so take my advice with a grain of salt.  This worked for me, hopefully it will work for you too.


Here’s the circuit that you want to create:

OLinuXino Sous Vide.png

On the extension cord, you want to attach the end with the larger plug (hot side) through the relay.


When you connect the circuit to the OLinuXino you want to connect the +5V wire to pin 1, the GND wire to pin 2, and the GPIO wire to pin 10.  All of these pins are on GPIO-2.


The point of this circuit is to convert the 3.3V output of the OLinuXino GPIO pin into a 5V signal that the relay expects.  3.3V is not enough to get the relay to toggle on/off.


For more information about using the GPIO ports on the OLinuXino, check out this blog post.


The neat part about using pin 10 on GPIO-2 is that when you set its output high, it will also turn on LED1 (green LED next to the red power LED).


This is a good point to stop and test to make sure that everything is working correctly.  To do this, I would hook a lamp up to the extension cord and turn it on.  This way it will be very obvious when the circuit is turned on.  Then issue commands to turn the lamp on and off:



If all goes well, you should hear the relay click and the light turn on/off.


Tying It All Together

Now that we have all of the pieces, we need to put it together into one coherent system.  To do this we are going to write a small python script:



This script will turn the heating element on when the temperature measured by the sensor is less than the target temperature.  It uses the OWFS method to read the temperature.  This is a very simple way of going about the problem, but it seems to work.  The biggest problem is that this will produce a large overshoot.  Meaning that the temperature of the water will continue to rise even after the heating element is turned off.  So, give this a little time to settle down.


So, plug in the heating element, fill the pot with water and give it a try!  A great triumph like this calls for a perfectly cooked steak!