I’ve just bought my 1st ESP 32 board and I’m looking to set it up with PWM to control a solid state relay to control an immersion heater. The heater is rated 3kw and I would like to be able to vary its power based on the level of exported power from my solar panels.
Most of the example code I’ve found relates to fan speed control, it makes sense to me but it seems to be missing anything in the ESPhome code to define the power level.
I also looked at slow_PWM but unless I’m misunderstanding the documentation slow_pwm uses a fixed duty cycle?
Any pointers on how to set this up would be hugely appreciated.
I was lead to believe that by toggling the relay on & off using the pwm capability of the esp32 it could effectively work as a dimmer.
IE if I want to run the heater at 1.5kw then it would run at 50% or on for X seconds/milliseconds on for Y seconds/milliseconds depending on the export power that the inverter is reporting to HA.
I have all done, but I’m not familiar with the specific yaml code to start sending PWM signals to GPIO4 compatebel with the M150.
Next I want to adjust the PWM signal based on the numeric value of a helper input_number.injectie.
I forgot that my heating resistors have 2kW in delta connection. I only get 1100W at 230V. That is still sufficient for me.
Here is my test setup. I am having a hard time with the programme. it would be great if someone had helpful tips.
Hi, did you proceed somehow? I’m doing same project. So far I can change ssr manually, but I’m looking for automatic setting based on excess PV energy.
I’ve kinda given up for now.
Starting to get to the time of year when there is minimal excess & my inverter doesn’t update fast enough. So HA will switch on the heater then shut it down when the export power drops off.
Need to add a CT clamp to the esp32 to monitor the load from the heater and factor out in somehow.
Or that might just be my brain trying to over engineer the problem.
I have a heating rod which consists of three individual 230 V heating rods each 1kw. Actually, my goal was to completely dim this 3kw but the dimmer of Robotdyn 24A 600V gets too hot. Thus, this dims only one heating element 1kw. alternatively, +1kw heating can be connected via two ssr.
The issue was that the SSR setting isn’t reflected in the house load.
So 100% “brightness” will see 3kw
50% may only see 800w
I don’t know if that’s because the SSRs control voltage is 4v and it’s only getting 3.3 or if it’s that the inverter only updates the load every 30 seconds and so if only showing what is seeing based on the point in the pwm that it takes its snapshot.
I tried to switch to slow pwm but couldn’t work out how to change the duty cycle from home assistant.
Yes, of course, this process should be automated at some point. For this I still need a bit of code. That’s why I created this provisional page for testing.
I know the guy who gave me advice on parts has a second esp32 with a CT monitoring his import/export power. I guess he’s using that and not to bothered about the zero crossing.
With the slow pwm surely it would negate the issue slightly if say to get ~1kw from a 3kw heater it switches on for 1 second then off 2 then even if it’s not zero it’s not as much of an issue as it would be if the pwm was cycling the relay at say 40khz?
Four months in to using HA, I’m at the stage of trying to achieve this too, as a means of efficiently using surplus solar energy. I’m not convinced any kind of PWM control will actually reduce the energy that my electricity meter will bill me for, though.
Let’s say I know my solar system is exporting a surplus of 1.5kW, so I’d like to have my 3kW immersion heater use it. If I switch it on and off with an SSR to achieve 50% PWM, however rapidly, it’s still going to alternately draw 3kW, then 0kW. So my meter will see bursts of +1.5 and -1.5kW, and I’ll still get billed for the positive bursts and be giving away the negative ones without using them.
Or am I missing something about how the meter measures PWM draws?