Search code examples
javaandroidandroid-intentbatterybatterylevel

Does battery voltage directly correspond to its level/percentage?


I found out that if you use getIntExtra("voltage", -1) in a broadcast receiver listening for ACTION_BATTERY_CHANGED. It gives you the mV. I have two questions actually.

1. Does anyone know of a way I can grab the voltage at any point in time without relying on the most recent update from my broadcast receiver?

2. Does anyone know if this value is reliable enough to use for measuring battery consumption over a time interval?


Solution

  • I can answer question 2 and the question in your title - most mobile devices use Lithium ion batteries and the raw voltage of the battery has a very non-linear relationship with how much capacity it has left (i.e. % charged / discharged).

    Take a look at the graph here showing a Li-ion cell voltage against capacity left. You can see that voltage remains roughly constant (slight downward trend) from battery full to battery about 10% capacity and then sharply falls off.

    @ChrisStratton points out in a comment that the graph is not for a modern device and says that they are substantially different and may be easier to infer state of charge from voltage. Unfortunately I could not find a link to similar graphs for a modern mobile phone battery. However, it can be seen that modelling state of charge from open circuit voltage (OCV-SOC) remains an active academic research topic.

    The point still stands that using the voltage to estimate state of charge is non-trivial.