nbolton / greenhouse

1 stars 0 forks source link

Watchdog reset circuit for when MC freezes #252

Open nbolton opened 2 years ago

nbolton commented 2 years ago

Problem: When the microcontroller freezes, the water heater pump will get stuck on. This causes the water to heat continuously, boil, and eventually trips the overheat protection on the heater (which may not recover; could get stuck open).

Solution 1: A heart beat circuit; perhaps a capacitor that slowly charges over 1 minute. When it reaches full charge, it either disconnects the microcontroller temporarily or pulls the reset circuit high. The microcontroller would then have to keep discharging the capacitor in order to keep the signal low. A possible design flaw is that the MC could send a false signal to the cap while in a crashed state.

Solution 2: The watchdog circuit expects a specific digital pattern or signal that is unlikely to occur accidentally. If the signal isn't received within 60 seconds, the reset signal is triggered on the microcontroller.

nbolton commented 2 years ago

Something like the TPS3823 might solve this.

nbolton commented 2 years ago

https://sigmdel.ca/michel/program/esp8266/arduino/watchdogs_en.html

nbolton commented 2 years ago

Maybe less important if 8b0c3d884b4d2cf00b93b89e522c6ad3a0569142 makes the system more stable.

nbolton commented 2 years ago

The ESP8266 has a software WDT and hardware WDT, so for both of those to fail is a bit odd.