Well thanks for the nice remarks about the helpful suggestions. And yeah, you can modulate the PWM based on a PID is where I think you are headed.
I can recall a PWM example on this forum, will search it in a sec…
Found it.
I’d go deeper in this example when I have more time but here’s the general idea:
-
Create the time-on and time-off variables so you can see the inner workings of the timers on your displays and such.
-
Create a PID based on the hot water setpoint and the hot water temperature.
-
Program the heater to be on according to the time-on and PID calculations.
-
Debug the system and make sure it can maintain setpoint well.
-
Finally, create the outdoor reset forumula to adjust the hot water setpoint based on the outdoor air, pretty sure there’s an example here on the forum.