I know that a similar question has been asked before (control power to water heater,) but prices and technology have changed, and my situation is slightly different so I am asking again.

My situation is that I have about 5kW peak solar panels, about 11kWh Li batteries and an 8kW inverter (Deye.) I am prepared to add a couple more panels if necessary.

Our electricity supply is intermittent (South Africa) and there is currently no feed-in tariff for small home systems so I have no motivation to supply power back to the grid. On sunny days, my battery (which I let discharge in the night) is usually charged up by noon, and then the rest of the solar power during the day goes to waste. I would like to add an intelligent controller to save this excess energy as heat in my hot water system.

My initial thoughts were a Raspberry Pi/Arduino based system that interrogated the inverter, determined the load, and PV generation, then (based on the currently set control algorithm) would funnel excess power to a hot water system. My current element is about 3kW, 250V.

I am a semi-retired scientist/software developer, but not an electronic engineer. I have programmed Arduinos before for semi real time applications.

solar demand, battery and consumption curve

I was wondering about using a SSR capable of switching 15 or 25 amperes at 250V, and setting it up to act like a trailing edge (or leading edge) dimmer, i.e. wave form as shown below:

trailing edge dimmer waveform

Proposed solution

With an Arduino (or Raspberry Pi) it should be easy enough to switch within millisecond accuracy to get the required percentage of the full element power.

Obviously we would also have a thermostat in the loop (either being intelligently read by the control system, or just the old simple type on/off thermostat as used in normal electrical heaters.)


  1. Is this a practical idea?
  2. Would it be better to just switch off a whole cycle (or half cycle) at a time?
  3. Will the SSR be able to switch fast enough? (The ones I have seen are 0.1msec switch on time and ~ 11msec switch off time.) Presumably you get faster switching ones.
  4. Could this damage the inverter, or place some kind of weird inductance/power factor/ (name your own bad thing here) load on the inverter?
  5. The SSRs I have seen for sale mention that they have a TRIAC inside (with built in snubber on the output). Is this good or would it be better to use something else (MOSFET maybe)?

I know that one needs adequate heat sinks, wiring thicknesses etc. for this kind of power, and would get help from electrical design people/ colleagues if I decided to go ahead with this.

  • 1
    \$\begingroup\$ Why do you want to have fast switching on the SSR ? Can't you just switch once the battery is full and switch back if the battery gets discharged? You are using SSR outside their designed purpose which is never great. \$\endgroup\$
    – Damien
    Commented Jul 4, 2022 at 11:16
  • \$\begingroup\$ Features like that are implemented in some systems already (PV ready is a trademark for this), so it's entirely doable and practical. I'd also rethink the choice of not supplying energy to the grid - I don't know the South African grid, but if you'd supply energy to the grid it could help reduce the conventional power needed and thus reduce the emissions. But if it is like in Germany bureaucratic hurdles prevent a simple solution... \$\endgroup\$
    – Arsenal
    Commented Jul 4, 2022 at 12:17
  • \$\begingroup\$ If you need to heat water, solar thermal panels may be cheaper, less complicated and safer. \$\endgroup\$
    – Solar Mike
    Commented Jul 4, 2022 at 13:12
  • \$\begingroup\$ @Damien I want a way of applying continuously variable power to the thermal element in the water heater. For example as angle of the sun changes and the panels can no longer supply the full 3kW. If not an SSR, what other switching component would you recommend? \$\endgroup\$
    – Paulus
    Commented Jul 4, 2022 at 16:07
  • \$\begingroup\$ @Arsenal, do you have a link for this? \$\endgroup\$
    – Paulus
    Commented Jul 4, 2022 at 16:26

2 Answers 2


Your triac solution ignores the fact that electrons do not store.

OK, so there you are with a 2000 watt solar surplus. You decide to divert 2000 VA into your 4000 VA water heter, by running the triac at 50%.

During the first half of the half-wave, the triac is off. The solar is pumping the 2000 VA surplus onto the grid.

During the second half of the half-wave, the triac is on. An additional 4000 VA of load is now on. 2000 VA of that comes from the surplus coming off the solar panels. The other 2000 VA comes from the grid in the normal fashion.

Nice job!

You have electron storage. Use it.

Since you already have a battery, you are better off running loads in the normal manner to keep the battery from quite reaching 100%. At 100% turn on a load, and leave it run until battery is 99%. Then turn it off and let the solar array top up the battery.

And since you're running loads on normal sine-waves instead of doing wackadoodle PWM, you can run almost any load! HVAC, dehumidification, a pecking order of loads based on demand.

By which I mean, you need to watch this video.


"I use a roughly 16 kilowatt-hour battery that I just happen to have lying around".

Rather than use your boiler to store heat energy, use your whole (efficient) house!

And that way, your storage water heater is not bouncing around at random dangerous temperatures. You need to keep the water heater at 60C to kill legionella and other bacteria, and your plan requires keeping it much lower so you have thermal headroom to store solar energy. I bet the legionella thing is news to you... it is relatively recent science and was exposed due to the Flint, Michigan water crisis.

Why not make the grid one of the dump loads?

You point out quite correctly that your power company won't give you net metering. Well then! Why back-feed the grid as a default? I would think about rerouting your solar flow so that grid back-feeding is NOT the system default, but is a low priority dump load, behind other priorities such as HVAC, dehumidification, water heater etc.

Honestly, it sounds like if your solar system never fed the grid at all, that would be fine by you. So why not just arrange the system that way in the first place? Have all these loads driven off the battery/inverter (or switched to battery/inverter as directed). Have an algorithm that shaves the top of the battery by calling for storage loads like HVAC or water heat, and the algorithm also looks at when battery is getting too low, and allows the grid to recharge the battery at those times.

If the algorithm was internet connected, it could also pull public-source data that would tell you the expected solarization in your area for the coming hours and days, and use that information for battery management. Like that video says, weatherpeople have the next day pretty well figured out.

So many design possibilities!

  • 1
    \$\begingroup\$ Harper: what is it about Legionella that was revealed in the Flint water crisis? Lukewarm water harbouring legionella has been a thing since legionella. Especailly when a lot of that water is going to end up aerosolised, but even in hottubs etc. \$\endgroup\$
    – Dan
    Commented Jul 5, 2022 at 7:55
  • 1
    \$\begingroup\$ ”During the first half of the half-wave, the triac is off. The solar is pumping the 2000 VA surplus onto the grid.” The inverter will have at least one quarter cycle worth of capacitors so that’s unlikely to happen. \$\endgroup\$
    – winny
    Commented Jul 5, 2022 at 9:05
  • 1
    \$\begingroup\$ @DanSheppard Lansing's order to "make it happen" forced Flint treatment engineers to work outside the realm of their experience, and they messed up the water treatment that normally keeps legionella and other bacteria in check. And much like Chernobyl, there were "X-factors" they just didn't know about. (the condition of legacy pipes and mineralization on those pipes). \$\endgroup\$ Commented Jul 5, 2022 at 19:30
  • 1
    \$\begingroup\$ @winny yeah we are focusing on different things. Making the sine wave isn't the problem. The problem is how the inverter is connected to the water heater and to the grid. OP seems to have the usual/normal grid-tie arrangement of them all paralleled onto one big happy bus, and once the inverter exports the sinewave, it has no control over where it goes - back to the grid or the heater. The only way the heater can prevent grid export is by jumping in front of it and absorbing the electrons. But it must do so all the time, not some. \$\endgroup\$ Commented Jul 5, 2022 at 20:10
  • 1
    \$\begingroup\$ @winny Since a triac solution would involve adding an abysmal power factor load to the grid, it would depend muchly on how meters treat poor power factor. "hostile to the customer" is certainly the answer; utilities Do Not Like low power factor. \$\endgroup\$ Commented Jul 5, 2022 at 20:56

A quick search reveals a lot of commercial solutions that do that: heat water directly with PV power. Also seem to be references for running heat pumps as well. Example: https://www.fronius.com/en/solar-energy/home-owners/products-and-solutions/heating-with-pv


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.