
PowerHAT Battery Power for Raspberry Pi
The PowerHAT(tm) is designed to make your Raspberry Pi Zero/A+/B+/2B/3 battery operated. Since it is HAT compliant, it plugs directly into the 40 pin GPIO connector on any of these pi's. It can also act as a battery backup. For sensor applications, it also has built-in 4 channel analog to digital converter.
The PowerHAT includes a 2000 mAh thin Li-Ion rechargeable battery and the software to control the board.
The control board contains a Li-Ion battery charger circuit, a 5V, 3A nominal output buck/boost circuit, power-on surge protection, the HAT personality EEPROM and Power Conflict Shutoff circuits, a 4-channel A2D, a breadboard area, and breakout access to the 40 pin GPIO connector.
Charging the battery takes about 3 hours (5V@1.6A) with either the built-in micro USB connector, or your your own connector attached to the power-in terminals. The battery charging circuit allows you to run the Raspi powered with a totally flat battery.
Installing the software installs a daemon to monitor the battery level and the controller status, and a shutdown script to power off the Raspi. The software is downloadable from github.
You attach your own momentary contact switch to the board or optionally, have us install one. The intelligent On/Off control powers up the Raspi the first time you push the button. The next time you push the button, the controller signals the Raspi that it is time to initiate shutdown. The daemon recognizes this signal and initiates the shutdown procedure. The controller implements a "third push" fail-safe power down in case the Raspi stops functioning for some reason.
Besides monitoring for the On/Off button, the daemon continuously monitors the battery level. When it detects that the battery is low, it automatically triggers the shutdown sequence so an orderly shutdown can occur before the battery can no longer run the system. The daemon also reports the current battery level through the command-line.
The A2D is wired to SPI channel 0 making it very easy to capture the analog signals. The HAT personality EEPROM automatically loads the A2D driver, providing you with devfs access to the individual A2D channels.
You can add "Power Applied" and "Charging" LED's to the board. These LED control signals are also wired to the 40 pin connector so your software can monitor them via the GPIO.
Every signal connected to the GPIO connector has a breakout access terminal, and is connected to the GPIO connector via 0-ohm SMD resistors that can be easily removed, allowing you to easily customize the GPIO channel mapping.