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

Charging don't stop #87

Open neresus opened 2 years ago

neresus commented 2 years ago

Hello

I don't know what I am doing wrong. I used litokala 18650 batteries and still have 3,7V on them after three days ups still charging.

Raspberry Pi power supply voltage: 5.084 V Current current consumption of Raspberry Pi: 1791.590 mA Current power consumption of Raspberry Pi: 8962.153 mW Batteries Voltage: 3.736 V Battery current (charging), rate: 360.000 mA Current battery power supplement: 1253.659 mW Current processor voltage: 3265 mV Current Raspberry Pi report voltage: 5104 mV Current battery port report voltage: 4211 mV Current charging interface report voltage (Type C): 5010 mV Current charging interface report voltage (Micro USB): 19 mV Currently charging through Type C. Current battery temperature (estimated): 48 degC Full battery voltage: 4292 mV Battery empty voltage: 3791 mV Battery protection voltage: 3700 mV Battery remaining capacity: 92 % Sampling period: 2 Min Current power state: normal Shutdown countdown: 198 sec Automatically turn on when there is external power supply! Restart countdown: 198 sec Accumulated running time: 3125 sec Accumulated charged time: 3136 sec This running time: 748 sec Version number: 10

peacho10 commented 2 years ago

Hi, some problem here. The only way to get a good measurement again is: turn off the UPS(and RPI) remove UPS power remove the batteries put the batteries put the power to the UPS and turn the UPS

mmaga commented 2 years ago

I still have the same problem reported by @neresus after the steps suggested by @peacho10 :-/

neresus commented 2 years ago

Problem is that device have full battery voltage 100mA higher than maximum of full voltage on batteries I don't know why.. After two complete cycles charging and discharging my ups still charge batteries and shows 99% of capacity.

mmaga commented 2 years ago

Problem is that device have full battery voltage 100mA higher than maximum of full voltage on batteries I don't know why.. After two complete cycles charging and discharging my ups still charge batteries and shows 99% of capacity.

@neresus , my batteries are 4.2V I'm feeding with info I got from the UPS Plus script: Batteries Voltage: 4.216 V Full battery voltage: 4293 mV

stuuno commented 2 years ago

I think I may have the same issue as above.

I have tried a couple of different batteries, have done the firmware update, reset to factory defaults, tried different chargers and tried setting the parameters manually. Still the UPS does not charge to 100%, https://api.52pi.com/ says "It seems that your battery is still not fully charged."

The batteries I would like to be using are used LGDAME11865 (https://secondlifestorage.com/index.php?threads/lg-lgdame11865-cell-specifications.8332/)

Output from upsPlus_iot.py 'PiVccVolt': 4.98, 'PiIddAmps': 929.8570227081581, 'BatVccVolt': 0.0, 'BatIddAmps': 98.04878048780488, 'McuVccVolt': 3259, 'BatPinCVolt': 4237, 'ChargeTypeCVolt': 8929, 'ChargeMicroVolt': 44, 'BatTemperature': 41, 'BatFullVolt': 4295, 'BatEmptyVolt': 3700, 'BatProtectVolt': 3700, 'SampleTime': 2, 'AutoPowerOn': 1, 'OnlineTime': 157944, 'FullTime': 158232, 'OneshotTime': 5175, 'Version': 10,

Watching this thread with interest.

ArjenR49 commented 2 years ago

With f/w v.10: Reset UPS to factory defaults by writing 1 to register 0x1B. No need to do anything else like taking the batteries out. (see script reset2FactoryDefaults.py at https://github.com/ArjenR49/UPS-Plus or use the appropriate i2cset command; the f/w will set the register back to 0 automatically) You could set the protection voltage as low as 3000 mV (setProtectionVoltage.py at https://github.com/ArjenR49/UPS-Plus) before the next step. Have a UPS control script running, like fanShutDownUps.py by frtz13. Disconnect AC and run the batteries down and then recharge them (in the UPS) at least once to make the UPS learn the low and the high voltage limit. Use a good quality charging cable and a good quality PD charger. It will deliver 9 V to the UPS and more than 3 A charging current to the batteries when they're empty. Eventually the charge % will become 99 and even the last blue LED will stop blinking.

neresus commented 1 year ago

I have 65W usb-c charger. Second day of charging 8,682V 0,2A... still not charged :(

toruvinn commented 1 year ago

Unfortunately I, like many people here, have the exact same problem. I'm not sure what's up with the UPS, but it never stops charging, despite reaching 4.2V on the battery already. It won't go higher, of course.

$ upsPlus_iot.py 
{
  "PiVccVolt": 5.148,
  "PiIddAmps": 984.861227922624,
  "BatVccVolt": 4.204,
  "BatIddAmps": 80.0,
  "McuVccVolt": 3290,
  "BatPinCVolt": 4198,
  "ChargeTypeCVolt": 9081,
  "ChargeMicroVolt": 64,
  "BatTemperature": 40,
  "BatFullVolt": 4000,
  "BatEmptyVolt": 3600,
  "BatProtectVolt": 3700,
  "SampleTime": 2,
  "AutoPowerOn": 1,
  "OnlineTime": 161237,
  "FullTime": 161237,
  "OneshotTime": 161237,
  "Version": 10
}

You can even see I've set:

  "BatFullVolt": 4000,
  "BatEmptyVolt": 3600,
  "BatProtectVolt": 3700,

But unfortunately the UPS seems to ignore it? How do those settings work? Oh and of course I've done bus.write_byte_data(DEVICE_ADDR, 42, 1):

FixedVbat register is: 1
Full Voltage register is: 4000
Empty Voltage register is: 3600

Could someone please explain how do those settings work? Firmware version is 10, as stated above. I would really wish to set the max voltage to some arbitrary number, to prolong the battery life (not to mention, I really want the UPS to stop constantly charging them when they are full already), probably at around 60-70% capacity, that's more than enough for my use case.

I've also tried two different battery types, they are both 4.2V.

Raspberry Pi power supply voltage: 5.140 V
Current current consumption of Raspberry Pi: 953.070 mA
Current power consumption of Raspberry Pi: 4911.690 mW
Batteries Voltage: 4.204 V
Battery current (charging), rate: 100.000 mA
Current battery power supplement: 336.585 mW
Current processor voltage: 3292 mV
Current Raspberry Pi report voltage: 5186 mV
Current battery port report voltage: 4199 mV
Current charging interface report voltage (Type C): 9068 mV
Current charging interface report voltage (Micro USB): 57 mV
Currently charging through Type C.
Current battery temperature (estimated): 41 degC
Full battery voltage: 4000 mV
Battery empty voltage: 3600 mV
Battery protection voltage: 3700 mV
Battery remaining capacity: 95 %

Makes me wonder what the "remaining capacity" is given that current bat voltage is above "max voltage" reported by Full-featured-demo-code.py as above...

Is there a firmware version that actually honours the max voltage setting?

Thank you.

neresus commented 1 year ago

Hello. Is someone who haven't this issue and charging stops? Can you write here your batteries manufacturer and type?

anomaly256 commented 1 year ago

Currently on firmware version 14, seeing this issue as well. Charging never stops, I suspect because the batteries aren't isolated once full and continue to contribute something to powering the pi. As such the UPS is showing a charging current of like 40 mah. Is this going to damage the batteries? Or is this current low enough to be irrelevant for the battery lifespan?

jens-roth commented 5 months ago

Hello. I'm using two different UPS Plus EP-1036 (rev. 5.4 2020-01-05 PCB03a) and (rev. 5.0 2020/12/23 PCB01b) both on Firmware v14. Because I can not revert to Firmware v10. OTA_firmware_upgrade.py failed to download any other Firmware version ("File not found"). I tried to set the battery full voltage to 4100mV to prevent from constantly overloading the lipo cells. This did not work. It's constantly charging the cells over 4200 mV. So I'm realley concerned to use it 24/7. I would like to know, if the setting of batt full voltage is controlling the charge settings in any way. I understand, that setting the full voltage higher than 4200mV for lipo cells could be really dangerous. But I want to set it lower for safety reasons.