[Q] About battery calibration - setting new Full40 - Desire Q&A, Help & Troubleshooting

Hi everyone, finally I managed to calibrate my aged battery of HTC Desire. Anyway I'm stuck at this point:
theGanymedes said:
ADDENDUM:
Since the battery age value is somehow rewritten to 94% when you charge your phone off, I recommend editing the full40 value accordingly. In order to do that, first start and successfully complete a learning cycle; and then reboot (or power on/off). After this, you shall see the age value of your battery (say XX%).
Now, you should calculate "real" mAh value using this:
Code:
Code:
REAL Capacity = "Real" Full40 Value (1452 in Stock etc.) x Age Percentage (0.XX)
Now, we must recalculate the "fake" Full40 value and write it to EEPROM, so that our battery will be always calibrated (even charged off):
Code:
Code:
"Fake" Full40 = Real Capacity / 0.94
Write this value to Full40 assignment area in the Learn Prep app in the application, press Save and you're done.. Congrulatulations, you just calibrated your battery, even when it's charged off.
NOTE: Since some internal calculations also use Full40 value, I recommend you to write rounded to next value, rather than truncated.
Click to expand...
Click to collapse
That is simple math
But I want to make sure I'm not doing wrong - then being obliged to recalibrate again.
My real full40 value is 1452mAh, and Age% is 100%
Real capacity = 1452 x 0,100 = 145,2 ==> Is that so?
Fake Full40 = 145,2 / 0,94 = 155
Now I shall go to the LearnPrep tab and set that 155 value to Full40. Is that possible to set such a low value?
I'm sure I'm mistaking some calc :|
I guess the right calc for Fake Full40 is (1452x100)/94 = 1545.
Tell me please, and sorry for the nobbish question.
And thanks in advance.

Also I can't get this:
theGanymedes said:
Capacity (to set) * 15 (Rsns value) / 6.25 (constant) = AC register value
Click to expand...
Click to collapse
Where the hell do I know that "Capacity (to set)" number?
Maybe I am stupid, maybe my english comprehension is not perfect, maybe both.
But please, help me!

I think these LiION batteries reserve a certain percent of power to stop them fully discharging as that is quite bad for Li-IOn.
So for example, when you see 1% battery power there might actually be 6% left but the phone will power off to avoid damaging the battery.
I used an app on the app store to recalibrate my battery [Battery Calibrator
Jon Richards] based on a thread here somewhere. It worked and I went from gettign about 8 hours where the phone would power off to about 16 hours and I'd still have 10 - 20% left.
However, I think I might not have followed the instructions correctly and allowed the battery to discharge too much, damaging it. Last week my battery died - this could of course be coincidence but err on teh side of caution when playing around with Li-ion thresholds.
I may have also taken other steps - I can't remember - the whole adventure of prolonging battery life was quite a chore

Properly calibrating battery which gives you accurate readings and more battery life is
Follow these steps
1. Switched On phone charge till 100% and wait 1 hour more don't unplug charger, after that time unplug charger and power off your phone.
2. Charge your phone switched off till 100% then unplug charger
3. Switch on phone and again follow step 1, then unplug charger and reboot into recovery/advanced settings/ wipe battery status. Now turn on your phone again and follow step 1 and that's all.
Your battery will be properly calibrated enjoy friends
Sent from my GT-S5660 using xda premium

rakijaman said:
Properly calibrating battery which gives you accurate readings and more battery life is
Follow these steps
1. Switched On phone charge till 100% and wait 1 hour more don't unplug charger, after that time unplug charger and power off your phone.
2. Charge your phone switched off till 100% then unplug charger
3. Switch on phone and again follow step 1, then unplug charger and reboot into recovery/advanced settings/ wipe battery status. Now turn on your phone again and follow step 1 and that's all.
Your battery will be properly calibrated enjoy friends
Sent from my GT-S5660 using xda premium
Click to expand...
Click to collapse
http://www.google.com/url?sa=t&sour...1oCIBA&usg=AFQjCNHUrHK2SdcwIXgUdqFMed-PZcDJ7Q
i think u best read this
Sent from my HTC Desire

100% age after successful calibration
KengoNakamura said:
Hi everyone, finally I managed to calibrate my aged battery of HTC Desire. Anyway I'm stuck at this point:
That is simple math
But I want to make sure I'm not doing wrong - then being obliged to recalibrate again.
My real full40 value is 1452mAh, and Age% is 100%
Real capacity = 1452 x 0,100 = 145,2 ==> Is that so?
Fake Full40 = 145,2 / 0,94 = 155
Now I shall go to the LearnPrep tab and set that 155 value to Full40. Is that possible to set such a low value?
I'm sure I'm mistaking some calc :|
I guess the right calc for Fake Full40 is (1452x100)/94 = 1545.
Tell me please, and sorry for the nobbish question.
And thanks in advance.
Click to expand...
Click to collapse
I also calibrated successfully and age was 100% .. so according to fake full40 formula it needs to be reset as 1452/0.94 = 1545 ;
can you answer what you did or how you approached further .. because 1545 does not seem to be proper value to be set
kindly reply...

Related

Android battery calibration, what are other people experiencing except me?

Well members,
I really want to know who has their battery percentage the same as in winmo. I know it has a issue with the battery driver, but still i am curious.
My battery.capacity=4462 Units.
Current percentage in Android 41% at the moment
Current Units in Dmesg 2988Units
After restart in Winmo it says 53%
If I calculate this, (2988/4462)*100= almost 67%
Someone knows what i am doing wrong?
PHP:
I will charge my battery again tonight, plug usb out, read units, change Units again in default.txt. Then I will keep for myself updates trough the day of the current data. Will post again tomorrow with updates.
Hope to hear what other people are experencing
Don't blame my poor english, Firefox English dictionary isn't downloaded/installed yet
battery
Yeah is really not understandable of how to calibrate the battery, iv been trying it for the past 2 weeks...and i still have not get it right! well..i got 4320
My battery reports completely wrong in android, to the point where it's 30-50% left then dies as it's really flat!
Hmm,
Code:
Try to use this line in default.txt if you don't got it yet
board-kaiser-battery.battery_capacity= ****
**** stands for the unit you get in with Dmesg in terminal of android after a full charge.
I can say that doesn't even is correct for me.
But I Tried another value. I read (translated) on japanese forum dat you have to put the mAh instead of units.
So I tried with 1350 (Of my Kaiser160).
Now my android shuts of when it's 15% instead of 59%. He also said something like, try to double the value. I am testing now with the value 2700
You guys should try :O
I've to say, after changed to 1350, i had a more realised idea how android does with the battery. I can say that android sucks more battery than winmo.
battery
assangflexx said:
Hmm,
Code:
Try to use this line in default.txt if you don't got it yet
board-kaiser-battery.battery_capacity= ****
**** stands for the unit you get in with Dmesg in terminal of android after a full charge.
I can say that doesn't even is correct for me.
But I Tried another value. I read (translated) on japanese forum dat you have to put the mAh instead of units.
So I tried with 1350 (Of my Kaiser160).
Now my android shuts of when it's 15% instead of 59%. He also said something like, try to double the value. I am testing now with the value 2700
You guys should try :O
I've to say, after changed to 1350, i had a more realised idea how android does with the battery. I can say that android sucks more battery than winmo.
Click to expand...
Click to collapse
Hi there, well iv tried the above instructions, but i found out something is strange, i deleted the batterystats.bin and then make sure that the board-kaiser-battery.battery_capacity= 1400 (my battery is 1400) i adb pushed it to my device....but strangely when i reboot....it changes back to 2700 automatically....i think this is the reason why we still cannot calibrate our battery for now...since as soon as my battery reaches down to 20% and suddenly 4% then shuts off...
Perhaps do you guys think that to keep our kaiser's stanbby time longer rather buy an external battery charger and make sure that battery is charged up fully.so that we can utilize the battery fully.
i think for now we should just try an carry our chargers with us say to work or school..and charge it over night....
Usually i wouldnt charge my phone for bout 2 days but it will last..but now i realieze its a must if ima use android..
Cheers
i never trust the battery status when charging.
if I am looking for a full charge I wait until dmesg reports a charge of less than approx 30mA. if it shows charge at 100/100 and it still is showing over 100mA then it is not done charging.
also if it is showing less than 30mA and a charge of less than 100/100 it really is done charging. don't wait for 100/100 if it is done charging.
as far as battery usage is concerned, one thing to not as far as a difference between winmo and android:
winmo shuts down many services when sleeping.
such as in winmo if you are playing music and it goes to sleep, music shuts off.
and same for wifi.
android doesn't seem to shut of anything except the screen.
maybe there is settings for what is to be run while sleeping.
I had a program in winmo that allowed you to turn on or of services during sleep.
mnjm9b said:
i never trust the battery status when charging.
if I am looking for a full charge I wait until dmesg reports a charge of less than approx 30mA. if it shows charge at 100/100 and it still is showing over 100mA then it is not done charging.
also if it is showing less than 30mA and a charge of less than 100/100 it really is done charging. don't wait for 100/100 if it is done charging.
as far as battery usage is concerned, one thing to not as far as a difference between winmo and android:
winmo shuts down many services when sleeping.
such as in winmo if you are playing music and it goes to sleep, music shuts off.
and same for wifi.
android doesn't seem to shut of anything except the screen.
maybe there is settings for what is to be run while sleeping.
I had a program in winmo that allowed you to turn on or of services during sleep.
Click to expand...
Click to collapse
yep...you are right....maybe we should just focus on dmesg for now...by the way, do you guys have the same problem as i have...20% then suddenly drops to 4% then shuts off?
twinklesam123 said:
yep...you are right....maybe we should just focus on dmesg for now...by the way, do you guys have the same problem as i have...20% then suddenly drops to 4% then shuts off?
Click to expand...
Click to collapse
i dont have that problem..however today, i charged to 100 percent and talk to my gf on the phone for about an hour..it went down to about 40 percent..i set it down and didnt touch it for about 20 minutes..and it went up to about 70 percent..very weird
Yes, i can tell you, in the settings under connection (i think, i have dutch android language) you can define a setting that wifi goes to sleep after your screen sleeps.
Code:
Also,best way to use android is that you have to
1. fully charge your phone in android and keep the powercable on it,
2. look in dmesg for the units. when te units aren't getting bigger, than that's the last one that is charged.
3. write down or do something with your mind :D
4. restart to winmo, KEEP POWERCABLE ON
5. change and/or put a line to your default.txt "board-kaiser-battery.battery_capacity= ****"
change **** to your units you have written down
6. after you changed units, start to android.
But still it doesn't is good yet. I experienced that 1350 value is the most effective one. When android said 15%, i tought lets restart and look what winmo says. winmo was at 1%.
Also, i was a little cocky and without 100% battery i started android. I can say, it took ages that 100% was changed to 99%. Also you never know when battery is going to die
Maybe someone can do something with this.
Battery
i think for now...we should just look at the charge in dmesg....which is the most accurate telling for now...
twinklesam123 said:
Hi there, well iv tried the above instructions, but i found out something is strange, i deleted the batterystats.bin and then make sure that the board-kaiser-battery.battery_capacity= 1400 (my battery is 1400) i adb pushed it to my device....but strangely when i reboot....it changes back to 2700 automatically....i think this is the reason why we still cannot calibrate our battery for now...since as soon as my battery reaches down to 20% and suddenly 4% then shuts off...
Perhaps do you guys think that to keep our kaiser's stanbby time longer rather buy an external battery charger and make sure that battery is charged up fully.so that we can utilize the battery fully.
Click to expand...
Click to collapse
try to put these lines in sysinit.rc:
#battery patch
chmod 777 /sys/module/board_kaiser_battery/parameters/battery_capacity
write /sys/module/board_kaiser_battery/parameters/battery_capacity 1400
I'v changed it to 1350. It was charged properly and drop to 4% from ~10%, so nearly ok. But when connected charger it's full in about 10 minutes????
Edit: After dischargine (5 minutes), it charges probably normally.
working...
tiagoclc said:
try to put these lines in sysinit.rc:
#battery patch
chmod 777 /sys/module/board_kaiser_battery/parameters/battery_capacity
write /sys/module/board_kaiser_battery/parameters/battery_capacity 1400
Click to expand...
Click to collapse
Thanks! i think it worked now!my battery now runs down normally...
How long everybody using your Kaiser battery? I can use 3 days in Winmo but it could not exceed 1,5 day in Android (NAND) :-(
I have the same as you.
But i stopped using Android on ma phone. I'am out with Winmo, don't want to use it anymore. And android dies just quickly.
Am using now en Nec N343i
Will try android again when new updates or new kernel arrives
yo ppl...now most of the time i can figure this type of stuff out....but this time im kinda lost....i edited the sysinit.rc file....also the battery_capacity file.....im running poly 2.1g on NAND but after i reboot the phone....does nothing.....any tips or site with a little more info...?? thanks in advanced for any help
Battery problems on polymod 2.1 gamma
tiagoclc said:
try to put these lines in sysinit.rc:
#battery patch
chmod 777 /sys/module/board_kaiser_battery/parameters/battery_capacity
write /sys/module/board_kaiser_battery/parameters/battery_capacity 1400
Click to expand...
Click to collapse
Hi,
I have polymod 2.1 gamma with all updates (UPDATE 15 Mar 2010, UPDATE 18 Mar 2010, UPDATE 23 Mar 2010) and the kernel from "ponack.net/poly/BT_Update/" installed on NAND (Tytn II). It runs really smooth, but I have a problem with my battery.
I have written the battery patch from tiagoclc in the sysinit.rc before I installed on Nand (but with value 1350 from my battery). But is this enough or do I have to delete a *.bin file from battery? I hope someone can help me with a description.
I have seen a fix for "Myn's Warm Donat" here:
forum.xda-developers.com/showpost.php?p=6243182&postcount=306
Is there also a fix for Eclair 2.1 available? Or does someone have a "complete" description for this battery problem? My Batterie is a few hours on 100% with this battery patch and I can not charge it. But this could not be true.
I hope someone can help me.
MT
Maybe kernel problem.
I'm experiencing the same problem as everyone.
Lately my battery suddenly drops from 100% to 4%.
When I put to charge, it reaches 100% very fast. Should reach only 5%
I think it can be a problem in the kernel.
Now, i'm trying to solve it. If I find something I'll share with you
I can not determine which kernel brought the problem...
23/04 - 16:16 (GMT-3 - Rio de Janeiro) - Trying an old kernel
23/04 - 17:00 - Nothing. But came to the conclusion that the problem is with the battery.
Battery really "thinks" its 100% charged, since it accepts flash a nbh without the need of the phone is charging. And this only happens when the battery is at least 50% charged...
(sorry about my english. I'm brazilian and still learning english)
Some threads and posts about battery:
http://forum.xda-developers.com/showthread.php?t=661588
http://forum.xda-developers.com/showthread.php?t=644453
http://forum.xda-developers.com/showpost.php?p=5599516&postcount=33
We must concentrate everything in one thread!!!
We have to use search
I have set 1350 in sysinit.rc and it seems to be ok, but before every charge I have to reboot to charge it fully. then it discharges nearly fine - there are some fluctuations beetween 2-3-4 percent.

[Q] New Phone - How long must I charge battery?

Waiting to get my hands on my DHD at Sunday when I return home from my girlfriend. Im just curious if I need to charge it those 12ish hours like I've always done when I've got a new phone, or if batteries is different since my last one.
Thanks!
a full recommended charge by manufacturers is usually 12 - 16 hours, so charge it for 16 hours and then have some fun...
fkofilee said:
a full recommended charge by manufacturers is usually 12 - 16 hours, so charge it for 16 hours and then have some fun...
Click to expand...
Click to collapse
Does that also count for todays smartphones? I mean, I know all Apple Products comes precharged so you dont have to bother with the 12 hours of charging. HTC aint running that path?
I quote a message I've made in the battery life thread:
theboostman said:
Since i use some RC Helicopter with li-po/li-ion that both have the same way to produce energy, I have learned how to use this kind of battery and how to ensure a good battery life/durability.
There is no reason to worry about the battery if you follow those few recommendation (given by a battery producer):
-Your battery has to be charged with a current of 1C max (1C mean 1230mA for a 1230mAh capacity).
-Your battery voltage must not be over 4250mV. If you go over, you may damage the battery and risk random explosion/fire. In normal use, it's better to not go over 4200mV.
If you charge the battery with your phone, you will never be able to go over 4200mV because the charge stop automatically before.
-Your battery must not be under 3300mV. Same risk as above. In normal use, it is better to not go under 3450-3500mV to ensure a good battery durability (numbers of cycle charge/decharge). I think the phone show 0% at near of 3450mV, but never check this cause i never wait my phone to be as close to the death.
-Your battery has to be drain at a current of 10C max, i.e for desire HD , 12.30A (1230mAh x 10).
impossible to reach that current with your smartphone so no worries about burning your cpu with heavy bench.
Whatever you do respecting this will not be harmful for your battery.
Click to expand...
Click to collapse
So don't believe crazy rumor and just follow battery manufacturer recommendations.
charge the phone up to full for first time is just usefull to ensure a good calibration of the battery level in android.
But the battery itself doesn't care about first charging since they already have been charged for the stockage by the manufacturer.
You can check with Currentwidget the current send to the battery. Wait until you have 0mA. This can take 1h after the green light has turn on as the green light seems to occur by voltage mesure and not by current.
this occur every time you charge the battery and then I prefer to check with Currentwidget when the battery is actually full.
It is good to know here that a li-ion battery will reach near than 4200mV before to be full and at this state has to be charged with a current limited Alim. It seems that this is already used by the phone as you can see the current decrease as long you reach full charge.
But as I already mention, it seems that the phone show 100% when a voltage Value is reach. So it is not very accurate to see when the battery is actually full.
After that you can play whatever you want with your battery:
- You don't have to wait that the battery is full discharged to charge. ( In fact it is better to never wait your battery to be empty)
- You can stop the charge before the end.
- You can leave the phone plugged in the whole night cause the phone automatically stop the charge.
Can you use the phone on the first charge?
Yes you can. For battery point of view, no problem.
For android battery level, I don't know if using the phone at first charge can cause more inaccurate mesure but anyway the battery level will be more accurate after some cycle of charge/decharge so don't care about this. Plug the phone and use it!
Very, very detailed. Far more detailed than what I can understand. I'd follow the battery manufacturer recommendations, but HTC doesn't list anything helpful on their website.
The battery is partially charged when shipped. Before you turn on and start using your phone, it is recommended that you charge the battery.
Click to expand...
Click to collapse
..they dont tell you if to charge until simply fully charged, or 12ish hours. Thing is, I read in another topic that the whole point of charging for a long time was back in the "NiCad days"; but does not apply for Li-ion batteries.
Can this be confirmed?
To be more clear:
- optional(but recommended): Charge the battery up to full at first time (about 3h, check with current widget for example)
- never let your battery be empty
- each time you charge, you may charge about 45-60min more when the green light turn on. (you can check with currentwidget or equivalent when the battery is actually fully charged)
Sent from my Desire HD using XDA App
theboostman said:
To be more clear:
- optional(but recommended): Charge the battery up to full at first time (about 3h, check with current widget for example)
- never let your battery be empty
- each time you charge, you may charge about 45-60min more when the green light turn on. (you can check with currentwidget or equivalent when the battery is actually fully charged)
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
Thank you very much. : )
So I simply use CurrentWidget (by which looking on google shows the current mA) and simply waits till it hits 1230mA. Is that how the widget works? If yes, after reaching 1230mA, do I still leave it in for 45-60mins or not?
Sorry if im not getting it right - getting into Android is not as easy as I thought it would be.
No that's not right
Current widget will show you the actual mA consumed by your battery when the phone is un plugged and the actual mA sended to your battery when charging.
This allow you to check when the battery is full.
When you just plug your phone, you will see battery widget show about 500mA and then decrease down to 0mA as long you reach full charge.
When you see 0mA, the battery is full.
You will notice that the green light and 100% status are reached before current widget show 0mA.
This is why you can't trust the green light when charging your phone and have to charge it 45-60 min more when the 100% status/green light is reach
Sent from my Desire HD using XDA App
Oh!!! I get it now! THANK YOU!
Guess I'm just gonna have to deal with turning it on and getting the app. - but probably shoulnd't affect it in any way (the battery that is...) ^- ^
im picking up my new phone tonight then heading out for dinner
i dont think im going to be able to sit there and not turn the thing on and have a play with it
from reading the posts here it sounds like doing so wont cause any damage to the battery it might just screw up the android battery readout
on my galaxy s you could boot into the recovery menu and just wipe the battery memory
cant i just do that with this phone ??
I wouldn't risk it. Wait till you get home, turn it on, download Current Widget also mentioned in this topic, plug in the charger and wait for the app. to show "0mA".
I also couldn't resist turning mine on and ended up with dust on the wrong side of the screen (yes, theres a tiny gap around the screen where it crawls in - lame design) - now im going down for a swap and I wont open the box until I recieved my case for the back and shield for the front+lens.
I'd suggest you to do the same to avoid the damn dust and scratches. Its up to you tho.
Juusuhako said:
I wouldn't risk it. Wait till you get home, turn it on, download Current Widget also mentioned in this topic, plug in the charger and wait for the app. to show "0mA".
I also couldn't resist turning mine on and ended up with dust on the wrong side of the screen (yes, theres a tiny gap around the screen where it crawls in - lame design) - now im going down for a swap and I wont open the box until I recieved my case for the back and shield for the front+lens.
I'd suggest you to do the same to avoid the damn dust and scratches. Its up to you tho.
Click to expand...
Click to collapse
i wont be able to wait that long
if it doesn't damage the battery i dont see the harm
i went and bought a case for it today so the moment i get the phone its strait into a case
Yea, it's not easy to keep the hands off it.
I dont know if it's gonna "damage" it and cause a worse battery life, but it's full potential will first show after a few recharges apparently, it's up to you. Hopefully your cover will actually cover the gaps from dust etc. (unless ofc it's a full-case cover.)
Couldn't wait
Great phone love this big screen
Just need to get home and debadge it
Sent from my Desire HD using XDA App

Battery "calibration" knowledge, gleaned from the Nexus One

This is not a thread about best battery tips, etc. And I'm hoping it is not another standard thread about how to calibrate our batteries.
There is a lot of information flying around regarding battery calibration. A lot of it involves draining the battery, plugging it in at certain time, removing the battery, erasing batterystats.bin, etc. etc. etc.
Some feel the batterystats.bin file is key, and others believe it is completely unrelated to how the battery performs--just a log of stats.
How can this be reconciled?
UPDATE: Deleting batterystats.bin to "recalibrate" a battery is total and utter nonsense
http://forum.xda-developers.com/showthread.php?t=1442989
https://plus.google.com/u/0/105051985738280261832/posts/FV3LVtdVxPT
Over on the Nexus One forum, there was/is an extensive discussion, with REAL data gleaned from reading the technical datasheets of the battery itself, and the DS2784 chip within. The key to the Nexus calibration program was the ability to reprogram values on the battery chip.
http://forum.xda-developers.com/showthread.php?t=765609
I don't know if much of anything is going to be the same on the GNex battery, since the N1 was a HTC product. However, if the charging algorithms are all dictated by the Android OS, instead of hardware specific, then it could provide useful precedent. (I am not going to go through all the Samsung forums to look for valid battery calibration threads--if you know of some, for say, the Nexus S or Galaxy S2 (predecessor and comparable cousin, let's call them) please comment).
Here's a primer for all I learned that was used on the Nexus One battery calibration program. Full credit to those fine users who took the reins and made that happen, and to the fine users who continue to provide user support to the newcomers who don't know/refuse to acknowledge the existence of a search function.
My hopes are that this will lead to more rational battery life discussions and maximization for the Galaxy Nexus.
(I am not an engineer, so if any of you out there would like to tighten the language used here, please let me know).
What are the important values in battery/calibration?
1. mV = voltage
2. mAh = milliamp hours, a measure of capacity. This is how much 'juice' your battery has left/stored.
3. mA = milliamps, a measure of current. This is how much 'battery power' your phone is drawing/using at a set time. GPS/bright screen means large mA usage.
Apparently, Samsung (and Motorola phones) do NOT have mA readings in their battery drivers. This poses a problem. Apps that measure current (such as the excellent and free "current widget") cannot give a readout.
How is the battery life % calculated?
Present mAh / "full" capacity mAh (more on "full" later)
When does a phone shut down?
1. When mAh = 0
OR
2. When mV < 3416, which is coded on the battery as the "empty voltage"
Whichever occurs first.
If mAh = 0, then batt % = 0. However if condition 2 occurs, batt % could be anything.
I have found the empty voltage on the GNex to be the same, 3416 mV.
I have found the maximum voltage on the stock GSM battery to be 4197 mV.
Through experimentation, it was found that reprogramming the "empty voltage" down to 3201mv could provide extended battery life. The voltage was found to drop very quickly any lower than that, providing minimal gain afterwards.
What is the full capacity of a battery?
On the N1 battery, it is coded into a chip on the battery itself. This can be reprogrammed with the calibration utility. The stock value was ~1400mah. This is called the Full40 value (the mAh at 40oC). A value called "battery age %" is used to adjust how close the real capacity is to the full, which decreases with use and age. By multiplying (batt age * full40), you get the real assigned capacity.
Some non-OEM batteries, however, had miscoded capacities, usually LOWER than what was advertised. This led to very disappointed users who had purchased extended batteries that lasted no longer than stock, due to wrong mAh coding. (See below how this could be corrected).
Other low-end crappy non-OEM batteries had a crap chip which was coded with nonsensical values. This also led to unreliable battery life. These chips were not reprogrammable.
The very interesting thing is whenever the battery thinks it was completely charged, the mAh becomes SET to this number. mAh is NOT an independent value. Also, you could set it whatever you wanted, whenever you wanted, whether it was accurate or not. % battery left was basically calculated as present mAh / (full40 mAh*batt age). So you could get false values of either too little or too much battery left.
Why does this matter? If that was falsely low, the phone would cut out at 0% battery life, but you would still have usable battery left. If it was falsely high, it would cut out at 10% or whatever, since voltage would hit 3416 faster than mAh hit 0.
How does the battery know/think it is full?
When connected to a charger, the phone draws +mA. It can start around 1000mA (depending on the charger), and drops as the battery becomes more and more charged.
Another coded value, the "minimum charge current," tells the battery when to stop drawing current. This is set at default to +80mA.
Another coded value, the "minimum charge voltage," tells the battery that as long as the voltage is less than this #, it should continue to charge. At default, this is 4099mV.
An important concept is that once the charge amperage drops below minimum charge current (and the voltage is > the minimum charge voltage), the battery thinks it is done. Again, that state becomes 100%. Again, the capacity mAh is SET to the full capacity, no matter what is at that time. The actual mAh doesn't matter--it BECOMES whatever is coded as the (age % * full capacity).
As with other values in the battery chip, minimum charge current can be changed. It can be made to 40mA, or 20mA, or whatever you wish. By doing this, the battery will continue to draw current, and thus charge more and longer, until the minimum charge current is met.
Speaking of charging amperage, this can be an issue when using a non-OEM crap car charger when using your smartphone as a GPS. If the DC adapter is NOT truly giving 1A, the phone will use more current than it is receiving, and the battery will continue to LOSE current despite being hooked to a charger. Upgrade your car DC adapter! They are not all made the same.
How does 'bump' charging relate to all this?
Bump charging is essentially a way to trick the battery to continue charging despite the current draw being < the minimum charge current.
There is a problem with this "full" battery detection method:
If you draw enough current from the battery, while it is charging, after the minimum charge volt is reached, you can PREMATURELY fool the battery into thinking it is done.
Say the charging mA is at +200mA. If you turn on your smartphone, start GPS, turn the lights on, stream Pandora, etc., the mA will easily drop from +200 to a lesser value, negative even. The phone will think the charge is complete, since it is <80ma. THAT state becomes 100%, because the mAh get set to full capacity. Falsely.
However, this should only happen when the charge is ~90% or greater (when mv >4099). So, it may not play a huge significant role in battery time, basically missing out on 10% or so of battery life. Also, at the next recharge cycle, provided you don't fool it again, the mAh will be RESET to the more appropriate designated value.
If mAh can be set to whatever value whenever, how do we get it PROPERLY set/calibrated?
There are 2 times when mAh is automatically set. Upon draining the battery to empty (3416mv by default, 3201 preferably), when the phone shuts down, the mAh will be properly set = 0. This is good. We want mAh = 0 when mV = empty voltage.
The other time is when the battery thinks it's full, when minimum charge current is met--this is often not accurately set, not good.
If we start charging when the battery is empty, the mAh rises as the battery is charged. However, the MAXIMUM mAh needs to be watched. The mAh could be HIGHER than the programmed full mAh. Or far lower. Finding this maximum mAh, and reprogramming the battery accordingly, is the key.
Once again, when the battery hits the minimum charge current, the mAh will either jump up to the set battery capacity value (so the battery will die sooner than expected), or less commonly, drop down.
The goal is to get an accurate mAh capacity of the battery, for the voltage range between min + max, and have this set every time the battery is charged to capacity.
If we know the maximum mAh the battery reaches when charging, provided it started from 0, we want to reprogram the battery so that this value is set each time it completes charge.
There is a "learn mode" on the Nexus battery. Provided this was activated, through a series of very specific events, the battery would give itself a "battery age %". This is used to give the accurate (battery age % * full40) = true capacity. On the Nexus, the default battery age was 94%. So, mAh was set at every full charge to 94% of the full40 capacity. Obviously, this is not true for every battery forever.
Once again, why errors can and do occur:
mAh and mV are not directly linked. If mA falls to 0, or mV is less than the cutoff empty voltage, the phone will shutdown, even if the other value is still sufficient.
1. mAh is falsely high. The battery won't last as long as we think it will. Battery % is falsely high. Phone won't get to 0%.
2. mAh is falsely low. The voltage is adequate, but the mAh isn't correct. The battery % is falsely low. Phone gets to 0% too quickly. Perceived loss of battery life duration.
Why use mAh at all? Seems like mV is the only important thing?
I don't know. Why is mAh capacity important in telling the phone to shutdown? Someone enlighten me.
I think one reason is that voltage can and does fluctuate up. So using this to calculate battery % life would be extremely erratic and confusing.
What does this teach us, overall?
I'd have thought there would be much better technology built into battery calibration. Seriously. This is one big mess of poor design.
This is a bunch of technical mumbo jumbo. How does this help me?
On the N1, you can give yourself more battery life!
1. Set your 'empty voltage' lower
2. Set your minimum charge current lower
3. Calibrate the maximum mAh to a higher value to accomodate the new 'empty voltage' and 'minimum charge current' values
4. Don't play with the phone too much when it is >90% charging or it will prematurely end its charge cycle, give you a falsely higher charge %, resulting in the battery dying before you think it should.
5. Profit.
(On an extended 3200mAh battery from Seideo, after lowering the empty voltage and minimum charge current, I found >3900mAh (!) as my new maximum mAh. That's a heck of a lot of free juice).
On other phones? I'm hoping real programmers here can figure out how to do the same.
So, for the Nexus One, there is ABSOLUTELY NO correlation between battery calibration and the battery stats file. NONE. The values on the battery chip determine everything.
So, please comment on how battery calibration tech has changed over the past 2 Nexus generations. If it has.
ADDENDUM:
RogerPodacter, the xda guru/user who was instrumental in creating the N1 battery calibration app, has been looking into the GNex battery quite intently.
I just stumbled across some useful info about our battery fuel gauge from the sgs2 forum. Basically the result is there is not much we can do with our fuel gauge. But they do talk about how to truly calibrate it. And they discuss the improved version max17042 which is used on tbe sgs2 and has all the bells and whistles.
Heres the topic.
http://forum.xda-developers.com/show....php?t=1312273
Click to expand...
Click to collapse
(If you found this info useful, please click the THANKS button!)
Somebody is looking at this already. That same somebody who made the nexus one battery app. This chip doesnt supply amperage either. After i told him my battery seems to only charge to about 4.15v and that on discharging/charging my voltage is everwhere so it is hard to ascertain how accurate my % is. He finally got a chance to look over some stuff and we both think the nexus only allows charging to 4.15v. And. I think the battery shutdowns at 3.6v this go around. From initial observation he led me to believe everyrhing seems to be fine and we might not be able to do much. He might be able to get 4.2v and 3.4v for the voltage cycle. This is partly my speculation but we did agree that samsung may have done this intentionally for longevity of the battery. We will have to wait and see because he is still tinkering with his phone and deciding how to initially proceed. Might be a few days though. I am getting the extended battery soon so i would like to see what changes there are from the 250mah difference.
Sent from my Galaxy Nexus using xda premium
To gleam is to shine or sparkle... to glean is to learn or become knowledgeable about.
FrayAdjacent said:
To gleam is to shine or sparkle... to glean is to learn or become knowledgeable about.
Click to expand...
Click to collapse
..wow, just wow.
To the OP thank you for all this compiled information.
Sent from my Galaxy Nexus using XDA App
FrayAdjacent said:
To gleam is to shine or sparkle... to glean is to learn or become knowledgeable about.
Click to expand...
Click to collapse
I thought the same thing but possible typo. N and m are next to each other. But if op ends up giving us something tangible positively foe the nexus he will have gleamed. Lol.
Sent from my Galaxy Nexus using xda premium
Agggh. I suppose gleam could be appropriate here. But yes, glean was the original intent.
Due to my grammar OCD-ness, it has been edited. =P
@rbiter said:
Somebody is looking at this already. That same somebody who made the nexus one battery app. This chip doesnt supply amperage either. After i told him my battery seems to only charge to about 4.15v and that on discharging/charging my voltage is everwhere so it is hard to ascertain how accurate my % is. He finally got a chance to look over some stuff and we both think the nexus only allows charging to 4.15v. And. I think the battery shutdowns at 3.6v this go around. From initial observation he led me to believe everyrhing seems to be fine and we might not be able to do much. He might be able to get 4.2v and 3.4v for the voltage cycle. This is partly my speculation but we did agree that samsung may have done this intentionally for longevity of the battery. We will have to wait and see because he is still tinkering with his phone and deciding how to initially proceed. Might be a few days though. I am getting the extended battery soon so i would like to see what changes there are from the 250mah difference.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Great to hear! Is that on this forum or rootzwiki, or a private communication?
I have noticed that shut down is usually at 3.6 or so. I drained it completely one time with multiple reboot attempts, and I got battery monitor widget to log a 3.417 or so that ONE time, but yes, the battery prefers to quit more around 3.6.
Battery monitor widget outputs an 'estimated' mA, but that's the closest thing I could find.
Wow you brought up the nexus one battery project. I was actually the one who re-wrote that battery driver for the n1 linked in the thread in the first post. Then I wrote the apk with dvghl. I even got my altered battery driver officially merged into the cyan kernel repo for the n1.
Anyway my point is that I learned an ENORMOUS amount about how these fuel gauge chips work, specifically the ds2784 chip in the n1. The bad news is our galaxy nexus chip max17040 doesn't have all the cool features that I cracked open on the ds2784 chip. But still worth trying a few things. Specifically I'm curious what the rcomp register does in our battery driver.
Also the other bad news is our galaxy nexus max17040 cannot give current mA readings. It can only be estimated using battery monitor widget for example.
Unfortunately we don't have a learn mode or age register like we did in the n1, so we can't get too deep into the chip like we did in that project. Kinda unfortunate. Seems the max17040 only has about 7 memory registers, where the n1 ds2784 had about 30 or so registers we could hack into and tweak.
RogerP, so good to see you here! Hope my summary gave some hint as to the enormous amount of effort your project took, and the huge leap in battery charging knowledge it provided.
waylo said:
RogerP, so good to see you here! Hope my summary gave some hint as to the enormous amount of effort your project took, and the huge leap in battery charging knowledge it provided.
Click to expand...
Click to collapse
Hey man, you did a near perfect job with the write up. That project was a one of a kind opportunity in the sense that the ds2784 chip, and the tech sheet and hacks we did, all lined up to be the perfect storm of what we can learn and do with these batteries. So much knowledge was extracted from that effort.
The bad news is that Samsung phones don't typically use the ds2XXX fuel gauge chips, instead they use max1704X chips. These chips use voltage to determine SOC along with their "secret" algorithm that they don't publish. In the end there isn't as much ability to do anything with our fuel gauge like we did with the n1. There are 7 registers or so, SOC, mode, volt, rcomp, but no current and no mAh. The rcomp is the one I was curious about tweaking.
This weekend I was thinking of setting up Ubuntu build environment and attempting to play arount with this new driver and see if we can learn anything more. I'm sure there are more capable devs who maybe already know about this fuel gauge cause the nexus s and other Samsung phones use similar chip. It'd be another fun project if so!
Thanks OP. Very helpful.
Glad to spread the word!
Don't forget to click the THANKS button if I helped!
thanks!! helps alot more knowledgeable now about batteries
I bought the spare battery kit that comes with an external charger. I run my battery to near empty or empty then swap it out. Do the external chargers behave the same way?
Sent from my Galaxy Nexus using Tapatalk
Very happy to see the same crew from the N1 battery calibration days on the GN. I was pretty disappointed when I got the NS and there was little discussion or attention given to the battery at such a detailed level. By the time I picked up the GN I had mostly accepted that the N1 situation and battery related dev/testing/discussion was unique in that it was both possible to tinker with and we had some dedicated fellas, especially you RP, that were willing/able to tackle the task.
As with the N1 battery testing, I'm all in to test and help whenever possible to break some ground with the GN.
This topic made me reminisce about my old N1, wish I hadn't sold it on eBay. I sold it to a Canadian, cost me a bloody fortune to ship to him bc of restrictions on amount of lithium cells/customs regulations. The guy was probably wondering if he bought it from some nut job when it arrived with like 7 batteries of many different manufacture/capacity and spare battery chargers. I half expect that US/CAN Customs put me on some kind of list when they inspected the shipment.
ellesshoo said:
As with the N1 battery testing, I'm all in to test and help whenever possible to break some ground with the GN.
Click to expand...
Click to collapse
I'd also be willing to contribute to these efforts.
Sent from my Galaxy Nexus using Tapatalk
deekjx said:
I bought the spare battery kit that comes with an external charger. I run my battery to near empty or empty then swap it out. Do the external chargers behave the same way?
Click to expand...
Click to collapse
That's an excellent question I don't know the answer to. I'm not sure what kind of charging algorithm the external chargers would use, except to stop charging once the current reaches a certain low level.
As RogerP described above, most of the GNex battery algorithms are a mystery at this point, with some proprietary methods that won't ever be voluntarily revealed =P.
There is probably not a whole lot that can be done with the nexus battery. Yall gotta remember there was a bugnor bad programming revealed and that is why so much time was devoted to that. Roger already found that the battery stops around 4.15 volts. Changing it 4.2 will not make a big difference here and im sure it is intentional to extend charging cycles.
My grandma beat me down and took my nexus. Sent from a jitterbug with beats by dre.
well i dont think this project is "dead". i still plan to compile a kernel with a few batt driver tweaks and see if we can extract what the "rcomp" register is, what values it contains, and if we can tweak it at all. same with the "mode" register. also if you guys browse the source, there is a different driver called max10742 and it has all the extra options including "age". if only samsung had given us that one.
the other thing i want to do, or someone here could do, is map the voltage readings to the batt percentages. we did this way back in the beginning on the n1, except we mapped percentage vs mAh. but here we dont have mAh readings, only volts. what we can learn from this is if the percentage is calculated precisely from the voltage, how linear the mapping is, or if it's loosely estimated based on their modelgauge algorithm or whatever they call it at maxim.
i think it would be easy to just use battery monitor widget and export a full day's worth of your logs. maybe i'll install it and give it a shot.
I already have weeks of mv vs. batt % if you need that, specifically from battery monitor widget.
Graph 1: All data from the start. 5000 data points.
Graph 2: ~600 data points, starting from after I ran the battery down to 0 completely, plugged in with phone off, and charged to 100%.
Not sure why all the data gives 2 distinctly different patterns. The lower data plots seems more favorable, with higher % at lower mV.

Battery Life Optimization Guide

Rule 1: If you haven't taken these steps, you haven't done a thing in the way of actually optimizing your battery life, and please do not complain that your battery is bad if you haven't at least done steps 1 and 2!
Step 1: Use BetterBatteryStats: http://forum.xda-developers.com/showthread.php?t=1179809
This will diagnose battery drain issues. If you have apps that are sucking battery in the background, this will show it. Google the ones that have high partial wakelock, and usually you will get a diagnosis. It is also sometimes very easy to figure out what is sucking battery just by looking at the application that is holding wakelocks or having many alarm wakeups.
Step 2: Sync settings, make sure that all of them are either at push or as high as you're personally willing to allow between sync checkups. Any sync settings that happen too often will trash battery life.
Step 3: Radio based drain is a very big part of battery life! As such, if you do not need constant sync, you can turn off mobile data on your own when you do not need it, or go to the Mobile Network settings and disable always on mobile data. This can greatly increase battery life, but at the expense of sync not working when mobile data is off.
Step 4: Display brightness can greatly affect the power drain of the battery! You can either manually control the brightness, download Lux autobrightness to make your own autobrightness settings, or flash a custom autobrightness setting in the ROM in order to achieve this. It also can have the side effect of making the display of the right brightness when in the sun and in the dark, so it is always at ideal brightness to preserve battery.
Step 5: Make sure that the battery is calibrated. This is not very complicated. Download currentwidget from the market, put it on a homescreen. Charge the device until currentwidget indicates 0 mA charge. Use the phone until the phone shuts off. You might want to then go to hboot and drain the battery until it shuts off again, and then do a full charge again. Only do this once every 2-3 months, because this is bad for the battery.
Step 6: Adblocking! One big cause of battery drain and unnecessary network usage is downloading ads. If rooted, use Adaway and Adblock to block ads from ever being downloaded, and use Adaway's adware feature to detect and remove apps with adware!
Step 7: A radical step is to use Core Control or something similar to either underclock, undervolt, or just shut off cores. Undervolting is always highly suggested, as it will help reduce heat and give the phone a longer lifetime, but underclocking and shutting off cores will reduce performance!
Step 8: Custom ROMs and kernel experimentation might yield just a bit more in the way of battery life, and also give much more customization and features.
After this, you have likely topped out all that can be reasonably done to extend battery life. If you find that your battery drain is still poor, perhaps you have a defective battery, or maybe even a defective device (Highly unlikely, but who knows...). It is also possible that you simply have a use case that is much more than the phone can accomplish, in which case you can either use a battery case, or an external battery to charge the phone on the go.
Hunt3r.j2 said:
Step 5: Make sure that the battery is calibrated. This is not very complicated. Download currentwidget from the market, put it on a homescreen. Charge the device until currentwidget indicates 0 mA charge. Use the phone until the phone shuts off. You might want to then go to hboot and drain the battery until it shuts off again, and then do a full charge again. Only do this once every 2-3 months, because this is bad for the battery..
Click to expand...
Click to collapse
Weird, I've tried this many times, and can't get the indicator show exactly 0 mA...
the lowest for me around 3-5 mA... :|
what do you mean by undervolt because i dont understand..what are the consequences ?
nemer12 said:
what do you mean by undervolt because i dont understand..what are the consequences ?
Click to expand...
Click to collapse
if too much undervolting the phone freezes/ reboot ....so the best value for undervolting is between 50 and 100mv ....in some cases undervolting increases battery life and makes the phone cooler but not much ...
Under volting is when you tell the battery to provide a little less power than usual.
Which is why the battery life usually increases, as less battery is being used than previously.
But as stated, too much can cause the battery to not provide ENOUGH power, therefor crashes and cannot boot properly etc.
One-X-master said:
if too much undervolting the phone freezes/ reboot ....so the best value for undervolting is between 50 and 100mv ....in some cases undervolting increases battery life and makes the phone cooler but not much ...
Click to expand...
Click to collapse
Pretty much, I would say. Drastic increase of battery in games: phone won't get hot => battery will last longer without overheating and, what is much more important, it will stay healthier in long run.
Even on wall charger while playing, my HOX won't overheat with - 100mv UV.
This is the main feature I miss on JB Sense without custom kernels
Sent from my HTC One X using xda app-developers app
THANK YOU
MysteryE said:
Weird, I've tried this many times, and can't get the indicator show exactly 0 mA...
the lowest for me around 3-5 mA... :|
Click to expand...
Click to collapse
Same here. On both my old HTC Sensation, and my HOX. Never saw the mA reach 0. Even after leaving on the charger for a couple of days.
DarkManHaze said:
Same here. On both my old HTC Sensation, and my HOX. Never saw the mA reach 0. Even after leaving on the charger for a couple of days.
Click to expand...
Click to collapse
The problem is, the phone cannot get the same amount of energy, it consume (in fact, it is the millisecond, where the phone is fully charged, than it discharges for some minutes, than it will be charged again for three minutes and so on periodically). So, what I mean, you will almost never see 0 ma on one X or other modern phones. You can only see that, if device can disable battery while it is fully charge and use wall charger like a main supply. And the last device with such behavior was Huawei s7 back to 2010
So, 3-5ma is pretty ok.
Sent from my HTC One X using xda app-developers app

Huge battery drain (i think)

Is it normal that i've already lost more than 70% in 3 hours!
But i have to say that im using my phone realy hard those 3 hours: mobile data on, playing games, surfing on the internet, download few apps
Im on stock rom
Sent from my HTC One X using xda premium
Wow thats a lot, but the Tegra 3 One X is a power hungry beast... It might just be normal.
Its hard to asses if something is wrong from a distance, you might wanna try an app like Better battery Stats to check whats responsible for this battery drain.
tommeke19 said:
Is it normal that i've already lost more than 70% in 3 hours!
But i have to say that im using my phone realy hard those 3 hours: mobile data on, playing games, surfing on the internet, download few apps
Im on stock rom
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
If you had the screen on for most of that time, it's normal.
Sent from my HTC One X using Tapatalk 2
That's probably about right, I get about 4 hours of continuous use, less gaming.
If it's playing games then I wouldn't be suprised, I experience the same, Tegra 3 really does drain the tiny battery of the One X especially on the high res screen.
It is possible though that your battery may also be wrongly calibrated, so if you have root, then get battery calibrator from the playstore and let it do it's thing, otherwise you can get currentWidget and use the reading to determine when the battery is fully charged (i.e. the mAh value is close to 0) and see if that helps.
I have only played 1 game for maximum half an hour.
Can you please tell me how to use Better Battery Stats I don't understand it.
tommeke19 said:
I have only played 1 game for maximum half an hour.
Can you please tell me how to use Better Battery Stats I don't understand it.
Click to expand...
Click to collapse
I haven't used Bettery Battery stats but if you get Current Widget, then put the widget on your homescreen, click on the widge until you see a "mAh" reading which indicates how much it is charging. Charge your phone, if after reaching 100% the value is still high and not close to 0 then it could be a sign of batter miscalibration, in that case, just let it keep on charging until you see the mAh value go close to 0 or possibly less than 10.
iq-dot said:
I haven't used Bettery Battery stats but if you get Current Widget, then put the widget on your homescreen, click on the widge until you see a "mAh" reading which indicates how much it is charging. Charge your phone, if after reaching 100% the value is still high and not close to 0 then it could be a sign of batter miscalibration, in that case, just let it keep on charging until you see the mAh value go close to 0 or possibly less than 10.
Click to expand...
Click to collapse
Could over charging my device cause some sort of power cable damage inside the phone?
I had to send my device back for repairs due to unexpected shutdown, and they told me the battery cables were soldered again.
You can't overcharge it without dismantling the battery.
iq-dot said:
I haven't used Bettery Battery stats but if you get Current Widget, then put the widget on your homescreen, click on the widge until you see a "mAh" reading which indicates how much it is charging. Charge your phone, if after reaching 100% the value is still high and not close to 0 then it could be a sign of batter miscalibration, in that case, just let it keep on charging until you see the mAh value go close to 0 or possibly less than 10.
Click to expand...
Click to collapse
Hi,
I've installed the app as you said, ive plugged in my phone before i went to sleep yesterday. And when i woke up it says over 30 mah and it was full charged it wasnt empty before i went to sleep and it charged for 8h
Sent from my HTC One X using xda premium

Categories

Resources