APPLICATION NOTE 4043

Storing Fuel Gauge Parameters in the DS2784


Abstract: The DS2784 allows the user to customize the stand-alone fuel gauge to the exact requirements of the application and the cell being used. The parameters required are typically known in units such as mA, V, mAhrs, and mΩ. The DS2784 requires the parameters to be stored in units such as µV, µVhrs, and mhos. This application note describes the calculations involved in converting the typical units into units that are actually stored in the device.

Introduction

The DS2784 stand-alone fuel gauge is simple to use and very accurate, assuming that the correct parameters for the application have been stored in this device. It is very important to store the correct data in order to optimize the fuel gauge. The DS2784K provides an easy way to program the DS2784. The user can input cell characterization and other application data in units such as mA, V, mAhrs, and mΩ, as shown in Figure 1. The DS2784K then converts that data into the format that actually gets stored to the device, as shown in Figure 2. Application note 3463, "Getting Started with the DS2780" describes how to select all of the parameters that are stored in the DS2784. The following text describes the calculations involved in storing these parameters to the device.

Figure 1. The Application Units subtab of the Parameters Tab allows the use to enter application data in conventional units, such as mA, V, mAhrs, and m ohm.
Figure 1. The Application Units subtab of the Parameters Tab allows the user to enter application data in conventional units, such as mA, V, mAhrs, and mΩ.

Figure 2. The Device Units subtab of the Parameters Tab shows the parameters that are actually stored in the DS2784.
Figure 2. The Device Units subtab of the Parameters Tab shows the parameters that are actually stored in the DS2784.

Calculations

Figure 1 shows the parameters that are needed by the DS2784 to operate accurately as a fuel gauge. When the Write & Copy button is clicked, the DS2784K software converts the parameters into the format that is actually stored in the device, as shown in Figure 2. Those values are then written and copied into EEPROM Addresses 60h–7Fh.

The following sections show the calculations that are required to convert the application parameters into the actual values that are stored in the device at each address. The units used in the calculations are displayed such that AccBias_µV indicates that the Accumulation Bias Register is displayed in terms of µV, and AccBias_mA indicates the same value in terms of mA. The value to be programmed to each EEPROM address is shown as a hexadecimal value in the form ValueStored (EEPROM ADDRESS); each shown is a single byte. Example data in the following calculations come from the values in Figure 1 that are used in the equations, which supply the values in Figure 2.

Control Register (Address 60h)

The Control Register is stored in Address 60h and the bits are formatted as described in the DS2784 data sheet. No calculations are required.

Accumulation Bias Register (Address 61h)

The Accumulation Bias Register is used to estimate either battery currents that do not flow through the sense resistor or battery self-discharge. This is a signed register with an LSB value of 1.5625µV/RSNS. It is stored in Address 61h and has a range of -200.000µV to 198.4375µV. Assuming the sense resistor has a value of 20mΩ, the range is -10mA to 9.921875mA in 78.125µA steps.

AccBias_µV = AccBias_mA × SenseResistor_mΩ
AccBias_µV = 0.3125mA × 20.00mΩ
AccBias_µV = 6.25µV

Equation 1

Aging Capacity Register (Address 62/63h)

The Aging Capacity Register stores the rated capacity used in estimating the decrease in battery capacity during normal use. It is an unsigned register with an LSB value of 6.25µVhr/RSNS. It is stored in Addresses 62h and 63h, and it has a range of 0 to 409.59375mVhrs. Assuming the sense resistor has a value of 20mΩ, the range is 0 to 20479.68755mAhrs in 0.3125mAhrs steps.

AgingCapacity_µVhrs = AgingCapacity_mAhrs × SenseResistor_mΩ
AgingCapacity_µVhrs = 1220mAhrs × 20.00mΩ
AgingCapacity_µVhrs = 24,400µVhrs

Equation 2

Charge Voltage Register (Address 64h)

The Charge Voltage Register stores the charge voltage threshold used to detect a fully charged state. This is an unsigned register with an LSB value of 19.52mV. It is stored in Address 64h and has a range of 0 to 4.9776V.

Equation 3

Minimum Charge Current Register (Address 65h)

The Minimum Charge Current Register stores the charge current threshold that detects a fully charged state. This is an unsigned register with an LSB value of 50µV. It is stored in Address 65h and has a range of 0 to 12.75mV. Assuming the sense resistor has a value of 20mΩ, the range is 0 to 637.5mA in 2.5mA steps.

ChargeCurrent_µV = ChargeCurrent_mA × SenseResistor_mΩ
ChargeCurrent_µV = 80mA × 20.00mΩ
ChargeCurrent_µV = 1600µV

Equation 4

Active Empty Voltage Register (Address 66h)

The Active Empty Voltage Register stores the voltage threshold used to detect the Active Empty point. This is an unsigned register with an LSB value of 19.52mV. It is stored in Address 66h and has a range of 0 to 4.9776V.

Equation 5

Active Empty Current Register (Address 67h)

The Active Empty Current Register stores the discharge current threshold that detects the Active Empty point. This is an unsigned register with an LSB value of 200µV. It is stored in Address 67h and has a range of 0 to 51.2mV. Assuming the sense resistor has a value of 20mΩ, the range is 0 to 2560mA in 10mA steps.

AECurrent_µV = AECurrent_mA × SenseResistor_mΩ
AECurrent_µV = 240mA × 20.00mΩ
AECurrent_µV = 4800µV

Equation 6

Active Empty 40 Register (Address 68h)

The Active Empty 40 Register stores the Active Empty point value for +40°C (as shown in Figure 11 of the DS2784 data sheet). This is an unsigned register with an LSB value of parts per million of the Full point at +40°C. It is stored in Address 68h and has a range of 0 to 24.9% of the Full point for +40°C.

Equation 7

Sense Resistor Prime Register (Address 69h)

The Sense Resistor Prime (RSNSP) Register stores the value of the sense resistor that computes the absolute capacity results. This is an unsigned register with an LSB value of 1mhos. It is stored in Address 69h and has a range of 1mhos to 255mhos, which is 1Ω to 3.922mΩ.

Equation 8

Full 40 Register (Address 6A/6Bh)

The Full 40 Register stores the Full point value for +40°C (refer to Figure 11 of the DS2784 data sheet). This is an unsigned register with an LSB value of 6.25µVhr/RSNS. It is stored in Addresses 6Ah and 6Bh, and it has a range of 0 to 409.59375mVhrs/RSNS. Assuming the sense resistor has a value of 20mΩ, the range is 0 to 20479.6785mAhrs in 0.3125mAhr steps.

Full40_µVhrs = Full40_mAhrs × SenseResistor_mΩ
Full40_µVhrs = 1051mAhrs × 20.00mΩ
Full40_µVhrs = 21020µVhrs

Equation 9

Full Slopes (Address 6Ch–6Fh)

The Full point at +40°C is a stored value (Full 40), and the Full points at the other temperatures are calculated using the slope of the Full line (refer to Figure 4 in the DS2784 data sheet). The slope of the Full line between each of the programmable temperature points (T34, T23, T12) is stored as an unsigned byte in terms of ppm/°C. It is assumed that the Full point at +40°C is the highest point on the Full line. The Full line is reconstructed in one-degree increments such that the Full point at any temperature is always less than or equal to the Full point at the next higher temperature. The slope can range from 0 to 15564ppm/°C. Note: Only three temperature points are stored in the device, but a fourth point, T01, is required to calculate the slope of Full Segment 1.

The variables used in the following equations have the following meaning and format: Full Seg_4 Slope indicates the slope from the Full point at +40°C to the Full point at temperature T34. Full_40C_mAhrs signifies the Full point in mAhrs at +40°C. Full_T34_mAhrs indicates the Full point in mAhrs at temperature T34. T34 designates the temperature breakpoint in °C. The variables used in the other equations follow the same format.

Equation 10

Active Empty Slopes (Address 70h–73h)

The Active Empty line is reconstructed in a similar fashion as the Full line. The Active Empty point at +40°C is a stored value (Active Empty 40), and the Active Empty points at the other temperatures are calculated from the slope between each of the temperature breakpoints (T34, T23, T12). The slopes between each of the Active Empty points are stored as an unsigned byte in terms of ppm/°C. The Active Empty line is reconstructed in one-degree increments in such a way that the Active Empty point at any temperature is always greater than or equal to the Active Empty point at the next higher temperature. The slope can range from 0 to 15564ppm/°C. Note: Only three temperature points are stored in the device, but a fourth point, T01, is required to calculate the slope of AE Segment 1.

The variables used in the following equations have the following format and meaning: AE Seg_4 Slope indicates the slope from the Active Empty point at +40°C to the Active Empty point at temperature T34. AE_40C_mAhrs shows the Active Empty point in mAhrs at +40°C. AE_T34_mAhrs denotes the Active Empty point in mAhrs at temperature breakpoint T34. T34 indicates the temperature breakpoint in °C.

Equation 11

Standby Empty Slopes (Address 74h–77h)

The Standby Empty line is reconstructed in a similar fashion to the Full and Active Empty lines. The Standby Empty point at +40°C is fixed at zero. The Standby Empty points at the other temperatures are calculated from the slope between each of the temperature breakpoints (T34, T23, and T12). The slopes between each of the Standby Empty points are stored as an unsigned byte in terms of ppm/°C. The Standby Empty line is reconstructed in one-degree increments in such a way that the Standby Empty point at any temperature is always greater than or equal to the Standby Empty point at the next higher temperature. The slope can range from 0 to 15564ppm/°C. Note: Only three temperature points are stored in the device, but a fourth point, T01, is required to calculate the slope of SE Segment 1.

The variables used in the following equations have the following format and meaning: SE Seg_4 Slope indicates the slope from the Standby Empty point at +40°C (which is zero) to the Standby Empty point at temperature T34. SE_40C_mAhrs signifies the Standby Empty point in mAhrs at +40°C. SE_T34_mAhrs shows the Standby Empty point in mAhrs at temperature T34. T34 indicates the temperature breakpoint in °C.

Equation 12

Sense Resistor Gain Register (Address 78/79h)

The Sense Resistor Gain (RSGAIN) Register stores the calibration factor that produces accurate readings in the Current Register when a reference voltage is forced across SNS and VSS. This is an 11-bit value with an LSB value of 1/1024. It is stored in Addresses 78h and 79h, and it has a range of 0 to 1.999. The nominal value for this register is 1.000.

Equation 13

Sense Resistor Temperature Coefficient Register (Address 7Ah)
The Sense Resistor Temperature Coefficient (RSTCO) Register stores the temperature coefficient of the sense resistor. This is an 8-bit value with an LSB value of 30.5176ppm/°C. It is stored in Address 7Ah and has a range of 0 to 7782ppm/°C. A value of 0 disables the temperature-compensation function.

Equation 14

Current Offset Bias Register (Address 7Bh)

The Current Offset Bias register allows a programmable offset value to be added to raw current measurements. This is a signed register with an LSB value of 1.5625µV/RSNS. It is stored in Address 7Bh and has a range of -200.000µV to 198.4375µV. Assuming the sense resistor has a value of 20mΩ, the range is -10mA to 9.921875mA in 78.125µA steps.

OffsetBias_µV = OffsetBias_mA × SenseResistor_mΩ
OffsetBias_µV = -0.3125mA × 20.00mΩ
OffsetBias_µV = -6.25µV

Equation 15

Temperature Breakpoints (Address 7Ch–7Eh)

The Full, Active Empty, and Standby Empty lines (refer to Figure 4 in the DS2784 data sheet) are reconstructed using the slopes calculated above and three programmable temperature breakpoints (T34, T23, T12). These breakpoints are stored as signed registers with an LSB of +1°C and a range of -128°C to +40°C.

ValueStored (7Ch) = T34 = +18°C = 12h
ValueStored (7Dh) = T23 = 0°C = 00h
ValueStored (7Eh) = T12 = -12°C = F4h

Protection Threshold Register (Address 7Fh)

The Protection Threshold Register is stored in Address 7Fh, and the bits are formatted as described in the DS2784 data sheet. No calculations are required.

Conclusion

The DS2784 allows the user to customize the fuel gauge to the exact parameters of the application. However, the units stored in the device are not units that are commonly used. By following the calculations outlined in this application note, the more recognizable units can be converted into the units required by the DS2784.

Related Parts
DS2784 Free Sample
Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format
© , Maxim Integrated Products, Inc.
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.
APP 4043:
APPLICATION NOTE 4043,AN4043, AN 4043, APP4043, Appnote4043, Appnote 4043