While finishing up a report on your laptop late at night, you get an alert that your battery is low and that you should plug your charger in. “Just a few more minutes,” you think and continue with your work. Suddenly, you get the hated message that your system’s battery is critically low, and if you do not connect it to a charger, the computer shall turn itself off.

It’s only then that you frantically look for the charging adapter and hopefully protect your unsaved work from a digital catastrophe.

There are so many things that our laptops and smartphones can do that we often take them for granted. Among many other things, almost all modern electronic devices keep tabs on their batteries and tell you, in absolute percentage values, how much charge is left or how long they can be used before they’ll need a recharge.

Have you ever wondered how modern electronic devices do that?

### How do smartphones and laptops calculate how much charge is left in their batteries?

**Short answer:** Accurately determining the amount of charge left in a battery is no easy task, but there are a few methods that can be used, including estimation based on voltage, estimation based on current (Coulomb Counting), and estimation from internal impedance measurements. All these methods rely on measuring a convenient parameter that changes as the battery is charged/discharged.

However, all these methods have their own shortcomings, and therefore cannot be relied upon to provide 100% accurate readings of the ‘remaining charge’ in the battery. Also, some of these methods are specific to certain cell chemistries.

Before we learn about some of these methods in detail, it’s important to first decipher a term that’s going to appear throughout this article with remarkable consistency.

### What is ‘State of Charge’?

State of Charge, as the name implies, tells you the state of a battery, and more specifically, the charge remaining in a battery, at a given moment. Commonly abbreviated as SOC, it is the equivalent of a fuel gauge for the battery pack in an electric vehicle or hybrid vehicle.

Another closely related term to SOC is Depth of Discharge (DOD). It’s actually just the inverse of SOC, i.e., it’s an alternate method to indicate how much of a battery’s charge has been used up.

A battery holds charge, and we want to measure how much it holds at a given instant. In other words, we want to determine its State of Charge. This can be achieved through a few methods. Let’s talk about some of them.

#### Determining State of Charge by measuring the voltage

A battery’s SOC is often measured by its voltage, as the process is simple and yields fairly accurate results. It basically converts a reading of the battery voltage to SOC and displays it to the user.

Let’s try to understand this process with the help of an analogy. A battery is like a tank of water with a faucet at its base. You have no way of looking into the tank, so you can’t know how much water it contains at a given instant. How will you determine how much water is left in the tank?

One way of estimating the amount of water left is to look at the pressure of the water coming out of the faucet. If the water comes out fast, it means that it’s under a lot of pressure, signifying that the tank is mostly full. On the other hand, if the flow of water out of the faucet is very slow, you know that the tank is almost empty

The same is true in the case of batteries. A Li-ion battery with a voltage of 3.5 V may be 3.6 V when full and 3.3 V when almost empty (i.e., 92-98% of its total capacity has been used). Note that a Li-ion battery can be discharged to 3V and lower, but the battery shows 0% or ‘fully discharged’ at 3.3V to ensure maximum useful capacity of the battery. Discharging the battery below this **cut-off voltage** can do serious damage to the battery.

A device will take this voltage and accordingly estimate how much charge is left in the battery, which is then shown to the user on the screen.

#### Problems with SOC estimation by voltage

Although the process is simple, it cannot be relied upon to provide 100% accurate results, because certain factors like ambient temperature, discharge rate, cell materials and battery age affect the voltage. Voltage curves in most batteries follow a non-linear curve against state of charge.

Furthermore, there’s the problem of hysteresis, which means that the battery keeps discharging itself even after it’s stopped to discharge. To prevent this issue, a battery must be ‘relaxed’ completely for a few hours for the voltage measurement to work accurately. (Source)

#### Determining state of charge using current (Coulomb Counter)

Another method of estimating SOC is to measure the current entering (when it’s being charged) and leaving (when it’s being discharged) the cells and integrating this over time. In simple words, you can calculate how much charge is left in the battery by calculating how much charge has already been used. This technique of determining the SOC is aptly called ‘Coulomb counting’, since it *counts* the charge entering/leaving the cells.

Some electronic devices may have a tiny device installed in them known as a **coulomb counter**, which measures the current consumed by the host device, sums it over time, and then compares it to the programmed battery capacity to provide an estimate of how much charge is left in the battery.

Although it provides more accuracy than most other SOC estimation methods, since it measures the current flow directly, it has its own set of limitations, namely that it does not consider the efficiency of the battery. Also, it’s very difficult (and expensive) to make accurate current measurements (Source).

#### SOC estimation from Specific Gravity (SG) measurements

This is a very commonly employed method to estimate the SOC of lead acid batteries.

It involves using a sensor that measures changes in the weight of the active chemicals present in the battery as it discharges. As the charge stored in the battery is used up, the concentration of sulfuric acid (an active electrolyte in the battery) decreases, which proportionately reduces the specific gravity of the solution.

Although hydrometers have been traditionally used to make specific gravity (SG) measurements, modern lead acid batteries consist of electronic sensors that provide real-time SG measurements and yield fairly accurate SOC values. However, this method is quite exclusive to lead acid batteries and cannot be used with other cell chemistries.

#### SOC estimation by measuring internal impedance

The active chemicals inside a cell change their composition as they convert from one form to another during charging/discharging the battery. Therefore, by measuring the internal impedance (the opposition that a circuit presents to a current when voltage is applied) of the cell, its SOC can be determined.

However, this technique is not a popular choice: first, the impedance of a cell is temperature dependent; and second, it’s difficult to measure the impedance of a cell while it’s still active.

There are a few other methods that can be used to determine the state of charge of a battery, but none of them is perfect, and each offers a unique set of problems.

So, it should always be considered that SOC determination methods can provide only an *estimate* of the state of charge of a battery, and not a 100% accurate value. In other words… keep your charger handy!

### References:

- Wikipedia
- BatteryUniversity
- CiteSeerX – Penn State University
- Academia.edu
- The University of Texas at Dallas