Making a custom sous-vide controller phase 1

September 15, 2014
Leave a Comment

What the heck is sous-vide?

Sous-vide is a method of cooking using a water bath at a highly controlled temperature. I became aware of the method in the same way most people do, the Modernist Cuisine.


The market has dedicated sous-vide cookers, or controllers that will convert a rice cooker or slower cooker into a sous-vide cooker by adding a temperature sensor and regulating the heating element.


Controllers can be bought with similar functions of what my basic controller can do, but I have plans for expansion. There are kits to make your own controller. But if you are like me, you might have most of the parts already on the shelf. And you would rather do a little work from scratch. My inspiration for this project came from an article I read in Make magazine for the Yogurt bot. My wife becomes a little nervous when a new Make magazine shows up in the mailbox.



  1. I wanted to create my own controller from parts I had on hand, and buy as few parts as I can to complete the project.
  2. I also wanted to get a better understanding of GIT, a source code management system. The last Arduino project I worked on was a test chamber that could control temperature and humidity. I interfaced that with an industrial Touchscreen that I had on hand using Modbus protocol. I have since lost the source code of the project. I did not want to have that happen again. The unit is still working flawlessly, but if I want to make a change, I’ll have to rewrite the whole project again.
  3. I want to be able to add profiles to the controller so I can set it run at temperatures for beef, pork, lamb, ect, as well as timed profiles so I can make yogurt. EG run x number of minutes at y temperature, and then x number of minutes at a different temperature.


I had on hand, an Arduino Uno, bread board, a SainSmart relay board, salvaged pc speaker, a crockpot, electrical outlet, electrical plug and the resister for the one wire sensor.

I had to buy a waterproof one wire temperature sensor, a SainSmart LCD Shield that had built in buttons.

Total cost is estimated at about $60, excluding the crock pot.



I started out slowly adding the parts I wanted to use one by one. I started with the temperature sensor and the example code that can be found with the Dallas library.

I then added the speaker, and used the example for playing melodies. I had to add the Pitch.h file to the project to make that work.

Adding the relay is simple enough, but with my setup, setting the relay pin to low would actually energize the relay coil. So I made a quick define to have RELAY_ON = 0, and RELAY_OFF = 1. This made the code cleaner to read and easier to understand. The relay sends power to the outlet when energized.

The LCD was the easiest part to integrate since it simply plugged into the Uno. But it took some work to find the code needed to set it up.

All of this is plugged into a bread board for the initial setup. This will be finalized later in a project box that I will likely design and print.


The first item to complete was setting up GIT on Windows 7 machine. It took a little reading online but it wasn’t too hard. I will not go into the process here as it can be found online.

Finding examples to build from:

I found the project for the Adafruit Kit which is intended to work with the Adafruit LCD shield and prototyping shield. I like the overall process but it would not work with the LCD shield I had.

Due to the lack of documentation of the SainSmart LCD I had to find examples of interfacing with the unit. I will have a link to the information I found to use this device.


The yogurt bot project I found in Make magazine had a good outline for making a dedicated yogurt fermentation machine. But I want more for this project.



The one-wire sensor is easy enough to use, but the library‚Äôs have to work with the newer 1.0+ of the Arduino compiler. So if you have any trouble with the sensor double check that library’s are up to date.

PID control library is used in the Adafruit project, and I want to have a pretty good temperature control setup so I am using that as well as the PID autotune code.

Speaker, as mentioned above, can play melodies, or simple tones. I am using a tone from the example for now, but I plan on changing that later.

Bringing it all together:

I like to use EditPad Pro for the coding of the sketch, and then use the Arduino IDE to compile and upload to the board. The same process can be accomplished with Notepad++. I have used Visual Micro in Visual studio before, but really didn’t care for it. The next time I have a project I think might use Atmel studio. But for now, EditPad Pro it is.



With all the pieces collected, I now have to combine them in some sort of organized mess to make a program. Setup a few defines, include a few library’s, declare a few variables and we are almost done. OK not quite done but it’s a good start.

The basic program flow will work like this:

Setup the sensor, make sure it doesn’t error out. Wait for user input to begin.

User input will decide if a profile will be run, or if the cooker will be at a set temperature. The user can also make changes to the PID tuning, and other settings.


As you can see the project is still in the development phase. It is working with the user defined setpoint. The PID still needs a little tuning to prevent overshoot, but it holds a constant temperature after it settles down from the initial temperature overshoot. I still have to add support for the profiles, additional melodies, and some serial logging. I will be modifying the Uno to prevent it from resetting when serial connection is established. I had serial debugging in the sketch but it actually caused more problems by using up too much memory and bogging down the serial buffer. I’ll slowly add it back in if needed. Of course I still have to package the whole unit up in a nice tidy box. I’ll design that later.


I am standing on the shoulders of giants. Well not really, but I did pull a lot of information from various sources to get the project to this point.