The PowerBoost 1000c can only provide about 1.1A, which may not be sufficient to power a Raspberry Pi 3(+). According to the FAQ, the Pi 3 may draw up to 1.2A under load. The typical current draw is listed as around 500mA, which would be fine.
Theory of operation
PiPower is designed to ensure that your Pi will shut down cleanly when it is disconnected from its primary power source.
PiPower runs on an ATtiny85 microcontroller and acts as an intermediary between your Raspberry Pi and an Adafruit PowerBoost 1000c. When the microcontroller (mc) boots, it checks to see if an external power source is available to the PowerBoost. If so, it sets the
EN line and the PowerBoost starts to supply power to the Pi.
If no external power is available, the mc enters a low power sleep mode until external power is applied. At this point, it will boot the Pi.
When the Pi boots, it must signal to the mc that it has booted successfully by bringing the
BOOT line low. If the mc does not receive this signal within 30 seconds of providing power, it will turn off the power and return to the low power mode.
If external power is lost while the Pi is running, or if you press the power button while the Pi is running, the mc will send the
SHUTDOWN signal to the Pi. It will then wait up to 30 seconds for the Pi to shut down. The Pi can signal a clean shutdown by setting the
BOOT line high. Once the shutdown is complete (or if 30 seconds pass), the mc will remove power from the Pi and return to low power mode.
Installing pipower on your attiny85
make to build the executable:
make flash to upload the image to your attiny85:
Makefile assumes you are using an Arduino UNO as your ISP. If you're using something else you will need to update the Makefile appropriately.
PB0- Momentary Power Button
USBline from PowerBoost
ENABLEline to PowerBoost
BOOTsignal from Raspberry Pi (default
SHUTDOWNsignal to Raspberry Pi (default
5v Powerconnected to the VS output from the PowerBoost
Installing on your Raspberry Pi
pipowerd directory contains the components that need to be installed on your Raspberry Pi. Clone the repository onto your Pi, cd into the
pipowerd directory, and run:
This will build the
pipowerd executable, which is a daemon that will monitor a GPIO pin for the shutdown signal from
pipower. When it receives the shutdown signal it runs
pipowerd and the associated
systemd units, run:
To enable the new services, run:
Makefile will install the following systemd units:
GPIO4) when the Pi boots and de-asserts it on shutdown.
pipowerddaemon to monitor for shutdown signals on
You can configure these services by creating the file
/etc/default/pipower, which may set one or more of the following variables:
PIN_POWER- BCM GPIO on which to assert the
PIN_SHUTDOWN- BCM GPIO on which to watch for the
- My blog post on this project at https://blog.oddbit.com/post/2019-01-19-pipower-a-raspberry-pi-ups/
- Doxygen documentation for this project is online at http://oddbit.com/pipower
- PowerBoost 1000c data sheets/pinouts/etc
- ATtiny85 data sheet
PiPower, a UPS for your Raspberry Pi
Copyright (C) 2019 Lars Kellogg-Stedman email@example.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.