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

V8 Firmware overcharged Samsung 25R batteries #54

Closed nikivanov closed 7 months ago

nikivanov commented 3 years ago

I'm running V8 Firmware. I left the unit plugged into the charger overnight. When I came back it luckily didn't catch fire. However both batteries, genuine Samsung 25R, are COMPLETELY dead - multimeter can't detect any appreciable voltage between the terminals. I've unplugged the charger and replaced the batteries with another fully charged set. When I ran the Full-featured-demo-code.py script it gave me:

Full battery voltage: 4914 mV

It seems the unit kept overcharging them until some internal fuse blew. I tried doing the following:

fullVoltage = 4100 self.bus.write_byte_data(DEVICE_ADDR, 13, fullVoltage & 0xFF) self.bus.write_byte_data(DEVICE_ADDR, 14, (fullVoltage >> 8)& 0xFF)

but it doesn't seem to be able to write to that register - Full voltage is still at 4.9V

Has anyone else had a similar issue? Is it even possible to set max charging voltage? I think it should be - batteries last longer if they aren't charged to 100%, so maybe setting max charged V to 4.0V might be useful.

hellresistor commented 3 years ago

what is miliamper of each battery value 2500mAh ?

nikivanov commented 3 years ago

Yep, 2500mah

hellresistor commented 3 years ago

Yep, 2500mah

Mine 2600mah. I am waiting arrive of 2000mah batteries to test...

nikivanov commented 3 years ago

To test what? The unit should stop charging batteries once they reach a certain voltage. This used to work in earlier versions of the firmware, fwiw.

hellresistor commented 3 years ago

batteries quality. other brand and other values. I am on paranoid mode ;)

nickfox-taterli commented 3 years ago

in fact, the capacity of the battery is determined by the battery, modifying this parameter is to determine the charging behavior, when close to full charge voltage, it will actively reduce the charging rate.

nikivanov commented 3 years ago

@nickfox-taterli Here's the output of the demo script:

~/upsplus $ python3 Full-featured-demo-code.py Raspberry Pi power supply voltage: 4.976 V Current current consumption of Raspberry Pi: 478.553 mA Current power consumption of Raspberry Pi: 2624.054 mW Batteries Voltage: 0.000 V Battery current (discharge), rate: -895.854 mA Current battery power consumption: 0.000 mW Current processor voltage: 3360 mV Current Raspberry Pi report voltage: 5034 mV Current battery port report voltage: 4619 mV Current charging interface report voltage (Type C): 0 mV Current charging interface report voltage (Micro USB): 0 mV Currently not charging. Current battery temperature (estimated): 43 degC Full battery voltage: 4000 mV Battery empty voltage: 3000 mV Battery protection voltage: 3000 mV Battery remaining capacity: 99 % Sampling period: 2 Min Current power state: normal No shutdown countdown! Does not automatically turn on when there is an external power supply! No restart countdown! Accumulated running time: 2777 sec Accumulated charged time: 150678 sec This running time: 414 sec Version number: 9

I left the UPS unit plugged in for too long (last time I did that it killed my batteries altogether). This time it just overcharged the batteries. Note the battery port voltage - it's 4.6V. These are genuine Samsung 25R batteries.

neresus commented 3 years ago

I have 4,27 on batteries and now is 4th day when they are being charged.. this is strange behavior.