How to determine watchdog trigger time

I have a program written to control the east / west and tilt motors of my solar tracker using a ESP32. The program seems to function correctly but, I would like to add watchdog code as a hang-up precaution. What is the best way to determine the time-out period? The code loops until it receives a hourly interrupt. Than it calculates the distance to move and makes a tracking correction if it is during day light hours. At 11pm the tracker moves to full east waiting for day break. Since different tracking moves take different amounts of time, should I change the watchdog timeout period accordingly or gist set it to the longest period?

Please post your entire sketch in code tags.
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966#post-all-your-code

The rule of thumb on choosing a watchdog timeout is how long the system can operate safely without the controller running. If the answer is "indefinitely" then just choose a timeout value that's convenient.

Sure. But most MCU watchdog hardware can't be configured for one hour... so that figure is not relevant. So yes it is a matter of convenience.

What would actually happen if your software "locked up"? How would that differ from a "halted" state? Do you have hardware interlocks like limit switches to prevent equipment damage in the event of a processor melt down? What is the worst case failure scenario?

Worth whatever time you give them

and

a7

All motors have direct mechanical over-travel limit protection. The only problem with cpu lockup is loss of harvested power and me having to go out and reset it in fowl weather.

It's just an opinion - but I wouldn't worry about it. Not until it actually does lock up, if ever.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.