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

[Firmware V.9] Battery voltage bad data after a few hours. #56

Closed peacho10 closed 7 months ago

peacho10 commented 3 years ago

Hi, after being in operation for a few hours, the battery voltage reading is wrong.

2021/07/21 14:05:02 Raspberry Pi power supply voltage: 4.760 V Current current consumption of Raspberry Pi: 2081.245 mA Current power consumption of Raspberry Pi: 10247.267 mW Batteries Voltage: 4.220 V Battery current (charging), rate: 168.049 mA Current battery power supplement: 712.195 mW Current processor voltage: 3309 mV Current Raspberry Pi report voltage: 5116 mV Current battery port report voltage: 4187 mV Current charging interface report voltage (Type C): 5417 mV Current charging interface report voltage (Micro USB): 38 mV Currently charging through Type C. Current battery temperature (estimated): 48 degC Full battery voltage: 4270 mV Battery empty voltage: 3789 mV Battery protection voltage: 3600 mV Battery remaining capacity: 97 % 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: 7978 sec Accumulated charged time: 8002 sec This running time: 7972 sec Version number: 9 Serial Number is: xxxxxxx-xxxxxxx-xxxxxxx

1 minute later:

2021/07/21 14:06:01 Raspberry Pi power supply voltage: 4.972 V Current current consumption of Raspberry Pi: 2510.177 mA Current power consumption of Raspberry Pi: 13917.578 mW Batteries Voltage: 3.764 V Battery current (charging), rate: 128.049 mA Current battery power supplement: 448.780 mW Current processor voltage: 3309 mV Current Raspberry Pi report voltage: 5094 mV Current battery port report voltage: 4214 mV Current charging interface report voltage (Type C): 5391 mV Current charging interface report voltage (Micro USB): 64 mV Currently charging through Type C. Current battery temperature (estimated): 48 degC Full battery voltage: 4270 mV Battery empty voltage: 3789 mV Battery protection voltage: 3600 mV Battery remaining capacity: 97 % 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: 8034 sec Accumulated charged time: 8058 sec This running time: 8028 sec Version number: 9

It also happens with firmware 7 and 8.

The only way to get a good measurement again is to turn off the UPS, remove the batteries, put the batteries and turn the UPS back on.

ArjenR49 commented 3 years ago

Where did you get f/w version number 9?

On geeekpi's GitHub there's only v. 8 ...

I went back from 8 to 7 weeks ago, because I had big problems with v. 8. Couldn't write to registers meant to be written to. So I've been waiting for an update all this time or at least an acknowledgement of the problems.

My only problem now with version 7 is that if you shut down the pi from its OS, you cannot start it again unless you take out the batteries. The button is dead. But if the power is disconnected and the pi stops after a while, it will restart when power is restored. That much works fine now. I use frtz13's software from GitHub.

I plan to reset the ups to factory defaults one day soon and see if that solves the button problem. Reset is mentioned in the table of the documentation ep-0136. Write a 1 to address 0x1B ... Don't remember if I ever tried that before.

Suggestion for development: Since there is a RTC on the ups board, one could expect there to be a possibility to program an automatic boot. RTC's seem to have the possibility to do a particular something at a certain time. I have an Olmatic UPS on a pi3b+ which uses that functionality of the RTC if so desired.

Arjen (On The Road)

Op wo 21 jul. 2021 14:30 schreef peacho10 @.***>:

Hi, after being in operation for a few hours, the battery voltage reading is wrong.

2021/07/21 14:05:02 Raspberry Pi power supply voltage: 4.760 V Current current consumption of Raspberry Pi: 2081.245 mA Current power consumption of Raspberry Pi: 10247.267 mW Batteries Voltage: 4.220 V Battery current (charging), rate: 168.049 mA Current battery power supplement: 712.195 mW Current processor voltage: 3309 mV Current Raspberry Pi report voltage: 5116 mV Current battery port report voltage: 4187 mV Current charging interface report voltage (Type C): 5417 mV Current charging interface report voltage (Micro USB): 38 mV Currently charging through Type C. Current battery temperature (estimated): 48 degC Full battery voltage: 4270 mV Battery empty voltage: 3789 mV Battery protection voltage: 3600 mV Battery remaining capacity: 97 % 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: 7978 sec Accumulated charged time: 8002 sec This running time: 7972 sec Version number: 9 Serial Number is: xxxxxxx-xxxxxxx-xxxxxxx 1 minute later:

2021/07/21 14:06:01 Raspberry Pi power supply voltage: 4.972 V Current current consumption of Raspberry Pi: 2510.177 mA Current power consumption of Raspberry Pi: 13917.578 mW Batteries Voltage: 3.764 V Battery current (charging), rate: 128.049 mA Current battery power supplement: 448.780 mW Current processor voltage: 3309 mV Current Raspberry Pi report voltage: 5094 mV Current battery port report voltage: 4214 mV Current charging interface report voltage (Type C): 5391 mV Current charging interface report voltage (Micro USB): 64 mV Currently charging through Type C. Current battery temperature (estimated): 48 degC Full battery voltage: 4270 mV Battery empty voltage: 3789 mV Battery protection voltage: 3600 mV Battery remaining capacity: 97 % 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: 8034 sec Accumulated charged time: 8058 sec This running time: 8028 sec Version number: 9 It also happens with firmware 7 and 8.

The only way to get a good measurement again is to turn off the UPS, remove the batteries, put the batteries and turn the UPS back on.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geeekpi/upsplus/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCBKNS5ATDSH3J3OMV5MR3TY24W5ANCNFSM5AX3SE7A .

hellresistor commented 3 years ago

@ArjenR49 I got on my last firmware upgrade the V9

ArjenR49 commented 3 years ago

@hellresistor You will have noticed that these GitHub don't know a thing about this version 9. I have been checking these pages for weeks and hoping for a newer and hopefully better version. So, what would you be able to say about version 9, especially compared to v.8, which had serious issues, in my experience, at least. I had to go back to v.7, once I found out it is possible at all.