geeekpi / upsplus

UPS Plus is a new generation of UPS power management module. It is an improved version of the original UPS prototype. It has been fixed the bug that UPS could not charge and automatically power off during work time. It can not only perform good battery power management, but also provide stable voltage output and RTC functions. At the same time,it support for FCP, AFC, SFCP fast charge protocol, support BC1.2 charging protocol, support battery terminal current/voltage monitoring and support two-way monitoring of charge and discharge. It can provide programmable PVD function. Power Voltage Detector (PVD) can be used to detect if batteries voltage is below or above configured voltage. Once this function has been enabled, it will monitoring your batteries voltage, and you can control whether or not shut down Raspberry Pi via simple bash script or python script. This function will protect your batteries from damage caused by excessive discharge. It can provide Adjustable data sampling Rate. This function allows you to adjust the data sampling rate so that you can get more detailed battery information and also it will consume some power. The data sampling information can communicate with the upper computer device through the I2C protocol. UPS Plus supports the OTA firmware upgrade function. Once there is a new firmware update, it is very convenient for you to upgrade firmware for UPS Plus. The firmware upgrade can be completed only by connecting to the Internet,and execute a python script. Support battery temperature monitoring and power-down memory function. UPS Plus can be set to automatically start the Raspberry Pi after the external power comes on. The programmable shutdown and forced restart function will provide you with a remote power-off restart management method. That means you don’t need to go Unplug the power cable or press the power button to cut off the power again. You can set the program to disconnect the power supply after a few seconds after the Raspberry Pi is shut down properly. And you can also reconnect the power supply after a forced power failure to achieve a remote power-off and restart operation. Once it was setting up, you don't need to press power button to boot up your device which is very suitable for smart home application scenarios.
https://wiki.52pi.com/index.php?title=UPS_Plus_SKU:_EP-0136
MIT License
73 stars 25 forks source link

ups switches back on after shutdown countdown, even when AC power is not restored #15

Closed frtz13 closed 3 years ago

frtz13 commented 3 years ago

follow-up on issue #7

using firmware v. 5 after a shutdown countdown, with Back-To-AC Auto Power up enabled, the UPS switches back on, even when no AC power supply is connected.

pi@raspberrypi:~/upsplus $ python3 Full-featured-demo-code.py Raspberry Pi power supply voltage: 4.936 V Current current consumption of Raspberry Pi: 1184.861 mA Current power consumption of Raspberry Pi: 5665.265 mW Batteries Voltage: 4.064 V Battery current (discharge), rate: 1590.000 mA Current battery power consumption: 6473.171 mW Current processor voltage: 3282 mV Current Raspberry Pi report voltage: 4962 mV Current battery port report voltage: 4042 mV Current charging interface report voltage (Type C): 73 mV Current charging interface report voltage (Micro USB): 0 mV Currently not charging. Current battery temperature (estimated): 46 degC Full battery voltage: 4285 mV Battery empty voltage: 3700 mV Battery protection voltage: 3700 mV Battery remaining capacity: 55 % Sampling period: 2 Min Current power state: normal No shutdown countdown! Automatically turn on when there is external power supply! No restart countdown! Accumulated running time: 7634 sec Accumulated charged time: 7639 sec This running time: 5964 sec Version number: 5 Serial Number is:(...)

nickfox-taterli commented 3 years ago

You may need to update the firmware via Method 1, which will make him forget the configuration that already exists, and look forward to the next feedback.

frtz13 commented 3 years ago

Firmware had been updated via Method 1. I took out the batteries another time for reset. still the same fault.

nickfox-taterli commented 3 years ago

Please let us know the process of testing and we will try to reproduce this issue.

frtz13 commented 3 years ago

steps to reproduce the issue:

demo code result (1): pi@raspberrypi:~/upsplus $ python3 Full-featured-demo-code.py Raspberry Pi power supply voltage: 4.928 V Current current consumption of Raspberry Pi: 1082.759 mA Current power consumption of Raspberry Pi: 5739.277 mW Batteries Voltage: 4.212 V Battery current (charging), rate: 201.951 mA Current battery power supplement: 936.585 mW Current processor voltage: 3206 mV Current Raspberry Pi report voltage: 4855 mV Current battery port report voltage: 4100 mV Current charging interface report voltage (Type C): 4828 mV Current charging interface report voltage (Micro USB): 0 mV Currently charging through Type C. Current battery temperature (estimated): 54 degC Full battery voltage: 4285 mV Battery empty voltage: 3700 mV Battery protection voltage: 3700 mV Battery remaining capacity: 74 % Sampling period: 2 Min Current power state: normal No shutdown countdown! Automatically turn on when there is external power supply! No restart countdown! Accumulated running time: 171 sec Accumulated charged time: 171 sec This running time: 171 sec Version number: 5 Serial Number is:(…)

demo-code result (2) pi@raspberrypi:~/upsplus $ python3 Full-featured-demo-code.py Raspberry Pi power supply voltage: 4.932 V Current current consumption of Raspberry Pi: 1089.655 mA Current power consumption of Raspberry Pi: 5359.125 mW Batteries Voltage: 4.140 V Battery current (discharge), rate: 1585.854 mA Current battery power consumption: 6848.780 mW Current processor voltage: 3301 mV Current Raspberry Pi report voltage: 4988 mV Current battery port report voltage: 4138 mV Current charging interface report voltage (Type C): 254 mV Current charging interface report voltage (Micro USB): 3 mV Currently not charging. Current battery temperature (estimated): 42 degC Full battery voltage: 4285 mV Battery empty voltage: 3700 mV Battery protection voltage: 3700 mV Battery remaining capacity: 56 % Sampling period: 2 Min Current power state: normal No shutdown countdown! Automatically turn on when there is external power supply! No restart countdown! Accumulated running time: 897 sec Accumulated charged time: 897 sec This running time: 897 sec Version number: 5 Serial Number is:(…)

nickfox-taterli commented 3 years ago

We have made some updates to the software that seem to have solved the problem, please test it and wait for your feedback.

frtz13 commented 3 years ago

using firmware version 6. the typical scenario now works again:

However, the following scenario (issue #7) still does not work:

nickfox-taterli commented 3 years ago

The problem has been identified and a firmware update has been made, please update to version 7 and test.

frtz13 commented 3 years ago

using firmware version 7. both of the above scenarios now work fine. thanks.