UPS Scap 5V5A: Difference between revisions
| (13 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{GD Template Impl}} | {{GD Template Impl}} | ||
==Safety Instructions & Warnings== | ==Safety Instructions & Warnings== | ||
| Line 95: | Line 87: | ||
==Packing List== | ==Packing List== | ||
* | * Supercapacitor UPS 5V 5A PD power module x 1 | ||
* | * USB C-C adapter board x 4 | ||
== | ==Battery life== | ||
After an external power failure, the system automatically switches to supercapacitor power to save data and shut down the system. The measured operating time of the supercapacitor UPS at various cutoff voltages is listed below: | |||
'''(Note: The three modes—long-run mode, balanced mode, and performance mode—are adjusted by resistors on the circuit board. The factory default is long-run mode.)''' | |||
100F version: Discharge begins at 5.2V: | |||
== | ==Related Explanation== | ||
'''1.PD Handshake Protocol''' | |||
* | * The Raspberry Pi 5 uses a non-standard PD handshake protocol. Even if a standard 5V 5A power supply is used and the voltage and current meet the requirements, the system will still issue an alarm if the corresponding handshake protocol is missing. | ||
* This module's USB-C output natively integrates a PD handshake chip, ensuring perfect compatibility with the Raspberry Pi 5 and eliminating pop-up alarms. | |||
* | * The USB-A port can be used with a USB A-C PD adapter to provide a second power source for the Raspberry Pi 5. | ||
'''2.Power-Off Detection and Power-On/Off Logic''' | |||
* '''Detection Method''': Raspberry Pi 5 detects the external power status in real time via GPIO26 pin. | |||
* '''Power-Off Trigger''': GPIO level goes low → Script execution saves data → Countdown → Safe shutdown | |||
* '''Power-On Sequence (Onboard Microcontroller Power Management)''': When external power is restored, the module sends a power-on signal to Raspberry Pi 5 via a pin, in two scenarios: | |||
# '''System is completely powered off''': Automatic power-on upon receiving the signal; | |||
# '''System is still running normally''': A power confirmation pop-up appears. The application must automatically clear the pop-up. If the pop-up is not cleared after two consecutive power outages and power-on cycles, a forced shutdown will be triggered. | |||
* '''Dead Zone Special Condition (Extremely Low Probability)''': After sending the shutdown command, the screen will briefly display plymouth-poweroff.service (lasting approximately 1-2 seconds). If external power is restored during this window, the system will lock and cannot start, only recovering after the next power outage and power-on cycle. Dead zones are extremely rare, so there's no need to worry about them for local use; however,'''thorough testing and evaluation are recommended for remote, unattended scenarios.''' | |||
'''3.I2C Voltage and Current Monitoring''' | |||
* Real-time I2C bus reading via the INA219 chip: capacitor voltage, charging/discharging current, and power; remaining battery life can be estimated based on voltage. | |||
* Supports Raspberry Pi OS and Ubuntu systems. | |||
'''4.Power-Down Detection GPIO Script Demonstration ''' | |||
The board has an onboard power-down detection circuit. For a Raspberry Pi 5, it's directly connected to GPIO26 of the 40-pin GPIO for detection. See below for specific instructions (using a Raspberry Pi system as an example; the I2C interface needs to be enabled beforehand). The script code is as follows (script name: gpiot.sh): Power-Down Indication Script Demonstration | |||
'''5.This module can also be used on non-Raspberry Pi 5 platforms, but please note the following:''' | |||
# Power-down detection: Connect the detection signal through the appropriate GPIO pin and read the voltage and current via I2C to determine the charging and discharging status. | |||
# Power-on/off logic: Most development boards do not have dedicated power-on/off logic for Raspberry Pi 5. After power-off, the system may enter a locked state upon power restoration. | |||
# Recommended solution: After saving the data, the application continuously monitors the power-down detection pin. If power is restored, the application continues to execute the business process; if power is not restored, it will idle and wait for the system to shut down due to power failure. | |||
# Compatibility prerequisites: If the target board has a logic power-on/off pin, it can be connected to implement the same automatic power-on/off function as Raspberry Pi 5. | |||
==FAQ== | ==FAQ== | ||
<!--Add review function! --> | <!--Add review function! --> | ||