SunFounder PiPower User manual

SunFounder PiPower
www.sunfounder.com
Aug 29, 2023


CONTENTS
1 Component List 3
2 Assemble the PiPower 5
3 Features 13
3.1 Detailed Introduction ........................................... 14
3.2 Battery Indicators ............................................ 17
4 Start to Play 19
4.1 Install the HassOS ............................................ 19
4.2 Add PiPower Pro in Home Assistant ................................... 29
4.3 Configure Dashboard ........................................... 35
4.4 Add Card by Code Editor ........................................ 37
4.5 PiPower Pro Entity ............................................ 44
4.6 Setting up Safe Shutdown ........................................ 45
4.7 Coulomb Counter (Beta) ......................................... 54
4.8 Custom Development .......................................... 55
4.9 Multiple PiPower Pro Units ....................................... 56
4.10 IO Expansion ............................................... 56
5 FAQ 59
5.1 PiPower Pro not working? ........................................ 59
5.2 Which single-board computers can PiPower Pro be used on? ...................... 59
i

ii

SunFounder PiPower
What a UPS Does?
If your Raspberry Pi project requires constant power, relying only on the main power system is not a viable option.
Depending on your location, power drops and surges may occur frequently and often last for hours. Any power fluc-
tuations can damage your Raspberry Pi, and a power outage will immediately shut it down. Consequently, it will not
shut down safely, which can result in all data on the SD card being lost, increasing the chances of it being destroyed.
Therefore, the use of an uninterruptible power supply (UPS) is recommended.
With a UPS, if there is a power interruption from the mains (interruption = power outage), the battery or other power
source will take over and continue to power the device without shutting it down. A UPS is often considered an emer-
gency power source. After the main power source is repaired, the UPS will recharge and be ready to handle the next
disaster.
About PiPower
That’s why we designed PiPower in the first place. PiPower can be used as a second power source for the Raspberry Pi.
A USB-C mains power supply plugged into the PiPower will directly power the Raspberry Pi and charge the battery
at low current. PiPower can seamlessly power up a Raspberry Pi in the event of a power outage or disconnection of
USB-C mains power.
PiPower can output 5V/3A power supply to meet various Raspberry Pi usage situation. It has 4 power indicators; each
indicator represents 25% of the power, and is equipped with a power switch to turn on/off the power of the Raspberry
Pi without plugging or unplugging the power cord.
Warning: When you put the battery in for the first time or when the battery is unplugged and put in again, the
battery will not work properly, at this time, you need to plug the Type C cable into the charging port to turn off the
protection circuit, and the battery can be used normally.
About PiPower Pro
PiPower Pro builds upon PiPower, integrating an ESP32 S2 module that enables real-time monitoring of the mod-
ule’s battery voltage and current status, input/output voltage and current. It also features intelligent charging current
adjustment and seamless switching between input and battery power, ensuring uninterrupted power output.
CONTENTS 1

SunFounder PiPower
When integrated with Home Assistant, users can easily access and review all parameter data, as well as configure
automation for smart device scenarios.
Additionally, PiPower Pro offers external IO interfaces for controlling the on/off state of sub-devices. With its open-
source ESPHome configuration, users can customize IO functionalities and expand the system with more sensors.
2 CONTENTS

CHAPTER
ONE
COMPONENT LIST
3

SunFounder PiPower
4 Chapter 1. Component List

CHAPTER
TWO
ASSEMBLE THE PIPOWER
After getting familiar with the components in the package, we start to assemble PiPower.
In the next steps, there are a lot of details you need to notice, especially the assembly position of the battery and the
clear acrylic back cover.
1. Attach the Adhesive Tape to the back.
2. Then stick the battery on and plug it in.
5

SunFounder PiPower
3. Bind the battery wires with a cable tie.
4. Now screw in four sets of standoffs.
6 Chapter 2. Assemble the PiPower

SunFounder PiPower
5. Mount the Raspberry Pi on top.
7

SunFounder PiPower
6. Secure a protective plate at the bottom.
8 Chapter 2. Assemble the PiPower

SunFounder PiPower
7. Plug in the USB-C cable to power the Raspberry Pi.
9

SunFounder PiPower
8. PiPower needs to be activated with the USB-C cable at the charge port the first time you use it or re-plug the
battery
10 Chapter 2. Assemble the PiPower

SunFounder PiPower
Warning: When you put the battery in for the first time or when the battery is unplugged and put
in again, the battery will not work properly, at this time, you need to plug the Type C cable into
the charging port to turn off the protection circuit, and the battery can be used normally.
11

SunFounder PiPower
12 Chapter 2. Assemble the PiPower

CHAPTER
THREE
FEATURES
•Pass Through Charging
•Shutdown Current< 0.5mA
•Input:
–USB Type-C, 5V/3A
–Battery Input
•Output
–USB Type-A, 5V/3A
–2x4P P2.54 pin headers
•Charging Power5V/2A
•Equipped Battery
–Type: 3.7V Lithium-ion batteries x 2
13

SunFounder PiPower
–Capacity: 2000mAh
–Connector: PH2.0, 3P
•Over Discharge Protection Voltage6.0V
•Overcharge Protection Voltage8.4V
•Dimension: 90mm x 60mm x 24.9mm
•On-board Indicators
–1 x Charging Indicator (CHG)
–1 x Power Indicator (PWR)
–4 Battery Indicators (D4 ~ D7)
•On-board Power Switch
•On-board MCU ESP32 S2
3.1 Detailed Introduction
STAT LED
The STAT LED is the status indicator for the ESP32 S2.
•Off: ESP32 S2 is powered off.
•Slow blinking: ESP32 S2 is powered on, but Wi-Fi is not connected.
•Steady on: ESP32 S2 is powered on and Wi-Fi is connected.
Note: The so-called “ESP32 S2 powered off” state refers to the situation when the USB Type C power is connected.
In this state, the ESP32 S2 is technically “powered off” but not completely shut down. The power LED still requires
the ESP32 S2 to control its illumination, and some functions may remain operational. However, when you unplug the
USB Type C power, the ESP32 S2 will shut down completely.
Switch Power Path
PiPower Pro integrates a power path function that automatically switches power paths to ensure maximum output
protection.
1. When external power is connected, the 5V output is directly supplied through the external USB Type C and can
be turned off using the switch. The external power source charges the battery with as much current as possible
(see charging current) while ensuring the input voltage is greater than 4.6V.
2. In the moment of power disconnection, the system automatically switches to battery power output with seamless
transition, ensuring the system can function properly during power interruptions.
3. If the external power is below 4.6V, the system automatically switches to battery backup power to prevent external
devices from losing power.
Table 1: Output Power Logic
Switch External Power Output Status
On Plugged in External Power
On Unplugged or voltage below 4.6V Battery Power
Off Plugged in Off
Off Unplugged or voltage below 4.6V Off
14 Chapter 3. Features

SunFounder PiPower
Charging Power
Under the power-on state, the charging current will automatically adjust based on the input voltage.
Table 2: Charging Current Logic
Switch Charging Current
On Adjusted based on input voltage
Off 2A
1. When the switch is in the “Off” state, PiPower Pro does not supply power externally, and the charging current
reaches a maximum of 2A, allowing for fast charging. The charging time from 0% to 100% is approximately 2
hours and 10 minutes.
2. In the “On” state, since PiPower Pro needs to supply power externally, the external USB also needs to provide
power to the battery. To ensure the voltage of the USB power supply remains stable, the charging current is
adjusted based on the input voltage, ensuring the voltage stays above 4.6V.
Over-discharge Protection
When the single battery voltage is below 3V, the battery protection activates and the battery is no longer discharged.
When the battery is unplugged, due to the mechanism of the on-board over-discharge protection circuit, the voltage will
be considered too low, thus activating the protection circuit; when you replug the battery into the PiPower, the battery
will not work properly, at this time, you need to plug the Type C cable into the charging port to turn off the protection
circuit, and the battery can be used normally.
Overcharge Protection
Charging ends when the total battery voltage reaches 8.4V.
Charge Balance
When the voltages of the two batteries are not equal, the charging current of the two batteries is automatically adjusted
to balance the two batteries.
When a single battery exceeds 4.2V, the voltage divider resistor channel conducts and the battery charging current is
reduced or even discharged.
Battery
The product comes with two 3.7V 18650 lithium-ion batteries in series, featuring an XH2.54 3P connector, with a
nominal capacity of 2000mAh.
•Composition: Li-ion (Lithium-ion)
•Capacity: 2000mAh, 14.8Wh
•Weight: 90.8g
•Cells: 2
•Connector: XH2.54 3P
•Overcharge Protection Voltage: 4.2V per cell
•Over-discharge Protection: 3V
External Battery
3.1. Detailed Introduction 15

SunFounder PiPower
You can connect your own battery using the Screw Terminal. The device only supports two 3.7V lithium-ion or lithium-
polymer batteries. It’s preferable for the batteries to have a protection board and ensure an output of more than 15W.
Warning: Do not connect the external battery and the included battery at the same time!
Temperature
When the output power reaches the maximum nominal 5V/3A, the temperature of DC-DC buck chip U1 will rise to
about 70-80 degrees Celsius, so be careful not to touch it to prevent burns and keep ventilation. When the temperature
16 Chapter 3. Features
Other manuals for PiPower
2
Table of contents
Other SunFounder Computer Hardware manuals