Electronic – Arduino watchdog with 555 Timer and a MOSFET

555arduinomosfetwatchdog

I want to protect an Arduino from stop running using a 555 timer. I saw some projects that use the Arduino RESET pin to do that but there are cases that my Arduino project still stop working even when I do a reset using the RESET pin.

So I used the circuit below to cut the 5v line of my Arduino. I choose the 5v line instead of the ground because I have only one 5v pin and more than one ground at Arduino.

My problem is how can the Arduino reset the 555 counter? How can I pulse the 555 to prevent it from disable the Arduino? If I connect the D2 Arduino pin to the Threshold/Trigger/Capacitor pin like I saw on some projects, and keep the capacitor charged, it works when the Arduino is running but if it disables it never turn on again because the Arduino don't allow the capacitor to charge again and it stays forever off.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

These microcontrollers used in Arduinos typically contain a so-called Watchdog, which fulfills exactly the role of your 555, but is

  • already integrated, thus needs zero additional components (and thus, sources of failure),
  • uses an amount of power that is, even with lab equipment, pretty much impossible to measure, whereas the classic 555 is a true power hog,
  • can be way more accurate,
  • will reliably reset your system exactly once until it is started again (which you typically do early on in your firmware),
  • is designed and tested by experts for production in the millions to billions and I'd thus expect it to be way more reliable than your own analog circuit and
  • leaves your Arduino in a defined state instead of violently disconnecting it from power, which leads to a brown-out situation with currents flowing in directions noone foresees.

So, abandon the 555 approach and simply learn how to use the watchdog. It's superior in any aspect I can think of.