• sales


Power Management HAT (B) User Guide


Power Management HAT(B) is a Raspberry Pi power management control board, which can provide a set of extremely powerful power management for Raspberry Pi, such as timing switches, measuring working voltage and current, etc. The load transient response function enables fast switching among multiple power supplies.


  • Onboard MCU (RP2040), powerful and easy to use
  • Onboard PCF8523 RTC chip, provides precise RTC information
  • Onboard MP28167-A buck-boost DC chip for fast load transient response
  • Protection circuits such as power supply anti-reverse, counter-current proof, etc. ensure stable and safe operating
  • Standard Raspberry Pi 40PIN GPIO extension header, supports Raspberry Pi series boards
  • Onboard user-defined button, can be used for Raspberry Pi start-up, safe shutdown, or other customized function
  • It can detect the input power supply voltage and the working current, and it can be programmed to cut off the power supply immediately to ensure the working life of the lithium battery.
  • Voltage/current monitoring circuit, monitors the Raspberry Pi operating voltage and current in real-time


  • Main chip: RP2040
  • Communication interface: UART + GPIO
  • Download interface: USB + SWD(Debug)
  • Baud rate: default 115200bps (configurable)
  • Power supply: USB/PH2.0 connector
  • USB port voltage: 5V
  • PH2.0 connector voltage: 3.3-4.2V (3.7V Li battery)
  • Built-in circuits: battery anti-reverse, counter current proof, voltage/current monitoring
  • Dimensions: 56.5mm x 65mm
  • Fixed hole diameter: 3.0mm

Hardware Connection

RP2040 GPIODescription
GPIO0UART0_TX pin, connect to Raspberry Pi D15 pin
GPIO1UART0_RX pin, connect to Raspberry Pi D14 pin
GPIO6I2C1_SDA pin, connect to II2 SDA pin
GPIO7I2C1_SCL pin, connect to II2 SCL pin
GPIO19User key pin, generally for controlling the power switch
GPIO21RTC interruption pin, RTC chip will be pulled down when the RTC clock is triggered
GPIO22Raspberry Pi soft shutdown pin, connect to Raspberry Pi D20 pin
GPIO23Raspberry Pi run pin, connect to Raspberry Pi D21 pin
GPIO24Power control pin, when it is pulled low, the power is cut off, otherwise, the power is on
GPIO25Status LED pin, used to display the current operating status
GPIO29Input voltage acquisition hardware, the voltage here is about 1/10 of the input voltage

User Guide



  • 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.
  • Do not mix use old batteries with new ones, avoid using batteries of different brands.
  • 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 a 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 or work over two years, whichever comes first.
  • Should be placed carefully and properly, keep it away from inflammable and explosives articles, away from children, and avoid any safety accident caused by careless storage.

Working Principle & Demo

GPIO Protocol (Configurable Protocol)

  • Based on software compilation, this protocol requires RP2040 and Raspberry Pi to run the demo.
  • As the GPIO headers of RP2040 and Raspberry Pi are connected, the running state of Raspberry Pi can be detected and its shutdown can be prompted.=Working With Raspberry Pi=

Configure Pico Compile Environment

  1. Download the installation script.
    cd ~
    wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
  2. Give run permission and run:
    chmod +x pico_setup.sh
  3. Restart the Raspberry Pi:
    sudo reboot


  • Power Management HAT(B) has connected SWD (debug) to the Raspberry Pi interface, you can directly use the debug interface to download programs or debug.
  1. Download the library source code required for OpenOCD
    cd ~/pico
    sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-
  2. Download the OpenOCD source code.
    git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
  3. Compile and install:
    cd openocd
    ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
    make -j3
    sudo make install