Release Better battery charging (beta)


WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,731
Hi guys,


I was hoping to have this completely set to go by now, but looks like with the transitioning from HF4 to HF5 I've got some packages crossed.


It kinda works, but can't mount very many filesystems, ie, PNDs. It's misbehaving and I'll fix it as soon as I can and maybe get this into the official firmware.


Anywho, here's what I've got (and the source will go up somewhere too)


Recommended only for people running off an SD card so you can easily recover. Simply replace (or symlink) the uImage in the /boot directory with this one.


What it does: other than breaking some things I didn't touch, it makes charging the Pandora's battery much safer. I spoke with someone from my university solar team on the nature of batteries and got some good advice on lipo vs li-ion. Basically, trickle charging a lipo is BAD. My apologies to whomever said that and I explained it only applied to standing charge, not discharging batteries. I was wrong. A lipo sitting at 100% charge, even if it is trickle charging exactly the amount going into it, is bad for the battery. It will puff exactly the way that others have seen.


What I've done is increased the sensitivity of the end-of-charge circuit, so it should stop charging within minutes (maybe a half hour) of reporting 100%. It will then discharge to 95% and then start charging again. My contact at my university mentioned some laptops using lipo batteries (as opposed to li-ion which apparently does not have this problem) which used this method as well.


I went one step further. When asked about prolonged standby charge, my contact suggested a much deeper cycle: discharge to 40% and then charge back up again and repeat. So if you leave it plugged in for about 24 hours, with the next full charge, it starts idling the charge circuit, which will bring it way down, and then start the cycle back up again. If he's right and I've implemented it correctly, we should see the end of battery concerns.


I'm also working on the led module so we can distinguish these different states: charging, full, and idle.


Hopefully once HF5 is fully up and running, I'll be able to squash out the last bugs and work it into HF6.


Gruso edit: There is now an executable linked in post #25. Use that instead of the uImage linked above.
 
Last edited by a moderator:
Sounds good, thanks for your work.


Let's see if we get some testing reports now.
 
Last edited by a moderator:
When asked about prolonged standby charge, my contact suggested a much deeper cycle: discharge to 40% and then charge back up again and repeat.
Would it hurt to make the deep cycle discharge phase slower by using the charging circuitry at less mA than what it takes to run the pandora (thus from the battery POV it would still be clearly discharging, but less)?


This would use up the battery cycles less than the alternative when you leave a pandora on the charger for extended periods of time.
 
About the battery puffing up: I've taken a careful note that when my battery is simply charging period, regardless of the level, it will expand just enough to create a pivot point on the underside of the case so I can spin the unit on a flat surface. I am not sure if this is dangerous and as a result I tend not to plug in the Pandora unless it's two batteries I have are dead completely. Please note this happens whether on USB or PSP-AC. Is this a normal behavior as it sits this moment? In general is it fine, and not a problem? Or will this be fixed via your help here WizardStan?
 
About the battery puffing up: I've taken a careful note that when my battery is simply charging period, regardless of the level, it will expand just enough to create a pivot point on the underside of the case so I can spin the unit on a flat surface.
I don't think it should be doing that. The puffing comes from overcharging. It could just be that your battery is so tight that the extra heat of charging is causing an expansion to the plastic. If it goes back to normal when removed from power it is probably fine, maybe? The major concern is the obvious puffing that doesn't go away. That's what this is supposed to fix, reduce the overcharging to give us many more years of 10+ hour battery life.
 
WizardStan, while I'm not advanced enough in my knowledge to go ahead and set this up and such (I've yet to find the spare time to learn to boot from SD, at this point I'm pretty certain I won't be finding the time for it) I am glad to hear about all of this.


I'm a bit curious on the deep cycle bit. Supposing I understand this correctly your going to let units drain to 40% whenever they charge to 100% before charging again? I dislike the idea of potentially waking up to find my Pandora less than half charged even though it had 10 hours to charge while I slept, even if it's a low one to preserve the longterm life of the system (as I expect my Pandora won't still see use in ~5 years).
 
I dislike the idea of potentially waking up to find my Pandora less than half charged even though it had 10 hours to charge while I slept, even if it's a low one to preserve the longterm life of the system (as I expect my Pandora won't still see use in ~5 years).
That's why it waits until it's been plugged in for 24 hours (I'll make it configurable in the final) before going into this deep cycle process. Before that, it keeps it at around 95%.
 
Seems interesting :)


If this is the right way to do it then I guess the way to go would be to integrate it into the firmware (it should of course get tested first). Obviously the Pandora team need to review this first, especially as this concern hardware. I would imagine the company that produced the battery should have an idea too.
 
I'm also working on the led module so we can distinguish these different states: charging, full, and idle.

this


make it blink quickly when fully charged :D
Id go the other way around slow down the blinking the more charged it is until finally its just static

...or possibly give us a choice? I'm not complaining because I appreciate your efforts. I just have a suggestion. When I'm using my Pandora and it starts getting low on battery power it blinks to alert me, which is great. But once I've plugged it in, I find the blinking distracting while I'm using it and it's charging. Once it's plugged in, I've addressed the reason that it was blinking, so it would be nice if it would quit reminding me.


Thank you for your coding for the Pandora!
 
When I'm using my Pandora and it starts getting low on battery power it blinks to alert me
Yeah, this is a weird thing which I've asked ED about. I can't find the blink code anywhere. The basic LED control just has charging on/off, none of this "blink if it drops below 10%".

I'd like to see your changes. If you cant host publicly, PM me. But a diff to current git would be best.
As soon as I get home, assuming I remember, I'll upload a diff somewhere. The changes themselves aren't that complex, most of my time was spent manually plugging in values via i2c and seeing what happened.
 
Please make your "deep cycle" configurable. I often charge for more than 24 hours before picking it up on the way out the house - and as with t'other poster, I'd be pretty pissed off if it's sitting at 40% having had more than 24 hours on the charger.


My DS sits on the AC power for days at a time and has no issues (and when I take it off charge, it's at full) - why should the Pandora be any different? Bad choice of battery?


D.
 
My DS sits on the AC power for days at a time and has no issues (and when I take it off charge, it's at full) - why should the Pandora be any different? Bad choice of battery?
Different battery technology. Better performance, but more fussy about the way it's treated :)


~24 hours to trigger the 'safe' mode sounds pretty good, you still end up with 4 hours of use time, and it only takes a quick (what?) to reset this to 'top-up' mode.
 
Software can't guess what the user's going to do, so couldn't users just tell it what they're going to do? Wicked cool would be the ability to tell it when you want it ready. Plug it in at night, tell it you want it full by 8 the next morning, then it immediately goes in to deep cycle and times itself to be full by 8. If that kind of timing isn't feasible, maybe just have it switch back to shallow cycle within one hour or so of the specified time.
 
Yeah, that would be good, or just make the "deep" cycle not quite so deep. I don't like my battery to be at less than 95% when I leave the house, and tbh I prefer it at 100%. If the firmware starts to decide that I can't have a full battery when I want a full battery (recharging times taken into account of course) then I'm going to rip that part of the firmware out, disable it or just downgrade to a previous version of the firmware.


From what I have seen of bloated batteries, it happened after many months of continuous charging - which is something that doesn't happen to my Panda, as it gets taken off charge every day (or two days if I'm not at work) and almost runs dry.


D.
 
Back
Top