How much solar hot water do I have ?

what you will get ..

My solar water heater installation

A few years ago, I installed a solar water heater. Energy from the sun is captured by solar panels on my roof, and used directly to heat water in the water heater’s tank. Unlike photovoltaic solar installation, there is no electricity involved. It works like a charm.

Solar panels transfer heat to a special fluid (red on the diagram above). An exchanger in the water tank transfer this heat to water. Hot water is flowing from the top of the tank, replaced by cold water entering at the bottom of the tank.
  • this is just a display. I need to go in the cellar to read it. I want a connected solution.
  • more importantly, this is only the water temperature at the bottom of the tank. But the hot water will come from the top of the tank.
Late morning. Sun is up. Temperature at the bottom of the tank is already 48 °C
Stratification on the left. Heating coil on the right.

My DIY connected application

My DIY solution is based on an ESP32 microcontroller, MicroPython and a couple of DS18B20 temperature sensors.

Hardware design
A DS18B20 temperature sensor. Those sensors are positioned to touch the water tank metal enclosure. I had to dig a small hole in the tank’s thermal insulation to get access to the metal. Of course I cannot get inside the water tank itself.
The two temperature sensors
The OLED screen displays various information, in particular the temperature at the top and mid point of the tank, the LIPO battery SOC (state of charge) and the Wi-Fi signal strength.
Testing on the living room table. The MicroPython application is developed with Microsoft VScode and downloaded to the ESP32 with USB (not shown)
  • ESP32 deep sleep mode. The ESP32 starts, read the temperatures and the battery charge, send those values thru Wi-Fi to my smartphone, and then goes to deep sleep for the next 10 minutes, after which the cycle restarts. While in deep sleep, the ESP32 almost does not draw any power from the battery.
  • The OLED screen and the temperature sensors are powered by the ESP32 itself. So while the ESP32 deep sleeps, those two devices are powered off as well.
3 days worth of data. Temperature (red and orange) raises in the morning, as the sun hits the panel. It drops a bit in the evening, as showers are taken. The blue line is battery state of charge.
The smartphone application.
  • robustness: a watchdog is implemented as a separate MicroPython thread (yes, you get multi threading on a 3$ microcontroller), which forces deep sleep after 60 seconds, no matter what. This covers possible hangs, loops, bugs ..etc.. Without a watchdog, the program would just stop, and sit idle, consuming power. A push notification is sent to my smartphone when the watchdog pops.
  • remote update: A jumper cable can be used to tell the ESP32 to not go to deep sleep, but instead initiate MicroPython’s web REPL (Read Evaluate Process Loop). This allows updating the MicroPython application via Wi-Fi with no need of a USB connection between your desktop and the ESP32. To replace a jumper cable with a virtual one, you can read This computer will run forever .
  • operation statistics: the application records the status of sensor readings (ok or failed), the number of failures since last hard reset, and the number of time the watchdog popped. Those statistics are stored in a specific RAM area of the ESP32, known as RTC (real time clock) memory. This memory is maintained during deep sleep while the rest of the RAM is wiped out. Those statistics are displayed on the OLED screen and sent periodically to my smartphone application. Note that the are no reasons for a sensor reading to fail. If it does, this is most likely a cable getting loose.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
pascal boudalier

pascal boudalier

Tinkering with Raspberry PI, ESP32, Solar, LifePo4, mppt, IoT, Zwave, energy harvesting, Python, MicroPython, Keras, Tensorflow, tflite, TPU. Ex Intel and HP