Pool Heater Controller

Years ago, I built a “passive” pool heating system where water is diverted from the pool pump through a few hundred feet of black pipe within which the water is warmed by the sun before being delivered back to the pool. I had always needed to manage the turning on and off of the diverter manually. Forgetting and leaving the pump circulating through the cool night air undid all of the work I had done to inch up the temperature over the preceding days. Having the circulator on only during the day was also sub-optimal, since the heater works best when the sun is shining. Cloud cover can result in a cooling effect, even if the ambient temperature is high. A solution that automated this process was needed.

The solution monitors pool water temperature, heated water temperature, and available sunlight and lets a program decide when to allow heated water through by engaging a solenoid (electronically controlled valve).

This is the most technically advanced project I’ve undertaken so far. The entire solution consists of two Arduino boards, multiple sensors, and a solenoid controlled valve. The circuitry of the Arduino is more complicated as it includes a relay, an external DC power supply, as well as a LCD display, toggle controls, and LED status lights. The data is all orchestrated on the cloud to allow monitoring anywhere/any time.

Components
A1Arduino ESP32 microcontroller. Monitors all on the sensors and sends data to the cloud for analysis by the other ESP32.
A2Arduino ESP32 microcontroller. Provides operator interface and monitors the sensor data on the cloud to determine if the heated water solenoid valve should be opened or closed.
BTemperature sensor. Monitors the temperature of the pool.
CTemperature sensor. Monitors the temperature of the heated water entering the pool. Heater water will enter the pool as long as it’s warmer than the pool water (B).
DUV sensor. Monitors the strength of the sunlight. Used to determine when to engage the solenoid valve.
ELED status lights. Shows the selected mode and whether the solenoid value is currently activated.
FMode selector switch. Selectable modes are Sensor (uses sensor data to determine if the solenoid should be engaged), Continuous (keeps the solenoid open continuously regardless of the sensor data), and Off.
GLCD display. Shows the pool temperature, heated water temperature, UV reading, UV threshold (value over which the solenoid will be engaged), and the time of day.
HRelay. Lets the low voltage Arduino control the higher voltage solenoid value.
IDC power supply. Provides power to the solenoid (12V DC).
JSolenoid. Sits inline with the hose that sends heated water to the pool. When energized, water is allowed to flow.