Watchdog and "off" switch for your Raspberry PiDesigned by South Berkeley Electronics, Ships from 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 computer module and the original Model A) that provides much needed hardw...Read More…
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.
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 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" them from time to time.
Sometimes RPi's crash. The 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. You can shutdown the operating system, and that reduces power, 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!
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!
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 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 back down 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 like a handful of 32 bit registers that contain various countdown timers and control bits, and there is a basic Python library provided that makers 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.
There is a minor assembly error on some boards, where two resistors were populated when only one or the other should 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 a an unclean RPi shutdown.
I am very sorry for the inconvenience!
The projects can be found on GitHub: https://github.com/djacobow/pidog2. In that repo, you'll find:
|Shipping Rate||First item||Additional items|
United States Postal Service: First Class Large Envelope
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!
What happens when an electrical engineer changes careers and then starts getting bored?
Lots of late-night tinkering and hacking and making and eventually ... South Berkeley Electronics!
My interests include IoT, amateur radio, energy measurement, and light up toys. I've got some of the latter up on the Tindie now and will be adding more projects soon!