8

I recently learned about watchdog timers, and am trying to implement one for my circuit for the purpose of resetting my (AVR) microcontroller if it hangs (i.e., doesn't respond to the watchdog).

Based on some research, it appears to me that there are around four options:

  1. Connect my microcontroller with an external dedicated watchdog-timer-specific IC.
  2. Connect my microcontroller with an additional microcontroller (some very basic, inexpensive one), the latter coded for the sole dedicated purpose of watchdog-timing.
  3. Lay out my own 555-timer-based watchdog circuit and connect it to my microcontroller.
  4. Use the internal watchdog timer capability on my microcontroller.

.

Which of the above approaches would you rank higher and why?

I would like to set a watchdog time of around 6 seconds, based on certain criteria for the way I'm making the rest of my design and code (the device will be a battery-powered, periodic temperature logger).

A little note: My preference would be Option 1, for simplicity, however, based on the couple I have found, these parts either appear to be expensive (I'd like a solution under 1.25 USD at most), or only allow only less than 2 seconds for the watchdog timing period.

Brian Carlton
  • 13,312
  • 5
  • 44
  • 65
boardbite
  • 4,922
  • 11
  • 48
  • 73
  • 1
  • is cheap and simple. Is your objection only that you can't set it to 6 seconds? That's quite a long time by microcontroller standards
  • – pjc50 Oct 12 '12 at 16:47
  • 1
    @pjc50: It is definitely cheap :) And even the 6-second timing is possible I believe. However, articles like this one suggest that the internal watchdog may not be as robust as a dedicated external one. And the reason for the 6 second time is, on my microcontroller, I have an Arduino bootloader which includes a wait time of 4 seconds on first start. (I could learn to re-program this but that is still on my learning curve) – boardbite Oct 12 '12 at 16:53
  • 1
    You should definitely fix the bootloader. The 4 seconds of waiting are 4 extra seconds of battery consumption which you can get rid of. Instead of waiting, have it e.g. sample a dedicated pin which is pulled down when in deployment. – Igor Skochinsky Oct 12 '12 at 16:58