Raspi UPS HAT Board

From raspberry pi wiki
Jump to: navigation, search
Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766

Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766
Raspberry Pi UPS HAT Board sku:451741
Raspberry Pi UPS HAT Board + 2500mAh Battery sku:451766



  • Standard dimension of Raspberry Pi HAT, and it's compatible with all of the expansion board.
  • Cascading design saves space while powering raspberry pi and expansion boards without affecting GPIO expansion.
  • Support up to 2A quick-charge technology, can rapidly charge full the battery.
  • Can be charged and supplied power to raspberry pi at the same time.
  • With 4 LED power indicator;
  • Provides an example code to beginner to demonstrate how to demonstrate battery capacity displays the current battery level in the raspberry pi current program, it can detect the current battery, voltage etc.
  -- Applicatoin scene 1: You can program to control automatic backup of data at low power and safe shutdown.
  -- Applicatoin scene 2: Remind users to charge at low battery levels. etc.)
  • Removable battery, user can choose a more larger capacity lithium battery pack (NOTE: voltage must be 3.7V).
  • With safety protection circuit to prevent overcharge and over discharge.
  • Retains the raspberry GPIO interface, you still can use all kinds of expansion board;
  • It is Mini UPS power supply; maximum 5V / 2A output, and maximum 5V / 2A input.

Note: The capacity of Lithium Battery is 2500mAh

But you can use the more big capacity battery. PS: Voltage must be 3.7V


The USP HAT will provide power to Raspberr pi via GPIO pin;

Don't connect the micro USB to rasberrry pi; please connect the micro USB to UPS HAT board; Connector specification is: PH 2.0 2-PIN connector

Two algorithm to obtain Battery capacity

Voltage estimation algorithm

Obtain the voltage, then estimate the current battery capacity by the following rules.

LED VBAT (Voltage of Battery)
1 to 2 3.622
2 to 3 3.832
3 to 4 4.043
FULL 4.182
LED VBAT (Voltage of Battery)
4 to 3 3.74751
3 to 2 3.501
2 to 1 3.35
Off 2.756

Coulomb meter algorithm

Please refer to Raspi UPS HAT Board#how to USP HAT use via i2c


But because every battery has its own different features so UPS HAT need to take time to learn and adapt it.

Driver and Sample code



How to use UPS HAT via driver

Please refer to How to use UPS HAT via driver

How to USP HAT use via i2c

In fact, you can use i2c to obtain the battery capacity and voltage. This python sample code is from a buyer friend, his name is Joachim, thank your very much.

The LED and UPS Switch

IMG 0108.jpg

IMG 0110.jpg Charging LED.jpg

USB to Two Micro USB Charging Cable

If you want your Raspberry Pi to be able to start automatically when you have an external power supply or battery, rather than manually switch on power, You can use this USB to 2 Mirco USB Cable, USB connect charger, one Micro USB connect Raspberry Pi, another Micro USB connect UPS HAT. So as long as there is an external power supply or battery, Raspberry Pi can work properly. Unless the battery is low and the external power is lost.

IMG 2344-how to work.jpg