0

Sometimes the arduino locks up for some reason. It would be nice to know why, but the problem is more general. I have found a hardware keep alive that resets the controller if it doesn't respond:

Arduino Keep Alive with AT-Tiny

This would work, but i wonder if there are there features like this built in to any of the processors that can be used in the Arduino environment (ESP8266, ESP32, or the like).

Maybe folks know of a processor with the "Keep Alive" feature?

How would i determine if this "keep alive" feature is present for a specific processor?

Thanks for any suggestions!

Mark

8
  • 7
    Yes, it's called the "Watchdog" and most MCUs (including the ATMega328p on the Uno) have one.
    – Majenko
    Feb 24 at 19:36
  • you can attach that atinny to any board, but why, if the built in watchdog does the same?
    – Juraj
    Feb 24 at 19:56
  • 2
    @xsk8rat That's often the problem: you know what you want, but you don't know what it's called, and googling without the magic word is nigh on impossible.
    – Majenko
    Feb 24 at 21:09
  • 1
    There is a WDT in the Arduino MCU but you really should be looking to solve your root cause first. An Arduino should not lock up and when it does it's usually either a software issue where the stack overflows or it's a hardware issue where you have noise or other spurious signals interfering with the MCU.
    – jwh20
    Feb 24 at 21:54
  • 1
    do we agree that the linked tutorial using external MCU as 'keep alive' is nonsense?
    – Juraj
    Feb 25 at 6:17
1

Reference link: https://create.arduino.cc/projecthub/rafitc/what-is-watchdog-timer-fffe20

enter image description here

  • Watchdog timers can be found in the datasheet. If there is no intervention to this module by the software, the MCU will be reset. basically, restarting all the functions.
  • It is a bad idea to use WDT to solve your particular topic. You should try to fix the issue
  • The external watchdog timers (Example: ADM8320) is more reliable than internal ones enter image description here
1
  • Thanks for the link, that is helpful! Yes, i need to learn more about what is causing the units to hang and fix that. That will be the first thing i do!
    – xsk8rat
    Feb 26 at 15:01
0

personally, I have never experienced my Arduino crashing. I even have a board running for one of my university projects measuring temperature, time and resistance of a sensor and saves the data to a micro SD card that has been running for over 3 months from batteries without issues!

What do you mean by 'locks up'? If you run the blink programme, does that stop or does It work ok?

In the link you provide, the idea of resetting devices in a complex IOT project is a smart idea, but you run into the risk of having your issue repeating over and over again if you do not know what is causing the problem

1
  • Hi Luke, That's an issue, i need to find the problem. The sensors are used in production and they have reported an issue. But i haven't retrieved an data or a unit yet.
    – xsk8rat
    Feb 25 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.