Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Conservative battery charging with AXP209

Featured Replies

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?

 

 

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?

 

  • Author

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.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.