Is my battery in need of replacement?


Barnaby

Member
Joined
Jul 6, 2005
Messages
203
Age
33
Location
Shadow Moses, in a cardboard box
Website
Visit site
I recently finally got my Pandora fixed after it suffered from the LCD cable issue for several months. For a couple of weeks my Pandora has been running great, but now I'm running into some odd battery issues.


At first, it just died while in sleep, which is understandable as I'd left it on for a couple of days. When I checked it it was around 28% battery, and about 2 or 3 hours later it had run out of power. So I plugged it in to charge. Nothing happened. Tried charging it through both USB and mains but the same thing happened. I removed and replaced the battery a few times - eventually the unit turned itself on. This is when I noticed something wrong - the battery was then reporting an 80% charge, yet quickly entered the "low power - will shut down in x seconds" mode. At least now it was finally accepting a charge, so I left it to charge where I could keep an eye on it. Not long later, (certainly not long enough for it to finish charging) the charge light turned off again and was now saying it was fully charged. So I just decided to play some games - maybe I just needed to fully discharge it? At about 80% power left (maybe an hour or two of PSX emulation) the unit shut off without warning. Now I can charge the unit, but it always charges too fast, and instead of switching off at 80%, the battery is just draining incredily quickly - I just played Yoshi's Island for 15 minutes at 800MHz, and the battery went down from 86% to 57%.


I'm sorry for the long post explaining battery faults but I just wanted to explain everything I've tried and tested. I'm assuming this might be because I left the battery out of my Pandora for a good 4 months while I was waiting to send it for repair - I sent it once but the package never got to ED and it was eventually sent back, which is why it's been left for quite a while. Do I need to buy a new battery (and if so, where from? I'm in the UK so I was thinking of Craig's shop, but I can't remember the URL for it and it's not on the Openpandora homepage anymore...) or can I get a replacement through some kind of warranty?
 
I also have my Pandora out for repair for a couple of months and I'm wondering about what my battery's state will be as well...


I don't have any answers but, how did you keep your battery while you waited for the repair? Did you put in the fridge like the user manual says? http://pandorawiki.o...manual#Charging
 
Last edited by a moderator:
Your battery is probably fine. Plugging it in and "nothing happening" is understandable behaviour if you had left it alone long enough to force itself to shut down while sleeping: if the battery voltage drops way too low the charge circuit has to enter a special charge mode to slowly raise it back to normal before it can even think of turning the device on. This typically takes about 30 minutes but has been known to take upwards of an hour or two for really drained batteries.


This weird shut down probably put the battery gauge into a weird state. The battery gauge is a pretty "smart" chip, it measures current to track how much power the battery can hold and will adjust itself accordingly over time. This is necessary because over the years the amount of power a lithium battery can hold will decrease, it's just the nature of batteries. I would guess that something about the way it shut down caused the gauge to misrepresent the total amount of power in the battery.


Try this: open a command line terminal. Charge your Pandora. When it reaches 100% type "cat /sys/class/power_supply/bq27500-0/voltage_now". The output should be close to 4200000. When the charge light turns off, type the same command again, making sure that it is still around 4200000; it should even be higher than that. Then start discharging it. Just leave it open or something and wait. As it approaches 0% run the command again. At exactly 0% it should be a little higher than 3000000 (3 volts, the hard cut off after which it becomes dangerous to keep running). If it reaches 5% and is still reading something like 3400000 then the gauge chip has definitely become confused. If it is approaching 3000000 then the chip is fine and you're right about the battery needing to be replaced.


If the battery needs to be replaced the only thing you can do is contact either Craig or ED and get a new one.


If the chip is incorrect, we can easily recalibrate it just by forcing it to charge properly. When it reaches 5% and the "shut down" dialog comes up, cancel it. It will eventually fall to 0% and try to shut down again. Don't let it, or we'll have to start all over again. This could take many hours, but every so often check the voltage as I described above. It should drop by about 100000 every hour (little less, actually), so if it's at 36000000 it'll probably take about 6 hours: check it every hour until it gets closer to 310. Don't play any games or anything, just let it idle itself to death. When the voltage finally starts to approach 3000000 that is the signal that the battery is actually at its real end. When it reaches that (or a little higher, say 305) shut down your Pandora. Leave it off for 5 hours: this calibrates the gauge's low end. After 5 hours, plug it in and let it charge back to full. When it stops charging, turn it off and leave it for another hour. This marks the high end. You may need to do one more discharge cycle like I described above. Once you've completed a full cycle like this, the chip should understand again how much power the battery can hold and you'll get full use out of it again.
 
a lot of great info stan will need to keep a copy for when i start to get some problems with my battery
 
Just an update now that it's fully charged - it's reading the voltage as 411300, so a bit less than 420000. I'll keep my eye on it and see how it goes - I'll make notes at every 10% if I can, but I might have to leave it discharge when I sleep. Or is it OK to switch it off and resume discharging tomorrow?


EDIT: Dropped to 4025000 by 90%


3912000 by 77%. Didn't check at 80% because I was asleep and just left the Pandora on suspend
 
Last edited by a moderator:
Quite a long time. Had it running for several hours before I went to sleep. I should have put time stamps on my edits, I thought it would say when it was last edited. I slept for about 8 hours and if I remember right it was somewhere around 85% when I did go to sleep. It doesn't seem to be draining very fast when I just leave it idle (I keep making sure the screen doesn't turn off though or it'll take forever). It only seemed to drain fast when I play games and stuff. I posted that it was at 77% about an hour ago and it's at 71% now (3874000)


EDIT: 1:45PM - 70%, 386900
 
Last edited by a moderator:
Keep at it. We'll see what happens nearer to 10%.


6% in an hour is more or less what I would expect at idle, and 30% in 15 minutes is definitely way off the mark. Maybe it's already recalibrated itself. Try playing Yoshi's island again for 15 minutes and check the percentage and voltage before and after.
 
Ok after 15 minutes of playing Yoshi's Island at 800MHz, it's gone down to 64% and the voltage is at 379100. Which is certainly a hell of a lot better than last time I played and it drained 30%. I guess it has recalibrated itself? Although 5% for 15 minutes still seems like a little much. That would mean I'd get about 5 hours game time, and my Pandora definately lasted longer than that before. But I guess that's just natural battery degredation over time?
 
Last edited by a moderator:
Oh dear. This is what the after affects of flu does to my brain I see xD Can't even do the most simple arithmetic possible. 3% isn't so bad then. I think the battery has most likely re-calibrated itself but I'll keep this process going just incase and follow through all your steps. Right now it's at 54% with 3766000.


EDIT: 50%, 3756000


EDIT: 11:25PM, it's at 20% now but the voltage still seems kind of high. It's at 3593000 now.
 
Last edited by a moderator:
At 11% (12:42AM) low power shutdown message appeared. Voltage is at 2956000. Shutting unit down now.


Suddenly jumped from 11% to 0% before I managed to get to the shut down button - thankfully I shut it down normally rather than let it shut down itself. Leaving it overnight then going to charge it I guess, unless you think I should do something else?
 
Last edited by a moderator:
The battery gauge chip is coded to jump to 0% as soon as it drops below 3 volts as a safety precaution. There's a lot of safety precautions in place.


Looks like something did happen to screw with the calibration which your last charge started fixing but didn't quite get there. This time should be fine, hopefully. Fully charge, shut down and let it sit for an hour, and everything should be back to normal.
 
I've been watching this thread because my charge indicator was pretty crazy as well after getting a new unit. The first charge would "charge" for about 2 hours after I hit 100% which I thought was strange.


I took my device off the charger and it would show 100% even after like a hour long game session which I thought was even weirder. And then I tried to play it to 0% after almost 2 hours of emulator demo the unit finally died even though it shown 0%.


I couldn't find any info on battery calabration so I figured I'd give it a try. Thanks for confirming it does exist stan.


So I did the whole charge to 100% and let sit for an hour, and sure enough after a couple min it started showing the somewhat accurate 99% etc. I still need to reset the 0% by letting it sit for 5 hours after it dies.


This is very good info someone should put it in the wiki or user guide. There is no mention of calibrating the battery
 
Yeah, that's a completely different bug: the charge light doesn't always come on. There doesn't seem to be any consistency to help debug it. At least none that I saw, Notaz may have figured it out and fixed it by now.


edit: forgot to mention, if the charge LED is off then you can still check the charge status with "cat /sys/class/power_supply/bq27500-0/current_now"


A positive number means it is charging, a negative number means it is discharging (battery full, so stopped charging).
 
Last edited by a moderator:
If the chip is incorrect, we can easily recalibrate it just by forcing it to charge properly. When it reaches 5% and the "shut down" dialog comes up, cancel it. It will eventually fall to 0% and try to shut down again. Don't let it, or we'll have to start all over again. This could take many hours, but every so often check the voltage as I described above. It should drop by about 100000 every hour (little less, actually), so if it's at 36000000 it'll probably take about 6 hours: check it every hour until it gets closer to 310. Don't play any games or anything, just let it idle itself to death. When the voltage finally starts to approach 3000000 that is the signal that the battery is actually at its real end. When it reaches that (or a little higher, say 305) shut down your Pandora. Leave it off for 5 hours: this calibrates the gauge's low end. After 5 hours, plug it in and let it charge back to full. When it stops charging, turn it off and leave it for another hour. This marks the high end. You may need to do one more discharge cycle like I described above. Once you've completed a full cycle like this, the chip should understand again how much power the battery can hold and you'll get full use out of it again.

So, I've done this 2 times now and it seems that it's still cutting off the top end and low end of the charge cycle still.


would it be possible to rewrite the charge % indicator application to correctly represent the values? Maybe create a table over time on by writing high/low values to a file on the firmware?


Right now mine shows 100% when it reached ~4000000 and it's at 4170000 and still climbing. (EDIT: maxed out at ~4200000) I didn't check the actual voltage when it hit 0% but it remained idle for 3 hours after I canceled out the "turn off your pandora now" & "your device is shutting down now" popups


There is definitely something buggy with the power manager on this. I have no doubt the internal one that controls the actual charging and battery safety shutdown is functioning correctly, because it charges and shows the voltage correctly, shuts down charging after a certian threshold, and doesn't allow the device to be turned on after it drops below a certian level. The problem really appears to be how the % on what you can normally see in the system tray or games that read the battery % is way off still.


I'm a fairly novice programmer but I would like to help fix this if it's not already being worked on. Can you point out the applicable files that control this on the xfce side of the house? I like how android does it's battery statistics, it only takes one charge cycle for it to retain a good high and low point.


I know this is or may be the way it currently works, so I may be restating the obvious or already present.


But I'm thinking something that will poll the current_now every min or two when the device is actively being used (screen on), 10-15 min when idle (screen off or LPM), and instantly when waking from a sleep state (screen saver or return from LPM). Read the current_now value and compare to a table loaded in ram. Display the the value in % compared to high & low values in the table. If that value exceeds the predefined stock range in the table it writes the new value to ram and if the values are not bogus periodically write to NAND. As the value reaches the upward most range of the "max safe" or "low safe" voltages the writes become more frequent. Have an option to wipe collected battery statistics to "recalibrate" manually. To track degeneration of battery after charge cycles by collecting timestamps on nand writes or track the number of charge cycle and if a voltage value is not reached that was once the uppermost limit after your battery gets to the highest value it then will drop the no longer achievable voltage value from the table.


The device learning your battery's range after a recalibration will be more sensitive at first and produce more writes than it would after a few cycles. But from what I can gather it doesn't look like it's not writing any permanent values to anything on the pandora. Or if it is, it's very (probably too) conservative with how it's tracking your "real" battery charge level.
 
Last edited by a moderator:
Back
Top