yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] mkrmec:
I have no idea how!! but I did a calibration and come to:

NOW:

1440 mAh

~4.15 V

Batt Age: i still have to reboot.. too lazy

Empty Volt = 3.4 V in app but actual was 3.6 V

Before:

1320 mAh

~4.1 V

Batt Age: 85%

And I see that the phone shuts down at 30 mAh... so that's 1415 mAh of usable battery. I have the original battery since launch day of N1.

Very nice work guys love it
[Nexus One Android Development] chowlala:
Which kernel are you using?

From what I know WM has 1190 mHz at 1325 mV power draw.

I'm currently using WM's kernel for testing. Haven't tried pershoots on LEARN yet. Maybe he has lower voltages since his OC is only up to 1114.
[Nexus One Android Development] houzuoguo:
thanks mate :)
[Nexus One Android Development] temasek:
WM 1152 mHz 4 Dec SVS CFS 950 kernel
[Nexus One Android Development] dvgrhl:
So today's been a crappy day, and tomorrow and Thursday aren't going to be any better. Sorry for not getting and updated app out, but it will probably have to wait for Friday or Saturday. We're really close to getting this thing to a good place, and I hate to lose any momentum, but that's the way things are looking.

I've merged in Roger's aged capacity fix though, and I'm going to to work on a couple other things from my list. But unfotunately it might be a few days. :/
[Nexus One Android Development] zdiamant:
Take your time.. We understand that this is not your full time job--although we would like it to be :D
[Nexus One Android Development] RogerPodacter:
Wow seems like you have the best results fir a stock battery I've seen so far.it looks like you have mire usable capacity not being used if you're not getting down to empty voltage.
[Nexus One Android Development] myakove:
Did learn on my 1600 battery and get age 90% and mAh 1500.
[Nexus One Android Development] RogerPodacter:
Really, and which place did you buy that from? What empty volt did you use? That's still 200-300mAh more usable capacity than we've seen from any stock battery, and it fits in the stock cover:-).
[Nexus One Android Development] Nighthound:
Lol, I'm from Singapore too! Now I'm really thinking about ordering the ebay battery that temasek got. Sounds damn amazing!
[Nexus One Android Development] temasek:
HUAT AH!!!

You should. My max capacity is now 2550mAh with the ebay bought 1600mAh battery.

Edit: 10 hrs 42 mins with moderate/heavy usage. Now at 52%. Cool :)
[Nexus One Android Development] steve.garon:
I have a question related to the 1600 mA Battery running at 2500 + mA. Is that dangerous for fire ?! I have no clue how batteries work and don't mind busting the battery if I buy one but I'm more scared of it catching fire than anything else...
[Nexus One Android Development] temasek:
Its probably under-rated. So far so good. Every discharge I am getting better rating. Should settle down in a few days time.
[Nexus One Android Development] temasek:
Quote from my own reply
[Nexus One Android Development] zdiamant:
OK.. so I increaded my Full40 to 3000mmAh (2400mAh battery), age 100%, got into learn mode last night.. still had to use the 0x10 "fix" to have enough mAh to get down to 3.4V, and this is the log..

12/08/2010 02:55:44 [INFORMATION] batt: 66%, 4192 mV, 16 mA (20 avg), 23.8 C, 1929 mAh

12/08/2010 02:56:34 [INFORMATION] batt: 100%, 4192 mV, 20 mA (19 avg), 23.8 C, 2939 mAh

12/08/2010 02:56:34 [INFORMATION] batt: charging BATTOFF [FULL]

12/08/2010 02:56:42 [INFORMATION] batt: Full40 mAh capacity is: 3000 mAh

12/08/2010 02:56:44 [INFORMATION] batt: Full40 mAh capacity is: 3000 mAh

12/08/2010 02:57:25 [INFORMATION] batt: 100%, 4192 mV, 0 mA (0 avg), 23.8 C, 2939 mAh

I rebooted this morning and my age still says 100%, and 2939mAh.. which might be more in line with how much I actually have since I had to modify 0x10 before..

I'll use the phone today and post back tomorrow.
[Nexus One Android Development] temasek:
If u set empty voltage point to 3201mV probably u have even more juice.

Btw I suspect your capacity still can go higher so your potential full40 maybe even greater than 3000mAh.
[Nexus One Android Development] RogerPodacter:
there's no risk setting full40 with this particular type of battery because the mAh is just based on a temperature model. the dangerous ones would be to change min charge volt and current to something really high perhaps, which could mean the battery can never reach those conditions and never stop charging or something like that.

the only thing i hope is that those 1600 batterys dont have some weird setting wrong which could cause them to count mAh improperly. like maybe the current accum bias or something which might "calibrate" the counting of current, if its way off could it be counting mAh wrong? doubtful since temasak actually sees increased usage times of his battery, so something must be working!
[Nexus One Android Development] RogerPodacter:
when you charged to full, did you actually have that jump from 66% to 100%? something doesnt seem right. from that log you posted, to me it says your battery only has 1929 of usable capacity. but what throws me is that you had to use the 0x10 bump up trick (which by the way is built into the latest app version!) to drain all the way to your empty volt. there's no way you could run out of mAh and need that trick if your full40 is that far over set. so i'm confused!
[Nexus One Android Development] mtw4991:
started doing another learn cycle today at 12:10 EST using the 1203 battery app and manually inputting the following aE is 3201, full40 is 1452, current <20mA, age is 100...lol, the "old" way. Also, CM nightly 281 with stock kernel, airplane mode is on and setcpu profile is 245/245 screen off, 245/245 charging ac. Will report back in a few hours.

Observation: Yesterday I did a learn at 1557mAh and it completed, but age dropped to 81% which is 1261mAh and it showed something like 1526mAh in the app. I then reset age to 1452 and 87% which should be something like 86.8%+/-, which would be about 1261mAh also so you wouldn't think there is any difference. However, today my phone auto-shutdown with 188mAh to spare when it reached 3201mV, which is around 12-13%...not sure why the mV dropped from 3600 to 3201 within a minute or two, all I was doing was reading XDA?
[Nexus One Android Development] mtw4991:
Instructions updated! Please review and let me know if I need to change/correct anything, thx!:)

Login: the link in the OP is correct. can you cut/paste onto the OP so they match pls, thx.
[Nexus One Android Development] RogerPodacter:
technically there should be no difference, both sets of values would be equivalent. I think something unrelated happened with your voltage dropping so quickly is the cause. usually at 3.6 volts there is still a decent amount of usage time left before shut down...:confused:
[Nexus One Android Development] mtw4991:
yeah, you'd think so anyway. Took forever today to get from 36xxmV down to 3201...had pandora, flashlight, hotspot and maps going, lol. idk.
[Nexus One Android Development] mtw4991:
EDIT: Charged as above stated for 4 hrs exactly and learn was achieved again. This time I rebooted thru recovery and age was reset to 87% @ 1252mAh, full40 1452. No hiccups or issues at all. Using 1203 version of the app.

I don't know why the 1205 version refuses to reset the age, but there are more people on the CM forum that have said that it just stays at 100% for them also. One guy said a reboot did nothing, but a manual power down/up worked to reset it.

Roger, Login any ideas???
[Nexus One Android Development] RogerPodacter:
Does the 1203 version have any of the acr write code or options in it? The only thing I can think is maybe if that somehow writes when its not supposed to it could maybe stop the learn cycle. But still it seems that would happen down low and cause failure right away. Really I have no clue why the age would just not update upon reboot.

The app primarily deals with detecting down low the learn flag. It doesn't really do much after that or up at the top that would interfere with the cycle completion. I'm really stumped.

Let me look carefully at the code difference and see. So for sure the 1203 works for everyone, but not any later versions? Which version is 1203? The latest should be 0.8.7 I believe.

Do we have any reports of a successful learn with the 0.8.7 version at all, even one?
[Nexus One Android Development] mtw4991:
1203 v..8.5 doesn't have the acr code in it. It has the "spare" space and it works fine. It appears that learn works ok on 1205/.8.7 as I'm seeing the <19mV twice prior to charge stopping, but

it is not resetting age upon reboot

. One guy over on CM forums said when he rebooted thru recovery, it still showed 100% but when he manually shut down/pwr on, it was reset. Neither worked for me since the new version came out. I tried 3 times, so idk. As the acr works at the very top, perhaps it is not "dis-engaging"???
[Nexus One Android Development] EnhancerFIN:
Weird.. Switched to another battery, started doing learn cycle for it after successful cycle with the other battery.

Installed the newest calibrator app, I put the maximum current draw (hotspot, spotify, torch etc.) on, so the drain was about 700mA, the app asked for superuser in about 3100mV, boosted the capasity up 200mAh:s and voltage dropped really fast so the phone force shutdown itself without powering off text ever coming to the screen? So I didn´t hit learnf because there was too much capasity left, although the voltage was way below 3201mV :O

Edit: Charged the phone a bit, used 0x10 01 to reset the capasity to 100mAh in about 3500mV and that did the trick, learnf set with the phone running extremely hot :D. Would it be possible to get the software in addition to add capasity automatically also to lower the capasity automatically, and for example in 100mAh increments?
[Nexus One Android Development] starfarer:
Can it be used also to reliably compare other after market batteries?? Some of the results here are impressive (number wise). I'm going after 1600MAh from ebay. Mine currently is only 90% :-(

Personally shutting down at <10%(usually 3-5% before auto shut down) is not a problem for me as is enough warning to not over-use but my main problem is initial 100-90% dip without actually doing anything major.
[Nexus One Android Development] mtw4991:
I've found it helps to keep current draw around -300 whenever you get to about 3300+, that way it doesn't shutdown too quickly before the learnf gets set. Just charge for a couple of minutes and try again.
[Nexus One Android Development] mtw4991:
Absolutely! I bought one today also...$15usd shipped is good by me. What will be interesting is that several of us (4-5) have bought the same one that Temasek bought, while Roger got one from htcrepair, and we can compare them really well using the app. Although all of them are marketed as 1600mAh batteries, I bet that some are 1600's, some are 2400's, etc. U never know!;)
[Nexus One Android Development] starfarer:
same as Temasek and hopefully it'll be 2400 :-)
[Nexus One Android Development] RogerPodacter:
Ok this seems like a bug in our acr write function which we built into the app, but my suspicion is its a little incorrect. Perhaps I will build a version tonight with a testing fix and see how it performs.

You should not have run out of mAh, we tried to automate that!

Edit: ok I mis read. It sounds like it did bump up correctly, but at a bad time it popped up the super user and then dropped the voltage so fast that you just shut down. We'll smooth that out.
[Nexus One Android Development] beagz:
If you do a full wipe is it necessary to perform a new learn cycle, or does this retain after a full wipe?
[Nexus One Android Development] djn541:
I set full40 to 1500 on a stock battery and am now successfully in learn mode. My question is this: what effect will setting it to 1500 have? Just curious and am experimenting a little just for fun. By the way, it hit learn mode with about 300 left in capacity...thoughts???
[Nexus One Android Development] overground:
What would be nice for future (once the bugs and code are ironed out) is have the service run in the background (kept alive by an insertion in the status bar, much like timer and stopwatch apps). All the user would have to worry about would be keeping things above 200 (unless the app can eventually provide that natively). Then, when things are nearing (but not quite reached) the 3201mV threshold, a status alarm could be triggered so one could be ready to insert power. That way the phone could be used for other purposes without having to monitor the app to avoid missing the threshold. Just ideas. Thanks for everyone's work here. Confusing, yet enjoyable.
[Nexus One Android Development] mtw4991:
Yeah, that would be the holy grail! You would probably have to program a stand-alone app(if possible) to pull >200mV also:p You can use the phone as-is now, just have to be careful to take note where you are in the "countdown" process. Even if you miss it, just charge a minute and try again.
[Nexus One Android Development] mtw4991:
Assuming you complete learn successfully, it will give you a little more "fake" top end but your age will be lowered also. 6 of one, half dozen of the other:eek:
[Nexus One Android Development] overground:
Lol. Yep. Had to do that a couple of times today. What I don't understand is the part where someone said they practically lost their nut hair. What were they actually in danger of?
[Nexus One Android Development] djn541:
alrighty then! Thanks!
[Nexus One Android Development] webarnes:
Looking at the instructions, it says to keep an eye on the current and the battery level while charging in learn mode. Does that mean you have to keep the screen on? Wouldn't turning on the screen to check the current do more damage than receiving a text message?
[Nexus One Android Development] temasek:
Deleted............
[Nexus One Android Development] overground:
He's talking about the charging portion...after the discharge.
[Nexus One Android Development] temasek:
Ya missed the meaning.....lol
[Nexus One Android Development] temasek:
For me I don't give a damn. Either I turn off screen or I use the phone while learning. No effect in my learning cycle.
[Nexus One Android Development] mtw4991:
Yes it would. Keep screen off when you are above 80% charged. Refer to the instructions again on the OP link, they have been updated here:

http://xdaforums.com/showpost.php?p=9583271&postcount=340
[Nexus One Android Development] webarnes:
Ah, the instructions make it sound as if getting a text message in learn mode will break it.
[Nexus One Android Development] mtw4991:
It does as you approach <70-80mV in order to reach the end of the learn cycle
[Nexus One Android Development] temasek:
I've been doing learn cycling almost daily with many different stuffs. :)

It does not affect, at least for me. I would think there may be other factors that kick off LEARNF.
[Nexus One Android Development] webarnes:
"h. charge to full 4hrs.(0x81 will show in battery status register when current drops below <20mA)"

"Note: As current gets close to <50-60mA don't touch the phone"

Can't see the current and registers with the screen off.
[Nexus One Android Development] mtw4991:
That is true lol, if you don't touch the phone the screen will turn itself off and you won't have to worry about it:-) missing the end of the learn cycle.
[Nexus One Android Development] mtw4991:
Are you saying that no matter what you do, you can keep using the phone as charge drops to say, 25, 23, 21, 19, 19-complete? And still reboot and show the proper age?
[Nexus One Android Development] temasek:
Lol u really very persistent. Answer is no. When its in high 90s % definitely I don't use.

Simple rule is just ensure no negative current (mA). Otherwise during learn cycle just do whatever u want.
[Nexus One Android Development] mtw4991:
Agree 100%... Not trying to contradict you, just see if there was something we were missing and not confuse the newcomers to the thread. You and I are "old dogs" here already lol
[Nexus One Android Development] temasek:
How u know I am old? I am just same age as simms22 ..... :)

Haha.
[Nexus One Android Development] watso4183:
Once I've achieved learn mode, do I have to watch it?

Will the learn mode flag turn off at any point other than if it fails?

Reason I ask is time got away from me, it's 10pm, and 6am alarm isn't looking very nice :/

Based on your estimates, I'm looking at 12-12:30
[Nexus One Android Development] dvgrhl:
Leaving it is probably the best thing you can do. Just let it sit, and tomorrow when you get up take a look at it. Try turning off the phone all the way, then powering it back up if your age hasn't adjusted correctly. Then report back here. :)
[Nexus One Android Development] 19blacktiger77:
Hi, i have S-OFF, and i can't edit setreg, through Root Explorer, or Nano command... :(
[Nexus One Android Development] chowlala:
Do you have root? Lolz.
[Nexus One Android Development] temasek:
Very true.
[Nexus One Android Development] mkrmec:
I have root, unlocked bootloader, and CM6.1 latest nightlys, and I can't even open the damn file let alone edit it for some reason...

I tried opening it in terminal and had the same permission problem. Used some wierd root terminal command and still no go.

I have no clue what to do.

I just used the battery app to enter those settings. Looks like it was effective since I had no problems with the learning cycle.
[Nexus One Android Development] mkrmec:
I just restarted my phone and the battery age actualy stayed at 100%.

I couldn't edit the setreg file for some reason, lack of root not being one of it, lack of skill that's a different story :D anyway maybe some setting is missing.

So you're saying it should go down to what voltage? 3.4V before it shuts down? My phone never goes under 3.6V.

Since I couldn't edit the setreg file, and did all the settings thru the batter app registers tab, I am kinda afraid that I did something wrong and it will blow up in my face soon hehe

Anyway it's been 1 day since I filled up my phone and I'm still at 70% I'll keep you informed about the changes etc.
[Nexus One Android Development] HunGAa:
Assistance

Okay I did everything that was in the "guide" provided but once I get the part

d. insert charger QUICKLY! (You will see a message saying Learn Mode is active on Learn Mode tab.)

After inserting... I don't see the message saying "Learn Mode is active". I see the buton LEARNF is on. I tried it once last night, left it until it was full then turn off and on. Age was still at 94%. Any ideas?
[Nexus One Android Development] somline:
I posted in the old thread ;-)

I just want to congrat you all for getting the calibration done. Good work.

Didn't follow the whole thread. So you patched the kernel?

And got getreg and setreg?
[Nexus One Android Development] RogerPodacter:
Hey there! Yes we ended up adding in the files, patched the kernel, and made a little free app:-). All is working great.

Funny, we have many nexus owners with extended batteries which are programmed with incorrect full40 values. Totally incorrect, they all have the stock value, even 3200's and such. How crazy.
[Nexus One Android Development] RogerPodacter:
Guys since dvgrhl has a few things to take care of I made an update to the app, just added 2 acr write options, one for greater than 0.2volts, and one for less than 0.2volts. It was my thought that the initial less than was backwards, but since we are unsure I figure both could be tested. I don't have access to dvgrhl's server so I'll what we can do tomorrow. It's really not important for people to get this version, only a few who would feel like testing those functions. Particularly artificially making your mAh run out and use one option for test, then the other way where volt runs out, etc. Talk tomorrow.
[Nexus One Android Development] somline:
We have that on cheap Chinese batteries with double capacity (double size) but full40 is set to stock (1150 instead of 2300).

One member disabled the overcharge protection in webOS (not the battery) and changed full40 to the truth value. After some tries he overcharged it. Now it is fried.

After that I was a little worried that you can easily fry your battery by changing the full40. For that reason I’ve hidden this functionality in Dr.Battery.

But as I can see, you all are playing with it.

We should share our results.
[Nexus One Android Development] temasek:
Roger,

My dumpreg

00: 45 87 05 f8 06 15 64 64 ff fd 21 80 6a c0 ff fd

10: 17 61 35 e0 80 80 7f c0 03 60 00 d0 ff ff ff 00

20: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

60: 42 ff 17 70 d2 06 a4 0f 07 43 17 70 04 00 00 00

70: 28 00 00 00 0d 00 00 00 04 09 00 ea 1e 14 0a 1f

b0: 00 00

Edit: Changed AC to 2500mAh (register 62 & 63).....dunno what will it do, more of wait and see...LOL
[Nexus One Android Development] RogerPodacter:
Wow no way. It was my understanding that full40 was totally safe to change, even if set far above the true capacity because the min charge current 0x65 is what controls charging. Which by the way we've all lowered our min charge current register from
[Nexus One Android Development] somline:
So I think I have to read the thread.

EDIT: Deleted wrong stuff

Forget what I've just written.

Just see, I misunderstood your post. Sorry.

Yes I was surprised too, that he fried it.

But this was this cheap Battery with completely wrong programmed chip.
[Nexus One Android Development] __max__:
Great work guys!

With the last app (1205) it's very easy to hit the learn flag, thanks!

I reached the learn flag and after a shutdown and boot (not reboot) the age has been updated at the right values i saw from the file (two times 90%-89%).

I see that to stop the charging have to be under 20 both the avg and the punctual values, because i had 19mA (20 avg) and that didn't stop charging, it stopped at 18mA (19 avg).
[Nexus One Android Development] zdiamant:
Hallelujah! Finally performed a correct learn! Unfortunately, my dmes log didn't export correctly so I don't have the log to see exactly what happened, but when I woke this morning, my age had changed from 100% to 89%. I had set my Full40 to 3300, and my capacity reads 2900mAh currently at full charge. (remember, this was a 2400mAh battery)

I only had to use the 0x10 fix once last night (and I may not have had to use it at all, but my capacity was below 75mAh, and I didn't want it to run out before the learn flag hit.)

Now will see if the phone shuts down at the correct percentage tonight.

Thanks to everyone for your hard work in making this app happen and persevering over these last few months!
[Nexus One Android Development] chowlala:
Dammit. You guys are making me feel like buying a damn battery!! Lol!
[Nexus One Android Development] mtw4991:
for $13.99 shipped, I pulled the trigger and said what the hell...:p
[Nexus One Android Development] RogerPodacter:
registers are, but in the driver you can see update intervals for slow and fast, sleep and awake mode, which is 1 min and 10 min. For some reason the log writes every 50 seconds, I thought it was in the driver, but don't remember that part.

It's the same reason why current_now and other files only update once a minute.
[Nexus One Android Development] theloginwithnoname:
We shall see once we can read the registers I guess!
[Nexus One Android Development] RogerPodacter:
I just looked it over and sample rate is definitely there. But duh we can just change it to faster. We need your build environment going! :-)
[Nexus One Android Development] theloginwithnoname:
update: right now I'm taking a copy of the cm-kernel to integrate your/my new code... :D