For tabs with battery drainage problem... or how to calibrate

Search This thread

Vlad_z

Senior Member
Mar 25, 2011
506
178
I've got this problem with my tab (quick battery drainage). Symptoms would be your 100% charged tab would go down to 0% in unusual shorter time ( like 2-4 hours). You put it on charger and tab would be charged back to 100% again in substantial short time like 2-3 hours instead of 6-7 hours.

Well, after looking at this issue I think I have come up with solution.
At least, my tab looks like it's back on track... though, to say for sure I would need another couple days of testing.

The problem is not runaway wild application on a background but battery control circuit. This chip reports to OS much smaller battery capacity as it is for some reason. I will not go into details but here is what you need to try:

Flash stock kernel (may be custom kernel is not the reason for bad chip calibration and I'm 90% positive but just to be on safe side). You don't need to do factory wipe in OEM recovery for our purpose.

You also don't need to wipe batterystats.bin or use "Battery Calibration" apps from market (which does exactly the same wipe just in more end user friendly way). This wipe serves no other purpose then refreshing your usage statistics.

You also don't need to drain your battery all way down... nice, this way you don't have to wait for too long.

Well, here we go:

charge tab somewhere in between 80 and 100%.
edit: remove charger
shutdown tab (not put in hibernate/sleep) for 1 hour.
edit: turn tab on and run it for 30-40 min. or whatever it takes to drop charge to 40-50%.
shutdown tab again for 5 hours (overnight).

turn tab again and check... you should be fine now, charge it again 100% and use as usual.

That should do correct chip calibration.


PS: the reason why this chip calibration went bad at the first still remains open.



EDIT: just want to give a shortcut for those who does not feel like reading through the thread.

http://xdaforums.com/showpost.php?p=16771651&postcount=41

Edit: here is calibration procedure which was modified down this thread ...

1. in CWM/recovery let it sit till battery in terminal will show less then 3700. The less you can get it the better. 3400 is probably absolute minimum.

2. shut down tab and let it sit for 1 hour.

3. plug it to charger and charge it for 5 hours.

4. disconnected charger and let it sit for 1 hour.

5. boot up your tab and test it, it your battery still not calibrated you can flash back your backup and repeat calibration procedure.

Edit: if you physically disconnect battery (you have to disassemble tablet) and keep it for couple min. that would trigger FG chip to start with default SOC curve.
 
Last edited:

Vlad_z

Senior Member
Mar 25, 2011
506
178
yup, this is it...

This is how properly calibrate sg tab's batteries. There are some variations to the process but essentially battery will be calibrated in two measurements which stand apart by minimum 40% when battery is at rest on time intervals 1 and 5 hours.

No need to do factory reset, wipe batterystats, use battery calibrator apps from market or dance around with rain stick... all this will give same result as woodoo magic... though if by some reason battery calibration conditions are met then one may claim a miracle.
 

FillTheVoid

Senior Member
Mar 10, 2011
255
54
*sigh of relief* looks like this worked. More people that have this issue should now about this. Thank you for the fix.

Sent from my DROID2 using XDA App
 

hyann

Senior Member
Nov 7, 2007
81
7
Is this the same as the Sleep on Death (SOD) syndrome? that while charging it dies overnight and then you have to long press the power button and/or charge it to get it back?
 

nikzDHD

Senior Member
Apr 2, 2011
4,547
1,207
London
Thanks will try this after flashing many custom roms I've been suffering from fast drainage which is not normal from when I had it on stock.
 

Vlad_z

Senior Member
Mar 25, 2011
506
178
Is this the same as the Sleep on Death (SOD) syndrome? that while charging it dies overnight and then you have to long press the power button and/or charge it to get it back?

How long your tab usually works on one charge? if 8 and more hours - then no, I would think that there is a bug in Android charger control.
 

wlighter

Senior Member
Aug 9, 2011
233
26
yup, this is it...

This is how properly calibrate sg tab's batteries. There are some variations to the process but essentially battery will be calibrated in two measurements which stand apart by minimum 40% when battery is at rest on time intervals 1 and 5 hours.

No need to do factory reset, wipe batterystats, use battery calibrator apps from market or dance around with rain stick... all this will give same result as woodoo magic... though if by some reason battery calibration conditions are met then one may claim a miracle.

May I ask what do you mean by rest time intervals of 1 and 5 hours?

Does it mean that the calibration will only take place when the tab is off for 1 hour, then switch on and used till battery depleted by a further 40% minimum and the switch off for another 5 hour. Correct?

Also , is this 40% refer to value before or after calibration? I asked this because when I restart my tab the value changed (ex: 36% before restart to 53% after restart)
 
Last edited:

Vlad_z

Senior Member
Mar 25, 2011
506
178
May I ask what do you mean by rest time intervals of 1 and 5 hours?

Does it mean that the calibration will only take place when the tab is off for 1 hour, then switch on and used till battery depleted by a further 40% minimum and the switch off for another 5 hour. Correct?

Also , is this 40% refer to value before or after calibration? I asked this because when I restart my tab the value changed (ex: 36% before restart to 53% after restart)

Yes that's correct.

Fuel gauge chip will take 1 measurement of open circuit voltage and internal resistance only when battery is at rest (no charge/discharge) for at least 40min. - so I say 1 hour just to be sure...

Consecutive measurements, from which gauge chip can derive capacity of the battery have to be at least 40% and 5 hours apart.

Technically speaking, that 40% difference can be in either directions. Say you have 40% as of now, leave it in rest for 1 hour, then charge it to 100% and leave it at rest for 5 hours and you will have same result.

Condition "at rest" means voltage change less then 4mV (or mkV) per sec. - I don't remember.

When tablet is in sleep some background processes may awake tablet briefly and reset the 1 hour counter - so to make it work for sure, simply do shutdown.

if you want additional reading on my findings then look here:

http://xdaforums.com/showpost.php?p=16615800&postcount=517
 
  • Like
Reactions: AUSTAB2012 and jzen

jzen

Senior Member
Oct 9, 2010
720
254
I tried this method...

1.Charged tab t0 80%, then shut down (removed charger) for 1 hour.
2.Turned on tab and played games for about 45min till battery was 49%.
3.Turned off tab and let sleep for 5 hours (charger still removed).
4.Turned tab back on and battery reads 79%, used for about 20min and battery reads 68%... Seems battery drain is still happening?

Right now i'm charging the tablet back upto 100% then perhaps try this method again... Did I do something wrong?
 

wlighter

Senior Member
Aug 9, 2011
233
26
I tried this method...

1.Charged tab t0 80%, then shut down (removed charger) for 1 hour.
2.Turned on tab and played games for about 45min till battery was 49%.
3.Turned off tab and let sleep for 5 hours (charger still removed).
4.Turned tab back on and battery reads 79%, used for about 20min and battery reads 68%... Seems battery drain is still happening?

Right now i'm charging the tablet back upto 100% then perhaps try this method again... Did I do something wrong?

same problem im facing. This is why im wondering is the 40% value of before or after calibration. Because although it might drop 40% before calibration is done, the real drop value might be less then that. Which means to the chip it might just see a drop of example 20% of real drop and hence it didn't perform the calibration because conditions of 40% is nt met.
 

jzen

Senior Member
Oct 9, 2010
720
254
I did forget to flash back to the stock kernel (using pershoot's).

I just flashed to doc's slim 6.5 which has a modified stock kernel (couldnt find just the stock kernel and my internet is too slow to download the entire stock rom.). Going to try this method again but starting at 40%

1.Battery at 40%, shutdown tablet for 1 hour.
2.Charge tablet to 100% (while shutdown)
3.Leave tablet shutdown for 5 hours :(
4.Pray to droid gods, find my rain stick and begin dark resurrection ritual while watching true blood.

My only question now is... Should I turn the tablet back on after the 1 hour shutdown? Or should I leave it shutdown and just plug in charger till its 100% charged, then let it stay shutdown for 5 hours?:confused:
 
Last edited:

FillTheVoid

Senior Member
Mar 10, 2011
255
54
This is what worked for me:

1. Charged tab to 100% removed from charger.
2. Power down for 1 hour.
3. Power on (tab at 96%)
4. Drain to 46%
5. Power off for 5 hours

When I powered the tab back on after the 5 hours, i used it for a while and rebooted and the battery reading stayed the same which it wasn't doing before the calibration. It has been draining and charging at a normal pace since then and has remained the same after reboots and ROM flashes since the calibration.
 
  • Like
Reactions: jzen

jzen

Senior Member
Oct 9, 2010
720
254
This is what worked for me:

1. Charged tab to 100% removed from charger.
2. Power down for 1 hour.
3. Power on (tab at 96%)
4. Drain to 46%
5. Power off for 5 hours

When I powered the tab back on after the 5 hours, i used it for a while and rebooted and the battery reading stayed the same which it wasn't doing before the calibration. It has been draining and charging at a normal pace since then and has remained the same after reboots and ROM flashes since the calibration.

I'm going to go ahead and try this method right now! But for me... sometimes my battery will not charge unless the unit is shutdown (ever since battery issues started.). I hope this time it will charge while its on. :cool:


Also the instructions say to flash the stock kernel before trying this method... Did you do this? And were you able to flash back to pershoot's without issue?

*Update:
It doesn't look like its charging, (system on). Should I just shutdown and charge it to 100%? Then continue with said method? Anyone know if this method will work while tablet is shutdown through the entire process? :rolleyes:
 
Last edited:

FillTheVoid

Senior Member
Mar 10, 2011
255
54
I'm going to go ahead and try this method right now! But for me... sometimes my battery will not charge unless the unit is shutdown (ever since battery issues started.). I hope this time it will charge while its on. :cool:


Also the instructions say to flash the stock kernel before trying this method... Did you do this? And were you able to flash back to pershoot's without issue?


My tab was charging while on, sometimes it wouldn't show it till after a reboot. I did mine from stock 3.1. (A backup I made before I took the TW OTA) I have not re-flashed pershoot's kernel and probably wont till the bug is worked out. I did however flash the deodexed stock TW and flashed a theme and have had no issues.

Edit: if its not chargin while on, i would charge it all the way while off then turn it on so it can read the battery then start the 1 hour power down.
 
Last edited:
  • Like
Reactions: jzen

Vlad_z

Senior Member
Mar 25, 2011
506
178
Correction guys...

I was sure that our p7510 model was using TI bq20z75 fuel gauge chip but with new information looks like it's Maxim 17042 chip... It's embarrassing but I have to stay corrected. TI chip would calibrate itself in procedure outlined above as for Maxim - I don't know yet. I'm looking at it.

These are good and bad news. Good one - with this new fact, it's very possible that the reason of chip's SOC counter corruption is in software. Driver for Maxim is pretty messy and complex (because it's messy). In contrast driver for TI is simple and straight forward (because TI chip is smart). Software can be fixed but problem in hardware design not so easy.

Well, I will report back when I find something.
 

FillTheVoid

Senior Member
Mar 10, 2011
255
54
Correction guys...

I was sure that our p7510 model was using TI bq20z75 fuel gauge chip but with new information looks like it's Maxim 17042 chip... It's embarrassing but I have to stay corrected. TI chip would calibrate itself in procedure outlined above as for Maxim - I don't know yet. I'm looking at it.

These are good and bad news. Good one - with this new fact, it's very possible that the reason of chip's SOC counter corruption is in software. Driver for Maxim is pretty messy and complex (because it's messy). In contrast driver for TI is simple and straight forward (because TI chip is smart). Software can be fixed but problem in hardware design not so easy.

Well, I will report back when I find something.

A lot of this is way over my head, but my battery calibration seems to be accurate, although I can't be absolutely sure because I have no stats from the previous calibration to compare it to. I do know for sure that after this process the bug of it draining then after reboot going back to what it should be is gone.
 

wlighter

Senior Member
Aug 9, 2011
233
26
so i guess we need to flash back the stock ROM w/o TW for this procedure to work? I was trying the same steps with StarBurst + pershoot kernel it seem that it doesn't work. Anyone manage to calibrate with pershoot kernel?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    I've got this problem with my tab (quick battery drainage). Symptoms would be your 100% charged tab would go down to 0% in unusual shorter time ( like 2-4 hours). You put it on charger and tab would be charged back to 100% again in substantial short time like 2-3 hours instead of 6-7 hours.

    Well, after looking at this issue I think I have come up with solution.
    At least, my tab looks like it's back on track... though, to say for sure I would need another couple days of testing.

    The problem is not runaway wild application on a background but battery control circuit. This chip reports to OS much smaller battery capacity as it is for some reason. I will not go into details but here is what you need to try:

    Flash stock kernel (may be custom kernel is not the reason for bad chip calibration and I'm 90% positive but just to be on safe side). You don't need to do factory wipe in OEM recovery for our purpose.

    You also don't need to wipe batterystats.bin or use "Battery Calibration" apps from market (which does exactly the same wipe just in more end user friendly way). This wipe serves no other purpose then refreshing your usage statistics.

    You also don't need to drain your battery all way down... nice, this way you don't have to wait for too long.

    Well, here we go:

    charge tab somewhere in between 80 and 100%.
    edit: remove charger
    shutdown tab (not put in hibernate/sleep) for 1 hour.
    edit: turn tab on and run it for 30-40 min. or whatever it takes to drop charge to 40-50%.
    shutdown tab again for 5 hours (overnight).

    turn tab again and check... you should be fine now, charge it again 100% and use as usual.

    That should do correct chip calibration.


    PS: the reason why this chip calibration went bad at the first still remains open.



    EDIT: just want to give a shortcut for those who does not feel like reading through the thread.

    http://xdaforums.com/showpost.php?p=16771651&postcount=41

    Edit: here is calibration procedure which was modified down this thread ...

    1. in CWM/recovery let it sit till battery in terminal will show less then 3700. The less you can get it the better. 3400 is probably absolute minimum.

    2. shut down tab and let it sit for 1 hour.

    3. plug it to charger and charge it for 5 hours.

    4. disconnected charger and let it sit for 1 hour.

    5. boot up your tab and test it, it your battery still not calibrated you can flash back your backup and repeat calibration procedure.

    Edit: if you physically disconnect battery (you have to disassemble tablet) and keep it for couple min. that would trigger FG chip to start with default SOC curve.
    17
    I want to give you guys updates on my findings regarding fuel gauge chip Samsung is using in our tabs.

    It's MAX17042. I spend lots of time looking for datasheet but cannot find it. I found some very similar chip but still not exact. It looks like this chip was specially designed for Samsung by Maxim. So any further knowledge was derived from looking at various drivers for different Samsung devices.

    Ok, looks like max17042 is utilizing combination of coulomb-counter with impedance tracking algorithm. What does it practically mean?

    There is "quick start"/"quick charge estimate" software function but it's not accessible without special cable or kernel software change. If someone wants to try this I can elaborate on that more.

    What can we do without any special thingy?

    Tab needs to be at rest (turned off) for at least an hour when its empty and then when it charged back. This will let chip to make 2 open circuit voltage measurements.

    How to make sure that tab is discharged enough for calibration to take the place? If capacity is off big time then gauge may report SOC 30% but in the fact battery is in 70%, so chip will not execute calibration procedure.

    The most sure way to check this is in terminal, execute this command:

    cat /sys/class/power_supply/battery/voltage_now

    or through adb:

    adb shell cat /sys/class/power_supply/battery/voltage_now

    your good discharged start point should be anything below 3700 (3.7V). If your tab is telling that you have 0% capacity but voltage is more then 3700 then keep rebooting tab (this will refresh counter for a moment) or just boot in CWM and let tab run/sit there for some time.

    Then charge it with power adapter to 100%, you can check voltage at this point - should be around 4100, usually you should be good.

    Then shutdown tab for another hour or two.

    That's it. You should be good now unless you are still using certain custom kernels.


    PS: I have heard cases when SOC miscalculation occurred on totally stock devices, well, I have no explanation for that, but with custom kernels which allow to charge through USB cable - there is a code path to write wrong data into remaining capacity counter stored in the fuel gauge chip.

    After it happens and even when you are back on stock kernel then it will take some time for the chip to slowly correct itself or you need to force recalibration outlined above.

    Btw, resent custom kernel (from pershoot) does not include charging by USB functionality. Well, there is nothing wrong with that idea. It just Samsung implementation of charging algorithm is not good if such function will be allowed.
    3
    I agree. The problem is the devs refuse to to add a disclaimer of the issues. Im sure if some of the people in this thread knew flashing other kernels and ROMs would cause this battery damage (which it does as statistics dont lie) they wouldnt do it.

    If you can do anything to help protect people from this issue it would be to state a clear disclaimer of this issue in all aftermarket kernel and ROM threads. Why is this not being done? :confused: You cant argue with the dozens of people here who have gotten this issue after they flashed ROM/ kernel.

    Be aware that I know you may not value me or my tablet but I ask for you to value others as they spent their hard working money on these tablets and it hurts me to see their units become crippled like this.

    exactly. you spend your money, and we make it multiply overnight. we do things the manufacturer wouldn't dream of doing (sometimes), and/or did not implement. you get to see development right before your eyes and be a part of something great in the making. for example, if i didnt value everyone's tabs, i wouldn't work so dilligently to perfect things across numerous devices. if i didn't care to make said device great (to the best of my ability), i wouldn't post anything. i like to share and have everyone reap the benefits.

    you are not protecting anyone by alienating yourself, in the way that has been done, thus far. this makes your core statement/focus lose credibility by the tenfold.

    here is a better way to phrase something:
    hey. im receiving xx issue. any logs or something i can get for you to try and rectify the issue?

    that would help a ton of people.
    2
    May I ask what do you mean by rest time intervals of 1 and 5 hours?

    Does it mean that the calibration will only take place when the tab is off for 1 hour, then switch on and used till battery depleted by a further 40% minimum and the switch off for another 5 hour. Correct?

    Also , is this 40% refer to value before or after calibration? I asked this because when I restart my tab the value changed (ex: 36% before restart to 53% after restart)

    Yes that's correct.

    Fuel gauge chip will take 1 measurement of open circuit voltage and internal resistance only when battery is at rest (no charge/discharge) for at least 40min. - so I say 1 hour just to be sure...

    Consecutive measurements, from which gauge chip can derive capacity of the battery have to be at least 40% and 5 hours apart.

    Technically speaking, that 40% difference can be in either directions. Say you have 40% as of now, leave it in rest for 1 hour, then charge it to 100% and leave it at rest for 5 hours and you will have same result.

    Condition "at rest" means voltage change less then 4mV (or mkV) per sec. - I don't remember.

    When tablet is in sleep some background processes may awake tablet briefly and reset the 1 hour counter - so to make it work for sure, simply do shutdown.

    if you want additional reading on my findings then look here:

    http://xdaforums.com/showpost.php?p=16615800&postcount=517
    2
    My previous posted method of calibration (what the op says) did in fact stop the battery from super draining then going back up after reboot. I can't say for sure if the battery is completely back to normal, I have nothing to compare it to but as far as I can tell I'm running normal again.

    you should be looking about 10% per hour battery usage for normal browsing on wifi