The DS278x family of stand-alone fuel gauges—which includes the DS2780
, 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 accuracy of the current readings.
Each device is factory calibrated to meet the data-sheet-specified current accuracy. However, the current-measurement gain factor (RSGAIN) is also user accessible and can be reprogrammed to improve current-measurement accuracy after module or pack manufacture. Users can adjust RSGAIN to correct for variation in an external sense resistor's nominal value, thus allowing the use of low-cost, nonprecision current-sense resistors.
RSGAIN is a scaling factor that is used by the DS278x family of devices to accurately scale currents that are measured to flow across the sense resistor. Each device measures the current and then multiplies that value by the RSGAIN scaling factor to provide an accurate current measurement, which is reported in the current register and accumulated in the Accumulated Current Register (ACR).
Reported Current (mA) = Measured Current (mA) × RSGAIN
illustrates the RSGAIN Register format. RSGAIN is an 11-bit value stored in 2 bytes of the Parameter EEPROM Memory Block. The RSGAIN Register value can be adjusted from 0 to 1.999 in steps of 0.001 (precisely 2-10
). The MSb has a value weight of 1 and the LSb has a value weight of 1/1024 (or 2-10
Figure 1. The calculated RSGAIN value should be written to addresses 78h and 79h using the above RSGAIN Register format.
To make accurate current measurements that do not require gain adjustment, a device would need an RSGAIN value of 1.000. Typically, a device in the DS278x family has an RSGAIN value between 0.990 and 1.100 when it leaves the factory.
Table 1. Example RSGAIN Values and Associated Register Values
||XXXX X000 0000 0000
||XXXX X000 0000 0001
||XXXX X011 1111 0110
||XXXX X100 0000 0000
||XXXX X100 0000 1010
||XXXX X100 0001 0100
||XXXX X100 0001 1111
||XXXX X100 0010 1001
||XXXX X100 0011 0011
||XXXX X111 1111 1111
The user must program RSGAIN cautiously to ensure accurate current measurement. When shipped from the factory, the gain calibration value is stored in two separate locations in the Parameter EEPROM Block: RSGAIN (reprogrammable) and FRSGAIN (read only). RSGAIN determines the gain used in the current measurement. The read-only FRSGAIN is provided to preserve the factory value only and is not used in the current measurement. In the event that an incorrect value is inadvertently written to the RSGAIN register, the FRSGAIN value can be used to recover the original RSGAIN value.
In order to calculate an RSGAIN value, an accurate reference current must be forced across the sense resistor. The reference current should be divided by the current reported by the device. The ratio of reference current to reported current should then be multiplied by the existing RSGAIN value to determine the new RSGAIN value.
For example, if precisely 500mA is forced across the sense resistor and the DS278x reports a current of 495mA with an RSGAIN value of 1.02637, then the new RSGAIN value will be 1.03674.
The RSGAIN value that is calculated should be written to Addresses 78h and 79h, as shown in Figure 1, and then copied into EEPROM. This ensures that the current reported by the DS278x device matches the reference current that is forced across the sense resistor.
The RSGAIN value can be reprogrammed by the customer to improve current-measurement accuracy after module or pack manufacture. This calibration allows the DS278x family of stand-alone fuel gauges to use a low-cost, nonprecision current-sense resistor, while ensuring that current measurements are as accurate as possible.