am just finishing up a project at work, which requires two water tanks to be maintained at 180F. Each tank has twin 1500 watt, 240vac heating elements, each controlled by a SSR (Solid State Relay). My Arduino Mega 2560 reads two DS18B20 temp sensors (one in each tank), and maintains the temperature with a 5 degree window.
I display both tank temperatures on a LCD, and control the color of two RGB LED’s, blue for under temp, green for correct temp, red for over temp. The photo’s are here. The following is the working code for the project.
#include <OneWire.h> #include <DallasTemperature.h> #include <LiquidCrystal.h> // Connections: // rs (LCD pin 4) to Arduino pin 12 // rw (LCD pin 5) to Arduino pin 11 // enable (LCD pin 6) to Arduino pin 10 // LCD pin 15 to Arduino pin 13 // LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2 LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
For more detail: Arduino Water Thermostat