Introduction: Water Heater Temperature Monitor
Our water heater temperature has been varying more than it should. I wanted to track the temperature over a week to see how closely the temperature was maintained day to day.
Since I didn't see a commercial product for this purpose, I decided to make one. The project is straightforward, and I tried to keep the cost and complexity down. The timekeeping is accomplished by using the Arduino's internal timer to keep track of the days instead of a separate clock/calendar module. I used the EEPROM of the Arduino to save the high and low temperature values. For the temperature sensor, I used the LM34, which produces an analog voltage output which is proportional to the temperature. A 2x16 LCD serves as the display, and I used a 3.3 volt Arduino Pro Mini microcontroller.
For an enclosure, I used 1/8" birch plywood from the craft store.
Step 1: Materials
Arduino Pro Mini, 8Mhz, 3.3 volts Pro Mini
2x16 LCD display 2 x 16 LCD
LCD adapter I2C adapter
LM34 temperature sensor temperature sensor
5 volt dc wall power supply or DC-DC converter DC to DC
40 pin Single Row Female 2.54mm Breakable Header female header
wire #28 silicone wire hookup wire
project box of 1/8" plywood
100 ohm resistor, 1 uF capacitor, headphone wire, 2 magnets
Step 2: Construction
Since I had an existing 4 volt dc wall power supply nearby the water heater, I used a DC to DC converter to bring the 4 volts up to the 5 volts needed for the LCD display, the Pro Mini Raw power input, and the sensor. If you have a common 5 volt USB wall charger available, you won't need the DC to DC converter.
I used #22 stranded flexible silicone wire to connect between the Pro Mini and the LCD, and soldered the wire to a single row female 2.54mm 40 pin header (broken to length to provide the required number of pins) that fits onto the LCD header pins. To protect the wire from excess bending at the solder joint, apply a bit of hot glue to the end of the wires at the female header, extending the hot glue over the header.
For the remote temperature sensor wiring, I used an old set of earphones that was missing the earbuds. That wire is very flexible, and is shielded as well. I used the red colored earbud wire as positive 5 volts, the green earbud wire as ground, and the copper shield as sensor output. Add a 100 ohm resistor and 1 uF capacitor in series between ground and sensor output per the data sheet, as the sensor would otherwise have trouble driving a long high capacitance cable, resulting in fluctuating temperature readings.
Connect per circuit diagram. Note that the Pro Mini works at 3.3 volts, while the LCD works on 5 volts, and has 4.7K pullup resistors for the I2C's SCL and SDA lines. Therefore there is a current flow through the Pro Mini's internal protection diodes. This current calculates to about 0.5mA, which is within the maximum spec of 1 mA on the datasheet. There is no observed performance penalty. You could add a level shifter, or substitute a 5 volt 16 Mhz Pro Mini if it bothers you. I used the 3.3 volt version because it was what I had on hand.
Program is Water_Heater_Temp1. Copy and paste into the Arduino IDE using a USB FTDI adapter set for 3.3 volts.Test the the unit before assembling into the housing.
I used 1/8" birch plywood from the craft store to build and enclosure. The first step is to determine the length and width of the face plate which is controlled by the LCD dimensions, plus a bit of room for the side plates and extra width for the push buttons and wiring, see face plate dimensions. Install the LCD, using bits of 3/16" square wood to act as spacers to hold the LCD level to the face plate, securing the LCD, wood spacers, and face plate with hot glue. The top and bottom plates are about 36mm at either side, but shrink to 31mm at the center to fit to the contour of my water heater- make a paper template to check your heater's curvature. Use hot glue or epoxy to hold the sides and face plate together. Drill holes for the reset button and EEPROM display button, and jack for temperature probe.Hot glue magnets to the sides of the enclosure so it will can be mounted to the water heater.
Step 3: Operation and Results
Operation- original programing, 7 days of low/high temperatures stored in EEPROM
There are two buttons, one of which clears the EEPROM values back to zero. The other button displays the accumulated EEPROM minimum and maximum temperature values for 7 days; after the 7th day is displayed, the program goes back to displaying the current day's minimum and maximum.
Operation- new programing (no EEPROM storage used, Water_Heater_Temp5.ino)
I found that it was not necessary to use EEPROM, since the power is very reliable in my area. It was possible to collect 600 temperature values and display them using one button to scroll back through time in one hour increments (one temperature reading occurs every 10 minutes, so 6 readings are simultaneously displayed per hour increment) or back in total about 5 1/4 days (600 readings). Pushing the other button can move up in time, again displaying 6 readings per 1 hour period. When either the 0 button push count or the 101 button push count is reached, the unit goes back to normal operation, displaying current temperature and the rounded last 6 readings (1 hour). Since finer increments of time are now possible, the minimum and maximum temperatures were found to not be important, since they can easily be seen in the hours data readings.
The water temperature variance throughout the day is 12 degrees. It is important to calibrate the readings, because the sensor attachment point will always be lower than the actual water temperature due to the heat loss at the attachment point. One way to calibrate it is to hold the sensor under hot water from a nearby tap, then compare that reading with the reading when the sensor is attached to the water heater. I found the highest temperature reading on the water heater was at the drain valve, but even there, install insulation over the valve to get a more accurate reading. The program currently stores 7 days of minimum and maximum temperatures, but many more days could be captured by modifying the program. Also, the sampling time period can be shortened or lengthened if desired.
I did a bit of research and found that my 120 degree temperature readings were too low to kill Legionnaires disease bacteria, and in fact can promote their growth. A temperature of 140 degrees will kill the bacteria, but that produces a risk of scalding. The solution is to use a mixing valve, available at the hardware store. It is easy to install, provides a more even temperature, and increases the amount of tempered water available. So far, the water heater is operating normally. Possibly a future addition to the water heater monitor would be to monitor the pilot light, although one problem is that the glass used in the pilot light window is glass, which blocks IR radiation.
Edit: the water heater died recently. Had to buy a new one, not GE this time.
We have a be nice policy.
Please be positive and constructive.