Precision Fermentation

blog.124

Arduino-Controlled Crock Pot Yogurt Maker.

What

A homemade thermostat attachment for a crock pot (or other electric heating device). It can be used to precisely control the temperature of the crock pot for things like yogurt fermentation.

Why

  • Making yogurt is fun. It is also way cheaper than buying it.
  • You can make yogurt on the stove or in an oven, however it is fairly temperature-sensitive.
  • I am lazy. I don’t like waiting around for the milk to sterilize; I usually end up burning it.
  • I wanted to experiment with Arduino microcontroller programming (and Fritzing) to give myself a high degree of control over my fermentation process.

Why Not

  • Electric yogurt makers already exist.
    • True, but many yogurt makers only incubate; the heating/sterilization has to be done by you on the stovetop.
  • You can also buy crock pots with thermostats.
    • I know, wanna buy me one?
  • You can buy yogurt in the store.
    • Yup. This is something I make for fun anyway. I figure I may as well combine it with other fun things I like.
  • This is boring.

How

The crock pot is attached to a relay that can switch it on or off. The relay is toggled by a microcontroller based on readings from a temperature sensor (thermistor) placed inside the crock pot.

Here’s the basic yogurt recipe (and the detailed version):

  1. Mix 1/2 gallon milk with 1 package of dry powdered milk. (This is optional, but it adds nutritional value and makes the yogurt thicker).
  2. Heat the milk to 185°F (85°C). This kills off microbes to make way for our yogurt cultures, and denatures enzymes in the milk that may interfere with yogurt culture growth.
  3. Cool the milk to 110°F (43°C). Add 2 tablespoons of already-made yogurt with active cultures, or yogurt starter.
  4. In a sealed container, ferment the yogurt for 7+ hours by keeping it as close to 100°F (38°C) as possible.

Doing things the old-fashioned way, I’d be using a stovetop and candy thermometer for steps 2 and 3, then a warm oven or a radiator for step 4. That takes a lot of attention, and uses more containers than I care to wash later. Many commercially-sold yogurt makers still require you to perform step 2 yourself.

With the Arduino setup, I use a few canning jars in a water bath inside the crock pot to ensure even heating. I submerge  the temperature sensor in the water. A voltage divider circuit is used to indirectly measure the resistance of the thermistor. In the code, I make use of the Steinhart-Hart Thermistor Equation to translate the thermistor’s resistance into temperature. This gives a pretty good idea of the temperature inside the crock pot.

In addition to the thermistor’s resistance at a given time, the Steinhart-Hart equation needs to be fed three coefficients which can be calculated from information on the  manufacturer’s data sheet based on predetermined resistances at different temperatures. Since we’ll be measuring a range between 100°F (38°C) and 185°F (85°C), I used resistance values measured at 86°F (30°C), 140°F (60°C) and 194°F (90°C) to calculate my coefficients. Here’s a simple calculator to calculate your coefficients from a given temp/resistance range, and here’s a more in-depth explanation of the math involved.

Construction

Parts list:

Thermistor Preparation

Since the temperature readings will be taken in the water bath, we need a way to keep the thermistor from getting wet. Here’s a good reference for constructing a waterproof sensor.

blog.137

Waterproof Thermistor.

I constructed my waterproof thermistor by first soldering the thermistor onto two long (~3′) lead wires, then wrapping the exposed wires with heat-shrink tubing. I slid a short length of aluminum tubing over the sensor, then used moisture-resistant shrink tubing to seal both ends. You could also use epoxy.

Relay Construction

Sparkfun.com has a great tutorial for constructing a 120V relay outlet specifically for this relay board. I recommend reading over their instructions.

Yogurt Maker Relay Assembly.

I deviated slightly by using a female connector instead of a GFCI outlet. Use the extension cord’s male end with about 12″-14″ of cord attached. Expose the three extension cord wires in the middle of the cord’s length. Cut the black wire and solder the ends to the relay board’s Load 1 and Load 2 connections. This is where the line voltage toggles on and off.

Relay Assembly: Black Wire is Soldered to Relay Board.

The three wires on the end of the cord attach to the female connector. The extension cord’s green/blue wire attaches to the green screw terminal. This is the ground wire. The black and white wires attach to the other two screw terminals. Use a connectivity tester to make sure that the larger slot receptacle is connected to the larger prong on the plug.

Female Connector Assembly: Green/Blue Wire Attaches to Green/Ground Screw.

Be careful when working with line voltage, as it can kill you. The solder points on the relay are basically live exposed wires, so use a project enclosure of some sort to keep the relay from accidentally being touched. I used a discarded plastic petroleum jelly container.

Circuit Building

Diagrams and schematics for the Arduino-controlled crockpot yogurt maker are shown below. If you haven’t yet, I’d also recommend checking out Fritzing, an open-source, cross-platform development a tool that allows users to document and share their electronics prototypes.

Fritzing offers a visual mode that allows circuits to be documented as they look in real life. This is a great feature for those of us who aren’t electrical engineers, or are just visual thinkers. The best part is that the visual mode is linked to a schematic drawn with traditional electronics symbols, which can really help electronics newbs to see the translation between visual circuit layout and schematic layout.

Yogurt Maker Circuitry Layout.

blog.143

Yogurt Maker Fritzing Diagram & Schematic.

Code

Making Yogurt

Wash Everything! Before starting, gather up all the containers, lids and stirring utensils to be used and thoroughly wash with hot, soapy water.

Ingredients: 1/2 gallon milk, 1 package dry milk, yogurt or starter culture. Let the yogurt come to room temperature before using; make sure that it contains live cultures & isn’t expired!

Add the Dry Milk to the Wet Milk. Stir Thoroughly.

Fill Containers and Place in Water Bath in Crock Pot.

Insert the Thermistor in the Water Bath (Loosely cover jars to prevent condensation from dripping in).

Plug the Crockpot into the Relay, the Relay into a Power Source.

Cover the crockpot and insulate with towels or blankets to help the heating stage go faster. The milk will heat to 185° F.

Plug the Arduino into a Computer. The Serial Monitor will give Feedback and Instructions.

After the milk has cooled to 110° F, add starter or yogurt (about a tablespoon per container).

Seal the lids tightly and incubate for 7 hours (or more) at 100°F.

It’s Yogurt! Refrigerate after opening.

by 14 years ago

RESPOND

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