Dual Solar PV Diverter - With Completed Write-up

I installed 4kW PV two years back with another 3kW being installed next week. Until now I have used a 1-2 kW fan heater to 'sweep up' spare generation, hardly ideal.

A couple of weeks back I looked for commercial offerings for diverting 'spare' generation into the hot water cylinder and/or electric heating - at the same time if sun comes out. What I wanted was a fully automatic, dual-proportional diverter to heat water and heating with the option to 'bypass' the unit (automatically) to top-up overnight on Economy 7 if needed. Above all it has to look after itself and get on with the job on its own.

Obviously there are commercial options out there, but exactly what I'm looking for? Not sure. Thinking I could get out the test kit (see profile picture) and put something together, someone will have built something... Welcome to the OpenEnergyMonitor Forum!

I have an ancient Electricity Council metering CT - many years ago I built an electronic integrating meter with clockwork Economy 7 timer long before electronic meters became the norm. Unfortunately I have just the one CT though it designed for and ideal for purpose. Calypso_Rae's design appealed; its simplicity, focus on diverting power rather than gismos and gadgets, and what an opportunity to get back into writing some code too. Thanks Robin - your guidance and articles are the foundations upon which I have built my Dual Diverter.

The diverter is designed and built to handle up to 6-7kW so as to match the new PV. It offers two independent proportionally controlled outputs one each for hot water and heating. The heating can deliver the total generation of 6-7kW if needed. The diverter benefits from a front panel switch to select water or heating priority, the theory being overnight water heating at 6p / kWh is cheaper than burning heating oil when the sun is out at about 7p /kWh equivalent. The diverter switches to 'bypass' to water only from an external clock, the input being a logical true/false, 5/0V. A suite of LEDs display diverter status: Healthy, Net Import, Net Export (PV Surplus), Heating, Water, Bypass/fault, Heating Priority. A test push-button completes the front panel.

The circuit is based on Robin's design (thanks again Robin!) although I have used a resistor divider with isolation capacitors for mains voltage monitoring. The output from capacitors drives the second half of the voltage reference (Vref) op-amp, a surface-mount TS912 soldered on to legs plugged into an 8-pin dual IC socket - needs must. Power for the Arduino and op-amp is derived from an old RS 6V 6VA miniature transformer with just a 1A bridge rectifier and decoupled 4700uF at 10V electrolytic. Two separate opto isolators interface the Arduino digital outputs with the gates on the triacs. The optos are mounted on a separate piece of Veroboard mounted inside the box away from the main electronics, and my fingers!

The diverter is supplied by 4mm twin and earth fed from a dedicated 32A MCB in the consumer unit. The mains voltage monitor, although currently connected within the diverter box, can be fed from a remote monitoring point within the consumer unit. I have built a simple terminal box mounted adjacent to the consumer unit to terminate the CT and remote voltage monitoring, it includes a CT short such the diverter can be disconnected safely should the need arise without removing the CT (solid core, by the way). I pulled in a couple of miniature twin mains cables along side the 4mm twin.

The diverter is (will be tomorrow) mounted beneath a 45A cooker isolator switch in the airing cupboard, about 4m electrically from the consumer unit. A socket next to diverter supports the immersion heater, a dual socket on the other side of the airing cupboard wall in the lounge, the heating.

Two pieces of code are the mainstays of the diverter. The 'Analogue Input Calibrator' is essential for calibrating the voltage reference (Vref), the main voltage (MainsV) and mains current balance in the feed from the supply meter into the consumer unit (MainsI). Mean and RMS calculations are included for all (4-off) analogue inputs.The forth analogue input monitors the bypass control input.

The 'PV Freerun DualRouter' is the body of code running the diverter. In summary it samples as per Robin's code on the positive half cycle, a while loop ensure as many measurements as possible are taken throughout every positive half-cycle. Tests show consistent measurement rates of 38-40 samples per half-cycle, should be enough. No power factor correction has been included as I could measure no perceivable phase shift on the scope when monitoring the mains voltage and current samples into the Arduino analogue inputs. Four integrators are employed to measure accumulated energy for triggering the water and heating triacs, plus to light the net import and export leds. A fifth integrator is effectively a total export integrator from which, in principal, the three export integrators are loaded and flushed out. All peripheral activities such as integrator logic, front panel switch monitoring and processing, led and triac firing, etc, etc is handled within the negative half-cycle, and to date I believe there is plenty more processor capacity to support future updates.

I have tested extensively (on the dining table for the past 8 days) using a 18V 32A transformer (yes, it's heavy!) fed be a Variac into a couple of good old-fashioned AVOs, a couple 3.5 digit Fluke hand-helds, a 6.5 digit Philips DVM with True RMS capability, a 4.5 digit hand-held with True RMS capability, the Tektronix scope, and 3 ancient very high current reostats - but hey, they work brilliantly and get very hot. A rheostat mimics each of domestic load, PV generation, and diverter load. Once I was happy the unit was working as expected, I have tested with 60 & 100W lamp bulbs - again with multiple turns on the CT to mimic heavier loads - a toaster rated at about 1500W, and a kettle at 2500-3000W. I had thought of using a second kettle, but then the 13A extension would likely catch fire.

I will write up more detail on the circuit design, build, and code in the next few days, I'll take and upload some photos too. I wonder how much interest there is in my design and if it may prove helpful for others? I've ideas for future enhancements and am particularly keen to implement 'anti-flicker', and if practical, accurate metering. I have a couple of 40:5A CTs (not ideal, but workable) for monitoring the water and heating feeds, from which one can derive generation with three of the four connections into the diverter being monitored.

And finally, most everything but the Arduino board, opto-isolatos and triacs was taken from a pile of bits and pieces in the loft, so a cost-effective and fun project, albeit I have been fulltime day (and night) on the case the past week.


calypso_rae's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Sounds complicated, glad to hear that the Mk2 design has been of use.

Let me know if you need any heatsinks :)

Andrewcee's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Hi Robin, All built, tested & installed working perfectly. Am fitting another 3.5kW solar next couple days but will write up my design & publish for anyone interested. Will be a big money saver for sure. Production release as installed has testing built in, power factor / phase correction, anti-flicker which is excellent, self-checking of reference voltage, heating and water priority selection, automatic Economy 7 water heating bypass - think that's it! Burnt no oil today... Thanks for posting all your work, perfect for getting me started.

Project reminded me of my time calibrating induction disk meters, acceptance testing of power station plant, although perhaps my biggest claim to fame was testing and commissioning all the control panel metering, AC tariff metering & DC metering at the French DC Link at Sellindge, Kent.

Got my dining table back today.

Cheers, Andrew

stevenma's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Hello Andrew,

I am looking forward to seeing your project's code and hardware details.

I have very recently installed 21.84kWp of PV at our office building in the North West.  It comprises 24 ~south facing 260W panels with an 8kW SolarMax 8MT2 inverter and 60 ~west facing 260W panels with a 15MT2 inverter.  Currently we are using everything we generate during weekdays but export a little at weekends.  My plan is to use that spare energy to heat one or both of our two 6kW Heatrae type water heaters used for toilet hand washing.  They seem to be quite well insulated so even if the hot water isn't used over the weekend at least it's pre-heated for Monday.  At the moment I've set the BMS timer to turn these on at the weekend to help use the spare energy.  I've also considered turning on a heater to pre-heat one of the colder offices at the weekend.

We consume 180 - 260kWhrs each 24hr weekday, around 60kWhrs on each weekend day and have a lower overnight (Economy 7) tariff which I currently use to turn the water heaters on for 30mins then off until the business day starts.

Our base load of up to 3.3kWhrs is quite high and work constantly to get this down but in addition to alarm & CCTV systems, BMS, IT equipment there are probably a lot of PCs, printers, phone chargers and the like on standby.

A Belgian friend of mine has, in his new build, high-spec home, an 'All-Off' switch by the back door which turns of everything except the essentials; exit / entrance lighting, security, fridge, freezer, TV set top box, clocks etc.  It would be good to see that implemented in new home and office builds more generally here.

I also have a 4kW system Sanyo panel and SMA system installed at home and am in the process of implementing emoncms there too.  I currently upload the SMA inverter stats to pvoutput.org using a Raspberry Pi.

I look forward to seeing the details of your system in due course.



Andrewcee's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Hello Steve, Not forgotten, been unwell, although hope to get back to it next week. I've attached my latest code releases however, for calibrating the analogue inputs and the PV Diverter. All have been extensively tested, although there may be one or two little funnies still to unravel. Any comments re improvements, eg. implementing a real-time clock, much appreciated.

Cheers, Andrew

Andrewcee's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Write-up on the way, improved code ....

Andrewcee's picture

Re: Dual Solar PV Diverter - With Completed Write-up

First Draft of write-up. Pictures and circuit diagram to follow .....

Andrewcee's picture

Re: Dual Solar PV Diverter - With Completed Write-up

Write-up complete... !!!!

Includes pictures and circuit diagram.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.