Display of countdown time

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:

  1. Create the time-on and time-off variables so you can see the inner workings of the timers on your displays and such.

  2. Create a PID based on the hot water setpoint and the hot water temperature.

  3. Program the heater to be on according to the time-on and PID calculations.

  4. Debug the system and make sure it can maintain setpoint well.

  5. 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.