UPS Scap 5V5A: Difference between revisions
| (42 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{GD Template Impl}} | {{GD Template Impl}} | ||
[[File:UPS-Scap-5V5A-03.jpg|thumb|right|UPS-Scap-5V5A]] | |||
[[File:UPS-Scap-5V5A-04.jpg|thumb|right|UPS-Scap-5V5A Interface Label]] | |||
[[File:UPS-Scap-5V5A-08.jpg|thumb|right|UPS-Scap-5V5A Battery life]] | |||
[[File:UPS-Scap-5V5A-06.jpg|thumb|right|UPS-Scap-5V5A]] | |||
[[File:UPS-Scap-5V5A-07.jpg|thumb|right|UPS-Scap-5V5A]] | |||
==Safety Instructions & Warnings== | ==Safety Instructions & Warnings== | ||
① Short-circuiting the positive and negative terminals of the capacitors is strictly prohibited. Damage caused by a short circuit is not covered under warranty. | ① Short-circuiting the positive and negative terminals of the capacitors is strictly prohibited. Damage caused by a short circuit is not covered under warranty. | ||
| Line 56: | Line 64: | ||
| '''Charging time''' || Approximately 15 minutes to fully charge (under 30W PD power supply conditions) | | '''Charging time''' || Approximately 15 minutes to fully charge (under 30W PD power supply conditions) | ||
|- | |- | ||
| ''Current and Voltage Detection''' || | | '''Current and Voltage Detection''' || | ||
Identifies charging and discharging status; | * Identifies charging and discharging status; | ||
* voltage and current of the supercapacitor can be read via I2C interface, and the direction of the current indicates whether it is charging or discharging; | |||
voltage and current of the supercapacitor can be read via I2C interface, and the direction of the current indicates whether it is charging or discharging; | * I2C interface allows reading capacitor voltage and charging/discharging current. | ||
I2C interface allows reading capacitor voltage and charging/discharging current. | |||
|- | |- | ||
| '''Power-down detection'''|| | | '''Power-down detection'''|| | ||
One power-down detection pin; | *One power-down detection pin; | ||
* a logic level of 3.3V indicates the presence of external power input, and a logic level of 0V indicates that the external power is off. For Raspberry Pi, external power loss can be detected via GPIO26 (40-pin); | |||
a logic level of 3.3V indicates the presence of external power input, and a logic level of 0V indicates that the external power is off. For Raspberry Pi, external power loss can be detected via GPIO26 (40-pin); | * for other development boards, it can be connected to a GPIO pin. | ||
for other development boards, it can be connected to a GPIO pin. | |||
|- | |- | ||
| Line 89: | Line 93: | ||
* Supercapacitor UPS 5V 5A PD power module x 1 | * Supercapacitor UPS 5V 5A PD power module x 1 | ||
* USB C-C adapter board x 4 | * USB C-C adapter board x 4 | ||
[[File:UPS-Scap-5V5A-05.jpg |600px]] | |||
==Battery life== | ==Battery life== | ||
| Line 96: | Line 102: | ||
100F version: Discharge begins at 5.2V: | 100F version: Discharge begins at 5.2V: | ||
[[File:UPS-Scap-5V5A-F8.jpg |700px]] | |||
==Related Explanation== | ==Related Explanation== | ||
| Line 111: | Line 119: | ||
Several Timing Analysis Methods for Restoring Power Supply After a Supercapacitor Power Failure: | Several Timing Analysis Methods for Restoring Power Supply After a Supercapacitor Power Failure: | ||
[[File:UPS-Scap-5V5A-F9.jpg | 700px]] | |||
The supercapacitor UPS board has a microcontroller for power management. When external power is restored, it sends a power-on signal to the Raspberry Pi 5 via a pin. If the system is currently powered off, it will power on. | The supercapacitor UPS board has a microcontroller for power management. When external power is restored, it sends a power-on signal to the Raspberry Pi 5 via a pin. If the system is currently powered off, it will power on. | ||
| Line 120: | Line 129: | ||
The application needs to clear this dialog box promptly to prevent a forced shutdown triggered after two consecutive power outages and recoveries. The demo code provided by our company already includes the code to clear this dialog box. | The application needs to clear this dialog box promptly to prevent a forced shutdown triggered after two consecutive power outages and recoveries. The demo code provided by our company already includes the code to clear this dialog box. | ||
Note: After executing the shutdown command, the screen will briefly display "plymouth-poweroff.service" for approximately 1-2 seconds. If power is restored during this time, the system will fail to boot and will remain in a shutdown state until the next power outage and restoration. The probability of entering this dead zone is extremely low; it is not a concern for local use. However, for remote unattended use, please carefully evaluate the situation. | '''Note: After executing the shutdown command, the screen will briefly display "plymouth-poweroff.service" for approximately 1-2 seconds. If power is restored during this time, the system will fail to boot and will remain in a shutdown state until the next power outage and restoration. The probability of entering this dead zone is extremely low; it is not a concern for local use. However, for remote unattended use, please carefully evaluate the situation.''' | ||
==Real-time monitoring of voltage and current== | |||
A supercapacitor UPS can monitor the status of the supercapacitor by reading voltage and current values via an I2C circuit. | |||
This operation is based on a Raspberry Pi system version: 2024-11-19-raspios-bookworm-arm64.img.xz | |||
Raspberry Pi system download address: | |||
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit | |||
'''1. Raspberry Pi System ''' | |||
'''1.1Enable the I2C Interface''' | |||
This UPS uses the I2C interface to view real-time power parameters. You need to enable the I2C interface on the Raspberry Pi system: | |||
Top left corner Raspberry Pi logo—Preferences—Raspberry Pi Configuration—Interfaces | |||
Enable I2C, as shown in the image: | |||
[[File:UPS-Scap-5V5A-R1.jpg | 500px]] | |||
This completes the relevant configuration. | |||
'''1.2 Viewing Real-Time Power Parameters''' | |||
Open the Raspberry Pi terminal and download software to view real-time power parameters: | |||
<nowiki> | |||
<code bash> | |||
wget -O INA219.py http://www.mcuzone.com/wiki/3006\_UPS\_Scap\_PD/INA219.py.zip | |||
</code> | |||
</nowiki> | |||
Then run the software to see the real-time power parameters: | |||
python INA219.py | |||
During charging: | |||
[[File:UPS-Scap-5V5A-R2-New.jpg | 500px]] | |||
During discharge: | |||
[[File:UPS-Scap-5V5A-R3-New.jpg | 500px]] | |||
'''Note: The "current running time" here refers to the running time of the INA219.py program, not the actual charging time.''' | |||
This is how a supercapacitor UPS starts discharging when fully charged (capacitor voltage around 5.2V), then restarts charging when the capacitor voltage drops below 3V, until it is fully charged (capacitor voltage around 5.2V). | |||
'''2. Ubuntu system''' | |||
This operation is based on the Ubuntu system version: ubuntu-24.10-preinstalled-desktop-arm64+raspi.img.xz | |||
Ubuntu system download address: | |||
https://ubuntu.com/download/raspberry-pi | |||
'''2.1 Enabling the I2C Interface''' | |||
This UPS uses the I2C interface to view real-time power parameters. You need to confirm that the I2C interface is enabled on the Ubuntu system: | |||
sudo nano /boot/firmware/config.txt | |||
Check if i2c_arm (highlighted in red) is set to "on". If not, please configure it as shown in the image below: | |||
[[File:UPS-Scap-5V5A-U1.jpg | 500px]] | |||
'''2.2 Viewing Real-Time Power Supply Parameters''' | |||
Open the Ubuntu system terminal and first install smbus support: | |||
sudo apt-get install python3-smbus | |||
Then download the software to view real-time power supply parameters: | |||
<nowiki> | |||
<code bash> | |||
wget -O INA219.py http://www.mcuzone.com/wiki/3006_UPS_Scap_PD/INA219.py.zip | |||
</code> | |||
</nowiki> | |||
Run the software to see the real-time power supply parameters: | |||
python3 INA219.py | |||
During charging: | |||
[[File:UPS-Scap-5V5A-U2-New.jpg | 500px]] | |||
During discharge: | |||
[[File:UPS-Scap-5V5A-U3.jpg | 500px]] | |||
'''Note: The "current running time" here refers to the running time of the INA219.py program, not the actual charging time.''' | |||
This is how a supercapacitor UPS starts discharging when fully charged (capacitor voltage around 5.2V), then restarts charging when the capacitor voltage drops below 3V, until it is fully charged (capacitor voltage around 5.2V). | |||
==User Manual== | |||
Power failure detection demonstration:[http://wiki.mcuzone.com:81/index.php?title=3006_RPi5-UPS_Scap-PD_5V5A#%E5%85%AD%E3%80%81%E6%8E%89%E7%94%B5%E6%A3%80%E6%B5%8B%E6%BC%94%E7%A4%BA Power failure detection demonstration] | |||
Real-time monitoring of voltage and current:[http://wiki.mcuzone.com:81/index.php?title=3006_RPi5-UPS_Scap-PD_5V5A#%E4%BA%94%E3%80%81%E7%94%B5%E5%8E%8B%E7%94%B5%E6%B5%81%E5%AE%9E%E6%97%B6%E7%9B%91%E6%B5%8B Real-time monitoring of voltage and current] | |||
==FAQ== | ==FAQ== | ||