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

Battery voltage reports 32V #50

Closed ggtools closed 7 months ago

ggtools commented 3 years ago

I brought a new UPS and while everything is OK I have a strange battery voltage which always reports 32V. I didn't check this with a voltmeter but I'm positively sure that two 3.7 v battery cannot output 32V even by accident.

The output of Full-featured-demo-code.pyis:

Raspberry Pi power supply voltage: 5.004 V
Current current consumption of Raspberry Pi: 1198.654 mA
Current power consumption of Raspberry Pi: 5991.590 mW
Batteries Voltage: 32.000 V
Battery current (charging), rate: 2615.854 mA
Current battery power supplement: 83712.195 mW
Current processor voltage: 3337 mV
Current Raspberry Pi report voltage: 5032 mV
Current battery port report voltage: 3857 mV
Current charging interface report voltage (Type C): 6 mV
Current charging interface report voltage (Micro USB): 0 mV
Currently not charging.
Current battery temperature (estimated): 39 degC
Full battery voltage: 4297 mV
Battery empty voltage: 3700 mV
Battery protection voltage: 3700 mV
Battery remaining capacity: 18 %
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: 59847 sec
Accumulated charged time: 283677 sec
This running time: 3931 sec
Version number: 8
Serial Number is:private
yoyojacky commented 3 years ago

please execute the python script again ? Is it remain this output?

ggtools commented 3 years ago

Sorry I was away so the whole RPi/UPS was off. I let it run a couple of days being plugged and I still get the following output:

Raspberry Pi power supply voltage: 5.008 V
Current current consumption of Raspberry Pi: 1176.451 mA
Current power consumption of Raspberry Pi: 5890.664 mW
Batteries Voltage: 32.000 V
Battery current (charging), rate: 4127.805 mA
Current battery power supplement: 134141.463 mW
Current processor voltage: 3312 mV
Current Raspberry Pi report voltage: 5001 mV
Current battery port report voltage: 4197 mV
Current charging interface report voltage (Type C): 8938 mV
Current charging interface report voltage (Micro USB): 3 mV
Currently charging through Type C.
Current battery temperature (estimated): 41 degC
Full battery voltage: 4303 mV
Battery empty voltage: 3700 mV
Battery protection voltage: 3700 mV
Battery remaining capacity: 90 %
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: 315702 sec
Accumulated charged time: 1273354 sec
This running time: 125138 sec
Version number: 8
yoyojacky commented 3 years ago

please try to upgrade firmware via OTA and try again.