(Dis)connect laptop to/from AC through software?

0

Contemporary laptop (lithium-ion) batteries come with a bevy of guidance on extending their lifespan. The usage advice is particularly frustrating. You’re not supposed to drain them below ~3%, but you’re also not supposed to leave them at 100% for extended periods.

In other words, you can’t leave the laptop plugged in to the AC all the time, but you also can’t wait until it is too low before plugging it in. Trying to plug and unplug the laptop manually is difficult at best (if you have nothing better to do than to sit around and watch the battery level, then you may as well just turn it off and do something else altogether).

Is there some way to use software to automate and maximize the battery’s lifespan? For example, plug in the laptop, and configure it to charge as normal until it is ~95% full, then programmatically switch to battery mode until it is ~5% then programmatically switch back to AC?

Synetech

Posted 2013-12-06T19:20:49.237

Reputation: 63 242

I'm not sure of a generalized solution, but Thinkpads allow the setting of charge thresholds through their Power Manager software/driver, e.g. http://forums.lenovo.com/t5/Windows-8-and-8-1-Knowledge-Base/Changing-Charge-Threshold-on-ThinkPads-under-Windows-8-without/ta-p/920657.

– ernie – 2013-12-06T19:49:35.303

You'd need a driver exposing your laptop's charge controller, such as that described at @ernie's link; even if such a thing exists (which would depend on the manufacturer), it'd probably be furnished as a .dll whose entry points aren't documented anywhere publicly accessible. Identifying the make and model in the question might make it easier to investigate the possibility of finding something for that particular device, but I wouldn't hold out any hope for a general solution. – Aaron Miller – 2013-12-06T19:52:19.660

@ernie, that sounds promising for the part about stopping the charge, but does it actually switch to AC power once it reaches the threshold? From what I can tell, it doesn’t, which makes it insufficient because from what I’ve read, to maximize battery life, it actually has to be used; simply keeping at 80% is not enough. – Synetech – 2013-12-06T21:32:44.020

@AaronMiller, interesting. Do you know of any specific examples? I would have thought that it would require a hardware implementation (e.g., in the battery circuitry) as opposed to just drivers. If it really can be done with a just driver (or even firmware) update, then that is really promising. – Synetech – 2013-12-06T21:33:59.900

Well, yes, it would require a hardware implementation, so that the driver of which I spoke would have something to tell what to do. Regarding examples, I have not the slightest idea, and I'd be somewhat surprised to learn that any model of laptop implements the precise behavior you desire. Something like what's described at @ernie's link is almost certainly as close as you're going to get, and that only if you happen to have a model of laptop with a similar driver available. – Aaron Miller – 2013-12-06T21:50:08.323

That’s my convern, that something as useful and desirable as this has yet to be implemented—though I imagine it would eventually happen in the future even though it’s obvious now. ¬_¬ – Synetech – 2013-12-06T21:59:09.090

Actually, the Lenovo solution switches just like you describe in the last paragraph of your original post, starting charging when the lower threshold is hit, and stopping charging when the upper threshold is hit (thus switching to battery). – ernie – 2013-12-06T22:09:45.780

Lenovo bought the ThinkPad brand in 2005, so any ThinkPad in the last 8 years or so has been Lenovo . . . – ernie – 2013-12-07T00:27:06.143

No answers