Display of countdown time

Maurice,
I can probably work this out myself but I notice that you often have great suggestions for economical Control Basic routines…

I have a 60degC hot water recirculation (pipe-warming) pump I am planning to cycle on/off for periods of about 5mins/5mins. I had the clever idea I could increase the Off-time in proportion to outdoor temp (since heat losses will be lower). Maybe the off-time might increase from 5mins for 0deg ambient up to 10 mins for 30degC ambient. I can play with the proportionality.

I also had the idea the HMI could display the time remaining for the active part of the cycle so I can see whats happening..

My starting point has been a simple TIME-ON and TIME-OFF cycle. But I dont know of a way of monitoring those timers

I had thpught about setting up the on & off times to start with a preset value (adjusted by Temp) and then count down to zero, then switch over - maybe using two For-Next loops.

And then I thought, I bet Maurice will have a smarter idea. Any suggestions?

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.