ArduinoYobot

Arduino timer tutorial

Thermistor 10K

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
Page last modified on November 03, 2016, at 10:46 AM