Patting the Dog
A watchdog timer is a great way of improving reliability for little cost in small, inexpensive computers such as the Raspberry Pi and Arduino.
Lead Image © Oleksiy Tsupe, 123RF.com
A watchdog timer is a great way of improving reliability for little cost in small, inexpensive computers such as the Raspberry Pi and Arduino.
Computers sometimes lose their way. A power glitch, RFI (radio frequency interference), hanging peripherals, or just plain bad programming can make your small computer hang, causing your applications to fail. It happens all the time. For example, how often do you have to reboot your PC? Not very often, perhaps, but once in while your Mac or PC will freeze requiring you to cycle the computer's power.
Raspberry Pis will sometimes freeze because a task does not free up sockets or consumes other system resources. Arduinos will sometimes freeze because of brownouts on the power line or a short power interruption. They might also freeze because they run out of system resources such as RAM, stack space, or both, which are very limited resources in an Arduino. Sometimes even programmers make mistakes.
With small computers, you can give your device a chance to recover from faults by using what is called a watchdog timer (WDT). A WDT is an electronic timer used to detect and recover from computer malfunctions (Figure 1).
[...]
Pages: 8
Price $15.99
(incl. VAT)