Tech Brief No. 14
Basic Gas Gauging Using the DS2437

Jason Cole, Applications Engineer, System Extension Group

Procedure

Experiment

Observations

Conclusion

 

Determining the remaining capacity in a battery pack is often given the simple name of "gas gauging". The idea of course is to find out how much "fuel" is left in the battery, much like one needs to know how much fuel is left in their automobile. In both cases, the results on the gas gauge help the user decide if there is enough fuel left to do what the user desires, and if not, to prompt the user to refill the fuel.

Unlike a car's gas gauge, which simply measures a level of fluid in a tank, battery gas gauging is a much more complex problem. Because batteries are not completely efficient when charging, not all of the energy put into them is actually usable; this charge efficiency is affected by factors such as charge rate, temperature, and the age of the battery. Likewise, discharging is not always 100% efficient either, with the same environmental factors affecting the usable remaining capacity as well. Designing a system which takes all of these factors into account is not a trivial task.

The DS2437 Smart Battery Monitor is a battery instrumentation device which monitors all of these environmental factors (temperature, voltage, current, and time), and would allow the user to do gas gauging as described above. It also features an Integrated Charge Accumulator (ICA), which keeps track of the charge going into and out of the battery. The ICA simply measures charge, and doesn't factor in other environmental effects. Despite this limitation, the ICA can be used as a basic gas gauge in certain applications. In this application note, we will examine using the DS2437 as a gas gauge for use in a cellular phone application. The primary concern of this application is being able to tell the user if there is enough fuel left in the battery to complete a new call.

As the phone's battery pack becomes discharged, the user must be warned when the battery's remaining capacity is low and in need of recharging. The following procedure provides a simple method to follow in order to get the most out of the DS2437 when it is used as a basic gas gauge.

Procedure

  1. Completely discharge the battery to what will be used as the zero level of the battery.
  2. Write 00h into the ICA register.
  3. Fully charge the battery.
  4. Read the ICA register.
  5. Create a scale factor such that: (Scale Factor) x (ICA reading) = 100%.
  6. Continue to use the scale factor on subsequent charge and discharge cycles.
  7. Recalculate the scale factor following each full charge.

Initialize the Gas Gauge

The first thing to do is to provide the DS2437 with a starting point. Because the ICA is a relative gauge, it is important to set the gauge to a known position prior to starting a charge or discharge cycle. This creates two possibilities, either set the ICA register to full (100%) when the battery has been fully charged, or set the ICA register to empty (0%) when the battery has been taken to a known discharged level. Since the critical area of the discharge curve is when the battery capacity becomes low, starting with a discharged battery is the better of the two approaches. Therefore, begin by discharging the battery to the desired zero level and writing 00h into the ICA register of the DS2437. It may be necessary to reestablish the zero level by repeating this initialization routine occasionally to accommodate for aging effects of the battery cells.

Charge the Battery

As the battery is subsequently charged, the ICA will increase relative to the amount of charge that has been put into the battery. Ideally, the ICA should reach 100% just as the charging cycle is completed. However, several factors can affect the ICA reading, such as if the sense resistance is slightly off, or if the battery capacity is not exact. If these or any other non-ideal conditions exist, the ICA will not be exactly 100% when the battery is fully charged. Rather than resetting the ICA to 100%, use a scale factor to make the display read 100%, while maintaining the current reading on the ICA. For example, if a charging cycle is completed and the ICA reads 80%, multiply that reading by 100/80 so that the display reads 100%. This allows the display to show the full scale of the relative battery capacity without affecting the accuracy obtained from the known starting point. The scale factor should be recalculated following each full charge cycle so that 100% is displayed when a full charge is reached.

Discharge the Battery

As the battery is discharged, the scaled capacity will continue to reflect the true relative capacity of the battery, as a percentage, as long as the scale factor remains constant. This allows for the actual ICA reading and the scaled capacity to converge to zero as the battery approaches the original discharged starting position. The scale factor should only be recalculated following a full charge.

Experiment

The following experiment was used to verify the above procedure.

In this experiment, a single Li-Ion cell, with a capacity of 1.3 Amp-hours and voltage of 4.1 volts was used with a sense resistor value of 37.5 mW. The battery was discharged until the cell voltage was 3.1 volts, which was used as the zero level in this experiment, and the ICA register was reset to 0%.

The Li-Ion cell was charged following a standard Li-Ion charging routine. Initially, a constant current of 1 C, or 1.3 Amps, was used to charge the cell until the cell voltage reached 4.1 volts. At that time, the charging changed to a constant voltage of 4.2 Volts. The constant voltage charge continued for 1.5 hours or until the charging current dropped below 20 mA. At this time, the cell was deemed fully charged and the scale factor was calculated accordingly.

A discharging routine was selected to simulate the discharge of a battery as used in a GSM cellular phone. The simulated GSM phone discharge cycle consisted of 5 minutes of standby time, where 1 mA was constantly drawn from the cell, followed by 5 minutes of conversation. The conversation consisted of a loop that was repeated every 4.7 milliseconds. The loop contained 4.124 milliseconds of a 160 mA discharge and .576 milliseconds of a 1.2 Amp discharge. After the 5 minute "call" was complete, the cycle began again with 5 minutes of standby discharging. The GSM discharge cycle continued until the cell voltage reached 3.1 volts.

Observations

Following the above procedure, the scaled relative capacity consistently tracked from 100% at full charge, to 0% when the cell voltage reached 3.1 volts as illustrated in Figure 1.

Figure 1: Fully Charged Discharge Cycle.
Figure 1: Fully Charged Discharge Cycle

The only error that was observed was that occasionally the ICA would reach zero one or two calls before the cell voltage reached 3.1 volts. However, reaching zero capacity a call or two early is much preferred over being late with the detection.

The above procedure provides very repeatable and reliable results in using the DS2437 as a gas gauge under conditions where a pack is fully charged and then fully discharged. The question then may arise as to what happens if a charge cycle is stopped short of a full charge, or charging begins before the battery is fully discharged, or a combination of the two.

Partial Charge

In the event that a battery does not receive a full charge before it is put into use and discharged, the scale factor should not be recalculated. Recalculating the scale factor is not recommended at this point because a full charge was not achieved and so it would not be accurate to report 100% when the battery has only received a partial charge. Rather, the scale factor from the previous full charge should be used.

To simulate the partial charge, a pack was initialized to the zero level of the pack and the ICA was set to 0%. Then the pack was charged as normal and the scale factor calculated when a full charge was reached, providing a full scale reference. The pack then was discharged down to the zero level and charging began again. However, before a full charge was achieved, the charging was stopped and then the standard discharge cycle began without recalculating the scale factor. The discharging continued until the zero level was reached. At that time, a new charge cycle was started and again was stopped short of a full charge. The stopping of charge occurred at various levels from ICA readings of 40% all the way up to a full charge.

This procedure produced similar results as to those obtained with a full charge/full discharge as illustrated in Figure 2. Additionally, using the previous scale factor provided for accurate tracking of the actual capacity for a partially charged battery.

Figure 2: Partially Charged Discharge Cycle.
Figure 2: Partially Charged Discharge Cycle

Partial Discharge

If a battery is not fully discharged before a charging cycle begins, no new action is required.

To simulate this event, a battery was initialized as described above to provide a full scale reference. Then a charging cycle took the battery to a full charge and a discharging cycle began. However, when the battery was discharged down to a level of 25%, a new charging cycle began and the battery was taken to full charge, at which point a new scale factor was calculated. The next discharge cycle was taken to the zero level to observe the tracking of the ICA. These two cycles were repeated one after the other.

This procedure again produced very accurate results. Each time the battery was discharged down to the zero level, the scaled capacity read less than 3% and thus accurately tracked the actual capacity of the battery over multiple full charge and partial discharge cycles. Figure 3 illustrates the ICA tracking down to the zero level on the cycle following a partial discharge.

Figure 3: Partially Discharged Discharge Cycle.
Figure 3: Partially Discharged Discharge Cycle

Partial Charge/Partial Discharge

The next procedure, and probably the most likely to be encountered in real life usage, is what occurs when a battery is not fully charged and then not fully discharged.

This procedure also began by initializing the battery with a full scale reference of a full charge and full discharge. Then a charge cycle began that stopped short of a full charge, and the scale factor was not recalculated. The battery was then discharged down to 25% and then charging began again. The next cycle again provided a partial charge, and then was discharged down to the zero level. These two cycles were repeated multiple times.

The results that this procedure produced were once again very reliable. At each full discharge, the zero level was reached with the scaled capacity reading less than 10% over several partial charge/partial discharge cycles. Figure 4 illustrates a full discharge following several partial charge and partial discharge cycles.

Figure 4: Partially Charged/Partially Discharged Discharge Cycle.
Figure 4: Partially Charged/Partially Discharged Discharge Cycle

Conclusion

In conclusion, the DS2437 Smart Battery Monitor can be used as a basic gas gauge by following the simple procedure described above. Begin with a discharged battery and an ICA set to zero, then the ICA register will track up and down and keep 0% as its zero level. To get the full range displayed, use a scale factor that is calculated at the end of each full charging cycle and the full range can be tracked accurately over many charge and discharge cycles, even when the battery is not fully charged or fully discharged. Occasionally it may be necessary to reestablish the zero level by fully discharging the battery and setting the ICA to 0%, to compensate for any shifting over time. Also, the scale factor should be recalculated each time a full charge is reached to present the full scale range of the battery's capacity.