-
Notifications
You must be signed in to change notification settings - Fork 25
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
[Feature Request] Maximum battery charge limit #16
Comments
At the moment is to try to keep it around 95%, that is why always see in the charge, we are considering a more optimal battery protection method, if you have reference to the open source project, you can also recommend us. |
Due to the characteristics of the battery, it will be used for the first time as heavy as possible to the highest voltage (charging current of less than 10mA considered full), and then dynamically set the VSET, we plan to design a function that can use software control VSET, which is supported in the hardware design (PCB Version > PCB01b), which generally affects the 80% to 100% charging stage. |
We have developed a feature(beta), please update the firmware to version 7, to add a new register FixedVbat (Reg Addr:0x2A), when set to 1, the Full Voltage and Empty Voltage registers are(must) manually edited,when FixedVbat is 1,make the battery Full Voltage always lower than Full Voltage, but Full Voltage only can be set to 4200mV or upper, which is the charge management chip lower-limit. |
Could you put a example to write and read these values? I thin to enable FixedVBat it can be "bus.write_byte_data(DEVICE_ADDR, 42, 1)", and to set and read the full/empty voltage? |
After you execute "bus.write_byte_data(DEVICE_ADDR, 42, 1)", you can adjust the [ Full Voltage and Empty Voltage registers ] registers manually, if you execute "bus.write_byte_data(DEVICE_ADDR, 42, 0)", the firmware will adjust them automatically, the automatic adjustment means that the battery maximum voltage is full and the minimum voltage is empty, regardless of the automatic or manual setting, the battery enters trickle charge mode when it reaches 90%. |
|
@Serhii020472 Thanks! |
Hi @nickfox-taterli
The corresponding output is:
The voltages are not altered, they remain as set by the firmware. Is the procedure I implemented in my script correct? Harry |
@nickfox-taterli Harry |
Hello, same result here:
|
assign to @yoyojacky for testing. |
I am using NCR18650B and according to the data-sheet its discharge-end voltage is 2.5V, I set the UPSPLUS (soft v8) empty voltage register to 3.2v to get more mAh out of the battery, but noticed that once it gets to 3.35v the battery voltage is incorrect. I measured voltage with a multimeter and it dropped as low as 2.5v. Is this a limitation of the voltmeter on the board?
Also, this does not seem to change "empty voltage" register, what am I missing?
|
I have the same sort of batteries and in v.7 or earlier there was no
problem going so low and have the ups Shut off when the batteries got
discharged. I would say it is not a hardware limitation. V.8 brought
changes but not for the better ...
Type journalctl -f in a terminal and have a good look there.
Arjen
(On The Road)
Op di 1 jun. 2021 13:50 schreef Leandro Albero ***@***.***>:
… [image: image]
<https://user-images.githubusercontent.com/12993089/120310570-d0fd8e80-c2d6-11eb-96f6-ec9f074867e9.png>
I am using NCR18650B and according to the data-sheet its discharge-end
voltage is 2.5V, I set the UPSPLUS (soft v8) empty voltage register to 3.2v
to get more mAh out of the battery, but noticed that once it gets to 3.35v
the battery voltage is incorrect. I measured voltage with a multimeter and
it dropped as low as 2.5v. Is this a limitation of the voltmeter on the
board?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCBKNT4UKZFYH4AIXQSBCTTQS3PXANCNFSM44O6EFTA>
.
|
Have tried using journalctl -f while using i2cset, but I can't find any errors related to that command.
journalctl output after above i2cset:
|
In addition, the protection voltage is determined by the protection voltage register, and the output will be turned off when the protection voltage is reached, the minimum voltage is used for battery estimation, not the shutdown function. Please set the registers in order, for example, 0x0F and 0x10 are a group. If your goal is to use more power, set a lower protection voltage as your request. |
I understand, but my problem is that none of the registers seem to get modified. Have tried manually using i2cset, also tried modifying protection voltage on upsplus.py and finally tried using this script:
Nothing seems to change registers going from 0x0D to 0x12, I am using version 8 of the firmware |
Got an unanswered question :( |
I have the same issue |
Please write byte by byte, please follow the example in the example to write two data byte by byte.
…--------------原始邮件--------------
发件人:"tokp ***@***.***>;
发送时间:2021年6月16日(星期三) 凌晨4:27
收件人:"geeekpi/upsplus" ***@***.***>;
抄送:"Tater Li ***@***.***>;"State change ***@***.***>;
主题:Re: [geeekpi/upsplus] [Feature Request] Maximum battery charge limit (#16)
-----------------------------------
I just tested with the script provided in our repo, set the protection voltage 3700 mV, the battery cut off smoothly.
Then change the protection to 3500 mV (readback to check) and run stress -c 4 to pressurize the system.
reach the protection voltage, smoothly cut off the power, using a multimeter to measure the voltage, indicating that the battery has 3.51V.
In addition, the protection voltage is determined by the protection voltage register, and the output will be turned off when the protection voltage is reached, the minimum voltage is used for battery estimation, not the shutdown function.
Please set the registers in order, for example, 0x0F and 0x10 are a group.
If your goal is to use more power, set a lower protection voltage as your request.
I understand, but my problem is that none of the registers seem to get modified. Have tried manually using i2cset, also tried modifying protection voltage on upsplus.py and finally tried using this script:
# set_Vfull_Vempty.py import smbus2 DEVICE_BUS = 1 DEVICE_ADDR = 0x17 SAMPLE_TIME = 1 # new values for Full Voltage and Empty Voltage parameters FULLVOLTAGE = 4200 EMPTYVOLTAGE = 3700 bus = smbus2.SMBus(DEVICE_BUS) # enable writing to Full Voltage and Empty Voltage registers bus.write_byte_data(DEVICE_ADDR, 42,1) # write to the now enabled registers for Full Voltage and Empty Voltage print("Set Full Voltage register to: %d" % FULLVOLTAGE) bus.write_word_data(DEVICE_ADDR, 13, FULLVOLTAGE) print("Set Empty Voltage register to: %d" % EMPTYVOLTAGE) bus.write_word_data(DEVICE_ADDR, 15, EMPTYVOLTAGE) # check result print("FixedVbat register is: %d" % bus.read_byte_data(DEVICE_ADDR, 42)) print("Full Voltage register is: %d" % bus.read_word_data(DEVICE_ADDR, 13)) print("Empty Voltage register is: %d" % bus.read_word_data(DEVICE_ADDR, 15))
Nothing seems to change registers going from 0x0D to 0x12, I am using version 8 of the firmware
I have the same issue
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I have the same problem and I never used word write nor read. Always
taking the value to be written apart in LSB and MSB and then write the
bytes one by one. LSB first to lower address.
I have a similar setting program for protection voltage and sampling
interval. One works, the other not. I forgot which, since so much time
has passed and no new f/w version has come. I think it was the voltage
setting that didn't work. Fortunately I have a sensible values there
already.
I am not using the UPS Plus now. It's just sitting there under my Pi
doing ***@***.*** crunching. Not UPS scripts installed at all now. The
UPS with v.8 as it is now cannot protect against power failure because
the scripts cannot write to the i2c registers.
With v.7 we didn't have this problem.
Op 16-06-2021 om 04:14 schreef Tater Li:
… Please write byte by byte, please follow the example in the example to
write two data byte by byte.
--------------原始邮件--------------
发件人:"tokp ***@***.***>;
发送时间:2021年6月16日(星期三) 凌晨4:27
收件人:"geeekpi/upsplus" ***@***.***>;
抄送:"Tater Li ***@***.***>;"State change ***@***.***>;
主题:Re: [geeekpi/upsplus] [Feature Request] Maximum battery charge
limit (#16)
-----------------------------------
I just tested with the script provided in our repo, set the protection
voltage 3700 mV, the battery cut off smoothly.
Then change the protection to 3500 mV (readback to check) and run
stress -c 4 to pressurize the system.
reach the protection voltage, smoothly cut off the power, using a
multimeter to measure the voltage, indicating that the battery has 3.51V.
In addition, the protection voltage is determined by the protection
voltage register, and the output will be turned off when the
protection voltage is reached, the minimum voltage is used for battery
estimation, not the shutdown function.
Please set the registers in order, for example, 0x0F and 0x10 are a
group.
If your goal is to use more power, set a lower protection voltage as
your request.
I understand, but my problem is that none of the registers seem to get
modified. Have tried manually using i2cset, also tried modifying
protection voltage on upsplus.py and finally tried using this script:
# set_Vfull_Vempty.py import smbus2 DEVICE_BUS = 1 DEVICE_ADDR = 0x17
SAMPLE_TIME = 1 # new values for Full Voltage and Empty Voltage
parameters FULLVOLTAGE = 4200 EMPTYVOLTAGE = 3700 bus =
smbus2.SMBus(DEVICE_BUS) # enable writing to Full Voltage and Empty
Voltage registers bus.write_byte_data(DEVICE_ADDR, 42,1) # write to
the now enabled registers for Full Voltage and Empty Voltage
print("Set Full Voltage register to: %d" % FULLVOLTAGE)
bus.write_word_data(DEVICE_ADDR, 13, FULLVOLTAGE) print("Set Empty
Voltage register to: %d" % EMPTYVOLTAGE)
bus.write_word_data(DEVICE_ADDR, 15, EMPTYVOLTAGE) # check result
print("FixedVbat register is: %d" % bus.read_byte_data(DEVICE_ADDR,
42)) print("Full Voltage register is: %d" %
bus.read_word_data(DEVICE_ADDR, 13)) print("Empty Voltage register is:
%d" % bus.read_word_data(DEVICE_ADDR, 15))
Nothing seems to change registers going from 0x0D to 0x12, I am using
version 8 of the firmware
I have the same issue
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCBKNUEW7X3SANCAQOPX2TTS73GZANCNFSM44O6EFTA>.
|
I have update my script to use byte by byte and still have same issues. A sample of my script:
|
@tokp, @ArjenR49 , @leandroalbero, @deHarro I managed this script to work adding time.sleep(1) after each bus.write_byte_data() :-) Sleeping time worked on avoiding Remote I/O error (#121), even when reading a long sequence of bytes from the I2C interface. The fixes are: import time Cheers! |
Hello, lots of phone or laptop manufacturers are including optimised battery charging into their devices. What this does is halt charge at around 80% instead of holding the battery cells at 100% charge during long periods of time. This greatly reduces battery ageing.
Is it possible to do this via software on upsplus?
The text was updated successfully, but these errors were encountered: