Smegheid / water_heater

Running solar water heater system with a busted panel sensor from a raspberry pi
0 stars 0 forks source link

Add tank hot hysteresis #2

Open Smegheid opened 2 years ago

Smegheid commented 2 years ago

Add hysteresis between the max tank temp where the pump is turned off and the level at which the pump should be turned on again.

The pump is currently turned off when the tank reaches the MAX_TANK_TEMP threshold. It is then turned on again when the tank drops below that level (a tenth of a degree, the chosen temperature resolution limit).

At the moment this means that the pump gets turned off and there's a time delay before the system will consider turning the pump back on. This already limits the minimum period between off/on cycles to 2 minutes.

However, it feels wrong that there's no temperature-based hysteresis in play. For completeness, there should probably be a tank hot state where the system sits and waits for the tank to drop to some level below the max, maybe call it by half a degree or so. This should slow the cycle time down significantly.