EtlARM Posted August 5, 2020 Posted August 5, 2020 Does anybody have a solution how to charge battery with more conservative voltage range? I'm using battery backup for my CubieTruck boards to survive power outages for several years. And as one of the batteries recently blew up (and also killed the backup HDD next to it) I try to find a way to charge the battery in a range that preserves health of it. When searching for a long-term-save voltage range of LiPo batteries you get something like: use only half of capacity, much below 4V, never deep charge, ... Default setting for the AXP209 charge controller is to charge to 4,2V, and emergency shutdown is at 2,9V. These ranges are much too broad and may damage the battery over the years. Deep discharge protection is quite easy, just use a script to regularly check current voltage and issue a shutdown when too low (no clue, why this is not already handled by the OS): if [ $(cat /sys/class/power_supply/axp20x-battery/status) = Discharging ]; then if [ $(cat /sys/class/power_supply/axp20x-battery/voltage_now) -lt 3200000 ]; then # prevent undervoltage shutdown -h fi fi But target voltage for the charge controller is not that easy to change, as AXP209 only supports 4,1V / 4,15V / 4,2V / 4,36V: echo 4100000 > /sys/class/power_supply/axp20x-battery/voltage_max_design I tried to reduce the charge current with rising voltage to stop charging at some point: echo 300000 > /sys/class/power_supply/axp20x-battery/constant_charge_current_max But the minimum supported value is 300mA, which is still charging and increasing the voltage. Also the charge current can not be increased again after setting a lower value. Does anybody have an idea how to stop charging at some voltage and to resume if it has dropped again below a second threshold?
Tido Posted August 5, 2020 Posted August 5, 2020 5 hours ago, EtlARM said: LiPo batteries you get something like: use only half of capacity, I also operate my mobile between 20-80% in which it is said to feel comfortable. Did you already search the forum to solve your interest?
EtlARM Posted August 6, 2020 Author Posted August 6, 2020 Yes, I read the forum during the last years, also read the datasheet of the charging controller and also the github repository to control it.
Tido Posted August 27, 2020 Posted August 27, 2020 On 8/6/2020 at 7:27 PM, EtlARM said: Yes, I read the forum during the last years, I don't know if you also came across this https://forum.armbian.com/topic/10834-axp209-proper-driver/
EtlARM Posted August 29, 2020 Author Posted August 29, 2020 Yes, I had seen these posts some time ago. They contain some really useful links. But as I forgot to bookmark it, is is very good you dig it out again. When I find some spare time, I will try to modify the AXP209 registers directly.
gounthar Posted August 31, 2020 Posted August 31, 2020 What about https://discord.gg/HGrtpa ? I think we might get hints over there.
Recommended Posts