I have built a very simple generic solar diverter based on an ESP32 and Solid State Relay (SSR) that diverts excess solar power using the multi-sinewave approach. I am using it to modulate the amount of power going into resistive loads inside heaters. At the moment it uses the ESP32 software created by F1ATB. A description is available at his site https://f1atb.fr/fr/realisation-dun-routeur-photovoltaique-multi-sources-multi-modes-et-modulaire/
This is an alternative approach to the usual method of utilising an SCR to constantly chop parts out of every sinewave which generated lots of harmonics and messes up power measurement. It is also very very simple and only needs the ESP32 and SSR with no additional components at all.
I tried his method and it seems to work fairly nicely but there is a slight delay as I feed the net power measurement via MQTT from Home Assistant, so there can be a bit of overshooting of the target power of net zero. What I would like to do is use ESPhome instead and write the code there to do the SSR control.
My questions are:
Has anyone here already tried something like this or does anyone want to help as my ESPhome coding skills are more or less non-existent just now?
Is the right place for the control code inside ESPHome or is better in an HA automation which I am a lot more familiar with.
The maximum update frequency must be more than 20ms, is ESPhome happy updating at that speed?
I have DIY triac based diverter for few years now. I personally have no problems with interferences, neither power measurement.
I didn’t read your description for F1ATB, but I suggest to not route time critical info through HA/MQTT . Also Esphome loop cycle is quite long, minimum 16ms.
What device is measuring net power? Measurements could be sent directly?
ps. “multi-sinewave” aka pulse train didn.t work for me, it was my first option…
I have various ct clamp power monitors. The best has been the Aliexpress bidirectional dual power monitor and the PZEM004’s that montior specific circuits like the EV solar charger. The previous units like Current Cost Clamp meter are very affected by my triac hot water diverter when it is running
I could attach power measurement directly to the ESP32 as I did build that circuit but found it also to be very inaccurate which came down to the poor onboard ADC.
So I need the net power monitor to instruct the solar diverter every second which pulse train to output. Hopefully a 16ms loop time should be fine for that. That also means that I can schedule all the priorities for power directly from HA automations. e.g. heat the hot water first, then charge the car whilst giving the excess to the heaters etc.
I use Shelly Em for “total” energy measurement and get actual power through Shellys HTTP api to Esphome device. It’s very accurate even for small loads.