Improve the life of your Pinebook battery by setting charger's voltage limits
#1
It is a good practice for lithium battery powered devices to briefly think about the charging configuration which can significantly influence the health and usable capacity over time of a battery. Typically, a LiPo battery -- as is also used in the Pinebook -- has a minimum voltage of 3.0 volts (falling below quickly damages the battery) and a maximum voltage of slightly above 4.2 volts (further charging can destroy the battery and even ignite a fire). 

The higher the difference of the battery voltage to these two extremes is, the longer it will keep its initial capacity and the less stress it has to withstand (temperature as another dimension can be critical also, but will be ignored for now). So, quite good voltage limits for charging your Pinebook may be 3.2 to 4.0 volts. The more tentative these limits are set, the less actual battery capacity will be usable, thus less time your Pinebook will be working on battery before it needs to charge.

Luckily, the power management unit AXP803 of the Pinebook allows you to configure, how you wish to set the voltage limits for your actual use case. To this end, you can use the virtual sysfs files in '/sys/class/power_supply/axp20x-battery/' which allow read and write access. I tested this on the current Armbian 5.86, but other distros may offer similar functionality, as they might use the same "axp20x" kernel module for accessing the AXP803 power management unit. 

With read access, you can find out how the limits are currently set. By echoing values into the virtual files, you can persistently write settings to the unit (yes, written values reside on the AXP803 and keep changed even after reboot or shutdown). As the AXP803, for instance, supports only four possible maximum voltages (4.10v, 4.15v, 4.20v, or 4.35v), invalid values as write attempts are caught by the operating system.

Code:
cat /sys/class/power_supply/axp20x-battery/voltage_max_design
cat /sys/class/power_supply/axp20x-battery/voltage_min_design


Charging voltage limits (example with a range of 3.2v ... 4.1v) can be set with:

Code:
echo 4100000 > /sys/class/power_supply/axp20x-battery/voltage_max_design
echo 3200000 > /sys/class/power_supply/axp20x-battery/voltage_min_design


It seems that the maximum voltage is handled by AXP803 (or the kernel driver) with precaution so that my Pinebook battery only charged to up to 4.0 volts with this configuration. The capacity value that is provided in '/sys/class/power_supply/axp20x-battery/capacity' is adjusted automatically to the min and max settings.

I hope, some of you can use these hints to improve the endurance of your Pinebook's battery. Please post a message on your findings relating to practical observations or a different OS.

See for reference on more internals on the power management unit as investigated by xalius:
AXP803 Battery Charger Support


Possibly Related Threads…
Thread Author Replies Views Last Post
  DietPi OS for Pinebook MichaIng 3 6,960 03-11-2024, 05:02 PM
Last Post: oxoocoffee
  Slarm64 on Pinebook [Slackware Arm - 64 bit] KRT 46 70,939 09-26-2023, 03:18 PM
Last Post: mara
  Broke pinebook GUI, what to do, fix or install new? acruhl 2 1,547 07-13-2023, 05:43 PM
Last Post: acruhl
  Orignal PineBook jwp1000 1 1,164 07-10-2023, 07:44 AM
Last Post: tophneal
  Pinebook no longer boots rjtanner 12 5,671 04-13-2023, 01:09 PM
Last Post: tophneal
  Stock Debian on original Pinebook moonwalkers 1 3,759 01-29-2022, 10:37 PM
Last Post: cel
  Write image to eMMC - Pinebook 11.6" irongarment 4 4,704 01-04-2022, 09:22 PM
Last Post: irongarment
  E: The repository 'http://pinebook.kde.org.uk bionic Release' no longer has a Release pixelpaperyarn 3 5,923 05-07-2021, 10:20 AM
Last Post: tophneal
  pinebook.kde.org.uk no longer has release file?? supermassive 1 4,218 01-20-2021, 11:18 AM
Last Post: tophneal
Question Ran apt update on my Pinebook.. ford442 0 3,130 12-25-2020, 04:40 PM
Last Post: ford442

Forum Jump:


Users browsing this thread: 1 Guest(s)