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 compatibility #112

Closed sturla78 closed 7 months ago

sturla78 commented 2 years ago

Hello, i have read on documentation (https://wiki.52pi.com/index.php/EP-0136) that this board support Support 4.2V 4.35V 4.4V 4.5V 18650 lithium battery, i have purchase two but 3.7V. Can be used with this board ?

galtobellojr commented 2 years ago

My experience with the device is small and eight months past, but I believe my batteries were also 3.7V and the device worked, but only after tweaking some of its settings. In particular, I found the low-voltage setting too low, especially since the value used was (iirc) 0.3V above that specified in the code. This resulted in a low-voltage shutdown very close to the batteries' nominal "charged" level, so minimal run time. Ran (on battery) a CPU test for 4 hours with the fan going after that was corrected, much longer with normal loads.

It was easy to tweak, and the upsplus device worked mostly as expected. The major exception I'd warn about is that when left off of mains power for a couple of weeks, the batteries are drained to 0V. This wouldn't be a problem in "typical" UPS always-powered usage, but I'd hoped to have a portable Pi that could be used continuously on mains and battery for a time, then stored for later. Battery removal seems the only safe way to store the unit for any time. I replaced the battery cover screws with knurled ones to facilitate.

sturla78 commented 2 years ago

Thanks galtobellojr, for describing your experience. I will try with the 3.7 battery me too, and will try to change the low voltage in order to have more battery time. My principal use is connected to main power so i think that for me should not be a problem the battery drain to 0V.

Thanks

sturla78 commented 2 years ago

Hello @galtobellojr, only one question: you have follow #16 in order to set the min and max voltage limit ?

Thanks

galtobellojr commented 2 years ago

@sturla78, I just looked at the discussion you linked, don't recall seeing it before (but given my memory...). I don't recall my FW version, but do seem to recall issues with rapid access to the registers. In my experience, the registers accepted values I wrote to them. And (without access to my code just now) I do believe one change I made was to the protection voltage, which I determined needed to be lower than the default.

I recall dealing with the issues at the time & thinking "this can't be exceptional" given the wide variety (as I discovered) of 18650 batteries. At the time, this was my first use of 18650s, and so my first practical glimpse of the LiIon hellscape. Most of my problems centered around the lack of documentation for this device, unawareness of the GitHub threads, and my newness to the Raspberry/Python world; the changes iirc were trivial. (...once I realized "18650" batteries can have such different specs; it wasn't me causing the batteries to drain to 0V; there was a cron task overwriting my register settings, etc...)

I have seen a thread here about older (v4?) FW versions stuck in reboot cycle when returned to mains, and observed (but don't think anyone commented) that the "mysterious" change in v10(?) that went from 30sec to several mins delay before power-restore-reboot might have been a response to that (prevent cycling by giving drained batts a few minutes' charge before adding load).

It all seemed pretty straightforward to this Raspberry novice with 40yrs in the industry, once I self-documented all the mismatched moving parts. Don't recall seeing any bugs (though that damned cron task made it look like my register writes weren't "taking").

sturla78 commented 2 years ago

Thanks again galtobellojr, i will try to write a new value for low voltage and protection level as described on the issue 16, and then see what happen.

Me too strating to have many years and if i can i try the simple solution :) 😀