yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] theloginwithnoname:
The spanner that is already in the works is that of the four of us that have hit calibration, all of us have gone no further than ~1280.

In the Pre thread, they set their age and "full" capacity to 100% and 1500mAh so that the calibrator can go up as much as it needs.

I suspect our full capacities are lower and in combination with that age (95%), our calibration high point is being set too low.

On the subject of deterioration with age, we could do some estimating to determine where our battery's age should be:

80% is considered the point where the battery is end-of-life

80% occurs around 1 year (warranty period)

from 95% (where it is when shipped, weirdly)

15% over 12 months = 1.25% a month.

Mine has been in use for 8 months = deterioration of 10%

means I should be on 85%

from 100%

20% over 12 months = 1.67% a month

8 * 1.67 = 13.33%

~86.7%

80% occurs around 2 years (expected replacement period)

5% off at 95% initially = 90%

6.67% off at 100% = 93%

i.e. none at 94.8% where *all* of those testing are now = BOGUS.

edit: my last learning charge got to 1261, which is 90% of 1400mAh.
[Nexus One Android Development] RogerPodacter:
Here's the first chunk, i'll update this post with more.

So for the conversion column, you would apply that forumla exactly as you see it to the raw value you get from the code. for example the first one, let's say the raw output in the code (without any conversion equations in the code) gives me a value of 4. so then "in your head" you would take 4*1.5625/15=0.3125. that number happens to be some offset value we probably dont care about and will never pull address 0x61, but just an example.

if we leave the conversion equations out of the code, you can define all of them as int. if you want to add the equations into the code, some may be decimal, some may be whole number, etc.

Address Raw Value Conversion
0x61 - 1 digit whole number - *1.5625/15
0x62 - 4 digit whole number - *6.25/15
0x63 - 4 digit whole number - *6.25/15
0x64 - 3 digit whole number - *0.01952
0x65 - 2 digit whole number - *50/15
0x66 - 3 digit whole number - *0.01952
0x67 - 2 digit whole number - *200/15
0x68 - 1 or 2 digit whole number - *full40 mAh / 1024
0x69 - 2 digit whole number - *0.015
0x6A - 4 digit whole number - *6.25/15
0x6B - 4 digit whole number - *6.25/15

0x14 - 2 or 3 digit whole number - *100/128

We almost need the "dumpreg" equiavalent of the pre.

These are stored as signed registers, that means something in terms of converting but i dont know what yet.
0x7C - 2 digit whole number - no convert needed
0x7D - 2 digit whole number - no convert needed
0x7E - 2 digit whole number - no convert needed

Full
0x16 - 6 digit whole number - *6.25/15
0x17 - 6 digit whole number - *6.25/15
Active Empty
0x18 - 3 to 5 digit whole number - *6.25/15
0x19 - 3 to 5 digit whole number - *6.25/15
Standby Empty
0x1A - 3 to 5 digit whole number - *6.25/15
0x1B - 3 to 5 digit whole number - *6.25/15

0x6C - 1-3 digit whole number - *1000000/16384
0x6D - 1-3 digit whole number - *1000000/16384
0x6E - 1-3 digit whole number - *1000000/16384
0x6F - 1-3 digit whole number - *1000000/16384

0x10 - 3 or 4 digits - *6.25/15
0x11 - 3 or 4 digits *6.25/15

I think that's it. let me know if there's any i missed that we want added.
[Nexus One Android Development] RogerPodacter:
What is your full40 on that 1600 battery set to?
[Nexus One Android Development] waylo:
Thanks so much for the clarification! Changed the 0x65 register and hoping to reap the benefits. Also ordered the 1600 battery everyone's been talking about =)
[Nexus One Android Development] waylo:
Any way for you to post some of your tasks? I use Tasker primarily to turn of wifi when I leave the house and also to change my lock settings/orientation when I get into my car.
[Nexus One Android Development] zen kun:
the manual its kind confuse for me sorry, i dont get it well cna someone explain me again please? for example

2. Navigate to sys>devices>platform>ds2784-battery>setreg>long press>open in text editor, then:

a. set your aEvolts to 3201 (type 0x66 a4 in setreg & save/exit)

b. set your stop charging current to <20mA (type 0x65 06 in setreg & save/exit)

c. if mAh drops to near empty, prior to 3201mV being reached, the ACR will raise capacity by 200mAh so phone doesn't auto-shutdown prior to reaching 3201mV

so i should put both on setReg?? btw when i use root explorer and modify the setreg y view if do my changes and its empty again :S

my phone shutdow beforethe LEARNF button turn on

i got a battery status register 0x07

and Waiting drain your battery to 117 mV to activate learn mode

so should i do this calibration when its near to die my battery??i gues yes so can someone post setReg file please?? thanks
[Nexus One Android Development] temasek:
To start a learn cycle, your mAh must not die before your voltage reaches empty voltage level. That's the golden rule.

Setreg is a file for you to input register & its values. When you open the file, it is suppose to be empty and you just input register/value, save & exit the file. When you reopen the file for edit, it will be empty again, fyi.

I recommend setting the following

1) Empty Voltage level to 3201mV ----> 0x66 a4

2) Min voltage level 40mA --------> 0x65 0c

Start drain your battery, once its below 3500mV voltage level, start monitor closely, your drain lvl must be above 200mA. If your mAh is below 100mAh and you are NOT confortable the app bumping up the mAh for you, you can do it manually by editing the setreg and key in one of the following will do.

0x10 01 -----> for 100mAh

0x10 02 ------> for 200mAh

0x10 03 ------> for 300mAh

Once below 3500mV, I suggest you plug in (standby) and turn on learn mode and prepare yourself.

Good Luck!
[Nexus One Android Development] Old MuckenMire:
I just had my Mugen 3200 shut down my Nexus while still showing 20% power left. :(

So I went in to learn prep and set battery age to 100% and the went to learn mode and let learn mode activate at 3006, I then plugged in my Nexus like it said to and put it into airplane mode and left it turned on...is this the correct procedure?
[Nexus One Android Development] temasek:
Basically yes. Once learn cycle started, you may turn off screen and go to sleep.
[Nexus One Android Development] Old MuckenMire:
Thanks! Is there anything else I should know/make sure and do? I'm a noob at this battery stuff :)
[Nexus One Android Development] temasek:
Turn off screen when learn cycle started and go to sleep. Do not attempt to peep even if the LED turned green cuz it may be at 99% and you will fail - just in case.

Good Luck :)
[Nexus One Android Development] Old MuckenMire:
Thanks man I appreciate it! One more question: when learn mode activated a pop-up came up saying to plug in now. Well I plugged it in BEFORE I clicked OK on the pop-up. This was because I was afraid the damn thing was going to shut down before I had a chance to plug it in(this happened to me on a prior attempt). Did plugging it back in before clicking OK on the pop up have any effect?

And yes I'm going to go to sleep and leave it on there for 8 hours :)

And when you say turn off screen, you mean let it time out...I didn't actually turn it off immediately, I just let it do it';'s 30 second time-out?
[Nexus One Android Development] temasek:
So long as u turn on your charger when u see the dialog box. AFAIK there is no issue when you click OK.

EDIT: Turn off either manually or let it time out no issue cuz actually from start of learn cycle, you really have plenty of time to play with. I actually still using phone for surfing during my learn cycle :) But for a general rule, we advice not to use phone.
[Nexus One Android Development] Old MuckenMire:
Okay thanks man we'll see how it goes...I'm crashing now at six in the morning :D I'll post back my results :)
[Nexus One Android Development] zen kun:
Thanks for the answer I modify yesterday before write this post the setAevolts file contains

AEvolt: 2732

Can someone give me the right values I guess must be I'm hex

So when I edit the setreg file should looks like:

0x66 a4

0x65 0c

Just that values? Thanks in advance sorry for bother first time I did not understand very well thanks

.......................................................

Sent from my loved nexus one ;D
[Nexus One Android Development] temasek:
Key your register and value into setreg one at a time.

0x66 a4

- this is to set AEvolt 3201mV

0x65 0c

- this is to set min stop charge at 40mA

Set age to 100% and u are set for a learn cycle.

Good Luck. :)
[Nexus One Android Development] zdiamant:
I set it to 1800 mAh, and my age was set upon learn to 87%.
[Nexus One Android Development] Smokeaire:
Ok...I'm a real noob....so if anyone will explain the age thing. I followed the instructions to the letter (I think) for the stock Nexus battery. At the end of learning the age is 87%. Is that good or bad? I thought it would be 100%.

I've tried reading a lot of the posts but I'm sure I missed the explanation.

What would be the result if I set it to 1669 / 100%?

A lot to learn here.

Thanks.
[Nexus One Android Development] mtw4991:
Your battery ages with time and degrades, mine is 88% so you should be good to go! Looks like you had a successful learn cycle...congrats;)

If you have your full40 set to 1452mAh and the learn cycle shows 87% (of new battery capacity left) then you should have around 126xmAh of usable power which is your new "100% full" point. You could set full40 to 126xmAh and age to 100% OR leave full40 at 1452 and age 87%...it is the same thing.

If you set your full40 to 1669 you would just be faking yourself as your battery can only hold around 126xmAh now due to aging. So, 1265/1669=75.8%...you would have to set age to 76% to keep it from dying early. If you set age to 100% then it should die around 10-12% as 87%-76%=11%.

The entire goal of this endeavor has been to correct the issue of our batteries dying around 8-15% and get them to charge to full capacity and die at 0% so that we don't get unexpected shutdowns. Additional capacity gained by adjusting high/low points has been a bonus. You want to set your full40 & age correctly so that your phone doesn't die due to running out of mAh prior to hitting the aEvolt point...i.e., 0mAh with >3201mV left. Hope this helps.
[Nexus One Android Development] Smokeaire:
Thank you...that was a great explanation...the scales have fallen off my eyes. I knew that batteries aged but I wasn't clear about the reason for the 100% setting. I'm looking forward to learning more about this.

Super app by the way.
[Nexus One Android Development] mtw4991:
We set age to 100% and full40 to 1452 as these are supposed to be the original settings of our batteries when they are brand new. By doing so, we allow the battery to be fully charged without limiting anything. The battery will "jump" to 100% by itself once it is full from whatever the full point actually is, i.e. 86%>>100%. The app recognizes this and resets the age to 86% upon power off/on. Now the new 100% full point is really 86% and it will die at 0%.

PS-our battery comes with age set at 94% from the factory, not 100%...don't know why either. That's why you sometimes see 94% upon rebooting. This happens when the learn cycle failed to complete successfully.
[Nexus One Android Development] Smokeaire:
Interesting about the factory age setting.....I'm going to assume this app will do wonders for new batteries.

What does affect the battery age more? Bad recharging practices or just time? When I'm home I keep the phone connected to the charger. Now I'm not sure that is good for the battery.
[Nexus One Android Development] Skyheartblue:
What's now friends?

Gents,

Pls see snapshots from my Nexus, I have an 1800mAh battery (see pictures - battery_1 & battery_2).

The value for Full40=3000 is just a value I input, no reason just for testing.

It was on the Nexus default value at start - 1452.

Please help me find out what to do next:

What to put as the "Age" value?

What to put for the "Full40" value?

After entering these values, what should I do next pls?

Thanks for helping out guys!! ;)

JB
[Nexus One Android Development] RogerPodacter:
Remember the app now has automatic acr adjustment built in. Just make sure that option is enabled in the settings menu and you should no longer have to do the 0x10 03 anymore. That should kick in by itself when you hit <70mAh.

We're actually still curious to hear feedback on how that feature is functioning from users. It's worked well so far but just wanna be sure its solid.
[Nexus One Android Development] dharani1234:
Guys

I have done everything as mentioned in the thread and the learning mode failed. Just wanted to check if I have missed something. I have the original battery.

1. Plugged in the charger immediately during learn mode.

2. Initially the app showed my battery age at 94 % before the learn mode.

3. Charged in "airplane" mode for 3.5 hrs and the register showed 0x81 when I disconnected the charger.

4. After the restart the battery age shows 89% and 1289 mAH and the battery status shows 100%. ( It used to go upto 1370 before )

any help ???
[Nexus One Android Development] RogerPodacter:
I would now do a learn cycle with those settings, then post your updated age value and we can help you from that point set up a proper full40 value.

This makes me think we should add to the app to display the battery log so we can see the jump and its all in one place.

Still want graphing too. Maybe I'll attempt to play around with that this weekend. Will be hard though.
[Nexus One Android Development] RogerPodacter:
Seems like you passed to me. Your true age is 89% which isn't bad.
[Nexus One Android Development] temasek:
You should set age 100 before a learn cycle. What is your full40 and how old is your battery? Is it a stock battery?
[Nexus One Android Development] dharani1234:
I have set the full age to 100%. My battery is just 6 months old. I bought my nexus in may'10.

Before I tried the calibration app , my battery would go to 1370 mah before it reported it was fully charged.

full40 is 1452

my CHGTF flag is still green. does that mean anything ?
[Nexus One Android Development] temasek:
As per roger I think your cycle passed. Maybe u wanna consider 1600mAh rated battery :)

Edit: highly possible that in past your charging from 0 to 1289 then immediately bumped up to 1370 from 1289. So 1370 is not really your actual max capacity, 1289mAh is.

CHGTF flag is to tell u that its fully charged.
[Nexus One Android Development] dharani1234:
I highly doubt that. I monitor it using OsMonitor and there is a steady increase and decrease . Also, after charging it to 100% it would take atleast 1 hr of use to bring it down to 99%. Now it has been only an hr and it's down at 96%.
[Nexus One Android Development] temasek:
If it takes 1 hr usage from 100% to 99% then your battery isn't calculating properly.

Anyway I leave u as it is since u doubt it. Maybe roger can explain better.

Cheers. :)
[Nexus One Android Development] dharani1234:
Thanks for your time . I am featherweight user :D. I don't even have 3g data ON continously.

Roger is it possible that the battery's age will come down to 89% in just 6 months ? As mentioned above I am not even an average user.
[Nexus One Android Development] ermacwins:
i used this app a few days ago when my battery dies out i switched it on switched on learn pref and put in charger and it looked like it was doing its thing but i took the charger out again for some silly reason and now after charging if full again, age set 100 the phone dies at 10% and the battery is pure flat. Usually beofre i can switch it on but nows it flat.

When i want to re-calibrate it, I cant even drain it to 3201 as its at 34xx most of the time. Even with wifi brighness tons of apps running. So erm what do I do now?
[Nexus One Android Development] mtw4991:
You failed to complete the learn mode the first time. Just do another learn attempt and

follow the instructions for each step

but make sure that the ACR Adjustment box is checked in the app's setting menu. When it is checked, the app will automagically add extra mAh so that you don't run out of juice before you get to 3201mV and you will get into learn mode easily.

btw, I never have to do anything other than turn on Pandora and Wifi Hotspot to stay above -200mA current draw.
[Nexus One Android Development] RogerPodacter:
Yes in fact we only really see stock batteries around 88% even brand new. These stock batteries they used are cheap and don't seem to have the full capacity. Your age is right on target with everyone else's stock results.
[Nexus One Android Development] Old MuckenMire:
well after my learn cycle my battery age still says 100%, even after a re-boot.

Does this mean the learn failed?
[Nexus One Android Development] mtw4991:
Don't reboot, power off then on and it should reset if it suceeded.
[Nexus One Android Development] Old MuckenMire:
You mean power off via holding the power button, then selecting power off? I thought that was the same as rebooting? Thx!
[Nexus One Android Development] mtw4991:
Not the same as rebooting.
[Nexus One Android Development] Old MuckenMire:
Okay I went ahead and did it and when it powered back on still at 100%, so I guess I failed.:(

damn!
[Nexus One Android Development] mtw4991:
Is your battery a new one or the stock battery that came with the N1? If new, you might be fine. If stock, yep something failed...prolly a timeout error. Can you post a dmesg from OS Monitor or history from Battery Monitor Widget?
[Nexus One Android Development] Old MuckenMire:
Hi, yes it's a week old Mugen 3200, so yes brand new.

I don't know what a dmesg is or those apps, I don't have them as yet. Here are some screengrabs I did for Roger a day or two ago, maybe those will tell you something? Thanks for your help man. I guess the best way to see if it worked is to wait for it to drain and see when it powers off. Just scroll down in that thread and you'll see them

http://xdaforums.com/showthread.php?t=859314&page=7
[Nexus One Android Development] temasek:
If your age after learn cycle is still 100 I am not surprised cuz your battery is new. My 1600mAh rated battery I done many learn cycles and all came out to be 100%.

So..........wait and monitor your battery %. If you can drain down to 0% u have successful done it.

Fyi
[Nexus One Android Development] Old MuckenMire:
Okay will do and I will report back. Thanks!!
[Nexus One Android Development] Smokeaire:
You just answered a question I had about why everyone seems happy with the age showing up in the upper 80s after learning. Thanks.

Great thread.
[Nexus One Android Development] dvgrhl:
Just a little update. I have internal app logging working, so we can have a persistant log of key battery stats, even after a reboot. I'll leave it as a feature you can turn on or off in the Settings. Hopefully after a little more work and some testing I can have it ready by the end of the weekend. I think I'll just replace the Registers tab with a Log tab, since we never really used the Registers tab for anything.
[Nexus One Android Development] RogerPodacter:
As a test yesterday I turned of mobile data for 6 hours while I went out last night. And it only dropped 3% the whole time.

Just shows how good the battery life really is on par with other phones, but how heavy it relies on data connection. Maybe I should try out juice defender.
[Nexus One Android Development] Old MuckenMire:
well my initial attempt failed, as when I let the battery run down, it was even worse. It shut down at 25%(previous was 20%) So I tried it again last night, and now my battery age reads 78%...this is on a brand new battery(Mugen 3200). Can someone tell me what the 78% means, if it's good or bad or neutral ? :)

Thanks!
[Nexus One Android Development] mtw4991:
Are you sure the learn cycle completed properly? From your statement, it looks more like a bump charge than a true learn cycle. 78% of 3200mAh is 2500mAh...maybe your battery is really only a 2500mAh battery? It's possible. Try another learn cycle, but set full40 to 2550mAh in LearnPrep tab (or 0x6a 17 and 0x6b e8 in setreg) and age at 100% then try again overnight. Follow the instructions to the letter and report back.

If your learn cycle stops around 2500mAh, then you have less capacity than you paid for...just like some got more than they paid for;)
[Nexus One Android Development] ellesshoo:
What I don't quite understand is this. I have 2 HTC N1 batteries, 1 came with the phone, the other I bought as a spare when I ordered my n1. So basically 2 identical stock HTC batts.

I've devoted one to this battery calibration stuff and the other I won't mess with. The one I don't mess with is aging predictably. It keeps it's age settings, dies at 0%, etc. The other battery worked the same until I started messing with it.

So I recently did a learn cycle and my battery reported 93% age upon on/off/on. Next restart it pulled the BS of reporting 94% age. Why the f would one battery not ever reset to 94% yet another identical OEM battery reset to 94% after a successful (multiple times, been following this topic since the beginning, I know it was "successful learn")?

It's almost like if you begin playing with all these settings your battery will crap the bed.

Anyone have some insight?
[Nexus One Android Development] Old MuckenMire:
okay will do, thanks!
[Nexus One Android Development] physics:
Please help!

Hi all-

I have looked through this post and done everything repeatedly exactly as instructed. However, for some reason, when I make the edits to setreg, the values just don't seem to take?!? It's driving me nuts. I'm on CM 6.1.1 with the provided kernal. I had tried this on CM6.1 as well. Also tried with Intersect's kernal. No joy. Basically, when I look at the values in the tool after I make the changes to setreg, I still see an Empty Current value of 200 (mA) and and Empy Voltage value of 3.416 (V). I just can't seem to get the 3201 number and the 20 number to take. I active the learn mode and the text tells me to discharge down to 3416. This is driving me CRAZY! Why won't it work? What am I doing wrong? Please please please help me out here. I've never had to actually ask for help before. I usually dig around and take care of it myself, but this one has me stumped.

Thanks!
[Nexus One Android Development] mtw4991:
Go to root explorer>sys>devices>platform>ds2784-battery>longpress on the setreg file>scroll to the bottom of the Options popup and click Open in Text Editor, then enter 0x66 a4 (for 3201mV) on the white screen, back out of your text keyboard, press the menu key softkey on your phone and go to settings and press Save & Exit. The screen will be blank again...but it saves the setting.

Now repeat the steps above and this time enter 0x65 06 (for <20mA) on the screen and Save & Exit. Reboot and your settings in the app will have changed.
[Nexus One Android Development] jonmall1441:
I tried this with my desire and let it charge overnight but now my Batt age is 88% (was 94%) and the value in Battery Status Register is 0x87.

Did learn mode fail? thanks
[Nexus One Android Development] RogerPodacter:
Looks like you passed to me with an age of 88% which is normal.
[Nexus One Android Development] Smokeaire:
I just checked Battery Calibrator..age was 87%..now it is back to 94%. I did flash a new CM nightly. Could this be the reason? Any affect because of this resetting of age? Also, when a new rom is flashed is setreg settings reset to the original, so that the learn process has to be repeated?

I know..lota questions....new territory for me.
[Nexus One Android Development] temasek:
If you already did a learn cycle and found the age to be 87%, when your battery forgets its age, simply use the battery app and set the age back to 87%. You do not need to redo learn cycle.
[Nexus One Android Development] Smokeaire:
Great ..Thanks.
[Nexus One Android Development] dvgrhl:
I'm working on a way to allow the app to do this automatically for you on boot up.

Also, I hope to have the logging stuff sorted out in the next day or two.
[Nexus One Android Development] temasek:
That will be great!