Introduction
This is an uninterruptible power supply (UPS) expansion board specifically designed for Raspberry Pi 5. It can be used as a mobile power supply, providing a stable 5V output with a maximum of 5A. Its enhanced power management system can intelligently monitor the power status of Raspberry Pi 5 and automatically cut off power when Raspberry Pi 5 shuts down, thereby increasing usage time and battery lifespan. It supports power outage and power adapter failure detection, and can automatically switch to UPS power supply in the event of a power outage or adapter failure. It can power on automatically when power is restored and can be completely shut down through software and I2C battery level detection. The automatic shutdown voltage can be set. Additionally, it supports fast charging with a maximum charging voltage of 3A, enabling quick charging. It is suitable for mobile power supply for Raspberry Pi 5 in various applications such as smart cars, outdoor equipment setups, and detection scenarios.
safety Instructions & warnings
- It is essential to read and understand these safety instructions and warnings before charging your batteries.
- Lithium Polymer and Li-ion batteries are volatile. Failure to read and follow the instructions below may result in fire, personal injury, and damage to property if charged or used improperly.
- Never make a wrong polarity connection when charging or discharging battery packs. Always double-check the polarity of the battery's connector to ensure that "+" is connected to "+" and "-" is connected to "-".
- Do not mix and use old batteries with new batteries, or batteries with different brand names.
- Lithium batteries have a limited cycle life. Please replace old batteries with new ones when they reach their service life or when they are two years old, whichever comes first.
- When charging the Battery Pack, please place the battery in a fireproof container. Do not leave the UPS shield on wood material or carpet unattended.
- Keep the UPS shield away from children to ensure their safety.
Features
- Compatible With Raspberry Pi 5
- Provides continuous operation for up to 10 hours (duration depends on battery type and applications)
- Supports a maximum current output of 5.1V 5000mA, suitable for most Raspberry Pi applications
- Integrated Advanced Power MOSFET with an equivalent of 7mΩ RDS(ON) to minimize power loss
- Convenient pogo pin connection for powering the Pi, eliminating the need for cabling and soldering
- Equipped with XH2.54 connectors and two USB sockets for 5V power output
- Supports fast battery charging with a capacity of 3000mA
- Battery charging control can be managed via GPIO
- Provides protection against battery overcurrent and overvoltage
- Built-in protection against reverse connection of battery cells
- Integrated Maxim's fuel-gauge systems for reading battery voltage and percentage over i2c
- On-board LEDs indicate battery charging and discharging levels of 25%, 50%, 75%, and 100%
- Features a 4-cell 18650 battery holder
- Integrated high-efficiency step-down DC-DC converter
- Wide operating input range of 6V to 18V
- Up to 95% efficiency for optimal power conversion
- Provides up to 5.5A output current, enabling 3A fast charging while powering the system
- Allows power input from various sources such as a car, solder panel, and more
- Common power input jack size of 5.5x2.1mm
- Compatible with Raspberry Pi USB-C Power Supply
- Seamless power switching between backup power and power adapter
- On-board push button performs the same actions as the Pi's power button
- Automatically cuts off power when the Pi is shut down
- On-board LED indicates power status and Pi detection
- AC power loss and power adapter failure detection via GPIO
- Auto power-on when power is applied or restored
- Automatic safe shutdown when battery voltage is low (programmable)
- Ultra-low standby power consumption to maximize battery life
- Advanced system power-path management to minimize frequent charging and discharging of batteries
- Connects to the Pi via convenient pogo pins, eliminating the need for additional cabling
- Designed to be attached on the bottom, allowing the use of favorite HATs alongside it
- XH2.54 connector available for adding your own power button
Specification
- Power input: 6-18Vdc,(12Vdc 3A power adapter recommended)
- UPS output: 5V ±5% Max 5A
- Battery charging current: Max 2.3-3.2A
- Terminal Battery Voltage: 4.23V
- Battery Recharge Threshold: 4.1V
- Ports & Connectors
- DC power jack - 5.5x2.1mm
- 2-cell 18650 battery socket x2
- 5V Power output connector x2 - XH2.54 2-pin
- USB2.0 type-A power output socket x2
- External power button connector x1 - XH2.54-2P
- PCB Size: 97.4mm x 85mm
PCB
Hardware description
Raspberry Pi GPIO used
PIN | GPIO | Functions |
---|---|---|
3 | GPIO2 | I2C-SDA,battery fuel-gauge systems-reading battery voltage and percentage |
5 | GPIO3 | I2C-SCL,battery fule-gauge systems-reading battery voltage and percentage |
31 | GPIO6 | AC power loss & power adapter failture detection,Low-power supply failed,High-power supply OK |
36 | GPIO16 | Control battery charging,High-charging disabled,Low-charging enabled |
Battery voltage level indicators
Battery voltage range(V) | D1 | D2 | D3 | D4 | Remark |
---|---|---|---|---|---|
3.87-4.2 | ON | ON | ON | ON | discharging levels of 100% |
3.7-3.87 | ON | ON | ON | OFF | discharging levels of 75% |
3.55-3.7 | ON | ON | OFF | OFF | discharging levels of 50% |
3.4-3.55 | ON | OFF | OFF | OFF | discharging levels of 25% |
Below 3.4 | OFF | OFF | OFF | OFF | low battery |
Hardware installation
Software Tutorials
Editing the EEPROM configuration
1.From the command line or Terminal window start by running the following command:
sudo rpi-eeprom-config -e
Change the setting of POWER_OFF_ON_HALT from 0 to 1 ,Add PSU_MAX_CURRENT=5000 at the end of the file that reads like this:
2.Reboot your Raspberry Pi 5 to make the change take effect.
sudo reboot
Configuring the Raspberry Pi for I2C
1.Open I2C through graphical interface or command line
2.Update your Pi and Install the required dependencies
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install python3-pip
3.Download the required scripts
git clone https://github.com/suptronics/x120x.git
4.Reboot the Raspberry Pi
sudo reboot
The Raspberry Pi will reboot and the interface will be enabled.
5.Once you have logged into your Raspberry Pi from the command line, run the command to see all the connected devices
sudo i2cdetect -y 1
the address of the battery fuel gauging chip
Reading battery voltage & percentage
1.Run the command to read battery voltage and percentage
sudo python3 bat.py
2.Change the battery low voltage to implement safe shutdown. default is less than 3.20Vdc.
sudo vi bat.py
Note: the voltage range must be 3.00~4.10vdc.
AC Power loss or power adapter failure detection (PLD)
Execute the command to initiate power loss detection (PLD)
sudo python3 pld.py
Disconnect the power adapter and observe the detection of the power loss.