How to stop killing your battery by overcharging your laptop [Tip]

You must have wondered one day or the other as to why your laptop battery has been draining faster than before. Say, when the battery was new, you used to get 5 hours of juice without charging the battery again, but after one year, it is giving you only 2 hours to run your laptop before plugging it into a power outlet.

Well, any battery in the world can be charged for a finite number of cycles. Moreover, the battery degrades over the time. And, the bad news is this degradation gets exacerbated by overcharging. True that it is best to fully charge, then fully discharge; however, if you want to retain the battery life better, you need to stop overcharging.Some power adapters automatically shut off charging when the battery is full. I rarely see it though as the vendors want you to kill the battery (as early as possible) for the obvious business reason. The software from some OEM (Original Equipment Manufacturer) may have a configuration utility to implement or have an on-screen display like ‘Do not charge if the battery level is above X %’.

The Windows system, by default, offers a Low battery notification (and, helps the laptop Sleep, Hibernate or Shut down before the battery is completely exhausted), but not a ‘high battery alert’ until the battery is fully charged. Therefore, one option is that you have to keep a close eye on how much the battery is charged. This is not quite practical given our busy life. The obvious jeopardy is that you just forget about it, and mostly end up overcharging the battery. You actually want to receive a notification about how much charge your battery has, or how full it is. Auspiciously, both challenges may be overcome by using a simple script. You can use this method to get an audiovisual alert for when your battery is charged up to a definite level (you can set a limit to the minimum or maximum charge). You could have used a free app like Battery Limiter, but if you don’t like installing yet another app, this script comes to the rescue.

Copy & paste the script (given below; credit goes to the original coder) onto the “Notepad” window, and Save As battery.vbs (change .txt to .vbs). Save this file to the folder of your choice, and create a ‘shortcut’ for it. Paste the shortcut in your Startup folder (Start > All Programs > Startup & then, right-click to Open) as you need it to run automatically. If you don’t like it to run every time you boot your system, place the file (and its shortcut) out of the Startup folder, and run it when you want to.

Understandably, it won’t work perfectly if you have multiple batteries.

set oLocator = CreateObject("WbemScripting.SWbemLocator")

set oServices = oLocator.ConnectServer(".","root\wmi")

set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")

for each oResult in oResults

iFull = oResult.FullChargedCapacity

next

 

while (1)

set oResults = oServices.ExecQuery("select * from batterystatus")

for each oResult in oResults

iRemaining = oResult.RemainingCapacity

bCharging = oResult.Charging

next

iPercent = ((iRemaining / iFull) * 100) mod 100

if bCharging and (iPercent > 95) Then msgbox "Battery is at " & iPercent & "%",vbInformation, "Battery monitor"

wscript.sleep 30000 ' 5 minutes

wendBattery monitor

This script notifies you using a popup dialog box (see the screenshot above) when the battery reaches 96% (with sound, if you don’t mute your system). You can edit the line if bCharging and (iPercent > 95) Then msgbox “Battery is at ” & iPercent & “%”,vbInformation, “Battery monitor”, and substitute the value in (iPercent > 95) to whatever value fits your liking. The popup comes back to remind you if you close the dialog box without unplugging. As the battery gets more and more charged, the popup reflects it (i.e., ‘Battery is at 97%’, ‘Battery is at 98%’, and so on).

I have tested this script in Windows 7 Professional 64-bit.

Does it work for you? Are you ready to protect your notebook battery from being dead sooner than expected? Let us know in the comments!

Related Posts

  • Ron Helton

    Except for the occasional power outages, the HP laptop on my desk has been plugged in continuously for the past 5 years. When the power does go out, I have not noticed any degradation in battery discharge time.

  • sam666

    That article says:
    The question is asked, “Should I disconnect my laptop from the power grid when not in use?” Under normal circumstances this should not be necessary because charging stops when the Li-ion battery is full. A topping charge is only applied when the battery voltage drops to a certain level. Most users do not remove the AC power, and this practice is safe.
    Mukhi says the charging does not stop… So now I don’t know if it does or not.
    I think if you are at home and going to use AC power, and your battery is already charged, then pull out the battery.

  • X Ray

    Here’s a full discussion on this topic.
    http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries

    What it says is that A) You CANNOT overcharge a Li-Ion battery & B) Don’t fully discharge a battery. Leave it plugged in.

  • Naveen Jaiswar
  • jamiesl

    sam666 that is incorrect, fully discharging lithium batteries does not harm them at all, unless maybe if they were stored that way for an extended period of time. That is another myth that was either carried over from another type of rechargeable or has just spread around. Actually i take it back, if you drained a lithium battery to absolute zero volts, it would be harmed, in fact it would never work again. Lithium have a built in mechanisms that dont allow this to happen. what we see as zero is more around 5%. But at the end of the day, both of us i think agree that the best way to charge is in less than full cycles from about 20 to 80 percent. For more information please start here: http://batteryuniversity.com/learn/article/premature_voltage_cut_off

  • sam666

    Mukhi says, “True that it is best to fully charge, then fully discharge”.
    That used to be true, but with lithium batteries you DO NOT want to fully discharge batteries as that shortens their lifespan.