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
- https://www.milesburton.com/Dallas_Temperature_Control_Library
Works nicely, with a bit more time lag than the previous thermistor. Also changed code so that if one doesn't attend to the "beep" it just lets things continue to cool down.
End result: Attach:TemperatureProbePlusYobot.zip
Links
Arduino timer tutorial
- http://tronixstuff.com/2011/06/22/tutorial-arduino-timing-methods-with-millis/
- http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
Thermistor 10K
https://www.sparkfun.com/products/250
Looks like ~5k resistor for voltage divider would be good.
Relay:
Also need ~5V power supply, switch, LEDs & resistors, buzzer
Yobot Circuit: https://drive.google.com/file/d/0B58l_8LQWpQgSE55ODgtdHJpX00/view?usp=sharing
Latest version of the program V3
Basic Program
(There are some additional checks, diagnostics etc.)
Initialize
- 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;
Startup
- assign pin numbers for input, output
Main loop
- Get milliseconds (1 minute = 60000 ms)
- Read temperature on analogPin
Startup
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