Introducing The PiDog2

PiDog2 is a "hat" for all Raspberry Pi computers with 40-pin GPIO connectors (that only excludes the computer 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

Background

The Raspberry Pi computers are great. They're cheap, fun to use, run a solid operating system, and can be programmed in whatever languages you like. Furthermore, they have ample IO capability, through USB ports and through that big, beautiful GPIO connector. However, there are a couple of problems with the Raspberry Pi's that make them difficult to deploy in places where a human can't easily visit them and "fix" the from time to time

Because of the complexity of the operating system scripting languages, and the potential unreliability of whatever you have attached to the Pi, sometimes they just lock up. Quite simply, they need to be rebooted. The Raspberry by has no means to turn itself off. You can shutdown the operating system, and that reduces power a but your peripherals plugged into the USB ports are still pulling power. In fact the Pi is, too -- a little. Worst of all, if you do shut down the OS, you have no way of remotely bringing it back up! Raspberry PI's do not have an easy way to monitor their own power supply. If you have a battery-powered Pi and want to know the state of the battery, you're out of luck.

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 for good, requiring that I visit them and manually reset them. This was tedious and crashes for low voltage / low power sometimes resulted in damage to the uSD flash cards in the Pi's. 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!

Enter the PiDog2

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 let's you use it to perform a complete powerdown 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, it can wake again periodically, check the battery voltages and decide whether to power back down or operate normally.