Conservative battery charging with AXP209


Recommended Posts

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?

 

 

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...