- 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 to almost 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.
1Oct2019 Two software things to change:
- 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.
- 2022: But I realize that a better solution would be to reduce the power. Do a PWM thing where after a couple hours, when the heater is "on" it is actually power cycled to heat at reduced power like 3 seconds on, 2 seconds off.
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:
- DS18B20 digital temperature probe.
- This device is already waterproof and provides a direct digital output
- Adafruit: If your sensor has three wires - Red connects to 3-5V, Blue/Black connects to ground and Yellow/White is data
- One wire communication: http://www.hobbytronics.co.uk/ds18b20-arduino
- more: https://create.arduino.cc/projecthub/TheGadgetBoy/ds18b20-digital-temperature-sensor-and-arduino-9cc806
Works nicely, with a bit more time lag than the previous thermistor.
End result: Attach:TemperatureProbePlusYobot.zip
Arduino timer tutorial
Looks like ~5k resistor for voltage divider would be good.
Also need ~5V power supply, switch, LEDs & resistors, buzzer
(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
- 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)
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