UPS Scap 5V5A: Difference between revisions

Rita (talk | contribs)
Rita (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 98: Line 98:


==Related Explanation==
==Related Explanation==
'''5.1 PD Handshake Protocol'''
'''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.
* 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.
* 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.
* 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.


'''5.2 Power-Off Detection and Power-On/Off Logic'''
'''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.
* '''Detection Method''': Raspberry Pi 5 detects the external power status in real time via GPIO26 pin.
Line 115: Line 115:


* '''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.'''
* '''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==