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.
Traceback (most recent call last):
File "/home/pi/bin/upsPlus.py", line 41, in
batt_power = ina_batt.power()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 204, in power
self._handle_current_overflow()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 246, in _handle_current_overflow
self._increase_gain()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 271, in _increase_gain
raise DeviceRangeError(self.__GAIN_VOLTS[gain], True)
ina219.DeviceRangeError: Current out of range (overflow), for gain 0.32V, device limit reached
UPS Plus Installation is Incomplete! ... failed!
Please visit wiki for more information:.
I have upgraded firmware to latest version via OTA, yet all scripts fail for example:
pi@raspberrypi:~ $ curl -Lso- https://raw.githubusercontent.com/geeekpi/upsplus/main/install.sh | bash
Welcome to 52Pi Technology UPS Plus auto-install Program!.
More information please visit here:.
-----------------------------------------------------.
https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136.
-----------------------------------------------------.
Start the configuration environment check....
Network status is ok....
Start the software check....
git has been installed..
pi-ina219 library has been installed.
Installing smbus2 library....
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: smbus in ./.local/lib/python3.9/site-packages (1.1.post2)
Requirement already satisfied: smbus2 in ./.local/lib/python3.9/site-packages (0.4.1)
smbus2 Installation successful..
create /home/pi/bin directory....
Create python3 script in location: /home/pi/bin/upsPlus.py Successful.
Create UPS Plus IoT customer service python script successful.
Add into general crontab list..
crontab has been created successful!.
------Current information of the detected Raspberry Pi------
Raspberry Pi Supply Voltage: 4.964 V
Raspberry Pi Current Current Consumption: 1164.172 mA
Raspberry Pi Current Power Consumption: 5776.283 mW
Traceback (most recent call last):
File "/home/pi/bin/upsPlus.py", line 41, in
batt_power = ina_batt.power()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 204, in power
self._handle_current_overflow()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 246, in _handle_current_overflow
self._increase_gain()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 271, in _increase_gain
raise DeviceRangeError(self.__GAIN_VOLTS[gain], True)
ina219.DeviceRangeError: Current out of range (overflow), for gain 0.32V, device limit reached
UPS Plus Installation is Incomplete! ... failed!
Please visit wiki for more information:.
-----------------------------------------------------.
https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136.
-----------------------------------------------------.
pi@raspberrypi:~ $
I2C is enabled, otherwise it would never read this:
Raspberry Pi Supply Voltage: 4.964 V
Raspberry Pi Current Current Consumption: 1164.172 mA
Raspberry Pi Current Power Consumption: 5776.283 mW
Somehow I just think the board may be defective, especially that after several hours even with power supply connected batteries finally go flat and raspberry shut downs. Batteries are doublepow as recomended on board docs
Traceback (most recent call last): File "/home/pi/bin/upsPlus.py", line 41, in
batt_power = ina_batt.power()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 204, in power
self._handle_current_overflow()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 246, in _handle_current_overflow
self._increase_gain()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 271, in _increase_gain
raise DeviceRangeError(self.__GAIN_VOLTS[gain], True)
ina219.DeviceRangeError: Current out of range (overflow), for gain 0.32V, device limit reached
UPS Plus Installation is Incomplete! ... failed!
Please visit wiki for more information:.
I have upgraded firmware to latest version via OTA, yet all scripts fail for example:
pi@raspberrypi:~ $ curl -Lso- https://raw.githubusercontent.com/geeekpi/upsplus/main/install.sh | bash Welcome to 52Pi Technology UPS Plus auto-install Program!. More information please visit here:. -----------------------------------------------------. https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136. -----------------------------------------------------. Start the configuration environment check.... Network status is ok.... Start the software check.... git has been installed.. pi-ina219 library has been installed. Installing smbus2 library.... Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: smbus in ./.local/lib/python3.9/site-packages (1.1.post2) Requirement already satisfied: smbus2 in ./.local/lib/python3.9/site-packages (0.4.1) smbus2 Installation successful.. create /home/pi/bin directory.... Create python3 script in location: /home/pi/bin/upsPlus.py Successful. Create UPS Plus IoT customer service python script successful. Add into general crontab list.. crontab has been created successful!.
------Current information of the detected Raspberry Pi------
Raspberry Pi Supply Voltage: 4.964 V Raspberry Pi Current Current Consumption: 1164.172 mA Raspberry Pi Current Power Consumption: 5776.283 mW
Traceback (most recent call last): File "/home/pi/bin/upsPlus.py", line 41, in
batt_power = ina_batt.power()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 204, in power
self._handle_current_overflow()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 246, in _handle_current_overflow
self._increase_gain()
File "/home/pi/.local/lib/python3.9/site-packages/ina219.py", line 271, in _increase_gain
raise DeviceRangeError(self.__GAIN_VOLTS[gain], True)
ina219.DeviceRangeError: Current out of range (overflow), for gain 0.32V, device limit reached
UPS Plus Installation is Incomplete! ... failed!
Please visit wiki for more information:.
-----------------------------------------------------.
https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136.
-----------------------------------------------------.
pi@raspberrypi:~ $
I have created separate issue here as well:
https://github.com/chrisb2/pi_ina219/issues/32