-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Current Value and Charging #74
Comments
Re the INA219 values:I have noticed the same already in june 2021 and adjusted the parameters roughly based on measured input power in the appropriate situation (referring to your second point). My INA219 calls:
and
In the case of your second point my explanation is the battery sampling done by the f/w at regular intervals (default 2 minutes). The blue leds are off while the battery is switched to power the load and the charging power supply is cut off for a number of seconds. Re your last point I have not much to add. I never tried to use any of the USB-ports on the shots side until just now ... It charges my phone ... the phone lives ... (USB A). Tried a Xiaomi power bank as well. It charges .. according to the led indicator at least (blinking). It looks like my UPS f/w is frozen again. At least the minute counts (originally seconds, I converted them in my reporting script) aren't increasing any longer. This is the major problem with this UPS on f/w 9 for me. Not reliable as a UPS. When it freezes, the control scripts cannot shut the Pi down after an AC failure. etc. etc. See other issues for this BUG.
|
as the parameter of the INA is the shunt resistor value, it should be something round like 0.01 and 0.015. don't really understand how this was not found already. about the charging, why must the charging be stoped in order to check the battery state. if I use the UPS as intended where it its allweays plugged into a charger it would charge and discharge the battery at 100% every 2 minutes. that's a good way to age a lithium cell very quickly about the charge port, I meant that when I plug a powerbank into the intended charge port on the LONG side it starts to charge the powerbank not the UPS. So there is no way to charge the UPS using a type c powerbank that can be charged and discharged over the same type c port. I'm considering switching over to the PiSugar. This is too much unexpected behavior for my linking. |
It looks like the resistors used for shunts are 0.01R R010 0.01 Ohm 1% 2512 (1W) SMD, so you should use INA219(0.01, ... |
Do you mean both INA219 instances need to have the same parameter value? I haven't tried to get a current meter between the UPS and the Pi. Once I had thin flexible double sided PCB material ... it would have been easy to make a probe with that. The parameter values I came up with are different for the two INA219's, both are about doubled from the original values. In the end the precision of the current measurement isn't very essential for the UPS operation. What is your opinion about that? |
Do you mean both INA219 instances need to have the same parameter value? In the end the precision of the current measurement isn't very essential for the UPS operation. |
In one of the rare comments by the makers, they seemed to say that the parameter values take into account the typical ON-resistance of the adjacent switching MOSFET. I have been on f/w v. 10 for a long time now, from before it was finally announced. This version prevents the Pi from accessing the i2c bus for a short while whenever it sees fit. This can be seen in the syslog. In practice this seemingly random blocking of i2c has not prevented control of the UPS by the script I use, fanShutDownUPS.py by frtz13 on GitHub. However, it has prevented freezing of the Pi/UPS combo assumed to be caused by contention over the i2c-bus. In fact, blocking i2c by UPS f/w v.10 was not admitted, it's just what I think happens ;-) |
@ArjenR49 does this mean there is a Version 10 released that fixes the freezing bug? I stopped using the UPS because it consistently freezes after an hour or so of operation. Do I need to use another i2c implementation in python? |
Yes, there has been a version 10 long before it was announced on the GeeekPi GitHub site. If the blocking happens to coincide with the control script trying to access the i2c bus, there will be an error message in the syslog, but otherwise nothing bad happens: As I wrote, I use frtz13's script from his GitHub page. I set the battery sampling by the UPS at an interval of 10 minutes: Battery sampling ('blue LEDs off') interval: 10 min (0x15-0x16) The battery check by Frtz13's control script is every 60 seconds. I have not used the 'official' control script for a long time, but I haven't noticed it had been changed lately for version 10. I have no idea how it would behave. It had preciously little i2c exception handling when I last looked at it unlike frtz13's script. |
Friend, are you saying We should change on python code with that values "0.01"? |
@hellresistor, yep. |
To those worrying about maximum battery capacity % readings from the UPS: I have changed the USB cable from the charger to the UPS to one by UGREEN advertised for fast charging (AliExpress: Ugreen Usb Kabel PD100W Usb C Naar Type C Fast Charger Kabel Voor Xiaomi Samsung Macbook Ipad 5A Mobiele Telefoon cord Usb-kabel Type C) and the charger to a UGREEN GaN 65 W charger, model CD244, also from AliExpress), which provides up to 3 A at 9 V (on my UPS). A more powerful charger and better USB cable indeed seems to make a difference, although I do not think this is essential to the operation of the UPS. Not all PD chargers and USB cables are created equal .... |
Hi ArgenR49, That's right. better power supply will offer better perfornance... |
Hi,
I have found some issues:
first, the current readings from both supply and batt in the python script are incorrect. it says the Raspberry consumes 2000mA
@5.0V resulting in 10W of power. the batt current also seemed too high. I checked it with a multimeter and both supply and batt current are of by about a factor of 2x.
I think here the wrong resistor values are used. I get roughly the correct values by using double the current values. I think this should be checked.
Second, I observed frequent interruptions while charging. I plotted the charge current and it drops every 2 minutes. Also right after charging start Power Delivery 2 is used with 9V @ 3A for 2 minutes then it stops charging and goes standard USB charging with 5V @ 1.5A. As a result, charging takes longer than discharging. that's not fast charging.
I use the type c port for fast charging. I have tested multiple chargers, and I updated the firmware with the OTA script to the current Version 9
One Discharge and charge cycle
Start of Charging:
Lastly, when I plug in a powerbank on the fast charging port, the powerbank is getting charged not the ups. I was expecting that the charge port on the long side is only input and the two USB A and one USB C on the short side are for charging external devices.
The text was updated successfully, but these errors were encountered: