Pico UPS B

From Waveshare Wiki
Jump to: navigation, search
Pico UPS B
Pico UPS B

UPS Module For Raspberry Pi Pico, Uninterruptible Power Supply





The Pico-UPS-B is a dedicated UPS (Uninterruptible Power Supply) module designed for Raspberry Pi Pico. It incorporates a Li-po battery switching charger with power path management, and a voltage/current monitoring chip that allows monitoring the battery operating status via the I2C bus. What's more, the male pin header makes it possible to "stack" other modules on top.


  • Standard Raspberry Pi Pico header supports Raspberry Pi Pico series boards.
  • Incorporates Li-po battery switching charger with dynamic power path management, a more stable power supply.
  • I2C bus communication, monitoring the battery voltage, current, power, and remaining capacity in real-time.
  • Multi battery protection circuits: overcharge/discharge protection, over current protection, short circuit protection, and reverse protection, more safe and stable.
  • Onboard recharging indicator, power indicator, easy to check the battery status.


  • Recharge voltage: 5V
  • Control bus: I2C
  • Battery support: 600mAh 3.7V Li-po battery
  • Dimensions: 60 × 21mm






  • Li-ion and Li-po batteries are quite unstable. They may cause fire, personal injury, or property damage if they're not properly recharged or used.
  • Do not reversely connect the polarities when recharging or discharging the battery. Do not use an inferior charger/charging panel to recharge the battery.
  • When buying a Lithium battery, should always make sure the battery specification is compatible with the expansion board. Choose batteries from the formal manufacturer, and ensure the batteries will work stably and safely by aging test.
  • Lithium batteries have limited cycle life, they will also deteriorate as time goes by. Should be replaced with new ones when the batteries reach their max cycle life, whichever comes first.
  • Should be placed carefully and properly, keep it away from inflammable and explosive articles, away from children, and avoid any safety accident caused by careless storage.

Setup Environment

You can refer to the guides of Raspberry Pi: https://www.raspberrypi.org/documentation/pico/getting-started/

Working with Raspberry Pi

  1. Access Raspberry Pi and open the terminal
  2. Download the download and unzip it to the Pico C/C++ directory. You need to follow the guides of Raspberry Pi to install SDK first.
wget -P ~/pico https://www.waveshare.com/w/upload/9/92/Pico-UPS-A.zip
cd ~/pico
unzip Pico-UPS-A.zip

C examples

  • Press the BOOTSEL button of Pico and connect the Pico to your Raspberry Pi by USB cable and then release it.
  • Build and run the C examples
cd ~/pico/Pico-UPS-A/c/build/
cmake ..
sudo mount /dev/sda1 /mnt && sudo cp Pico_UPS.uf2 /mnt && sudo sync && sudo umount /mnt && sleep 2 && sudo minicom -b 115200 -o -D /dev/ttyACM0
  • The expected result should be as figure below:
Pico UPS A 01.png

Python examples

  • Access Raspberry Pi and open the Thonny.
  • Open the example by the IDE and save
Pico UPS A 02.png
  • Click the Run button to run the codes
Pico UPS A 03.png


  1. Download and unzip File:Pico-10dof-imu.zip to the Windows desktop, refer to Windows software environment settings.
  2. Press and hold the BOOTSEL button of Pico, connect Pico's USB to the PC with a MicroUSB cable, and import a c or python program into Pico to make it run.
  3. Use the serial port to view the virtual serial port of Pico's USB enumeration to view the printing information, pay attention to turning on DTR, the baud rate is 115200, as shown in the figure.

Pico UPS Guide01.png


Demo codes


If you require technical support, please go to the Support page and open a ticket.