Power Management HAT (B)
From Waveshare Wiki
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
|GPIO0||UART0_TX pin, connect to Raspberry Pi D15 pin|
|GPIO1||UART0_RX pin, connect to Raspberry Pi D14 pin|
|GPIO6||I2C1_SDA pin, connect to II2 SDA pin|
|GPIO7||I2C1_SCL pin, connect to II2 SCL pin|
|GPIO19||User key pin, generally for controlling the power switch|
|GPIO21||RTC interruption pin, RTC chip will be pulled down when the RTC clock is triggered|
|GPIO22||Raspberry Pi soft shutdown pin, connect to Raspberry Pi D20 pin|
|GPIO23||Raspberry Pi run pin, connect to Raspberry Pi D21 pin|
|GPIO24||Power control pin, when it is pulled low, the power is cut off, otherwise, the power is on|
|GPIO25||Status LED pin, used to display the current operating status|
|GPIO29||Input voltage acquisition hardware, the voltage here is about 1/10 of the input voltage|
- 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 explosive 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
- Download the installation script.
cd ~ wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
- Give run permission and run:
chmod +x pico_setup.sh ./pico_setup.sh
- Restart the Raspberry Pi:
- 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.
- 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- dev
- Download the OpenOCD source code.
git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
- Compile and install:
cd openocd ./bootstrap ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio make -j3 sudo make install
The theoretical maximum output current is 3A, the actual maximum output current is limited by the power supply, such as using a 3.7V lithium battery (when fully charged), the maximum output current can reach 2A.
It is related to the power supply and output current. If the matching 3000mah3.7V lithium battery is used, the output current will remain at 1A, and it can be used for about 2 hours (depending on the temperature and battery status).
If you require technical support, please go to the Support page and open a ticket.