yashsingh1/xdaforums huggingface dataset:
[HD Mini General] 15131331231:
this is battery test data

Hi！r0bin

thanks for you great job.the test file uploaded come from xda.cn.it only the first test file,and more will be here later.hope it would help.
[HD Mini General] -r0bin-:
hi guys, thanks a lot for your files and for taking the time to do it (15MA1L, 15131331231 & xda.cn.it, Smudoooo)

the very good news is, the raw values match the windows values, this wont be that difficult to calibrate the driver.

the bad news is, i forgot to log the current charge and discharge, as well as ADC_REF etc :-/

i compiled a new version of this app, that log also the current, please use this one.

thanks :)
[HD Mini General] 15MA1L:
ok I'll repeat the charging-discharging with the new app, tomorrow morning you can find my results. I'm really glad that I can help. thanks
[HD Mini General] bruce2728:
I was just about to post results:)

I'll edit post in morning with new files.
[HD Mini General] 15MA1L:
results charging-discharging with the new app
[HD Mini General] yowojtas:
i will try this. i will send you the files about two days.
[HD Mini General] dontyoulin:
These are three users' testing data which hope can help you ~~:):)

View attachment 618945

View attachment 618946

View attachment 618947

Please go on!!;)
[HD Mini General] pwel:
here is my data: had wifi, BT on with opera in autorefresh mode
[HD Mini General] az35:
I have strange values under winmo as well... I'm trying to calibrate my battery

right now, if it doesn't fix my battery issues I will consider your other proposals. Thanks!
[HD Mini General] -r0bin-:
yes, you have to do something, or one day it could damage your phone :-/

your battery curves are really freaky :D

actually this algorithm uses voltage levels to determine the percentage.

the only correction made is with discharge resistor:

if i sum up, it would be like this:

r0bin_volt = wVolt + ((Abs(wCurr) * 27) / 100)

then i plot the results on the curve from 3600mV (5%) to 4100mV (100%) with five different lines & slopes.
[HD Mini General] pwel:
r0bin, well done! even the fridge curve by munjeni is covered quite well!

AZ35's curve is strange because at 2 moments, the voltage is going up during discharge, which indeed is strange.

I would go and add this to the kernel. In the meantime, AZ35 could publish new data
[HD Mini General] pwel:
maybe another option: build in your algorithm that during discharge, the percentage is never allowed to increase: so if it wants to increase, keep it constant.
[HD Mini General] -r0bin-:
yes you're right, that would be a good protection.

maybe instead of voltage, we should modify only percents, and not allow it to increase while discharging?

i still have weird increase on ciccius data :/
[HD Mini General] pwel:
yes, I would do it like that, just change the percentage.

I also checked ciccius data but it look fine? See attachment.

by the way, can't we use a similar model for the charging?
[HD Mini General] munjeni:
ok I will implement it to robin.php I we will see if is ok
[HD Mini General] -r0bin-:
we could, but its not as accurate as current i think.

the main issue is, when you charge, the voltage change and its not reliable, specially if the charge current is different (AC/USB).

i suggest we use the voltage algorithm when running on battery, and current algorithm when charging.

we could also check both voltage + current at the end of charge to be sure we stop charging at the good time.

i will work on the kernel src next week ;)
[HD Mini General] pwel:
of course, but in other cases the temperature correction accounts for that, but not for AZ35. And in your fridge data, temperature differences are bigger, and r0bin's model deals with that quite well
[HD Mini General] munjeni:
ok, agree

We at finish must to make changes also for batteries like az35 (prevent possible explode)

Update:

here is modified php-added r0bin percentage formula (you will see robin percent (w values used!), and you will see also r0bin percent (pwel w values used!))

Note: ignore some columns becouse log is from discharging and not from charging

Update:

added (r0bin+munjeni)/2
[HD Mini General] pwel:
I am still trying to get a better relation between percentage and other parameters. I believe the first step is to correct wVolt for temperature. If I understand well, if temperature gets higher, the wVolt gets higher. I suppose this means the temperature correction is negative (so the higher the temperature is, the lower the corrected voltage should become). Can someone confirm?

The second point I have: do we also have to correct for current? I believe I read somewhere that this only is needed for discharge. Can someone confirm?
[HD Mini General] munjeni:
Hi I realy understand all but only I not understand is how to get proper current level after discharging. When you connect AC, If you see wVolt is totaly diferent after discharging, battery has recovered before charging? Only not understand this part (level). Let's wait r0bin to make the first test driver
[HD Mini General] -r0bin-:
i think the algorithms are good enough to build a suitable driver.

there is no need of high temp correction, low temp only.

the wVolt getting higher is due to wCurrent variations (when high current, voltage is lower, then low current = higher voltage.

see ciccius for ex, or munjeni.

this effect is already corrected by the "resistor voltage computation"

this effect is increased i dont know why in the az35 traces, it is really clear.

im working on a driver, i might be able to test it tomorrow or the day after.

ill try to enable charging too :)
[HD Mini General] pwel:
ok, I will leave it as is, just still felt the need to have a relation as perfect as the others. But as long 100% and stopping chargin is perfect it works fine enough.
[HD Mini General] _Madmatt:
We still can fine-tune everything later ;) First make something work that is almost correct. :)
[HD Mini General] Ahmad.elhajjar:
Hello guys.

good job and good effort from all of you.

we still following the process with you,daily.

what is the next step? we will wait for a new revision of kernel to test or what?
[HD Mini General] -r0bin-:
yes, now we need to write all those algorithms in the driver and test.

when it'll be ready ill post it here.

it's not perfect algorithm but it can be enough for now.

still need to build a feature to "auto-calibrate" battery every time we perform a full charge or discharge cycle, so we can have a very accurate indicator.
[HD Mini General] _Madmatt:
That's a good idea! Let us know if you've got everything ready!
[HD Mini General] codiak:
Hint:

There is an App in the Market called Battery Calibration.

I used it a couple of times on my HD2.

This program does it by removing the batterystats.bin system file.
[HD Mini General] -r0bin-:
i am testing the new driver, it needs fine tuning before i release it.

good news is, i found the GPIO to enable charging. i tested only USB charger so far, it works!

i wanted to enable fast charger too, i found two others GPIO when i plug my phone to AC charger, one is set to 1, one is set to 0 (at the same time). so i dont know which one to use, i'll see!
[HD Mini General] munjeni:
good news! If possible to share your driver code?
[HD Mini General] _Madmatt:
He said it needs fine-tuning before he releases ;) Just a little patience :)
[HD Mini General] munjeni:
Yes, I know, I know to read, so that I do not need your translating:cool:

I want to help:)!
[HD Mini General] 15131331231:
R0bin,you are a great dev,and would you release G-sensor and light-sensor fixes when the battery works perfect?thanks.
[HD Mini General] tzacapaca:
hi r0bin

i was wondering if this driver will fix the power button issue so we won't need to use the volume button anymore :)
[HD Mini General] -r0bin-:
no, this is not related to battery, it's another issue.

for g-sensor etc, the same:

i work only on battery at the moment. all the other issues are specific and not related to this one.
[HD Mini General] tzacapaca:
aha,ok.i just think i remember the power button issue appeared after 1st battery driver,and you said that you don't know why this happened,but maybe i'm wrong:)

sorry..i'm getting old :)))))
[HD Mini General] -r0bin-:
guys, i was fixing AC charging and usb detection, and guess what:

USB connection is now recognized, and we can use HTC Sync from HTC!

our phone is detected as HTC Aria :-)))

when i connect my phone to PC, now i have choice: sync, charge, mount as SDCard, etc

i nearly fixed battery driver, be patient!
[HD Mini General] munjeni:
good job !
[HD Mini General] pwel:
excellent! thx!
[HD Mini General] tzacapaca:
wohoooooooooo that's great!!!:D:D:D
[HD Mini General] _Madmatt:
Really great! If you're ready, can you make a new image? I'd really like to test it, and to report possible bugs/improvements/whatevers. =)

It's really N I C E what you did! Thanks!
[HD Mini General] tzacapaca:
jeeez lol Madmatt...he just asked to be patient but you are just impatient as an old girl who wants to get married :p
[HD Mini General] pierpaolo789:
is really great I can not wait to try it with so many wonderful site
[HD Mini General] _Madmatt:
LOL :D That's true! Except I'm not a girl, nor I'm old and I won't get married anytime soon ;P

EDIT

However, I'm not the only one, who cannot hide his/her enthousiasm =)
[HD Mini General] -r0bin-:
guys,

here is a test zImage that has:

- charger enabled (i tested both AC and USB, it works)

- charge gauge improved (but still needs improvements)

- USB detection (for HTC sync or other)

there is a real difference between windows and android:

under windows, the Battery Spy tool was giving values every 30seconds, and the values were stable.

here on android, the smem values change every 100ms, and sometimes you got a big variation. this is something i need to improve, i need some time again :)

just use the 30/05 release and replace zImage by this one.

note: wifi wont work anymore, this is normal, no need to tell me :)

thanks for your reports and have fuuuuuuuuuuuun for the week end!

note: i tested this image both USB and AC charger, but not a long time.

i am not responsible if it damages your phone. use at your own risks!

note:

charge of battery is managed by hardware. we only enable/disable charger, and enable/disable fast charge.

the battery stops charging by itself when full (automaticaly by hardware, even when phone is off).

the phone switch off when batt is low (done by android).

normally there is no risks to use your phone with this new kernel. but i cant garantee anything ;)
[HD Mini General] munjeni:
Good job! Do you want to update svn? I realy want to see whats inside:) Also I will help!
[HD Mini General] pierpaolo789:
Hello Robin can also use an AC current or PC only:D
[HD Mini General] pwel:
the answer was already there ;)
[HD Mini General] -r0bin-:
Wouhou that's working great! Still issue in charging algorithm it doesn't refresh batt level, only when you unplug cable.

One hint if you want to make your battery life longer:

Reduce the screen brightness in settings menu!

Light sensor is not working, so it doesn't adapt automatically to daylight.
[HD Mini General] superzuan:
it works great r0bin , its fast and ihave it charge for one hole night . this was only charge zimage ? or are there more things that mus work now?
[HD Mini General] iPlasm:
Nice working :)

very Thankful, ;)
[HD Mini General] sahari308:
ok very nice

thanks
[HD Mini General] LEO K:
Nice Work

Thanks
[HD Mini General] pwel:
r0bin, looks good! Which app would you recommend to log battery info?
[HD Mini General] munjeni:
One metod is dmesg, second metod is aplication (maybe is somewhere on the net). If you want first metod, here is link how to do it. I prefer to see battery code and what is inside but I don't know why is non-public? I think we deserve to see how it looks!:cool:
[HD Mini General] -r0bin-:
thanks guys, thanks to your help we were able to build a working algorithm!

i wanna build a "battery spy" too for android, with smem logs, so we can verify the algorithm and improve.

relax i will upload it later, no time right now, there are many files to change.

do you want to know something in particular?
[HD Mini General] munjeni:
okay:cool:
[HD Mini General] -r0bin-:
i'll have more time on monday, will try also to create a new release with GPS, batt and some fix on video
[HD Mini General] 15131331231:
that's great!thanks for your excellent work!
[HD Mini General] singate:
Had to say thank you! r0bin!

you are great!
[HD Mini General] pwel:
good news! did you manage to solve the update issue of the battery percentage?
[HD Mini General] _Madmatt:
Hi Robin!

I've tried your battery fix yesterday. It worked very nice! Htc Sync is not working on my PC.however... When I click the Open option in the system tray, nothing happens. Neither do I see a screen when connecting the phone and selecting Sync option...

Charging the battery worked nicely! But there was an issue there however too. When I use WinMo, my device is fine. But when running Android and.just doing nothing at all, it's getting hot. When charging it's even.worse. So, I stopped charging, shut down Android an restarted WinMo. After giving the thing a while, it cooled down again...

This are my experiences with the latest Android builds so far.

Greetings,

MadMatt
[HD Mini General] tzacapaca:
hi MadMatt :)

it's getting hot because of running Android from SD card,so it's "normal" let's say..google it and you will find many people with ported Android on different devices having this issue..for example your PC processor or your video card or your motherboard is getting hot too because they are IN USE,so it's the SD card port,IN USE and HOT!:p

better hot than cold,when you are cold you're dead LOL

don't worry your phone won't make BOOM!:p (I think) :))

P.S. Install a cooler on your SD card port :p haha
[HD Mini General] _Madmatt:
All right, I'll place the cooler :D

Maybe, we should get NAND working first then? Because I don't really feel safe ;P
[HD Mini General] tzacapaca:
NO NAND until is fully ported..and even after..our devs doesn't have experience with bootloaders afaik..so start to learn :p

OR

email HTC and say to release an unlocked bootloader or at least to teach us how to do it(they are releasing phones now with unlocked bootloader,it's true :) )
[HD Mini General] _Madmatt:
Yup, I know they unlock bootloaders now. But that's all on Android phones afaik... Would they do so too for a WinMo phone? Hmm, I'll send them an email ;D
[HD Mini General] tzacapaca:
There has been overwhelmingly customer feedback that people want access to open bootloaders on HTC phones. I want you to know that we've listened. Today, I'm confirming we will no longer be locking the bootloaders on our devices. Thanks for your passion, support and patience.

source:

http://www.engadget.com/2011/05/26/htc-officially-dissolves-locked-bootlader-policy/

LOL @ pic
[HD Mini General] _Madmatt:
Yeah, I like the pic too ;P

Yes, I read that on Facebook. However, dropping them an email won't be for now, because their Support page seems to need a little support... It returns a 403 Forbidden error while submitting the form...
[HD Mini General] munjeni:
Good, we waiting new release, and do not worry, I will not say it was my fix! I think you are afraid that someone will say how he did it, but the goal is not what everyone will say, goal is to do more of, and one person can't do more than 10 people! I'm not fallen to that who did what, I just want to help and want to have full android... if you think it will be faster & better, you not need to publish the source as I'm concerned

You prefer to work alone, you not want advice, you not want help, ok, your choice!

update:

you say you not have time, but you have time writing posts hmm, I not understand.

3G does not complete, light sensor not work, proxymity not work, battery not complete, camera not complete... so, do you think it will be finished with hidden opinion and hidden source code? Do you think programing is better if one person working with one source code or you think better is when 10 persons work with same source code? What you think, I would like to know? Guys I'm right or not? Feel free to tell if I am wrong!

For which you serve this http://code.google.com/p/photon-android/source/list for wiki or for souce code changes? What is your opinion about light sensor? Why you not share? Schlund, why you not share opinion? I realy not understand our work! You got money for our work? What is problem? We not asked? Ok, I ask now, why light sensor not working, what you think?
[HD Mini General] codiak:
Dude, calm down!

He decide when he will push the changes to svn. You cant do anything. Just wait!

No reason to be demanding...
[HD Mini General] munjeni:
ok but why:cool: You want to speed our porting, or you want port after 1 years?
[HD Mini General] _Madmatt:
Munjeni, you want opinions, you get mine ;)

If you ask me, it's best that only 1 person works on 1 aspect of Android. That because if you work with 2 or more, you always need to fetch.the changes to the others... So let Robin handle the battery, and let someone else do something else.

If you really want to help, try to fix.another issue.

I'm sure Robin will post the updated source once it works good. Everything on it's time.:)
[HD Mini General] pwel:
Madmatt, don't forget Munjeni worked/helped a lot on the battery too!

Still I believe r0bin is free to to spend his time in his own way though.
[HD Mini General] munjeni:
Bravo dude you are very patient and smart and thank you for your support! Just that!

Guys if you see 3g internet (is fixed but is not ok!) not working to 50% of photon users! From that reason I appeal to see opinions and to see code (ok we have 3g code, thanks Schlund! But not know what is progress with light sensor...etc also not know why lightsensor not working) unsderstand me? If we want to speedup our port we must be somehow connected and we have to share observations to. I really do not understand some individuals and their thinking!

Good to see you back Madmatt, You waken up at the end:cool: and you are not right! If you see our battery is 90% finished through teamwork!!!!!!!!!!!!!!

ohhhh thanks:D
[HD Mini General] tzacapaca:
here you go..ROUND 3...

cardsharing started whinning and complaining again lol:D

fortunatelly this time you can't delete the source code :p so we are lucky

and if you want to take an advice,i'm saying again..don't beg,you embarass yourself

and a warning..everytime you will say something about r0bin or schlund i will pick on you!
[HD Mini General] munjeni:
very useful, thanks, this realy will help porting pffff
[HD Mini General] codiak:
Off-Topic:

munjeni: Your begging maybe the reason he is not publishing it yet, dont know.

You had the chance to teamwork and you dropped it in a very childish way.

Just my 2 cents...
[HD Mini General] munjeni:
I newer got teamwork! Only we got teamwork for our battery and this is so good!
[HD Mini General] pwel:
I think there is a big difference between whining on the one hand and some impatience with eagerness to help on the other.

please stop all and concentrate on content! please
[HD Mini General] munjeni:
house is product of one team and not of one man!!! If you want hard work you will make house (hard), or if you want easy work you will make team and team will make house(easy)! If you not understand, try to make house without team! This is one good primer!
[HD Mini General] iPlasm:
So you was hiding? no problem.. Welcome Back :D

but friends..., something of Munjeni is right, and some of you other are right.

and Madmatt is right about the person should work an issue, not like Versus! or munjeni is right about to work together for faster porting...

so maybe as munjeni said can work on 3G... :) I wonder what is your real name :D

Everyone has right to talk he's/She's Free.

We should all together work like friends; (moral).

We are very Thankful :)
[HD Mini General] utsavkoju:
TIAD8 has found the way to nand port android on some winmo devices and he is on beta phase at this moment... see the link. We can either learn the way from him or he might be of some help in the future buts that the future and you can't say anything about it from now. so chill guys :cool:

Again the drama got started on the thread.

stop so much complain dude... we (photon user) are looking daily for this progress in this forum and does know pwel, you and Robin are to be equally credited for this battery driver. The team work has paid for the success.

chill. Remember!!! Rome was not build in a day. We as a user have got patient so develop some with you. you are a developer and we don't want negative environment between our developers.

To be honest r0bin is a great developer we treasure in XDA-forum for our htc hd mini (munjeni we would also do credit you as a our treasure). we need r0bin for android on our photon. but again to be honest he is not really open to any of his code. till now we rarely got chance to have the idea behind the drivers r0bin has made. but whatever its his right munjeni we can't force him to make it public just stay calm and might he have got the time today to make that.

stop complaining dude. we are wishing our developers to work together but you as always started to mess up the thread. you are not defending r0bin and schlund you are creating a mess in thread as always as before. Stay calm dude nothing has gone wrong and nothing will be.

you don't have to defend r0bin and schlund every single regular visitor of this forum knows about their virtue. Their consistent work gave the life to our photondroid.

;)
[HD Mini General] _Madmatt:
Munjeni,

I really appreciate the work you did on the battery driver, but for now Robin wants to work on his own. Again, the battery is almost finished, if we have to work with more then 1, you would be busy fetching your fixes all day instead of coding.

You did your part on this driver and really, really thanks for that. Now it's up to Robin to finish.the job. Don't worry, you'll get your credits as you deserved them!

If you really want to help, (and I think.you really want to) then you can start working on another issue, isn't it? For example, I'd like WiFi connection with the real MAC address, so I finally can use it ;)
[HD Mini General] munjeni:
Thank you for your understanding...I will try to get mac...Will try to access nand again (last time I was corupted my device mtd partition)
[HD Mini General] _Madmatt:
Good luck!
[HD Mini General] tzacapaca:
I have to say that..

you are not right too!Cotulla has done 60-70% of Android porting+Haret porting without a team.(and I think he could finish it if you didn't swear his job):mad:
[HD Mini General] munjeni:
I donated to Cotulla in that day when he announced the first port, and I apologized to him, and again I publicly apologize, ok? This is not our theme, lets back to port! You do not exist for me as of today, I will ignore you, you are irrelevant for me! Please skip me!