yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] mtw4991:
Setting age and full40 are input as numerical numbers into the age and Full40 boxes respectively. When inputing values into setreg, they are input as hex values, so just do the following:

A.) under the Learn Prep tab, type 66 in the Register box and a4 in the Value box and press save. The register=66 is the aEvolt register and a4 sets the value.

B.) same thing here...type 65 in register field and 06 in value field and press save.

NOTE: after you press Save, nothing happens that you can see but the values get changed on the General tab and in the settings.
[Nexus One Android Development] bimasakti85:
I try to calibrate my battery. I do exactly as in the tutorial in the first page. After reboot, my age said 84%, not 100%. Does this means my battery age actually 84% ?
[Nexus One Android Development] temasek:
If u done it correctly, yes your true battery age is 84% as of now.
[Nexus One Android Development] bimasakti85:
What I did was run the cycle with with playing music+using the gps to drain the battery and to keep it above 200. After the pop up comes,immediately plug in the charger,stop the music,and activated the airplane mode. After that,I put the screen off and leave it charged untill I woke up in the morning. Is'nt my step right?

Sent from my Nexus One
[Nexus One Android Development] temasek:
Then your age is correct at 84%. Your battery should be around 1 year old +/- right ?
[Nexus One Android Development] bimasakti85:
Yes,u're right. Commonly,at what age I should replace my battery ?

Sent from my Nexus One
[Nexus One Android Development] temasek:
This is just an guide.............

At 80%

But even if u reach 80%, u still can use your battery. It is a guide to remind u "It's time for a new battery :D "
[Nexus One Android Development] k_myk:
OMG! I get it now! So after puting age and full40 values into there "places" I should insert first register (which is considered by default as aevolts), save and then in the same box i should enter second register and save right? One after another. Those two values should be inserted in the same box, am I correct?

I thought there supose to be two independent text boxes for those values and I was confused:P Maybe I'll look into this calibration later today.

One more question just to be sure: If I somehow spoil something is there any way to undo whole process easly?

Thank you very much for your effort to help me:)

P.S. sorry for any mistakes. No autocorrect on xda app:P
[Nexus One Android Development] mtw4991:
no the first value goes into the register box the second value such as a4 goes into the value box
[Nexus One Android Development] vzontini:
I recently got a new battery and I followed the instructions on the 1st page but in LearnMode my Cap.a (mAh) reads 104865 which seems really high, and the Real-Time Voltage is 4138442 (uV) and doesn't seem to change. The battery percentage indicator is dropping from the GPS polls but nothing on the app screen is changing.

Ideas?
[Nexus One Android Development] temasek:
You have a battery that cannot be calibrated.
[Nexus One Android Development] vzontini:
Thanks. That is what I expected. It was worth a try.
[Nexus One Android Development] Papa_I:
Just wanted to say thanks for the instructions and great app. The battery calibration worked great on the first try. No longer is my phone dying with 15% battery life left.
[Nexus One Android Development] somline:
Just a small reminder:

This was discovered by the best community you probably find:

http://forums.precentral.net/homebrew-apps/260947-dr-battery.html

http://forums.precentral.net/palm-pre/256967-find-out-how-good-bad-your-battery.html

And this Android Community did a great job making it even better.

Congrats my friends.
[Nexus One Android Development] RogerPodacter:
For sure, none of this ever would have happened if somline didn't do his initial work on the ds2784 chip on the palm pre. It all started from there:).
[Nexus One Android Development] houzuoguo:
I'm not sure if anyone has found this tip:

Charge phone when Batt Age is high (I use 100%)

Set Batt Age to real value when using phone (for my battery, 70%)

For some reason, my battery lasts significantly longer (almost double the before) using that method.
[Nexus One Android Development] temasek:
U are just bluffing the battery % and your phone will auto shutdown way before 0%. That is not battery calibration.
[Nexus One Android Development] houzuoguo:
Negative.

If I charge my phone when it's at the right age (70%), the battery usually lasts 15 hours with 2.5 hours screen-on, and system turns off automatically when battery drops to about 5%.

If I use the method I said above, the battery can last 1 day + about 10 hours with 4 hours screen-on, system turns off automatically when battery drops to about 10%.
[Nexus One Android Development] temasek:
You may wanna create your own thread cuz your method is not in-line with the battery calibration in this thread.

Pls don't confuse other n1 users of your method.
[Nexus One Android Development] houzuoguo:
Well in fact it is related to battery calibration :D or where else could I set battery age?

Also I didn't intend to confuse anyone, it's just a hint, maybe some other Battery Calibrator users will experience the same results if they do the same as I said in previous posts.
[Nexus One Android Development] temasek:
Your wish.

I rest my case as I'm not the thread starter. Just helping out here.

Have a nice day :)
[Nexus One Android Development] houzuoguo:
you too :rolleyes:

by the way, how do you feel about optimus 2x's battery life? better or worse than a nexus one?
[Nexus One Android Development] temasek:
Better but unreliable for now. Ctso is looking into a fix for reliable battery reading.
[Nexus One Android Development] waylo:
Hey temasek (and others of course),

I'd like your opinion on an alternate battery calibration calculation I've been using because for whatever reason, the learn cycle never quite completes properly on my phone.

I was wondering if using batt data from a log, one could guesstimate battery age.

1. I've set my full40 to just higher than what can be expected with my battery (1700ma). Battery age is set to 100%.

2. I start the learn cycle, so mA gets zeroed with my min voltage of 3.201 when charging begins.

3. Following batt data from the logs, at 96%, the amperage is 1529.

05/10/2011 02:14:38 [INFORMATION] batt: 96%, 4192 mV, 21 mA (21 avg), 26.6 C, 1529 mA

05/10/2011 02:15:28 [INFORMATION] batt: 96%, 4187 mV, -13 mA (10 avg), 26.6 C, 1529 mA

05/10/2011 02:16:18 [INFORMATION] batt: 100%, 4192 mV, 22 mA (19 avg), 26.6 C, 1580 mAh

05/10/2011 02:16:18 [INFORMATION] batt: charging BATTOFF [FULL]

05/10/2011 02:17:09 [INFORMATION] batt: 100%, 4187 mV, -1 mA (-1 avg), 26.6 C, 1580 mAh

4. The very next log entry is 100%, and the ma reading jumps (not drops) to 1580.

5. Can I interpret this as my batt capacity being 1529? Thus, keeping 1700 as my full40, batt age is approximately 89.9%.

Is there a logical misstep here?
[Nexus One Android Development] RogerPodacter:
No issue with your thinking, that's basically exactly what the chip does for the calculation. Literally that's exactly what its doing. So you can leave your full40 where it is and use an age value of 89%, or lower your full40 to match that mAh value and set age to 100%. Either way its the same, the chip multiplies age * full40 to give your full charge point.

Anyone checked the new galaxy s 2 battery code? Its using the new max17042 fuel gauge chip but its so new the data sheet doesn't exist yet. But its an advanced fuel gauge so I'm wondering what kind of cool functions it might have.
[Nexus One Android Development] mtw4991:
+1 what roger said.

also, it looks like something is kicking in right at the end of your learn cycle and preventing it from completing. Your mA should drop until there are 2 consecutive readings below 20mA, like 21,20,19,19=100% full charge. Your log shows 21mA, -13mA...the -13mA is a draw that appears to have dropped you below <20mA and ended your learn cycle.

Were you in airplane mode? Did you peek, lol?
[Nexus One Android Development] waylo:
Haha no peeking. I have not been in airplane mode though until last night. So I may post that log later.

So is the learn flag supposed to stay on the while time, or is supposed to turn off early in the charge cycle?
[Nexus One Android Development] mtw4991:
I believe it will stay on the whole time, but to be honest, I've never checked. I just put the phone in learn mode at night, went to bed and let it do its' thing :p
[Nexus One Android Development] waylo:
Right, I could have sworn it stays on.

But last night *right* after learn mode was initiated, I got a bunch of texts and such and when I later checked the learn flag was off. As I recall, supposedly only close to the end of the charge cycle can the learn cycle be disrupted with a negative amp draw, so I didn't think too much of it. But I could have sworn it was on the whole time other times I've played with it.
[Nexus One Android Development] mtw4991:
I have used the phone normally before, up until it gets around 85% charged the put it into airplane and let it finish and the learn cycle completed properly. Other times it failed for no known reason, so who knows? #gremlins n corpses :p
[Nexus One Android Development] temasek:
There is always a possibility that the learn flag tripped prematurely due to sudden draw of current or other unknown reasons. There seems to have a bug also that shut off the learn flag prematurely. U may be doing everything right ........
[Nexus One Android Development] resynx:
Ah, for the life of me I just cannot get my battery to drain down to 3201 mv. It's still always dying way before then. Is the battery dying before reaching 0% a problem with all Nexus Ones? Or will buying a new battery fix the problem of it dying at 15%?
[Nexus One Android Development] RogerPodacter:
The majority do die before 0%, around 10% or so. If you really are having trouble draining to 0%, just put your full40 value way up to something crazy. Then charge to full and drain it down to empty. Guaranteed to hit 0% to start the learn cycle. Just set it to something like 2500 mAh or whatever, that will do it.

Or use the app to let it bump it up for you.
[Nexus One Android Development] resynx:
Alright thank you I will try that! When I set it to 2,500, my battery dropped from 99% to 57%. Is that normal?
[Nexus One Android Development] mtw4991:
That would put it at about 1425mAh, which would be correct if you have done a learn cycle.
[Nexus One Android Development] RogerPodacter:
Yeah that's normal cause you're changing the range, no big deal to set it back. Try to drain to empty but I think I said it wrong and you were supposed to set it then charge to full. Oh well don't matter either way, if you still can't hit empty voltage then let us know.
[Nexus One Android Development] resynx:
Yes sir, didn't have time this morning after I set it so I just started on it now. Set it to 2,500 and it is charging to 100% now from 14% at the moment. Will let you know how it goes once I try to drain it.
[Nexus One Android Development] RogerPodacter:
cool you will notice a big jump to 100% which is normal because of your increased full40. no worries, once that happens and you start to drain you will be able to get the voltage all the way down to empty with no artificial limits blocking you. it was just a cheap trick way to easily get you to empty volt. you will have to set back to full40 of 1452 after and then determine your proper age value when it reaches full charge.

really the app should have done all this for you.
[Nexus One Android Development] resynx:
Ah, I see.. Wait, when exactly do I set it back to 1452? After it hits learn mode and then charges back to 100% (if so, set it back to 1452 before or after the reboot)? Sorry for so many questions, I'm pretty noob at this kind of stuff xD
[Nexus One Android Development] RogerPodacter:
Well I'm kinda having you go the long route. But change the full 40 back to stock once you hit empty volt and start charging. Then near full charge look for the jump to 100% and the proper age value for that jump.

Really the app should work correctly to do it all right.
[Nexus One Android Development] resynx:
Ok thank you very much for all of your help!
[Nexus One Android Development] resynx:
Yay!! I finally got it to drain to 3201mV and it is charging as we speak ^^

So how long does this calibration last before I need to do another learn mode? And just curious, if I bought a brand new battery would that have solved the shutting down at 15% problem?
[Nexus One Android Development] temasek:
If your calibration is done correctly then u don't have to calibrate anymore cuz your battery age will auto drop in time. Only if u consistently shut off before 0% then u should perform calibration again.

Brand new battery will have to perform calibration, if your battery is capable to perform one.
[Nexus One Android Development] leader288:
I’ve got a problem. I’ve done every step from 1a to 3a but however I’m having problems with 3b. The app doesn’t seem to be pushing up the cap of the battery. I’m using a HTC desire. I’ve bumped up the max cap to 1800 instead of 1452. just when the learn mode is activated, the moment it plug in, it shuts down. what do i do?
[Nexus One Android Development] mtw4991:
In the apps Settings menu, do you have ACR Adjustment box checked?
[Nexus One Android Development] leader288:
yup, it is.

10char
[Nexus One Android Development] lolobabes:
"setreg>long press>open in text editor, then:"

i tried to do this with file expert app, but nothing happens in long press.... help pls ty
[Nexus One Android Development] mtw4991:
you need root explorer, but you can also input the values in the app by enabling the advanced tab in settings.
[Nexus One Android Development] lolobabes:
ty, another question sir. in see 2 boxes for this first is:

Register: 0x - I suppose its for this -> a. set your aEvolts to 3201 (type 0x66 a4 in setreg & save/exit)

if so i only need to input "66 a4" right?

and the second is

Value: - is it for this one? -> b. set your stop charging current to <20mA (type 0x65 06 in setreg & save/exit) i need to the whole "0x65 06"?

sorry noob here sir

ty
[Nexus One Android Development] temasek:
0xYY xx

YY being register

xx being value
[Nexus One Android Development] lolobabes:
i got the answer here lol ty
[Nexus One Android Development] temasek:
Lazy to type cuz I answered that question too many times :p
[Nexus One Android Development] lolobabes:
no worries you're doing a g very good job sir, ultimate last question lol

A.) under the Learn Prep tab, type 66 in the Register box and a4 in the Value box and press save.

(B.) same thing here...type 65 in register field and 06 in value field and press save - Do I input this to the same Register and value boxes as above after hitting save? ty
[Nexus One Android Development] temasek:
That is correct.
[Nexus One Android Development] lolobabes:
I think am almost ready to do this but just to clarify these:

"d. turn off and close any open apps you have running, but leave Battery Calibrator open."

"turn off "? - will there be a button for this?

close apps means going to app manager and fc them all except batt calibrator right?

"charge for a full 4 hours" - doesnt mean fully charged for 4 hours, just charge phone 4 hours regardless of batt level right?

sorry for so many questions just wanna make sure i understand before i try it

ty for your patience... ahihihihi
[Nexus One Android Development] lolobabes:
how long do i have to wait on this? drain battery to 3201 mV? how many minutes?

"to hit learn mode you must keep your current mA above -200mA draw at the empty point!"

where can i see that -200mA coz my current mA goes below -200 a few secs after I hit learn mode on... any help

ty
[Nexus One Android Development] temasek:
Qn: How long do I have to wait on this? drain battery to 3201 mV? how many minutes.

An: As long as it takes. Your objective is to hit Empty Voltage of 3201mV before you drain off your mAh.

Qn: Where can I see that -200mA?

An: U can see from the Battery Calibrator app itself. You just need to ensure your current draw is above 200mA untill u hit Empty Voltage of 3201mV so that your Learn Cycle can start. Once u start your learn cycle, no need to maintain any draw. In fact, the less current u use the better once u started your learn cycle.
[Nexus One Android Development] temasek:
Once u hit learn cycle, u can turn on airplane mode and just leave it charge about 4-5 hrs. Do NOT attempt to peep (ie Do NOT turn on screen to look).

The longer the better to be safe. As a rule of thumb, just perform learn cycle charging overnight :)
[Nexus One Android Development] lolobabes:
so i can start the learn mode even my batt level is at 54% or do i have to be at 100%?

by the way can i play with the phone while waiting for this?

"You just need to ensure your current draw is above 200mA untill u hit Empty Voltage of 3201mV so that your Learn Cycle can start"

the problem is my current (mA) drops to -158 or even less few seconds after i hit the detect learn mode on, is that alright? ty
[Nexus One Android Development] temasek:
Usually when u will auto shut off? If it is about 15% then turn on your detect learn mode when u about 20% or so. Once u turn on detect learn mode, ensure your draw current is above 200mA.

To go above draw current of 200mA is quite simple. U can turn on anything. For me I just play online music :)

Once you are near your Empty Voltage of 3201mV you should plug-in and standby cuz anytime u will hit learn cycle. Once learn cycle starts, immediately plug-in and turn off everything u did. Also it is wiser to turn on your airplane mode.

Once u did that, GO TO SLEEP.

EDIT: Most important, do NOT allow your mAh to die before you hit Empty Voltage of 3201mV or u will fail. When needed, manual bump up your mAh by inputing from register

Register 10

Value 03

to bump up extra 300mAh for u manually.
[Nexus One Android Development] RogerPodacter:
Have a few minutes at the airport. So tab 2 isn't working yet. Basically all the app does for now is hit learn mode in a rather simple way. We're looking for feedback and suggestions:-). This is my first app so its a learning process so sorry if its not better than it should be;-). Dvgrhl has been an enormous help with his superb coding skills!

We want to expand the app it just takes so long and a lot of work. I figured for now this is some thing for you guys to play with and experiment with learn mode. Pershoot just updated his kernel with an extended time out poll so use that kernel and you should be able to do a full learn cycle. Good luck guys...
[Nexus One Android Development] dvgrhl:
Yeah, there is a lot of clean up that is needed on the UI side, but I'll see about getting that part done.

As to how to hit learn mode with this app, just drain down to around 15% or so and start watching the learn mode tab with detect learn mode turned on. When you see the LEARNF flag light up, plug in your charger immediately. This might take a little time to happen, but just be patient. That's all there is really.
[Nexus One Android Development] RogerPodacter:
Oh so the way it works is turning learn on increases the sample poll rate a bit. And once it hits 3.5volts the sample rate really steps up to about 1 second. Then just watch for the learn flag and plug in soon as you see it. Be quick too!
[Nexus One Android Development] dvgrhl:
Yeah, one thing I want to try to include at some point is a helper to drain the battery faster, maybe doing intensive computations or visuals or whatever is needed to drain the battery as fast as possible until reaching a certain percentage, like 15% or so.

So I've never actually calibrated my battery yet so I am going to do it the same as anyone else by testing out the app and seeing what happens. We'll all have to report back how it works out.
[Nexus One Android Development] RogerPodacter:
One last trick. If you guys attempt to hit learn and miss it and The phone shuts down. On reboot do this:

Echo 0x10 03 > setreg

Otherwise the second attempt might not trip the learn flag easily.
[Nexus One Android Development] temasek:
In that utility under learnprep, what is ACR?
[Nexus One Android Development] EnhancerFIN:
Could someone mirror that file, for example put it on dropbox etc?
[Nexus One Android Development] temasek:
http://www.mediafire.com/download.php?qqpnm2oojz6nkho
[Nexus One Android Development] chowlala:
Please be reminded that the app isn't fully ready and some of the stuff there probably isn't final. The current app only allows you to try to hit learn mode, and the instructions are all in the app itself.

If you're new to all this, do refer to the discussions in the brainstorm thread.

No one is gonna give a monkey's poopoo if you blow up your battery or really mess up with it because you don't know what you're doing. =P
[Nexus One Android Development] mtw4991:
stilL trying to blow the damn thing up lol, any pointers from the monkey?
[Nexus One Android Development] pwig:
Dumb question: do I need to be running the pershoot kernel for this app?
[Nexus One Android Development] chowlala:
No. But the kernel must have the battery calibration drivers included.
[Nexus One Android Development] apratomo:
Hi,

today I tried to drain my batt, then start the app to check voltage

but when hit 3400mV it didnt trip the LEARNF flag

anyway I plugin in the charger immediately when got shutting down message, do I success entering learn mode?
[Nexus One Android Development] RogerPodacter:
No I don't think you did a learn cycle, that learn flag needs to turn on right before shut down. Did any flags turn on?

Maybe we should add mAh output to the learn mode tab as that's kinda important to see to make sure it doesn't run out before the learn flag trips.

I'm gonna give one cycle a shot here cause I'm worried nobody has yet been able to hit learn with the app. Hope its functioning correctly.

When learn is ready you should see 3 flags turn on, aef, sef, and learnf. You also don't want the phone to shut down, it should give a few seconds showing learn right before shut down. That's the time to plug in, hence no shut down and learn active.
[Nexus One Android Development] apratomo:
well I have aef and sef on, but not learnf

is there something to do with changing battery age? before I have 94% then I changed to 100%. I did this before drain the battery
[Nexus One Android Development] k3vink3vin:
Don't worry! I was able to hit learn mode with the app (after 3 trials, 2 of which with setreg 0x10 03 :p), with the phone still on

After on-charging for 3 hours the led was still orange, I was curious and wanted to check its status, I switched on the monitor and that incurred a TIMEOUT thus interrupted the learn mode :(

one problem was the notification that says "learn mode is activated, plug in charger now" pops up non-stop and I had to hit "back" button many times to get rid of them one by one
[Nexus One Android Development] RogerPodacter:
No age actually should be set to 100 when you attempt learn, it makes it a little better chances you'll trip the learn flag. I'm baffled why this is happening so I'm at 50% right now about to test it out soon.
[Nexus One Android Development] RogerPodacter:
Ah nice thanks, and you confirmed something I wondered about. If you let the phone sleep then the time out poll won't happen till you wake it up. The problem is who wants to wait 3 hours to see in case it failed 5 minutes into it! I can't help but constantly check. So I just installed the latest kernel to see if the time out fix made it in or not.

Oh and that command that helped is good, we'll integrate that in so its automatic eventually. Also we'd like to expand the app other than learn mode. With such access to the battery, we could do a bunch of awesome graphing or rate depletion tracking etc. A learn cycle is one and done on need afterwards anyway. Lots of cool ideas could be added kinda as like a full on utility power suite, maybe set alarms at certain voltages and mAh, etc.