Nuovi prodotti

Nuovi prodotti
Tutti i nuovi prodotti

SwitchDoc Labs Dual WatchDog Timer Board for Arduino / Raspberry

16,54 €
SwitchDoc Labs Dual WatchDog Timer Board for Arduino / Raspberry Pi

Why do you need an External Hardware WatchDog on an Arduino or Raspberry Pi? The reason is the internal watchdog is disabled in the boot loader for the Arduino and the Raspberry Pi watchdog is unreliable and difficult to use. The SwitchDoc Labs Dual WatchDog Timer is designed to make small computer such as the Arduino and Raspberry Pi more reliable by detecting and recovering from computer or software malfunctions. It has two WatchDog Timers that can be used independently or together to reset non-responsive computers. It directly can drive the Arduino Reset line, the Raspberry Pi B/B+ and 2/3 reset line or a to a relay to reset a Raspberry Pi. The SwitchDoc Labs Grove/Pin Dual WatchDog Timer is based on the 555 timer IC running in astable mode. The 555 timer acts as a “continuous” pulse generator. The pulse starts on power up or any time the trigger input is brought to ground. The setting of the TM1 potentiometer determines the length of the pulse (30-240 seconds). When the pulse ends the Arduino Reset output is taken to ground (and the PulseHigh output goes to VDD) for approximately 200ms. Then the cycle starts over again. Learning About WatchDog Timers Here is a recent series of articles by SwitchDoc Labs about WatchDog Timers. Features Grove Connector Works with Pin Headers Dual Independent WatchDog Timers Arduino and Raspberry Pi Compatible LED Timer State Indicators 3.3V or 5V operation Programmable timeout from 30-240 seconds Open Drain or Pulse Driven Operation Low Power Low Cost Full Test Code Supplied Downloads You can download the Dual WatchDog Product Brief here (Version 2 as of April 22, 2016). You can download the Version 1 Dual WatchDog Product Brief here. Software The software on the Raspberry Pi and Arduino is very straightforward. To use a single timer on the WatchDog board, you connect a GPIO line to the DOG1_TRIGGER input. This GPIO pin needs to be set to high-impedance mode (input mode) when the trigger is not being applied to avoid interfering with the charging process of the 555 timer. The Code for "Patting The Dog" in Python and Arduino To “pat the dog” or trigger the External WatchDog Timer, you need to use the following code. Since the line has to be held in high impedance mode and then just taken to ground when you pat the dog, the code for the Arduino looks like this: #define RESET_WATCHDOG1 9 void ResetWatchdog1() { pinMode(RESET_WATCHDOG1, OUTPUT); delay(200); pinMode(RESET_WATCHDOG1, INPUT); Serial.println("Watchdog1 Reset"); } And in Python for the Raspberry Pi, the code looks like this: #define RESET_WATCHDOG1 18 def resetWatchDog(): GPIO.setup(RESET_WATCHDOG1, GPIO.OUT) GPIO.output( RESET_WATCHDOG1, False) time.sleep(0.200) GPIO.setup(RESET_WATCHDOG1, GPIO.IN) You put these functions in your code such that you pat the dog more often than Wto. Wto is defined as the maximum amount of time the WatchDog Timer can count before it needs to be reset (in other words, when it will reboot the computer if the computer goes away). Arduino Hookup Below is how you hook it up to an Arduino. WatchDog Timer Raspberry Pi Hookup Dual WatchDog and Arduino[/caption] And here is how you hook it up to a Raspberry Pi B+. DualWatchDogRaspberryPiB_bb