logo elektroda
logo elektroda
X
logo elektroda

Advanced DIY controller for heating utility water from a photovoltaic installation.

dgproject  52 15723 Cool? (+83)
📢 Listen (AI):
Hello everyone and thank you at the outset for your interest in this topic.

A few years ago, I described on this forum a balcony installation that still supplies my house with energy on sunny days.
https://www.elektroda.pl/rtvforum/topic3819236.html

Over time, I reduced the energy buffer from 105Ah to 65Ah, i.e. almost by half, due to the costs associated with cyclic replacement of this weakest link of the entire system.
Unfortunately, energy banks can only be afforded by people who have access to used cells, sponsor production companies on YouTube, and wealthy people - unfortunately, I do not belong to any of these groups - I am an ordinary electronics engineer with a passion.

Despite everything, my installation still works properly, protecting the devices on my farm against too high mains voltage on sunny days.

Over time, I began to optimize and measure the electrical and heating installations with the smart home system that I am building myself in my free time. To my surprise, it turned out that the biggest energy guzzler in my house was a 220-liter boiler, which was only set to heat at night.
The calculations show that the average daily energy demand for my four-person family is approximately 5.5 kWh in the period from April to November (outside the heating period).
This gives a result of approximately 1,150 kWh/year of energy demand just for maintaining domestic hot water.
I would like to mention that I regulate the temperature digitally, and the heater`s switch-off threshold is (or rather "was") 45°C with a hysteresis of 2°C.

I started counting…
-The period of reheating the buffer from the network is approximately 7 months (let`s assume 210 days).
-The boiler has an average demand of 5.5 kW/day
-Thermal losses through the tank jacket are up to 50W/h.
-This gives a daily loss of stored energy of >1kWh
-Higher losses can be achieved by using hot water circulation.
-In mid-March, the length of the day is 12H and the height of the sun above the horizon already exceeds 35°
-Theoretically, we should extract 5.5kWh from a 1.5kW PV installation on a sunny day.

I had to build a garden shed 20 meters behind the house and it was a miracle that I didn`t start making the roof from metal tiles.
The location of the garden shed was ideally south, however, I wanted to tilt the roof south for aesthetic reasons with an angle no greater than 8°, and to my surprise, using a calculator for photovoltaic installations, it turned out that in the summer, such an arrangement of the photovoltaic installation can start production at more than an hour earlier, which also applies to the end of production.
The roof surface allowed for the installation of six panels with a total power of 1440Wp.
Garden with lawn, visible small garden shed and brick buildings in the background with a rainbow in the sky.

Initially, I connected the installation using Ohm`s law directly to the heater, using the IGBT transistor as a switch. Everything worked fine, but I think I forgot something?!
Sure, MPPT…
After just a few days, it was noticeable that the installation was working poorly in the mornings and evenings, which resulted in me losing several dozen percent of efficiency. So I started searching the web for solutions.

I found a few ready-made drivers, but the price scared me a bit. After all, I had already spent PLN 1,700 for the panels with cables and connectors, and I wanted a return on the investment within, preferably, no more than 2 years.
So I kept looking and…

I came across a few designs, so I started playing.
-The first controller was simple, based on a transistor, a choke and a bit of wirework, which I prefer not to describe - the losses were still over 10%

-The next one was based on WEMOS D1 mini and ADS1115 - Unfortunately, it often crashed.
Electronic module mounted on a heatsink with visible mounting components.

-I based the next controller on the popular Arduino NANO and several readily available components. Unfortunately, even though I didn`t spend more than PLN 50 on it, since I had practically everything on hand, I wasn`t satisfied with it, because as it turned out, I didn`t have the right Mosfet transistors in stock. The resistance during conduction turned out to be very important, which one day led to the transistor being damaged and the water in the buffer almost boiling.
Printed circuit board with electronic components on a desk.
-And another...
Interior of a prototype PV controller with electronic components

-I tried to make the next drivers based on appropriately selected components and I started to figure out the pros and cons, taking into account available Open Source solutions as well as the capabilities of drivers available on the market, and here is the version of the MPPT driver, which I called
mini2nano_V2.1
View of the mini2nano_MPPT_V2.1 controller prototype with various electronic components.

Printed circuit board of the mini2nano_V2.1 project with electronic components.

MPPT controller with LCD display and Intel fan cooling.

And here are its possibilities:
-Voltage range from the PV installation <250VDC OpenCircuit (it is possible to increase the range - the IPC-2221 standard was used for PCBs).
-Maximum current <16A (It is possible to increase the range with the ACS712-30A module and by increasing the track thickness from 1oz to 2oz)
-The maximum power is therefore approximately 3.75kW
-A 200uF capacitor is used for smooth operation (buffer operation)
Set of capacitors on a metal frame
-Path topology allows for individual selection of components such as: Mosfets, Schottky diodes, drivers, capacitors, etc.)
-The MPPT P&O algorithm was used, with an efficiency exceeding 99%, with the possibility of replacing it with another one.
-Control of tank temperatures in three levels (Bottom, middle, top) - Why three sensors, you ask? The next point will explain.
- An additional output for an external relay has been implemented in case the weather is not good (the controller will connect e.g. a network heater located halfway up the tank and heat the upper part of the "Available water" buffer to a set value, e.g. 43ᵒC)
-Added the possibility of using proven cooling systems for passive elements (a 12V fan connector has been added, activated after exceeding the set temperature - initially 35ᵒC)
-The PCB has been designed so that it is possible to use computer fans with Intel LGA775, LGA155X, LGA1700 and AMD AM4 series sockets (prepared mounting holes)
-It is possible to mount the board to any heat sink using the pressure method (all passive SMD components mounted on one side of the PCB)
-It is possible to change the frequency of the PWM signal in the range of 2kHz – 17kHz.
-For temperature protection of the Mosfet transistor, an additional DS18B20 temperature sensor is used in the heat sink area)
-An additional connector has been added for individual project expansion (2x analog-digital input/output)
-An additional connector has been added for the ESP-01 Wi-Fi module or ESP-01s based on the well-known ESP8266 for data transfer to client applications such as Supla, Tasmota, Domoticz…
-It is possible to choose whether we want data transmission from Arduino Nano or a 100imp/kWh pulse signal at the ESP8266 Rx input.
-Added DS18B20 buffer temperature sensor connector on PCB for ESP-01s.
-For efficient operation, a Mosfet driver with a current capacity of 5A is used
-An RGB LED has been added to inform about the device status.
-The board is made using the lead-free method, i.e. "RoHS compilant" - if it`s ECO, it`s a bad idea.
-The program performs a full system test before starting work and during work:
-Checks the voltage range of the 12VDC power supply (The power supply allows you to extract every Watt from the panels.
-Checks buffer and mosfet temperatures.
-The device uses an LCD2004 display via the I2C bus (long-lasting and proven)
-The display will show, among others:
-Current PV voltage
-Current PV intensity
-The current power of the system.
-PWM signal drive level
-Current buffer temperatures
-Maximum daily buffer temperatures
-Current cooling system temperature
-Error messages in Polish
-Information on the status of the signal output for the additional heater
-Date
-Total daily production.
- Pinout of the display connector allows for easy installation of a display such as OLED SSD1306, however, due to the extensive Adafruit library, it is not possible to write code for multiple displays at the same time (I decided to leave the topic of OLED for dessert)
-A connector for an external button has been added if we want to mount the PCB in the box.
-Through the USB connector and UART connected to the ESP-01s connector, it is possible to set the following values:
-Date stored in EPROM memory (RTC clock removed - date will change automatically after dark)
-Temperature ranges:
-Buffer (pre-set to 65ᵒC)
-Additional external heater (pre-set to 43ᵒC)
-System cooling temperatures (pre-set at 35ᵒC)
-Additionally, via USB, UART we can:
-Call the command to start or turn off the system.
-Invoke the full test command for PWM signals showing the peak value and MPP power point
-Determining any PWM signal drive value.
-Monitor the values of analog inputs and their values converted into Amps, Volts for the purpose of calibrating the system.
-Call the intuitive MENU with a description in Polish, of course
-Erase the EPROM memory
-Send current values on request
-Inquire about historical values.

Someone will say, hey, another controller also has a graph on the display, but this one doesn`t.
That`s right. But the display used in my case costs about PLN 20, and if you insist, it is unnecessary, because thanks to the Wi-Fi module we have access to charts and history for free, as far back as we want, without additional SUBSCRIPTIONS, and best of all, we can choose which platform we send data to.
Bar chart displayed on a mobile app showing electricity consumption in kWh on March 8, 2024.
Data saved every 10 minutes.
Mobile app mini2nano_V2.1 with energy usage graph and costs.
This is the monthly production in the gloomy period of February - March

Chart of data from the mini2nano_V2.1 system showing temperatures and a counter.
Example of exporting power and temperature data to Excel from the sunny day of March 8, 2024.

You say, and another controller does not need a fan.
You don`t need this one either - all you need is a suitable radiator (sometimes we have one on hand for free)

Someone will ask - What about casing and security?
The PCB has dimensions of 98mm x 98mm - There will definitely be a dedicated box - after all, it is a DIY project.

What about DC safety?
We are on the Elektroda forum after all...
I designed the controller using the IPC-2221 standard.
All closed-mode switching power supplies have >300V DC inside the housing.
In addition, 90% of PV water heating controllers operate on direct current.


I have been developing the project for about a year and have recently been posting the progress on my YouTube channel
@mini2nano
Last year, between April and October, the PV installation successfully transferred 970kWh to the buffer, and I took less than 2kWh from the grid during the energy shortage in autumn.
In short, the installation paid for itself in half within a year.
If you liked the project, I will be very grateful for your support by subscribing to my channel and possibly Like...

About Author
dgproject
dgproject wrote 183 posts with rating 272 . Live in city Brzeg. Been with us since 2007 year.

Comments

gulson 18 Mar 2024 12:51

Thank you for sharing your solution! Mandatory reading, after all, we are implementing Fit for 55 by force. As you can see, you can do a lot on your own, while maintaining safety, of course. I like it... [Read more]

dgproject 18 Mar 2024 13:35

Thank you very much for the necessary corrections 😁 I should have the new tiles in their final version within a week. Currently, due to lack of time, there are no intro videos on YT, but I plan to change... [Read more]

gulson 18 Mar 2024 13:38

You can post here and each time the topic will be bumped up, some users are already following the topic. When it comes to software, github is irreplaceable, maybe even some people will join (pull req... [Read more]

Anonymous 18 Mar 2024 16:33

You kicked open the door ;) Complete project with sources, PCB etc: https://tnweb.tode.cz/fotovoltaicky-mppt-menic-pro-ohrev-vody-siton-210/ But each new project = more choice, so congratulations. [Read more]

dgproject 18 Mar 2024 19:07

🤔 Interesting, I didn`t look through it looking for inspiration. Initially, I tried something similar, but 50Hz really tired the capacitors and I had to choose expensive ones with a stronger ESR. Four... [Read more]

thn.technik 18 Mar 2024 19:58

Hello, yes, this project is interesting, I was particularly interested in monitoring in Supla, because I already have an energy meter there, so I would have everything in one place ;-) Are you planning... [Read more]

dgproject 18 Mar 2024 21:10

I will try to post a summary in the coming days. As of today, I can point out that the price of one set, when ordering components for one piece, will be about PLN 200 If I order components for 30 pieces,... [Read more]

Anonymous 19 Mar 2024 00:25

Gentlemen (colleagues), explain to me - a layman - why is a conversion from DC to AC needed to power the heater? [Read more]

acctr 19 Mar 2024 00:58

I don s needed [Read more]

Anonymous 19 Mar 2024 01:04

@acctr But I check the diagram of the solution indicated by my colleague Cefaloid and I see an inverter, DC input, AC output, I see an H-bridge - that`s why I ask why? [Read more]

Arek_v1 19 Mar 2024 06:15

And another one, unfortunately there is no PCB design for you to make yourself, but apparently the creator will send the PCB if you agree with him. https://projecthub.arduino.cc/stevetearle/loadmaste... [Read more]

Anonymous 19 Mar 2024 06:33

Is it so hard to scroll down to the download list? http://tnweb.tode.cz/wp-content/uploads/2022/07/Eagle-7.6.0.-BRD.zip ... http://tnweb.tode.cz/wp-content/uploads/2022/01/Stavebnice-Siton210.zip ... [Read more]

dgproject 19 Mar 2024 07:26

By using an H bridge, we can obtain alternating current that is safe for contactors, thermostats and relays when we work with a DC voltage higher than 30V, at which an arc is created as shown by the colleague... [Read more]

Anonymous 19 Mar 2024 22:26

@cefaloid @dgproject - thanks, friends - I thought it was about some nuance - I t an arc detector be better? In the USA, AFDD (Arc Fault Detection Device) is commonly installed in installations, which... [Read more]

sq3evp 20 Mar 2024 10:12

Interesting project. Did you use ready-made software or wrote something of your own? [Read more]

comer3 20 Mar 2024 11:44

Looking at the information provided by the author and sitting a bit on the topic, it can be assumed that the base software is https://projecthub.arduino.cc/stevetearle/loadmaster-xp-a-smart-pv-mppt-solar-hot-water-controller... [Read more]

dgproject 20 Mar 2024 13:34

The diode is most likely arranged parallel to the Mosfet, and yes, I admit that I based it largely on what I consider to be a very interesting project, the Loadmaster, whose work I once saw live at a friend`s... [Read more]

sigwa18 20 Mar 2024 14:44

In a similar but much simpler system, I use the stgw39nc60vd IGBT transistor via the HCPL3120 driver. Haven`t you thought about such a solution? [Read more]

dgproject 20 Mar 2024 16:03

Theoretically, it would be possible to combine them and maybe I will even test some IGBTs on this board. In the near future, I plan to build and miniaturize an IGBT-based system for heating water with... [Read more]

FAQ

TL;DR: With 970 kWh sent to the hot-water buffer in one season, this DIY controller shows that "the installation paid for itself in half within a year". It targets users who want to heat utility water directly from PV panels, avoid battery costs, and improve simple PWM heater control with low-cost MPPT and optional Wi‑Fi monitoring. [#21008889]

Why it matters: This design shows how a modest 1.44 kWp PV array can replace most grid energy for domestic hot water without adding an expensive battery bank.

Approach Main platform Reported behavior Cost / complexity
Direct PV switch to heater IGBT as simple switch Worked, but poor morning/evening performance without MPPT Lowest complexity
Wemos D1 mini + ADS1115 ESP-based controller Frequent crashes Low cost, unstable
Arduino Nano mini2nano_V2.1 Nano + MOSFET driver + sensors MPPT P&O, Wi‑Fi option, multi-point temperature control About PLN 200 for one set
Battery + 230 V inverter path Existing balcony system alternative More flexible, but battery replacement cost mattered Higher system cost

Key insight: The biggest gain did not come from bigger panels. It came from matching PV power to the heater in real time, then keeping the system simple enough to build, cool, monitor, and repair cheaply.

Quick Facts

  • The controller was designed for <250 VDC open-circuit, <16 A, and about 3.75 kW maximum power, with the option to raise current range using an ACS712-30A module and thicker copper. [#21008889]
  • The domestic hot-water load was measured at about 5.5 kWh/day for a 4-person family, giving roughly 1,150 kWh/year outside the heating season. [#21008889]
  • The PCB supports PWM frequency adjustment from 2 kHz to 17 kHz, uses a 5 A MOSFET driver, and monitors tank temperature at three levels plus heatsink temperature with an extra DS18B20. [#21008889]
  • Estimated build cost was about PLN 200 for one set, or about PLN 140 per unit for components when ordering for 30 pieces. [#21009779]
  • Increasing the input capacitor to about 200 µF stopped unacceptable voltage spikes and prevented lightning-related shutdowns seen with smaller capacitances. [#21014720]

How does the mini2nano_V2.1 controller use the MPPT P&O algorithm to heat a boiler directly from PV panels more efficiently than a simple PWM switch?

It tracks panel power and adjusts operating point instead of only chopping current. The controller uses an MPPT P&O algorithm, measures PV voltage and current, and regulates PWM so the heater sees the best available power point through the day. That matters most in the morning and evening, when the author saw simple direct switching lose several dozen percent of efficiency. He reports MPPT efficiency above 99% and live display of PV voltage, current, power, PWM level, and daily production. [#21008889]

Why did the author move from direct PV-to-heater switching with an IGBT to a dedicated MPPT controller for the 220-liter hot water tank?

He switched because direct PV-to-heater control wasted too much energy outside peak sun. The first setup used an IGBT as a simple switch and heated the 220-liter tank, but after a few days it was clear that morning and evening performance was poor because there was no MPPT. The tank consumed about 5.5 kWh per day, so losing several dozen percent of available PV production made the simple approach unattractive. The dedicated controller was built to recover that lost energy without buying an expensive commercial unit. [#21008889]

What is an H-bridge in a PV water-heating controller, and how does it help reduce arcing on thermostats, contactors, and relays at higher DC voltages?

"H-bridge" is a power stage that reverses output polarity, creating alternating current from DC, which helps contacts break current without sustaining a DC arc. In this project, it is discussed as a way to make the output safer for thermostats, contactors, and relays when PV voltage exceeds about 30 VDC. The author says an H-bridge can produce a square-wave output whose alternating polarity reduces arc support during disconnect events. That is why some builders prefer it where a standard AC thermostat remains in series with the heater. [#21010097]

What is AFDD (Arc Fault Detection Device), and how relevant is it in a DIY photovoltaic water-heating installation working with high DC voltage?

AFDD is mentioned here as an arc-fault detector that could add protection, but it is not presented as the main fix. The thread’s practical concern is simpler: DC above 24 V, and often several hundred volts, can sustain an arc that ordinary 230 V AC thermostats or fuses may not interrupt safely. In this build, the main safety focus stays on design choices, contact behavior, shutdown strategy, enclosure, and moisture and shock protection, not on AFDD integration. [#21016154]

What component choices made the Wemos D1 mini plus ADS1115 version unstable, while the Arduino Nano version became the main platform?

The Wemos D1 mini plus ADS1115 version was dropped because it crashed often, while the Nano proved stable in long-term use. The author first built a Wemos D1 mini controller with ADS1115, but says it often crashed. He later clarified that crashes were tied to the ESP side and its Wi‑Fi use, not to Arduino. By contrast, the Nano-based controller ran reliably enough that he described it as working so smoothly he only blows dust off the heatsink once a month. [#21171880]

How should I choose the MOSFET, Schottky diode, choke, and RC snubber when building a DIY MPPT water-heating controller like mini2nano_V2.1?

Choose parts for low conduction loss, thermal headroom, and your real PWM range. The author started with IRFP460, but moved toward STW74NF30 and SIHG80N60 because their parameters looked better and the price stayed acceptable. He places the Schottky diode thermally near the MOSFET, reports the PQ2614 choke reaching about 65°C mid-range, and selects the RC snubber with software rather than guesswork, using at least 1.5 W resistors. If your MOSFET has high RDS(on), overheating and even transistor failure can follow. [#21011954]

Why did the author use three DS18B20 sensors in the tank, and what problems can 1-wire temperature sensors have in a noisy high-power PWM environment?

He used three sensors to track thermal stratification in the tank. The controller measures bottom, middle, and top temperature so it can decide both how much energy is stored and when a backup heater should warm only the upper “available water” zone. "DS18B20 is a digital 1-wire temperature sensor that lets many probes share one data line, but noise sensitivity rises with long wiring and high-power switching nearby." The author first put several sensors on one 1-wire line and saw errors, then reduced that problem with cable layout, separate connections, and added shielding near the heatsink sensor. [#21011954]

What is the purpose of the extra relay output for a backup mains heater placed halfway up the tank, and how should its temperature thresholds be set?

It lets the system guarantee usable hot water when PV power is insufficient. The extra output can switch an external relay and power a mains heater located halfway up the tank, warming only the upper part of the buffer instead of the full volume. The thread gives concrete defaults: the main buffer target was preset to 65°C, while the backup heater target was preset to 43°C. That strategy reduces grid use while still keeping the top layer hot enough for bathing. [#21008889]

How can I integrate an Arduino Nano PV water-heating controller with ESP-01 or ESP-01S for Supla, Tasmota, or Domoticz monitoring without adding much cost?

Use the Nano for control and add an ESP-01 or ESP-01S only for data export. The PCB includes a dedicated connector for ESP-01/ESP-01S based on ESP8266, so you can send data to Supla, Tasmota, or Domoticz without buying a costly display with charts. The board also lets you choose either serial data from the Arduino Nano or a 100 imp/kWh pulse signal into the ESP8266 RX input. That kept the project cheap, modular, and easy to expand later. [#21008889]

What kind of Supla setup was used here: full custom ESP firmware over UART or a simple pulse counter plus DS18B20 reporting?

It used the simple option: Supla as a pulse counter plus DS18B20 temperature reporting. The author explicitly says Supla was configured as a pulse counter, and later confirms that the graphs shown came from the GuiGeneric pulse-counter setup with an added DS18B20 sensor on a separate board connector with pull-up resistor. He says the more advanced UART-based firmware path is available on the board, but he did not use that as the main published setup. [#21110043]

How do I estimate the real payback period of a DIY PV hot-water system when the author reports about 970 kWh transferred to the buffer and almost no grid usage?

Estimate payback from usable hot-water energy, not panel watt-peak alone. Here, the system reportedly transferred 970 kWh to the buffer between April and October, while less than 2 kWh came from the grid during autumn shortage. The author also says the installation “paid for itself in half within a year.” Use this 3-step method: 1. total your real build cost, 2. total yearly kWh that replace grid heating, 3. divide cost by annual savings at your tariff. The same thread cites about PLN 1,700 for panels, cables, and connectors. [#21008889]

What is the practical difference between heating domestic hot water from PV panels with a dedicated controller versus routing the energy through a battery bank and 230 V inverter?

The dedicated controller cuts cost and avoids the battery as the weak link. The author had already reduced his energy buffer from 105 Ah to 65 Ah because cyclic battery replacement was expensive, and he concluded that used or sponsored cells are not realistic for most hobbyists. A direct PV-to-water approach also skips inverter and storage losses for this single load. In practice, he treated hot water as the main energy sink, because the 220-liter boiler consumed about 5.5 kWh per day. [#21008889]

How should I size the controller, PCB copper thickness, current sensor, and panel string for a 3 kW heater in a 400-liter tank?

Size it from voltage, current, and copper limits, not tank size alone. The published board targets under 250 VDC open-circuit, under 16 A, and about 3.75 kW with 1 oz copper. For higher current, the author suggests thicker tracks, 2 oz copper, or reinforcing exposed copper with tin, plus an ACS712-30A if you increase current range. For a 3 kW heater in a 400-liter tank, he says watts and heater resistance matter most; panel count mainly sets the workable voltage range for the MPPT stage. [#21013819]

Why did increasing the input buffer capacitor to about 200 µF solve voltage spike and lightning-related shutdown issues better than using smaller capacitors or a capacitor bank?

A larger buffer capacitor damped spikes strongly enough that the controller stopped nuisance shutdowns. The author first used smaller capacitances and saw unacceptable voltage peaks. During a lightning discharge, the recorded spike even exceeded the voltage-divider measurement range despite headroom. He says that moving to about 200 µF removed those inconveniences, while keeping the capacitor off-board and within about 20 cm made replacement easy. He rejected a bank of small electrolytics because he did not trust their durability and safety in that role. [#21014720]

Buck converter versus the simpler PWM-and-buffer approach discussed in the thread: which topology is better for a DIY PV water-heating controller in terms of efficiency, heating losses, EMI, and cost?

The thread does not settle a universal winner; it presents a tradeoff. One participant argues a true buck converter with a larger core and higher frequency, such as 80 kHz, can reduce surge current, EMI, and capacitor stress. The author answers that his simpler approach already runs cool enough, uses low-kHz Arduino control, keeps capacitor temperature near ambient, and stayed aligned with his goals: low cost, small size, and practical reliability. If you want the cheapest working DIY build, his simpler topology is the chosen compromise. [#21171476]
Generated by the language model.
%}