The battery is fully charged when it is at 4.2 Volts and fully discharged at some predefined voltage (Lets say 3 volts).
The phone can measure these voltages directly from the battery. To see the voltage of your battery type *#*#4636#*#* into your phone and go to battery information.
If all that is so then what is the point or need of "recalibrating" and deleting battery stats and all that.
It seems logical to me that battery stats is just the place where your battery usage history is stored and nothing else.
Can someone confirm this or convince me otherwise?
(I rotate between 3 batteries and cannot grasp the idea that my phone can't consistently measure the charge level of the battery and operate accordingly.)
Measuring the Voltage to get the charge level is not very accurate, and has to be done with no load on the battery (that is, when its not in your phone).
So the phone has to count "energy used from"/"energy stored in" the battery for an accurate display. (called "Coloumb counter")
I did a test on new a battery a while ago. Measure voltage when the battery completely empty and fully charged.
Empty battery
1% remaining, using SystemPanel
Take the battery out and measure it with Multimeter
Fully charged
100% charged
Again, measure it with Multimeter
The voltage showed on the phone using SystemPanel app is quite accurate with 0.04V margin of error. Most smart electronic measure lithium battery capacity according to the remaining voltage. In this case, fully charged SGS is 4.2V, empty is 3.5V.
Me too, don't know why we have to delete batterystats.bin to recalibrate battery indicator But I do know that SGS keep track on power consumption on each of its component/application. Its a little bit silly if SGS reads batterystats.bin and display it as battery indicator.
I did a test on new a battery a while ago. Measure current when the battery completely empty and fully charged.
Empty battery
1% remaining, using SystemPanel
Take the battery out and measure it with Multimeter
Fully charged
100% charged
Again, measure it with Multimeter
The current showed on the phone using SystemPanel app is quite accurate with 0.04V error margin. Most smart electronic measure lithium battery capacity according to the remaining current. In this case, fully charged SGS is 4.2V, empty is 3.5V.
Me too, don't know why we have to delete batterystats.bin to recalibrate battery indicator But I do know that SGS keep track on power consumption on each of its component/application. Its a little bit silly if SGS reads batterystats.bin and display it as battery indicator.
Thanks for that, but you were actually measuring the Voltage, not current (Amperes).
In any case, for laptop Li-ion batteries there is normally a capacity counter (Coulomb counter) that reports the capacity in terms of mAh (milli-ampere hours). It can normally report the remaining capacity, maximum capacity, design capacity, and can be used to measure the *actual* power drain (in terms of Watts).
I wonder if Android has APIs that let apps access that kind of information?
Not really sure about this, but:
Phone seems to measure both voltage & discharge speed, "predicting" remaining charge.
It happens that after a flash battery indicator jumps to a higher value (not compatible with the couple of minutes of dc connection it had), and fall to a way too low value after any battery intensive task (a few minutes of audio call are enough), once more not compatible with the real usage.
I should inspect android code to be shure of this, but I suspect batterystats.bin is used to keep track of battery usage and to this sort of prediction, while a firmware flash seems to mess somehow the measurement.
Edit: this is based on my direct experience, even if on just "empirical" tests. I'll take a look to code asap
second:
you DON'T measure your voltage when your battery is disconnected. Because it will rise to the normal values of the battery after a while. When you connect it, and use it, the voltage will lower. Compare it to a garden hose. if you let water run out, the presure drops and water starts flowing (presure is voltage, flowing is the current). If you measure the presure when there is no water running, the presure will always mount to the default value, even if there is "not much water left in the tank". But when it starts running again, it could very well run out very fast. So in comparison: voltage says something, but only when you "use" it.
Third:
When a battery ages, it's characteristics change, it will be full... and then all at once, empty. It's not linear. So calculating the capacity is always a bit "guessing". (compare it to stones in your water tank... they don't give you water, the tank doesn't change, but all of a sudden, you're out of water).
conclusion:
capacity of a battery is a very tricky thing to do, it's a combination of voltage, current, age... so the best way to determine capacity is by using the history of the battery as the "guide" to the future. Resetting the battery statistics will remove that history and your phone will have to "learn" it's behavior again. If you don't reset your stats, your values will become more reliable over time (depending of course on the time the stats are kept )
For those who speak dutch, i put a complete battery description/howto/misunderstandings post on www.modelbouwforum.nl (search for posts of "harrydg")
If there are more questions or so, just ask, i'll try to help out as much as possible...
You've access to the battery stats from the kernel. And of course its current consumption which is measured not voltage. Voltage doesn't tell all that much. During high draws your voltage (at the battery level) can fluctuate quite a bit.
There's a regulator (or probably a bunch of them) get a stable voltage no matter what the input voltage is (well, still it has to be in the 3.3/5v range probably else the regulator burns)
Anyway, that's also why the battery stats have to be calibrated, while you can measure how much current is used (in maH aka milli amp per hour, or in mA aka "instant" milli amps), you don't know the battery capacity.
Not only the battery capacity changes from battery to battery but it also changes during the life time of the battery.
The *only* way to calibrate the battery, is to delete the stats, have a fully charged phone and let it drain out the battery until it turns off. That way the kernel will measure for example 1457mah used until it ran out of juice, and that's your battery capacity then. Having the full capacity allows the kernel to give you a rather precise estimate of your current battery status (eg "80%" that you see on the top of the screen) (of course the actual calculation is a bit more complicate but that's the basics)
If calibration stats storage is changed for any reason (probably kernel upgrade or just a whacky samsung implementation that gets corrupted for some reason) you need to delete it and make a new one to recalibrate.
If you want to make it simpler, make it at least correct...
"Anyway, that's also why the battery stats have to be calibrated, while you can measure how much current is used (in maH aka milli amp per hour, or in mA aka "instant" milli amps), you don't know the battery capacity."
First of al, it's mAh, which means milli ampere hour, NOT per hour, that would be mA/h, which it is not.
mA is milli ampere, which is a current
there is a significant difference between the 2.
the first is "capacity"
the second is "current"
it's like a bottle. The capacity is 2l and you pour at 1l per minut...
XDA Developer TV Producer Kevin wants to help make your … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?