APPLICATION NOTE 4188

Calibrating the Current Offset Bias (COB) Register for the DS278x Family of Fuel Gauges


Abstract: The DS278x family of stand-alone fuel gauges provides an accurate estimation of the remaining capacity available in rechargeable lithium-ion or lithium-polymer batteries. These fuel gauges contain a current offset bias (COB) register that can be utilized by the designer to eliminate the inherent offset introduced by the IC's current ADC. Improper calibration of this register, however, can decrease the accuracy of the current measurements, especially at low currents. This application note describes a step-by-step approach for properly calibrating the DS278x within the fully assembled battery pack in order to determine the correct value that should be placed into the COB register.

Introduction

The DS278x family of stand-alone fuel gauges—which includes the DS2781, DS2784, and DS2788—provides an accurate estimation of the remaining capacity that is available in rechargeable lithium-ion or lithium-polymer batteries. The accuracy of the fuel gauge is determined by the cell characteristics and application parameters that are stored in EEPROM, as well as the the accuracy of the current readings.

Each device contains a current offset bias (COB) register that allows the designer to eliminate inherent offset introduced by the IC's current ADC. The advantages of high-accuracy fuel gauging can be completely negated by the improper calibration of the device. This application note provides an example of how to properly calibrate the COB register of a DS278x.

Description

The current ADC of the DS278x family is extremely sensitive. It is capable of measuring a voltage drop of only 1.5625µV across the sense resistor. This kind of accuracy can only be achieved by calibrating the current measurement after the cell pack is assembled. COB is an offset value that is added to the current that is measured by the DS278x family of devices and, then, accumulated into the accumulated current register (ACR), as shown in Equation 1.

Reported Current (mA) = Measured Current (mA) + Current Offset Bias (mA)(Eq. 1)

Figure 1 illustrates the COB register format. COB is an 8-bit, two's complement value stored in 1 byte of the parameter EEPROM memory block. The COB register value can be adjusted from -199.68µV to +198.12µV in steps of 1.5625µV.

Figure 1. The calculated COB value should be written to addresses 7Bh using the above COB register format.
Figure 1. The calculated COB value should be written to address 7Bh using the above COB register format.

To make accurate current measurements that do not require an offset adjustment, a device would need a COB value of 0. Typically, a device in the DS278x family has a COB value of 0 when it leaves the factory.

There can be slight variations in the current offset of the device across the temperature and voltage range of the application. Therefore, it is recommended to calibrate the offset at the average temperature and voltage of the application. For example, a cell phone or PDA would spend the majority of its time at approximately +25°C and 3.8V, which would be room temperature and the midrange of the cell voltage. The following example lists the steps to calibrate the DS278x in-circuit.

  1. Initialize the offset register
    It is recommended to start by writing the COB register to 0x00h. The user may select a different offset value as a starting point without affecting the accuracy of the calibration. The starting offset value will need to be noted when determining the new offset value. For this example, it will be assumed that 0x00h is used as the starting point.

    Write 0x00h to the COB register 1 byte

  2. Verify that no current is flowing
    In most cases, disabling the protection FETs will cut off any current flowing into or out of the battery pack. However, some power supplies or loads that may be connected across the battery pack will have small leakage currents that will affect the accuracy of the offset calibration. This leakage can be detected by calibrating the offset with and without the load connected. If a different value for the offset is calculated in the two tests, then the load needs to be physically removed or disconnected through a switching relay prior to calibration.

  3. Read the current register
    The device samples the current flowing across the sense resistor at 18.6kHz and updates the current register at the completion of each conversion cycle, which is every 3.52 seconds. Therefore, it is recommended to wait at least 7.04 seconds before reading the current register to make sure that there are not any current samples included in the conversion cycle from before the FETs were opened and the load removed.

    Wait 7.04 seconds Wait for current conversion
    Read the current register 2 bytes

  4. Determine the new COB value
    The COB is added to the measured current (as shown in Eq. 1); therefore, the opposite of the value of the current register should be written to the COB register to remove the offset. The current register and the COB register have the same LSb value (1.5625µV), so finding the new value is simple.

    For example, if reading the current register reveals a current of +4.6875µV (+3 LSbs), then simply write -4.6875µV (-3 LSbs) to the COB register.

  5. Write and copy the new COB value
    The value that was determined in Step 4 should then be written to the COB register (Address 0x7Bh) in two's complement format and copied to EEPROM. The COB value for this example is -3 LSbs, so the two's complement value is 0xFDh.

    Write the new value to the COB register 1 byte
    Perform EEPROM copy on Block 1  

  6. Verify accuracy
    With the new value in the COB register, Steps 2 and 3 may be repeated to verify the accuracy of the calibration.

Conclusion

The COB register value can be programmed by the customer to improve current-measurement accuracy after module or pack manufacture. The current offset calibration allows the DS278x family of stand-alone fuel gauges to be as accurate as possible. The DS278x devices also contain a current gain register (RSGAIN) that can be used to improve the accuracy of the current readings, as described in application note 4114, "Calibrating RSGAIN for the DS278x Family of Fuel Gauges." It is important to calibrate the COB of the current register before calibrating the RSGAIN.