PV diverter with remote load switched by MQTT

Hey guys,

I have just installed and switched on my first PV diverter. It is a bit of a custom setup so I thought I would share what I have done in case anyone else is interested.

I have an existing solar hot water system, using evacuated tubes and a circulating pump. My HWC has two elements, one in the middle and one at the bottom. The existing solar H2O system is hooked up to the middle element and gives the cylinder a boost at 4am if it is below 45 degrees. This has been working very well. In summer it never kicks in but in winter it runs every night for an hour or so to heat the cylinder up to temp.

My electricity provider pays me a nice healthy 25c/kWh for the first 150kWh exported each month, and then it drops down to 10c/kWh for anything extra. My daytime importing rate is about 34c/kWh and at night this drops to 15c/kWh. So for the first 150kWh of export I am better off collecting the 25c/kWh, and boosting the HWC at night for only 15c/kWh. But once I exceed 150kWh I am better off, by 5c/kWh, to heat the cylinder during the day (via PV diversion). 

I want to use the bottom element in the HWC for PV diversion since this will provide the greatest thermal storage. The existing solar H2O system is great only using the middle element as I only want to heat half the cylinder when boosting - it is a 350l tank!

However the HWC is in a different location to my electrical distribution board and there is only a single circuit running to the HWC. Therefore I have to be very careful to ensure that both the elements are never on at the same time, as this would exceed the load permitted on the wiring and could cause major problems!

The wiring diagram is attached. I am using a mechanical SPDT relay to ensure only one side of the circuit can ever be powered up. This is switched by the existing solar H2O controller. The N/O side of the relay is connected to the middle element and is only activated when the solar H2O controller decides it needs to boost. The N/C side of the relay is then connected to a Crydom D2425 SSR (thanks to Robin for pointing me in this direction!) which is switch by an Arduino living in my HWC cupboard (used for other automation tasks like controlling my underfloor heating system. This Arduino is controlled by my home automation software via MQTT and had a spare digital pin which I have connected directly to the SSR input.

That is it for the HWC side of the design. There is a photo attached of the finished job.

The next part of the puzzle was how to control the SSR. I have an Arduino in the cupboard next to my distribution board, with the EmonTX Arduino shield. The Arduino I am using has onboard ethernet so I have modified Robins 'continuous_monitoring' sketch to publish readings over MQTT. This has been working great for the last few months. 

For this project I added some extra features to the sketch. The first was to allow the PV diversion logic to be turned on/off via MQTT. This would allow my home automation system (openHAB) to monitor the amount of exported energy each month and only enable the PV diverter once I hit the magic 150kWh. The second part was to incorporate Robins diverter logic and modify it slightly so that I could switch my remote load via MQTT.

​I have attached the sketch. So far it is working an absolute treat! This morning I hit 150kWh of export and all of a sudden my PV diverter switched on. So far today it has been happily switching the lower element of my HWC on/off and keeping my export to an absolute minimum. 

So firstly a big thanks to Robin for his patience and guidance in helping me get to this point! I was really hoping to buy some hardware off him but due to the rather unique design I wasn't able to support his store this time. And also thanks to Robert who helped out a lot with getting my EmonTX monitoring system up and running.

I am extremely pleased with the setup. The system allows me to make automated decisions about when to enable the diverter as well as being able to override the system and boost the HWC (via the SSR) all using MQTT via openHAB. 

Due to my existing solar H2O system I will probably disable the PV diverter during the middle of summer since that is more than capable of keeping the HWC above 60 degrees. This is easily done via a rule in openHAB. 

The next phase is to build my own solar H2O controller - so that I have full control over that as well as being able to monitor the HWC temps. This would allow me to disable the PV diverter when the HWC gets hot enough, as well as provide more things to graph/monitor in EmonCMS!

So thanks to all on this great forum, I hope someone gets some use or ideas from what I have done.

Best regards, Ben


pb's picture

Re: PV diverter with remote load switched by MQTT

Sounds like you have a good setup there. Shame Meridian are changing the buyback scene:

The new rates of 10c in winter and 7c in summer essentially make it a non-starter to install a PV system.

Comment viewing options

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