Watchdog Timeout on Imps

I’m looking at an application for imps that’s permanently powered. Because I can’t risk a potential lock-up on these devices, is there an extended period external watchdog IC that could be recommended to play nicely with the imp? Given the cellular units can take 1-2 minutes to connect and upgrades also take time, I guess it’d need to be at least 2-3 minutes for its timeout period.

I’ve read that the impOS has an internal watchdog. I also need an extra measure in case Squirrel gets stuck in an infinite loop. This is unlikely, but not impossible, if I’m sloppy and tired.

thanks!

You didn’t say how much you want to spend or your space limitations, power supply info etc.

If this were me, I would buy a cheap ESP32 with a LIPO charger built in. I would disable the WiFi, since you don’t need that for the ESP32. You just need the controller part with the auto recharging of a LIPO battery. The ESP32 watches for a periodic signal from the IMP (imp output pin to ESP32 input pin) Pin voltages between imp and esp32 are both 3.3V.

If the pulse is not detected, the esp32 drops a relay or whatever to kill power to everything, including itself. But it continues to run on the LIPO. After a minute it restores power.

The nice thing about this is when there is a “brown-out” or flicker of main power, the esp32 can turn everything off (as it can also monitor input power) and keep things off for a couple of minutes. A two minute power outage is way better than a 0.5 second power flicker or brownout.

Cost for esp32 w/LIPO charger, the LIPO battery, and some sort of relay or something to cycle main power … probably $50? esp32 programming using arduino IDE (which is free).

I mention the esp32 only because it’s a really cheap controller with LIPO charger. Not all controllers come with a built-in LIPO charger as its backup power.

That’s my 2 cents on this.

Added bonus is you could enable the esp32 wifi and use it for monitoring, but no need to have that extra wifi signal interfering with the imp’s wifi. Disable the esp32 wifi (and bluetooth).

Yes, there is an internal watchdog but correct it won’t affect squirrel code. I would go for a very very long watchdog interval (10 mins+) to ensure that upgrades are not affected - resetting during an upgrade will never brick an imp (we are safe against reset and power loss in every scenario) but if you’re on a really bad internet link and there are a lot of retries during an upgrade you don’t want to get kicked.

However, cap sizes tend to get large for this, eg https://www.mouser.com/datasheet/2/256/max6746-max6753-90818.pdf would require a 120uF capacitor (a low leakage ceramic at that) for a 10 min timeout.

Plausible for you?

Thanks, yes. The Maxim range with extended timeouts seem to be what I’m looking for.