Monday, January 31, 2011

Did I say “Pull the Plug”? Meant to say “DO NOT pull the plug”

This could be a mea culpa post. It is rare that I’m wrong; it is even rarer that I admit it! So listen up folks.

In the early days of this blog, one of my dedicated (?) readers had asked me about the urban myth about not keeping the laptop plugged in to extend the life of the battery. In response, I had written a post titled “Pull the plug, your battery will thank you”. This post is the single most popular post on this blog. Almost a year after the post was made, it still gets the most hits.

The logic behind doing this is very sound. As you can read from that post, it has to do with side reactions that occur in the battery at the top of charge. Letting the battery discharge a bit is good for life because the rate of these side reactions decreases with decrease in the voltage. Suffice to say that I recommended you wait for the battery to charge and then you pull the plug and let it self discharge. This way you can extend its life.

I follow this rule pretty diligently. And I thought it had worked well for me. I have one laptop that is 2 years old, has had 297 cycles and has lost 4% of its initial capacity. Not bad. This is my workhorse. I use it every day and although I pull the plug diligently, my usage is such that I keep it pretty close to fully charged. So over the last 2 years, it has spent its time at close to, say, 4 V.

I have another laptop which is 3 years old. It is my personal laptop which we (my wife and I) use typically only over the weekend. We pull the plug diligently, but then the computer sleeps all week; self discharges; and by the end of the week is pretty much discharged. This battery, as of last week, had not lost any appreciable capacity even after 350 cycles.

These two data points tell you something about batteries. The cell with more cycles and with more time is cycling better! No magic. Just a simple fact that the battery was sitting at a lower state of charge and so the side reactions were not as worse. Ergo, better life.

Did I mention that both these are Macs? I have a third laptop given to me by a startup where I spend some of my time. This is a PC assembled by a company whose name starts with a D and ends with an L and has 4 letters to it. That computer is on its 4th battery in 2.5 years. After I lost my first battery I spent significant time trying to understand why my rules were not working and trying to tweak the rules. Soon, I came to the conclusion that with some batteries there really is no point trying to find ways to extend life. They are beyond help.

Actually, these rules have been helping this battery also. But different battery companies make batteries with different quality (achieving tightly-bound quality metrics has been a challenge in the manufacturing of batteries). So when you start with a battery with bad quality, there is only so much you can do.

But let us get back to my Mac.

Well... last weekend, my 3 year old Mac with no capacity fade suddenly appeared to have a dead battery. Not a battery with some loss in capacity; or one with 20% loss in capacity (which is considered dead). It was just plain dead. No charge; pull the plug and it would shutdown. It was on life support, literally!

The only way this battery would have a second life was if it were a Hindu and had not attained enlightenment and so was eligible (I suppose doomed is a better word) to be reborn. Somehow it seemed like even with the 1000 (or is it 10,000) Hindu gods there was no way to get this battery back up.

My first reaction was one of disbelief. There was no way a battery can go from no fade to completely dead in a matter of 1 week of self discharge. It had to be a software glitch that was not allowing the battery to be used.

Two hours, a bit of heartburn, and a detailed scouring of the world wide web later, I found various tricks to reset the battery management software and a software to measure the voltage of the battery and came to the conclusion that it was indeed dead. The (average) individual cell potential appeared to be close to 1.5 V! The typical cutoff potential of these cells is around 2.5 V.

So I pulled the plug and my battery died!!

A call to Apple confirmed that I was out of warranty and was told to go to the Apple store for a “detailed diagnostics”.

So I dragged myself to see the “genius” at the store (I’m not being condescending here; they really call the tech support guys genius’. Apparently if Einstein were alive today he would be working at the Palo Alto Apple store!).

Albert plugged a USB stick into my laptop; my screen turned into a series of numbers. Albert then turned and says that my battery is dead. Clearly he was on his way to writing a paper on the unified field theory.

I apologetically told him something like “I understand a bit about batteries and I don’t expect them to fail like this” and he said “I would not expect them to do that early on, but after 3 years I fully expect this”. Not “its possible”, but “fully expect”!!!

I debated giving up versus trying to argue on the finer points of battery chemistry but it seemed like a lost cause. I’ve been very reluctant using my celebrity status as the author of TWiB, and I have to say that it is intimidating arguing with a “genius”!

So I shelled out $130 for a new battery; thanked the guy for his help; and left.

I drove back re-examining my whole life and everything I know. I always thought there was some merit to the George Costanza (of Seinfeld fame) principle of doing the opposite of what our instincts tell us. Maybe I had it all wrong. Maybe you should not be pulling the plug. Maybe my jingle on battery rules needed to be rewritten.

A couple of days later my confidence started to return. I decided to do what anyone looking for credible information does: perform a google search to see if plugging in your laptop battery is bad. I came across my original blog post on this topic.  I sounded so convincing in the post that I started to get re-convinced that I was right about my rules.

So what is going on? How can a battery die when it is self discharging on sleep?

Here is my take.

All you PC folks are familiar with the hibernation mode that you can either force your computer to enter, or set it such that the power management utility moves the computer to hibernation after a while of being at sleep.

In sleep the computer stops many of the processes from running and thereby decreases the processing needs and hence drains the battery slowly. In hibernation, the computer (presumably) stops pretty much everything; stores the state in memory; and basically shuts down. This means there is very little drain on the battery.

In a Mac there is a sleep option, but there is no hibernation option. However, if you are in sleep and if your battery drains down to some small state of charge (say 5%), then it automatically moves into a “hibernation” mode; freezes the state and stops all the processes.

One thing we had noticed in the dead Mac (before it died) was that when we opened it over the weekend it was pretty much in hibernation with little juice left in the battery.

Ideally hibernation in a low state of charge is a good thing. Remember the rule “don't charge them too high”? Higher the voltage of the battery, worse will be its capacity fade. So storing it at a low state of charge (or low voltage) is actually good for the battery.

Did I mention that keeping the voltage way too low (i.e., over-discharging) is a bad thing?

This is because many cathode materials can get irreversibly damaged on over-discharge. More importantly, if an anode is over-discharged you can start dissolving the current collector (copper).

When you discharge the battery and it reaches its end of discharge voltage, depending on the battery chemistry (i.e., the anode and cathode that it uses) and on the design of the cell, the battery is limited by either the anode not having any lithium left, or the cathode not being able to accept any more lithium.

As you cycle this battery there are side reactions in both the electrodes. The extent of these side reactions depends on the design of the cell, the chemistry of the electrodes, the composition of the electrolyte, the level of impurities in the manufacturing, the way the battery is formed etc.

In other words, the side reactions are pretty complicated.

However, what we need to understand is that these side reactions can actually change the way the electrode reaches the end of discharge. They can even change which electrode limits the end of discharge.

So here is my take on what happened to the Mac battery.

The battery management system had a methodology of estimating the state of the battery and deciding if its needs to jump from sleep (the usual mode) to hibernation. This estimation was probably pretty accurate at the beginning of the life of the battery.

But years pass (3 in my case); the side reactions chug along; and they start changing the shape of the voltage curves, especially at the end of the discharge. Slowly, but surely, the management system was making errors in its estimation on the remaining charge.

The battery was not fading appreciably. Instead it was becoming harder to predict the time it would take to go from, say, 5% SOC to being fully-discharged.

I think that as my battery kept fading, the transition from sleep to hibernation was not getting triggered correctly, the battery over-discharged.

This is why when I checked the battery voltage it was sitting at 1.5 V.

I have a sneaking suspicion that my battery may actually come back to life if charged but that the power management software is not allowing any charge to reach the battery because the battery voltage is so low. I should have asked for my old,dead battery to try to resuscitate it myself!

If this sounds like an easy explanation considering how complicated all this is, its because it is the only plausible explanation I can come up with. If Steve Jobs would like to disagree, I’m listening.

So I still believe that if you “pull the plug, your battery will thank you”. I am glad I don’t have to go back and change 7 of my posts and apologize to my regular readers (all 7 of them!)

So what can one do about all this? Download the desktop hibernation widget at This gives you a way to move your Mac directly into hibernation instead of to sleep. This is probably a good thing anyway to conserve battery on long trips etc.

Or you could buy one of the new Macbook air computers which comes standard with hibernation.

In the meantime, my rule stands: Pull the plug, and your battery WILL thank you.

When Albert at the Apple store told me he “fully expected” my battery to behave this way, maybe, just maybe, he actually knew all this. After all, he is a “genius”.



  1. Venkat,
    I read your first post on this a year ago, and while I was convinced, I have not been pulling the plug (but I've been less diligent about plugging in.)

    My reason for not pulling the plug is this: Batteries are expensive, but they're not *that* expensive. And remembering to pull the plug can be a pain.

    My question for you is this: How much benefit would I actually get each time I unplugged my computer at night instead of leaving it plugged in? Put another way, what % degradation can I expect for keeping my battery at full charge for 24h? Am I saving pennies each day, or fractions of a penny?

  2. Dear Venkat

    This is a very interesting post.

    First some comments:
    Owning a couple of Mac myself I have come to similar assumptions that the estimation on the remaining battery life could be deteriorating with time.
    Also, being a battery expert you could probably verify your hypothesis that the power management software is not allowing any charge to reach the battery.

    Then questions:
    - do you use a specific software to manage your battery life/health? I guess you do because you know the number of cycles.
    - do you think there should be a popup to tell us to pull the plug? or in other word is there room for an application to tell us how to improve our battery life?



  3. perhaps a test next time using a live version of linux on the computer will allow you to have better control of the charging function on the unit.

  4. Interesting post.

    First, I would've guess that with all the laptop batteries, the active materials technology are probably slightly different to start (MacBook air vs. your D--L)? If so, that means even with the software management, they all should probably be different in terms of monitoring battery health.

    Second, regardless how you use laptop, batteries performance are prone to fade, whether you let it sit idle on shelf or limit on charging too high or discharging too low. The question is a matter of how you get the most juice out (aka extend its life as long as possible) before it becomes inevitable.

    In terms of hibernation or sleep, I would've thought that there must be some minute amount of electricity drain from the batteries, whether if it's to keep certain memory alive or internal clock ticking? But I suppose the laptop companies know more about how they are electrically wired/distributed than I would.

    Anyway, like Tom, I do plug my windows laptop to the wall most of the time and maintain at ~80% and have it charge when it falls below 35%. Even when I travel with it for conferences, my batteries of >3 years still works and give ~2-3hrs life on maximum battery life mode in the software management.

  5. Why do you need to unplug the battery when fully charged? I think the software used with the pack is fully capable to keep is below the fully charged voltage. I will think this will be a easy fix through software if it is not already present..... maybe someone from Dell, HP or Apple can confirm ....

  6. Welcome back, please don't leave so long again!

  7. Tom Konrad: A battery at full charge degrades more significantly than one at 85-90%. I have to go back and get some stuff to give you a quantified estimate on the difference, but its significant. I do agree with you that laptop batteries are cheap enough; but remember that its the same batteries (kind of) that the EVs and PHEVs are using. Now we start getting into batteries that cost $25K!

    Thomas: I keep meaning to sit down and write down the voltage of the battery as it charges and discharges. I have tried it a couple of times, but patience is not a virtue I possess :-) If only someone would write a apple scrip that does a screen shot at specified times and then dumps the data into excel... You can see the voltage when you go to the system profiler and look under power. You can also use this software (thanks to Michael Kocher from LBNL for pointing me to this).
    There will be room for a (free) application that allows the user to change the state of charge to which you charge the battery. Lenovo's come with this. Can someone develop one for the mac?

    Anonymous on why pull the plug: If the software only charges the battery to a lower state then you get less run time. So to maximize this you need to charge all the way. But user tend to use the laptop like a desktop. ie., they keep it plugged in all the time. Hence "pull the plug".


  8. Also I'd imagine if the software keeps it at its estimated max, this estimation will also suffer over time, just as on the low voltages. Perhaps it estimates a 95% full while the battery is already at its max voltage, would that be a potential overcharge hazard, or not?

  9. I would be very wary of recharging a deeply discharged lithium ion cell.

    As you mentioned, the copper current collector of the anode may dissolve at low potential. This dissolved copper could plate as dendrites on subsequent recharge. If a copper dendrite causes an internal short when the cell is at a high SOC, you will have a bad day.

    Most battery pack circuitry and firmware prevents charge and/or discharge when the cell voltage is outside of an acceptable window.

  10. Excellent post and love the wit!

    Glad to see a new post from you as well.

  11. I have a new macbook air with the "deepsleep" function. Hopefully it works!

    In my system profiler, it says my battery voltage is 8142mV! That's huge compared to the 4 V you mention. 2 batteries perhaps?

    I'm also weary as previous readers mentioned of constantly cycling between say 85 - 95% while working. That's so much unnecessary cycling. Perhaps just keeping it at 90% at night or long periods of no use would be sufficient in getting a long battery life.

  12. Why not just turn the computer off instead of sleep or hibernation? Ideally you'd use it till the battery is around 50-60% discharged, and turn it off if you won't be using it for a while. Turned off there should be no further discharge. A123 Systems has shown 10's of thousands of cycles when operating the cells in the 40-60% SOC range. If there were a utility that could limit the amount of charge automatically if you didn't need a full charge that would also help, just as EV's do.

  13. Venka wrote:

    If the software only charges the battery to a lower state then you get less run time. So to maximize this you need to charge all the way. But user tend to use the laptop like a desktop. ie., they keep it plugged in all the time. Hence "pull the plug".

    Seems to me if most people use their laptops more like desktops (I know I do), then Apple should offer that as an energy saver profile (charge it like a Prius? charge it fully, then let it run down to some fixed state-of-charge?).

  14. I've been following the "pull the plug" instructions and diligently NOT overcharging my newest battery... the results have been phenomenal. Compared to previous batteries that within months would reduce their capacity to 1.5 or 2 hr (from 4 hour original), this one, when unplugged at 100%, shows (a reliable and slowly decreasing 4-5 hour capacity). Thank you!

  15. I've compiled a list of 10 tips to get better laptop battery life and to prevent it from prematurely being damaged.

  16. Dr. Venkat I have a question. I have heard some inside information from some high level workers and owners in the lithium mining business and word is there is a material other than lithium which is supposed to work better though from what I understand it currently is used in only in sectors of the market but soon next generation soon to come to the broad market. Do you have any idea what material they would be referring to?