Biomimetics and Dextrous Manipulation Lab



  • What is it? Example of using millis() on Arduino. This started as an ME310 Arduino thing.
  • Why? There are yogurt maker appliances, but they don't do the really important part for me, which is to bring milk almost to a boil, without it boiling over and making a mess.
  • What's it made of?: RBBB Arduino kit + power relay + temperature probe + LED + rice cooker
  • How does it work?
    • Add a quart (or a liter) of milk. I use 2%.
    • YoBot heats it to just below boiling, holds it there a bit, lets it cool down. Then it starts beeping when it reaches "brew temperature" (warm, but not too hot).
    • Add a spoonful of yogurt (I like Greek) and flip the switch.
    • After ~6 hours, it will be done. If you let it go longer the yogurt gets a little tarter and denser.
  • Recommended recipes and temperatures from Oregon State

Sept 2023: Finally getting around to the duty cycle idea from May 2022.

  • On Ubuntu 22 need to do a couple of things to get the FTDI usb/serial port working
  • Uses OneWire and DallasTemperature libraries (in IDE: Sketch/Libraries and Manage libraries to add them)
  • Currently set to print temperature probe (deg C) to serial monitor every ~10s
  • This version uses duty cycle when time beyond 4 hours:

May 2022: As the yogurt thickens, the heat transfer inside the pot drops considerably. Thus a better "slow brew" solution would be to reduce the heating rate.

  • I should do a software PWM emulator where, after a couple hours, when the heater is "on" it is actually power cycled to heat at reduced power like a few seconds on, a few seconds off.
  • This is based partly on a Yobot Thermal Analysis example created for ME1

1Oct2019 Two software updates:

  • If the initial heating period is over (it's cooling down) and nobody has thrown the switch to put in "brew" mode then just let it continue to cool -- all the way to room temperature if it comes to that. This is the safest "lack of attention" solution.
  • After being in brew mode for several hours the brew temp range should reduce to brew at lower temperature (and more slowly) so that if left, for example, overnight it doesn't get overdone.
    • Also, if the yogurt goes a long time, it gets denser and convective heat transfer in the pot is poorer, so the bottom can get overcooked. Reducing the temperature mitigates this issue.

4Oct2017 update: The thermistor may have corroded. Need either a better solution for waterproofing (yogurt-proofing) or, thanks to George Toye, a better temperature solution altogether:

Works nicely, with a bit more time lag than the previous thermistor.

End result:


Arduino timer tutorial

Thermistor 10K

Looks like ~5k resistor for voltage divider would be good.


Also need ~5V power supply, switch, LEDs & resistors, buzzer

Yobot Circuit:

Latest version of the program V3

Basic Program

(There are some additional checks, diagnostics etc.)


  • set pin names
    • inputs: analogPin for thermistor; yogPin for switch "yogurt added"
    • outputs: relaypin; yellowLED; buzzer
  • define constants
    • thermistor readings (maxboil ~95C: heater off; minbrew ~40C: heater on; maxbrew ~45C: heater off; cooled; disconnected)
    • logical: neverboiled; switchval; temperature; heattime; startup;


  • assign pin numbers for input, output

Main loop

  • Get milliseconds (1 minute = 60000 ms)
  • Read temperature on analogPin

if (time < startup time)

  • check if temperature status = thermistor disconnected (complain if so)
  • check if "yogurt added" switch on (complain if so)

Heating Phase
if(time < maximum heating time && never-boiled)

  • yellow LED on
  • if temp < maxboil
    • heater relay => on;
  • if temp > maxboil
    • heater relay => off; never-boiled = false

Cool-down and Brewing

  • Yellow LED => off

if (temp < minbrew && yogurt not added)

  • Complain (Beep) to add yogurt
  • If(temp< minbrew) => heater relay on
  • If (temp>maxbrew) => heater relay off
Page last modified on September 24, 2023, at 05:41 PM