Disable battery Charging


lukey

Rare Species
Joined
Jun 17, 2015
Messages
504
Location
Germany
Will there be the possibility to disable the charging of the Battery while the ac-adaptor is connected, so the battery isn't Stressed when you use the Pyra stationary? Or an option to charge the Battery only to maybe 70%?
 
But I also want to use the battery as an uninterruptible power supply.
 
Last edited by a moderator:
The Pandora's charge chip can't switch from constant to battery mode instantly which is the reason hotswapping it is so dangerous. I don't know what the team has decided to put into the Pyra but what you're asking for is a fairly uncommon feature so I wouldn't expect it to be available. Might be, I dunno, we'll see.

Most devices, your phones, laptops, and handheld game systems, they'll charge to 100% and then stop charging (even if they say they're still charging) and run off battery for a while, trickle down 1-5% (even if it still says it's at 100%) and then start charging again. This charge cycle is the best way to keep a lithium battery alive while using it.

That's how the Pandora operates (or how it's supposed to operate, I think there's a bug but whatevs) and at the very least the Pyra will do this better.

edit: Oh, but if you really only want to charge it to 70% (or even 40% would be optimal if you really don't see yourself using it off battery for a very, very long time, many months to years) then you can do that. Even the Pandora's charge chip is flexible enough for that, it's just a matter of putting the right i2c commands into a startup script.
 
Last edited by a moderator:
I've seen such settings to keep a battery charged at ~60% on recent Lenovo laptops and was surprised by it. When people ask if the same effect can be achieved with older laptops the answer I have seen given is that the charging circuitry on other machines is too disconnected from the OS to do so. Glad to see that even the Pandora has always been capable of doing this.
 
Even the Pandora's charge...
  
even the Pandora has always...
I find it amusing that the most advanced device of it's class is now getting the disparaging prefix of, "Even". The Pandora may have been designed in 2008, but it's still the top of it's class - even if it is a class with only one member.

"Handheld, pocketable, clam shell, general purpose computer with a full OS, enthusiast level gaming controls, audiophile headphone sound, and a full QWERTY keyboard and 10+ hour battery."

I guess the timing on the Pyra is on track.
 
The Pandora itself may still be a class of its own, but it's PWM is quite old. :p

"The Pandora" is not out of date, it cannot be until the Pyra comes along at least, but that doesn't mean there aren't a few individual components that aren't worth a complaint or three ;)
 
I've seen such settings to keep a battery charged at ~60% on recent Lenovo laptops and was surprised by it. When people ask if the same effect can be achieved with older laptops the answer I have seen given is that the charging circuitry on other machines is too disconnected from the OS to do so. Glad to see that even the Pandora has always been capable of doing this.
My Vaio also has this option. I've set it to charge to 50% :

rXgdcJg.png


The system is 4 years old now, and the battery is still in 'excellent' condition according to the battery monitoring app. So it does seem to work. Would be great if Pyra could do this too
 
If I recall something like that was discussed when the battery charging algorithm was discussed (although I think people were talking about 40% rather than 50% or 80%), but in the end the current algorithm of charging to 100%, letting fall to 80% then charging again was designed as an algorithm to not stress the battery too much by keeping it charged, while still meaning anyone picking up the unit after leaving it on charge overnight will have a reasonable battery life that day.

Perhaps now more Pandoras are likely to be left on a charger while we take our forthcoming Pyras out and about with us, and for the TV-only Pandora model, it's worth revisiting this option.  Perhaps max and trigger battery levels are already configurable - I forget the details.
 
Perhaps max and trigger battery levels are already configurable - I forget the details.
Yes it is, start_capacity and stop_capacity in /etc/pandora/conf/eventmap
Those values are 95 and 99 on my unit. Those values make a lot of sense for the "overnight charging" scenario, where power consumption is low so the number of trickle-down cycles is probably rather limited.

In a scenario where you intend to keep the Pandora/Pyra plugged in while actively using it, where the battery is just a UPS, this is probably not the best setting though. E.g. I guess it could make a nice robust webserver which could still be reachable over 3G in the event that power gets cut, including your normal internet connection. If it's going to be reasonably active most of the time, and the battery is just a failsafe, then the constant recharging from 95% to full is not going to be good for the battery in the long run. I don't know enough about batteries to say what would be the best setting, but perhaps something like 40% as a minimum would be better.

If the unit could hotswitch between the battery and the plug as a power supply, that would be even better, but I guess the hardware probably cannot handle that. I don't know much about electronics but I would guess that something like this could theoretically be implemented by having a reasonably large capacitor between the device and its power inputs, so that if it suddenly gets unplugged, it still has time to notice what happened and switch to the battery.
 
There's a note in the hacker manual about putting a resistor (I think) between the sense pin and the +5V pin of the power port, to simulate a battery.  I've never tried this, but I assume it's meant to allow for use without a battery, and you could leave it plugged in and put the capacitors inside the 5V power cable.

Alternately, I have tried powering my Pandora using croc clips on the edge power connectors, and that definitely bypasses the battery.  You'd have to build your own case for that, but it might be a simpler hardware design, if software isn't sufficient.
 
There's a note in the hacker manual about putting a resistor (I think) between the sense pin and the +5V pin of the power port, to simulate a battery
This was an idea I had that could theoretically work but I never took the time to actually figure out the details. It was only meant as an emergency idea in case the Pandora couldn't work off AC power alone, without the battery. Fortunately that little hidden features seems to be mostly working, with only a few people reporting any problems.
 
FWIW, I swapped out the values Notaz suggested for 40 and 99 on my unit, and after a reboot that's the percentages it started discharging and charging to.  It means there's a much bigger period now where the unit is discharging every cycle, and a slightly longer period while it recharges to 99%.

I left the max at 99% as I usually use my Pandora off charge, and therefore want to be able to get it to nearly full charge by watching when the charge light comes off.  If you usually use yours plugged in, you could perhaps use values of 38 and 42 or something, to keep the battery charged at around 40%, but topped up at about the same period as the original charge settings (or 95 and 99%).  As previously mentioned, I don't think it's possible to completely bypass the battery, especially not in a way that would let you switch onto battery power without rebooting the device.
 
what i would like to see in a charging circuit is some sort of intermediary power input/output layer, where a capacitor might be used to store energy.  off the wall (i.e. not charging), the battery charges the capacitor, and the capacitor sends power to the device.  plug it into AC, and the capacitor charges from the wall, and if the battery needs to be filled up, the capacitor sends some power to the battery, some to the device.  once the battery is full (or whatever % you want), the capacitor just sends power to the device, straight from the wall, and the battery is no longer being used.  if you make the capacitor large enough, you could have a second for the PC to shut down "nicely" if the power supply is interrupted.

i'm not an electrical engineer though, so maybe that's not possible/feasible.  just dabbling in things beyond my understanding ;)
 
The main problem I see with that is that capacitors are normally (barring any newfangled thingies I haven't investigated) pretty low energy density.

A capacitor that can run a device like the Pyra for any meaningful length of time would be huge, and there really isn't anywhere to put it.
 
Last edited by a moderator:
You'd need a capacitor the size of a couple 2032 coincells stacked for about 5 seconds of run time, assuming a few volts of usable range, half an amp of current (used a 5.5 V/1 F supercap for estimation.) Would be difficult at best to fit inside the case.
 
If it defaults back to battery power once AC is lost it has offline ups.

Less energy spent, and probably what works the longest.

Handy if you want to host things on it.

Prolongs the life of things to be able to use them for sensors and such after their intended lifespan is over.
 
Last edited by a moderator:
FWIW, having a relatively large capacitor plugged into the power source, and the rest of the circuit being plugged into that (although capacitors only have two terminals, so in practice the capacitor bridges the inputs) is a classic low pass filter used to smooth out momentary power interruptions - it's the first component (after the power supply) in almost every device out there, but it's only really designed to cover momentary drop outs, as noted by others above.

Modern supercapacitors might be worth investigating, but I've only really heard about them in respect of electric cars, where size constraints work on a whole different scale.  Perhaps they'll eventualy filter down to smaller sizes where they might be able to act as a shortish-term UPS to allow the system to shut down cleanly (as kingu hints at).  It's not really an applicable concern for the Pandora/Pyra though, until you're able to run with the battery present but not connected - such a device could use the time provided by the UPS to reenable the battery somehow and switch to its power. Such a set-up would be highly niche though, and require specific silicon to handle the fast events and need the OS to wake up to handle more complex situations, and I don't see that easily achieved by a team the size of the Pyra's crew.
 
Back
Top