Watchdog and "off" switch for your Raspberry PiDesigned by South Berkeley Electronics in United States of America
Introducing The PiDog2 PiDog2 is a "hat" for all Raspberry Pi computers with 40-pin GPIO connectors (that only excludes the compute module and the original Model A) that provides much needed hardwa...Read More…
PiDog2 is a "hat" for all Raspberry Pi computers with 40-pin GPIO connectors (that only excludes the compute module and the original Model A) that provides much needed hardware watchdog and power management capabilities that the Raspberry Pi itself lacks. It does this with minimal fuss and almost no effort on your part.
We all know RPi computers are great. They're cheap, fun to use, run a solid operating system, and can be programmed in whatever languages you like.
However, there are a few limitations with the Raspberry Pi's that make them difficult to deploy in places where a human can't easily visit them and "fix" them from time to time:
Sometimes RPi's crash. The Pi's built-in hardware watchdog can reset a Pi, but it can't turn one off and turn it back on again later. In fact, the Raspberry Pi has no means to turn itself off at all. You can shut down the operating system, and that reduces power, but your peripherals plugged into the USB ports will still draw power. In fact, so is the Pi itself! Worst of all, if you do shut down the OS, you have no way of remotely bringing it back up!
I designed the PiDog after I had to deploy Raspberry PI-based cameras and sensors around a wide campus, powered by batteries and solar panels. They worked pretty well in most cases, but after a long period of low sun, or certain types of network outages, or OS updates gone bad, the Pi's would "die" and disappear off our network until I could visit and manually reset them. This was tedious and crashes for low voltage / low power sometimes resulted in a borked uSD flash card. My solution to this was a small amount of hardware to reset the Pi's and turn them off when power is low or unavailable, but being able to turn them back on when the power is back!
The PiDog2 solves all those problems. First, the PiDog2 can cut the power to a Raspberry Pi after specified period of time. This lets it serve as an external watchdog timer, or lets you use it to perform a complete power down after a clean shutdown. Second, it can power the Raspberry Pi back up after a different specified time. Finally, it provides the Pi with a measurement of the 5V and 3.3V supplies, as well as up to two other voltages of your choice. This lets software running on the Pi make intelligent choices about when it should gracefully shut down in order to save battery and avoid flash corruption. Then, using the PiDog2, the Pi can wake/boot again periodically, check the battery voltages and decide whether to power down again or operate normally.
PiDog2 is powered by an Attiny84 microcontroller that is connected to the Pi via the GPIO header and the SPI interface. It uses one of the standard Raspberry Pi SPI chip-selects, but you can still use other SPI devices that work off other chip selects. The PiDog2 inserts a MOSFET switch between the incoming USB 5V and the Raspberry Pi. This way, it can turn the Pi on and off. Connection is very simple: simply remove the USB connector from your Raspberry Pi, attach the PiDog2 to the Raspberry Pi's GPIO header, and put the USB connector onto the PiDog2. That's all the hardware setup you need!
The PiDog2 is programmed to look to the Pi like a handful of 32 bit registers that contain various countdown timers and control bits. There is a basic Python library provided that makes interacting with those registers a snap.
The PiDog2 comes as a partial kit. Everything SMD is soldered on the board, but the connectors, all through-hole are included for you to solder in. At a minimum, you need to solder on the 40-pin connector, but you can also optionally add on the 2x2 power connector, 2x3 ICSP connector, 1x3 debug connector, and two 2-pin JST connectors for voltage measurement. We also provide two sets of wires withe matching JST connectors for your voltage measurements.
There was a minor assembly error on some of the earliest boards, where a resistor were populated that should not have been.
If you have a v0.5 board, you should remove resistor R10 if present. If you have a v0.7 board, you should remove resistor R2 if present.
So far, I have note noticed an actual problem with these resistors being present, but theoretically they could cause the PiDog2 to switch off the RPi will doing in-situ programming, resulting in failed programming and an unclean RPi shutdown.
I am very sorry for the inconvenience!
The project can be found on GitHub: https://github.com/djacobow/pidog2. In that repo, you'll find:
No country selected, please select your country to see shipping options.
No rates are available for shipping to .
Enter your email address if you'd like to be notified when PiDog2 can be shipped to you:
Thanks! We'll let you know when the seller adds shipping rates for your country.
|Shipping Rate||Tracked||Ships From||First Item||Additional Items|
I'm a one-man shop and I've get busy with family and work obligations, but I will always try to get new stuff in the mail within a few days.
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!