19-4637; 5/09 DS2786 Stand-Alone OCV-Based Fuel Gauge www.maxim-ic.com GENERAL DESCRIPTION FEATURES The DS2786 estimates available capacity for rechargeable Li-Ion and Li-Ion Polymer batteries based on the cell voltage in the open-circuit state following a relaxation period. The open-circuit voltage (OCV) is used to determine relative cell capacity based on a lookup table stored in the IC. This capability makes accurate capacity information available immediately after a battery pack is inserted. During periods of moderate to high rate discharging, which preclude OCV measurements, the DS2786 uses coulomb counting as a secondary means of estimating relative capacity. Remaining capacity is reported in percent, along with cell voltage, current and temperature information. Cell characteristics and application parameters used in the calculations are stored in on-chip EEPROM. The DS2786 is intended for use on the host side of portable devices, though it can also be mounted within a battery pack. Measurement and estimated 2 capacity data are accessed through an I C interface. Temperature data is available from an on-die sensor. Resistance measurements of a pack identification resistor and pack thermistor are supported by ratiometric measurements on two auxiliary inputs. APPLICATIONS Relative Capacity Calculated from Combination Coulomb Counter and OpenCircuit Cell Voltage (OCV) Battery Model Accurate Warning of Low Battery Conditions Even On First Cycle (No Learn Cycle Needed) 12-Bit Battery Voltage Measurement: ±10mV Accuracy 1.22mV LSB, 0V to 4.5V Input Range 11-Bit Bidirectional Current Measurement: 25V LSB, ±51.2mV Dynamic Range 1.67mA LSB, ±3.4A (RSNS = 15m) Current Accumulation Measurement Resolution: ±204.8mVh Range ±13.65Ah (RSNS = 15m) Internal Temperature Measurement: 0.125°C LSB, ±3°C Accuracy Two 11-Bit Aux Input Voltage Measurements: ±8 LSB Accuracy, Ratiometric Inputs Eliminate Supply Accuracy Issues VOUT Pin Drives Resistive Dividers, Reduces Current Consumption 2-Wire Interface Low Power Consumption: Active Current: 50A typ, 80A max Sleep Current: 1A typ, 3A max ORDERING INFORMATION 3G Multimedia Wireless Handsets Digital Still Cameras Digital Audio (MP3) Players PART DS2786G+ DS2786G+T&R TYPICAL OPERATING CIRCUIT TEMP RANGE -20ºC to +70ºC -20ºC to +70ºC PIN-PACKAGE 10 TDFN-EP* 10 TDFN-EP* +Denotes a lead(Pb)-free/RoHS-compliant package. T&R = Tape and reel. *EP = Exposed pad. PIN CONFIGURATION 3mm x 3mm TDFN-10 Top View Commands, Registers, and Modes are capitalized for clarity. 1 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge ABSOLUTE MAXIMUM RATINGS Voltage Range on All Pins Except VPROG Relative to VSS Voltage Range on VPROG Relative to VSS Operating Temperature Range Storage Temperature Range Soldering Temperature -0.3V to +6V -0.3V to +18V -40°C to +85°C -55°C to +125°C Refer to the IPC/JEDECJ-STD-020 Specification. This is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operation sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods of time may affect reliability. RECOMMENDED DC OPERATING CONDITIONS (2.5V VDD 4.5V, TA = -20C to +70C.) PARAMETER Supply Voltage Data I/O Pins Programming Pin VIN, AIN0, AIN1 Pin SYMBOL VDD SCL, SDA VPROG VIN, AIN0, AIN1 CONDITIONS MIN (Note 1) (Note 1) (Note 1) +2.5 -0.3 -0.3 (Note 1) -0.3 TYP MAX UNITS +4.5 +4.5 +15.5 V V V VDD + 0.3 V DC ELECTRICAL CHARACTERISTICS (2.5V VDD 4.5V, TA = -20C to +70C, unless otherwise noted.) PARAMETER Active Current Sleep-Mode Current Current Measurement Resolution Current Measurement Full-Scale Magnitude Current Measurement Offset Error Current Measurement Gain Error Timebase Accuracy Voltage Error Input Resistance VIN, AIN0, AIN1 SYMBOL CONDITIONS IACTIVE TYP 50 MAX 75 UNITS A VDD = 2.0V, SCL, SDA = VSS 0.3 1.0 SCL, SDA = VSS 1 3 ILSB DS2786 25 V IFS (Note 1) ±51.2 mV ISLEEP IOERR +50 V -1.5 +1.5 % of reading VDD = 3.6V at +25°C -1 +1 TA = 0C to +70C -2 +2 TA = -20C to +70C -3 +3 VDD = VIN = 3.6V, TA = 0C to +50C -10 +10 TA = -20C to +70C -20 +20 IGERR tERR VGERR A -50 DS2786 (Note 2) MΩ -8 IO = 1mA +8 VDD - 0.5 2 of 22 % mV 15 RIN AIN0, AIN1 Error VOUT Output Drive MIN LSB V DS2786 Stand-Alone OCV-Based Fuel Gauge PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS 13.7 14.2 ms +3 °C VOUT Precharge Time tPRE 13.2 Temperature Error TERR -3 Input Logic High: SCL, SDA Input Logic Low: SCL, SDA Output Logic Low: SDA Pulldown Current: SCL, SDA VPROG Pulldown Input Capacitance: SCL, SDA Bus Low Timeout EEPROM Programming Voltage EEPROM Programming Current EEPROM Programming Time EEPROM Copy Endurance VIH (Note 1) 1.4 V VIL (Note 1) 0.6 V VOL IOL = 4mA (Note 1) 0.4 V IPD VDD = 4.2V, VPIN = 0.4V 1.0 A 0.2 RVPROG 20 50 pF 1.5 2.2 S 14 15 V 2 mA 14 ms CBUS tSLEEP (Note 3) VPROG IPROG 3.1 tPROG kΩ 100 writes ELECTRICAL CHARACTERISTICS: 2-WIRE INTERFACE (2.5V VDD 4.5V, TA = -20C to +70C.) PARAMETER SCL Clock Frequency SYMBOL fSCL Bus Free Time Between a STOP and START Condition Hold Time (Repeated) START Condition tHD:STA Low Period of SCL Clock High Period of SCL Clock CONDITIONS (Note 4) MIN 0 tBUF TYP MAX UNITS 400 kHz 1.3 µs 0.6 µs tLOW 1.3 µs tHIGH 0.6 µs Setup Time for a Repeated START Condition tSU:STA 0.6 µs Data Hold Time tHD:DAT (Notes 6, 7) Data Setup Time tSU:DAT (Note 6) Rise Time of Both SDA and SCL Signals Fall Time of Both SDA and SCL Signals Setup Time for STOP Condition (Note 5) 0 0.9 100 µs ns tR 20 + 0.1CB 300 ns tF 20 + 0.1CB 300 ns tSU:STO 0.6 3 of 22 µs DS2786 Stand-Alone OCV-Based Fuel Gauge PARAMETER Spike Pulse Widths Suppressed by Input Filter Capacitive Load for Each Bus Line SCL, SDA Input Capacitance Note 1: Note 2: Note 3: Note 4: Note 5: Note 6: Note 7: Note 8: Note 9: SYMBOL CONDITIONS tSP (Note 8) CB (Note 9) MIN 0 CBIN TYP MAX UNITS 50 ns 400 pF 60 pF All voltages are referenced to VSS. Offset specified after auto-calibration cycle and Current Offset Bias Register = 00h. The DS2786 enters the Sleep mode 1.5s to 2.2s after (SCL < VIL) AND (SDA < VIL). Timing must be fast enough to prevent the DS2786 from entering Sleep mode due to bus low for period > tSLEEP. fSCL must meet the minimum clock low time plus the rise/fall times. The maximum tHD:DAT has only to be met if the device does not stretch the LOW period (tLOW) of the SCL signal. This device internally provides a hold time of at least 100ns for the SDA signal (referred to the VIHmin of the SCL signal) to bridge the undefined region of the falling edge of SCL. Filters on SDA and SCL suppress noise spikes at the input buffers and delay the sampling instant. CB—total capacitance of one bus line in pF. Figure 1. 2-Wire Bus Timing Diagram 4 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge PIN DESCRIPTION PIN 1 2 NAME AIN1 AIN0 3 SCL 4 SDA 5 6 SNS VSS 7 VPROG 8 VOUT 9 VIN 10 VDD PAD PAD FUNCTION Aux Voltage Input Number 1 Aux Voltage Input Number 0 Serial Clock Input. Input only 2-wire clock line. Connect this pin to the clock signal of the 2-wire interface. This pin has a 0.2µA typical pulldown to sense disconnection. Serial Data Input/Output. Open drain 2-wire data line. Connect this pin to the clock signal of the 2-wire interface. This pin has a 0.2µA typical pulldown to sense disconnection. Current-Sense Input. Connect to the handset side of the sense resistor. Device Ground. Connect to the battery side of the sense resistor. EEPROM Programming Voltage Input. Connect to external supply for production programming. Connect to VSS during normal operation. Voltage Out. Supply for Aux Input Voltage Measurement Dividers. Connect to high side of resistor divider circuits. Battery Voltage Input. The voltage of the cell pack is measured through this pin. Power-Supply Input. 2.5V to 4.5V input range. Connect to system power through a decoupling network. Exposed Pad. Connect to VSS. VIN AIN0 Figure 2. Block Diagram 5 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge DESCRIPTION The DS2786 provides current-flow, voltage, and temperature measurement data to support battery-capacity monitoring in cost-sensitive applications. Current is measured bidirectionally over a dynamic range of ±51.2mV with a resolution of 25µV. Assuming a 15m sense resistor, the current sense range is ±3.4A, with a 1 LSB resolution of 1.667mA. Current measurements are performed at regular intervals and accumulated with each measurement to support “coulomb counting” during periods of host power consumption. Each current measurement is reported with sign and magnitude in the two-byte Current Register. Battery voltage measurements are reported in the two-byte Voltage Register with 12-bit (1.22mV) resolution, and auxiliary voltage measurements are reported in the two-byte Aux Volt Registers with 11-bit resolution. Additionally, the Temperature Register reports temperature with 0.125ºC resolution and ±3ºC accuracy from the on-chip sensor. The on-chip temperature measurement is optional and replaces the auxiliary voltage channel AIN1. The DS2786 provides accurate relative capacity measurements during periods of host system inactivity by looking at cell open circuit voltage. Cell capacity is calculated using an OCV voltage profile and a 1-byte scale factor to weight accumulated current during the coulomb-counting periods. The OCV voltage profile and scale factor are stored in EEPROM memory. The EEPROM memory is constructed with a SRAM shadow so that the OCV voltage profile and scale factor can be overwritten by the host to accommodate a variety of cell types and capacities from 2 multiple cell vendors. The I C interface also allows read/write access to the Status, Configuration, and Measurement Registers. Figure 3. Application Example 6 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge POWER MODES The DS2786 operates in one of two power modes: Active and Sleep. While in Active mode, the DS2786 operates as a high-precision battery monitor with temperature, voltage, auxiliary inputs, current, and accumulated current measurements acquired continuously and the resulting values updated in the Measurement Registers. In Sleep mode, the DS2786 operates in a low-power mode with no measurement activity. Read and write access is allowed to all registers in either mode. The DS2786 operating mode transitions from Sleep to Active when: ( SCL > VIH ) OR ( SDA > VIH ) The DS2786 operating mode transitions from Active to Sleep when: SMOD = 1 AND [ ( SCL < VIL ) AND ( SDA < VIL ) ] for tSLEEP CAUTION: If SMOD = 1, a pullup resistor is required on SCL and SDA in order to ensure that the DS2786 transitions from Sleep to Active mode when the battery is charged. If the bus is not pulled up, the DS2786 remains in Sleep and cannot accumulate the charge current. This caution statement applies particularly to a battery that is charged on a stand-alone charger. PARAMETER MEASUREMENT The DS2786 uses a Sigma Delta A/D converter to make measurements. The measurement sequence shown in Figure 4 repeats continuously while the DS2786 is in Active mode. The VOUT pin is activated tPRE before the AIN0 and AIN1 conversion to allow for the VOUT output voltage to settle. The DS2786 can be configured to measure temperature using its on-chip sensor instead of the AIN1 input. When the internal temperature measurement uses the AIN1 conversion timeslot, VOUT is not activated. A full sequence of voltage measurements nominally takes 1760ms to complete. Figure 4. Measurement Sequence 7 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge VOLTAGE MEASUREMENT Battery voltage is measured at the VIN input with respect to VSS over a range of 0V to 4.5V and with a resolution of 1.22mV. The result is updated every 880ms and placed in the Voltage Register in two’s complement form. Voltages above the maximum register value are reported as 7FFFh. Figure 5. Voltage Register Format MSB—Address 0Ch S 211 210 29 28 LSB—Address 0Dh 27 26 MSb 25 24 LSb 23 22 21 20 X X MSb X LSb Units: 1.22mV “S”: sign bit(s), “X”: reserved The input impedance of VIN is sufficiently large (>15MΩ) to be connected to a high-impedance voltage divider in order to support multiple-cell applications. The pack voltage should be divided by the number of series cells to present a single-cell average voltage to the VIN input. Every 1024th conversion, the ADC measures its input offset to facilitate offset correction to improve voltage accuracy. Offset correction occurs approximately every 15 minutes. The resulting correction factor is applied to the subsequent 1023 measurements. During the offset correction conversion, the ADC does not measure the VIN signal. The voltage measurement just prior to the offset conversion is displayed in the voltage register. The OCV algorithm automatically adjusts for the effects of the offset correction cycle. AUXILARY INPUT MEASUREMENTS The DS2786 has two auxiliary voltage measurement inputs, AIN0 and AIN1. Both are measured with respect to VSS. These inputs are designed for measuring resistor ratios, particularly useful for measuring thermistor or pack identification resistors. Prior to the beginning of a measurement cycle on AIN0 or AIN1, the VOUT pin outputs a reference voltage in order to drive a resistive divider formed by a known resistor value, and the unknown resistance to be measured. This technique delivers good accuracy at a reasonable cost, as it removes reference tolerance from the error calculations. Measurements alternate between each input. Each auxiliary measurement is therefore updated every 1760ms and placed in the corresponding AIN0 or AIN1 Register in two’s complement form. Figure 6. Auxiliary Input Registers Format MSB—Address 08h AIN0 S 210 29 28 27 26 LSB—Address 09h 25 MSb 24 23 LSb 22 21 20 S 29 28 27 MSb X X LSb Units: VOUT × 1/2047 MSB—Address 0Ah 210 X MSb “S”: sign bit, “X”: reserved AIN1 X 26 LSB—Address 0Bh 25 24 23 LSb MSb 22 21 20 X X X X LSb Units: VOUT × 1/2047 “S”: sign bit, “X”: reserved 8 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge TEMPERATURE MEASUREMENT The DS2786 uses an integrated temperature sensor to measure battery temperature with a resolution of 0.125°C. Temperature measurements are updated every 1760ms and placed in the Temperature Register in two’s complement form. The format of the Temperature Register is shown in Figure 7. The ITEMP bit in the Status/Configuration Register must be set to enable the internal temperature measurement instead of the AIN1 measurement. Figure 7. Temperature Register Format MSB—Address 0Ah S 29 28 27 26 25 LSB—Address 0Bh 24 MSb 23 22 LSb 21 20 X X X X MSb X LSb Units: 0.125C “S”: sign bit(s), “X”: reserved CURRENT MEASUREMENT In the Active mode of operation, the DS2786 continually measures the current flow into and out of the battery by measuring the voltage drop across a low-value current-sense resistor, RSNS, connected between the SNS and VSS pins. The voltage sense range between SNS and VSS is ±51.2mV. Note that positive current values occur when VSNS is less than VSS, and negative current values occur when VSNS is greater than VSS. Peak signal amplitudes up to 102mV are allowed at the input as long as the continuous or average signal level does not exceed ±51.2mV over the conversion cycle period. The ADC samples the input differentially and updates the Current Register every 880ms at the completion of each conversion cycle. Figure 8 describes the Current Measurement Register format and resolution for each option. Charge currents above the maximum register value are reported at the maximum value (7FFFh = +51.2mV). Discharge currents below the minimum register value are reported at the minimum value (8000h = -51.2mV). Every 1024th conversion, the ADC measures its input offset to facilitate offset correction to improve Current accuracy. Offset correction occurs approximately every 15 minutes. The resulting correction factor is applied to the subsequent 1023 measurements. During the offset correction conversion, the ADC does not make a measurement. The current measurement just prior to the offset conversion is displayed in the Current Register. Figure 8. Current Register Formats MSB—Address 0Eh S 210 MSb “S”: sign bit 29 28 27 LSB—Address 0Fh 26 25 24 23 LSb MSb 9 of 22 22 21 20 X X X X LSb Units: 25V/RSNS DS2786 Stand-Alone OCV-Based Fuel Gauge Table 1. Current Range and Resolution for Various RSNS Values CURRENT RESOLUTION (1 LSB) RSNS |VSS - VSNS| 20m 1.25mA 25V 15m 1.667mA 10m 2.5mA 5m 5mA CURRENT INPUT RANGE RSNS VSS - VSNS 20m ±2.56A ±51.2mV 15m ±3.41A 10m ±5.12A 5m ±10.24A CURRENT OFFSET BIAS The Current Offset Bias Register (COBR) allows a programmable offset value to be added to raw current measurements. The result of the raw current measurement plus the COBR value is displayed as the current measurement result in the Current Register, and is used for current accumulation and detection of an OCV condition. The COBR value can be used to correct for a static offset error, or can be used to intentionally skew the current results and therefore the current accumulation. Read and write access is allowed to COBR. Whenever the COBR is written, the new value is applied to all subsequent current measurements. COBR can be programmed in 25V steps to any value between +3.175mV and -3.2mV. The COBR value is stored as a two’s complement value in nonvolatile (NV) memory. The COBR factory default value is 00h. Figure 9. Current Offset Bias Register Format Address 60h S 26 MSb “S”: sign bit 25 24 23 22 Units: 21 20 LSb 25V/RSNS CURRENT ACCUMULATION An Internal Accumulated Current Register (IACR) serves as an up/down counter holding a running count of charge since the last OCV condition. Current measurement results, plus a programmable bias value are internally summed, or accumulated, at the completion of each current measurement conversion period. The IACR has a range of ±204.8mVh. The IACR uses the Initial or Learned Cell Capacity Registers to increment or decrement the Relative Capacity Register as current flows into or out of the battery. In this way, the fuel gauge is accurate even when an OCV condition does not occur for an extended time period. Table 2. Accumulated Current Range for Various RSNS Values IACR RANGE VSS - VSNS ±204.8mVh RSNS 20m ±10.24Ah 15m ±13.65Ah 10 of 22 10m ±20.48Ah 5m ±40.96Ah DS2786 Stand-Alone OCV-Based Fuel Gauge CELL CAPACITY ESTIMATION The DS2786 uses a hybrid OCV measurement and coulomb counting algorithm to estimate remaining cell capacity. During periods of charging or discharging of the cell, the DS2786 counts charge flow into and out of the cell. When the application becomes inactive, the DS2786 waits for the cell voltage to relax and then adjusts the coulomb count based on an open-circuit voltage cell model stored in device EEPROM. The resulting calculation is reported to the system as a percentage value between 0% and 100%. As the cell ages, a Learn feature adjusts for changes in capacity. The Relative Capacity Register reports remaining cell charge as a percentage of full. Relative Capacity is reported with a resolution of 0.5% and is limited to a value between 0% and 100%. The Relative Capacity Register is updated each time the IC performs a current measurement or open-circuit cell voltage measurement. Figure 10. Relative Capacity Register Format Address 02h 27 26 25 24 23 22 MSb 21 20 LSb Units: 0.5% Prior to the first Learn operation, the Relative Capacity value is calculated by adding the IACR multiplied by the Initial Capacity Scaling Factor (7Ah) to the Last OCV Relative Capacity (16h). After the first Learn operation, the Relative Capacity value is calculated by adding the IACR multiplied by the Learned Capacity Scaling Factor (17h) to the Last OCV Relative Capacity (16h). Each Capacity Scaling Factor Register has a resolution of 78.125%/Vh and a maximum range of 0 to 19921.875%/Vh. During assembly, the Initial Capacity Register should be programmed to the capacity of the cell. For example, an application using a 1Ah cell and 0.015 sense resistor would set the Initial Capacity Register to a value of (100% ÷ (1Ah × 0.015)) ÷ 78.125%/Vh = 55h. The Learned Capacity Scaling Factor Register is controlled by the DS2786. The power up value is 00h, and the register is updated with the calculated new cell capacity value after every Learn operation. Figure 11. Initial Capacity Scaling Factor Register Format Address 7Ah 27 26 25 24 MSb 23 22 21 20 LSb Units: 78.125%/Vh Figure 12. Learned Capacity Scaling Factor Register Format Address 17h 27 26 25 24 MSb 23 22 21 20 LSb Units: 78.125%/Vh 11 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge OCV DETECTION AND CURRENT BLANKING The Blanking/OCV Threshold Register sets the current measurement level at which the DS2786 switches between coulomb counting and open-circuit voltage measurement. When the magnitude of the measured current (after COBR is applied) is less than the value defined by the Blanking/OCV Threshold Register, the measurement is not summed into the IACR. Instead, the IACR is maintained at its present value and the DS2786 begins dV/dt measurement evaluation to detect an OCV voltage condition. A threshold value that is below the minimum operational current, but above the maximum idle current of the application should be selected. The Blanking/OCV Threshold Register has a resolution of 25V/RSNS, and a range from 0mV/RSNS to 6.375mV/RSNS. The factory default value is 06h Figure 13. Blanking/OCV Threshold Register Format Address 7Bh 27 26 25 24 23 MSb 22 21 20 LSb Units: 25V/RSNS While the measured current is below the Blanking/OCV Threshold level, the DS2786 actively searches for a relaxed cell by calculating the change in cell voltage as reported in the Voltage Register over 15 minute intervals (dV/dt). If the 15 minute dV/dt change of the Voltage Register is less than the value stored in the OCV dV/dt Threshold Register, the DS2786 determines that the cell is now in a relaxed state and the Relative Capacity Register is adjusted based on the OCV cell model stored in parameter EEPROM. This operation will occur repeatedly every 15 minutes until the DS2786 returns to coulomb-counting mode of operation. The OCV dV/dt Threshold Register has a resolution of 1.22mV/15min and a range from 0mV/15min to 18.3mV/15min. The factory default value is 3.66mV/15min. Note that the upper 4 bits of the OCV dV/dt Threshold Register are used to EEPROM back bits from the Status/Configuration Register. Figure 14. OCV dV/dt Threshold Register Format Address 7Ch SMOD LDIS VODIS ITEMP MSb 23 22 21 20 LSb Units: 1.22mV/15min 12 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge OCV CELL MODEL The OCV cell model is a 9-point piece-wise linear approximation of open circuit cell voltage versus the remaining capacity of the cell. Whenever an OCV update occurs, the Relative Capacity Register is adjusted to a new value based on the OCV voltage reading and a linear approximation of the table values. Figure 15 shows the factorydefault cell model stored in EEPROM. Figure 15. Default OCV Cell Model 4.2 Breakpoint 7 4.087V 90.5% Breakpoint 4 3.831V 52.5% 4 Breakpoint 2 3.673V 10% Breakpoint 8 4.171V 100% Breakpoint 6 4.042 85% Breakpoint 5 4.005 80% 3.8 3.6 Breakpoint 3 3.752 25% Breakpoint 1 3.619V 5% 3.4 3.2 Breakpoint 0 3.186V 0% 3 100% 80% 60% 40% 20% 0% The OCV cell model can be modified by changing the Capacity and Voltage Breakpoint Registers in EEPROM. Capacity 0 is fixed at 0% and cannot be changed. Capacity 1 through Capacity 7 are stored with 0.5% resolution at addresses 61h through 67h respectively. Capacity values must be monotonic (Capacity 1 > Capacity 0, Capacity 2 > Capacity 1, etc.), but otherwise can be written to any value between 0.5% to 99.5%. Capacity 8 is fixed at a value of 100% and cannot be changed. Voltage breakpoints require two bytes per breakpoint, but are otherwise stored in a similar manner. Voltage Breakpoint 0: MSB stored at address 68h, LSB stored at address 69h. Other voltage breakpoints stored sequentially through address location 79h. Each voltage breakpoint has a resolution of 1.22mV, and a range from 0.0V to 4.996V (IC operation limited to 4.5V). Voltage breakpoint values must also be monotonic. Figure 16. Capacity 1 to Capacity 7 Registers Format Address 61h–67h 27 26 25 24 MSb 23 22 21 20 LSb Units: 0.5% 13 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge Figure 17. Voltage Breakpoint Register Format MSB—Even Addresses 68h–78h 211 210 29 28 27 26 25 MSb LSB—Odd Address 69h–79h 24 LSb 23 22 21 20 X X X MSb X LSb Units: 1.22mV “X”: reserved INITIAL CAPACITY ESTIMATION The DS2786 calculates Relative Capacity immediately upon power up. During initialization, the DS2786 makes a voltage measurement and uses the OCV cell model data to determine a starting point for the Relative Capacity Register. This estimation occurs regardless of the load on the cell. Any error induced from cell loading will be removed at the next OCV adjustment. The initial voltage measurement used in determining the starting point is stored in the Initial Voltage Register until the IC is power cycled. Figure 18. Initial Voltage Register Format MSB—Address 14h S 211 210 29 28 MSb 27 LSB—Address 15h 26 25 LSb 24 MSb 23 22 21 20 X X X LSb Units: 1.22mV “S”: sign bit(s), “X”: reserved NEW CAPACITY LEARNING As the cell ages, the Initial Capacity Scaling Factor Register value may no longer accurately reflect the true capacity of the cell causing error in Relative Capacity calculation while in coulomb-counting mode of operation. The DS2786 has a learn feature that allows the IC to remain accurate as the cell changes. The DS2786 compares the percent Relative Capacity difference between the last two OCV updates to the change in the coulomb count to learn the new cell capacity. The Last OCV Register maintains the Relative Capacity percentage at the previous OCV adjustment point used for learning the new cell capacity. Last OCV will be updated with a new value at each OCV adjustment. Example: Assuming a 15m sense resistor, the DS2786 adjusts the Relative Capacity of a 1000mAH cell to 10% based on an OCV measurement during an idle period of the application. The cell is then charged by 500mAH (to 60% expected) based on the internal coulomb count multiplied by the Learned Capacity Scaling Factor value of 55h. The next OCV adjustment determines the Relative Capacity should actually be at 65%, not 60%. The DS2786 then adjusts the Learned Capacity Scaling Factor value upward to (65% - 10%) ÷ (500mAH × 0.015Ω) = 5Eh lowering the expected cell capacity by approximately 10%. 14 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge Figure 19. Last OCV Register Format Address 16h 27 26 25 24 23 22 21 MSb Units: 20 LSb 0.5% The Learn Delta Percent Threshold allows the application to select how large of a cell capacity change is required before the new cell capacity value is learned. The difference between the present OCV measurement and the Last OCV measurement must be greater than the Learn Delta Percent Threshold value for a Learn to occur. This prevents IC measurement resolution from adding error to the Learned Cell Capacity value. It is recommended this register be set to a value of at least 50%. Figure 20. Learn Delta Percent Threshold Address 7Eh 27 26 25 24 23 22 21 MSb Units: 20 LSb 0.5% MEMORY MAP The DS2786 has memory space with registers for instrumentation, status, and control. When the MSB of a twobyte register is read, both the MSB and LSB are latched and held for the duration of the read data command to prevent updates during the read and ensure synchronization between the two register bytes. For consistent results, always read the MSB and the LSB of a two-byte register during the same read data command sequence. Memory locations 60h through 7Fh are EEPROM storage locations. EEPROM memory is shadowed by RAM to eliminate programming delays between writes and to allow the data to be verified by the host system before being copied to EEPROM. The Read Data and Write Data protocols to/from EEPROM memory addresses access the shadow RAM. Setting the RCALL bit in the Command Register (FEh) initiate data transfer from the EEPROM to the shadow RAM. Setting the COPY bit in the Command Register initiates data transfer from the shadow RAM to the EEPROM. An external voltage supply must be provided on the VPROG pin prior to writing the COPY bit. The DS2786 requires the COPY bit be reset to 0 within the tPROG time window to properly program EEPROM. Resetting COPY too soon may prevent a proper write of the cells. Resetting COPY too late may degrade EEPROM Copy Endurance. The DS2786 uses shadow RAM data for fuel gauge calculations. Fuel gauge information can be changed in the application by writing the shadow RAM locations. Afterwards the SOCV bit should be written to reset the fuel gauge. Note that any reset of the I.C. will cause the Shadow RAM data to be restored from EEPROM. Figure 21. EEPROM Access via Shadow RAM Copy EEPROM Serial Interface Write Read Recall Shadow RAM 15 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge Table 3. Memory Map ADDRESS (HEX) 00h 01h 02h 03h to 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh 10h to 13h 14h 15h 16h 17h 18h to 5Fh 60h to 7Fh 80h to FDh Feh FFh DESCRIPTION Reserved Status/Config Register Relative Capacity Reserved Auxiliary Input 0 MSB Auxiliary Input 0 LSB Auxiliary Input 1 / Temperature MSB Auxiliary Input 1 / Temperature LSB Voltage Register MSB Voltage Register LSB Current Register MSB Current Register LSB Reserved Initial Voltage MSB Initial Voltage LSB Last OCV Relative Capacity Learned Capacity Scaling Factor Reserved Parameter EEPROM Reserved Command Reserved READ/WRITE — R/W R — R R R R R R R R — R R R R — R/W — R/W — Table 4. Parameter EEPROM Memory Block ADDRESS 60h 61h 62h 63h 64h 65h 66h 67h 68h 69h 6Ah 6Bh 6Ch 6Dh 6Eh 6Fh DESCRIPTION Current Offset Bias Register Capacity 1 Capacity 2 Capacity 3 Capacity 4 Capacity 5 Capacity 6 Capacity 7 Voltage Breakpoint 0 MSB Voltage Breakpoint 0 LSB Voltage Breakpoint 1 MSB Voltage Breakpoint 1 LSB Voltage Breakpoint 2 MSB Voltage Breakpoint 2 LSB Voltage Breakpoint 3 MSB Voltage Breakpoint 3 LSB FACTORY VALUE ADDRESS 00h 0Ah 14h 32h 69h A0h Aah B5h A3h 20h B9h 50h BCh 10h C0h 20h 70h 71h 72h 73h 74h 75h 76h 77h 78h 79h 7Ah 7Bh 7Ch 7Dh 7Eh 7Fh DESCRIPTION Voltage Breakpoint 4 MSB Voltage Breakpoint 4 LSB Voltage Breakpoint 5 MSB Voltage Breakpoint 5 LSB Voltage Breakpoint 6 MSB Voltage Breakpoint 6 LSB Voltage Breakpoint 7 MSB Voltage Breakpoint 7 LSB Voltage Breakpoint 8 MSB Voltage Breakpoint 8 LSB Initial Capacity Scaling Factor Blanking/OCV Current Threshold OCV dV/dt Threshold I2C Address Configuration* Learn Threshold User EEPROM FACTORY VALUE C4h 20h CDh 10h Ceh F0h D1h 40h D5h 90h 80h 06h 93h 60h* 78h 00h 2 *The factory default 7-bit Slave Address is 0110110. The upper 3 bits are fixed at 011, the lower 4 bits can be changed by writing the I C Address Configuration Register as illustrated in Figures 24 and 25. 16 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge STATUS/CONFIG REGISTER The Status/Config Register is read/write with individual bits designated as read only. Bit values indicate status as well as program or select device functionality. Bits 3 though 6 are EEPROM backed at memory location 7Ch. Note that their bit positions differ between these locations. Figure 22. Status/Config Register Format ADDRESS 01h BIT 7 X BIT 6 PORF BIT 5 SMOD BIT 4 LDIS BIT 3 VODIS BIT 2 ITEMP BIT 1 AIN1 BIT 0 AIN0 Bit 7: X—Reserved. Bit 6: PORF—The Power-On-Reset Flag is set to indicate initial power-up. PORF is not cleared internally. The user must write this flag value to a 0 in order to use it to indicate subsequent power-up events. POR event will cause a reset of the fuel gauge. PORF is read/write-to-zero. Bit 5: SMOD—Sleep Mode Enable. A value of 1 allows the DS2786 to enter Sleep mode when SCL AND SDA are low for tSLEEP. A value of 0 disables the transition to Sleep mode. This bit is EEPROM backed by bit 7 of memory location 7Ch. The factory programmed value is 1. Caution: SMOD Sleep feature must be disabled when a battery is charged on an external charger that does not connect to the SDA or SCL pins. SMOD Sleep can be used if the charger pulls SDA or SCL high. The DS2786 remains in Sleep on a charger that fails to properly drive SDA or SCL and therefore does not adjust Relative Capacity when a battery is charged. Bit 4: LDIS—LEARN Disable. A value of 1 disables cell capacity learning by the DS2786. A value of 0 allows cell capacity learning to occur normally. This bit is EEPROM backed by bit 6 of memory location 7Ch. The factory programmed value is 0. Bit 3 : VODIS—VOUT Disable. A value of 1 disables the VOUT output. When set to 0 this output is driven tPRE before the AIN0 conversion begins, and disabled after the AIN1 conversion ends. This bit is EEPROM backed by bit 5 of memory location 7Ch. The factory-programmed value is 0. Bit 2: ITEMP—ITEMP. A value of 1 enables measurement of temperature using the internal sensor during the AIN1 conversion timeslot. AIN1 input is not selected and VOUT is not enabled during the AIN1 timeslot. A value of 0 restores the measurement of AIN1 and enables VOUT during the AIN1 timeslot. This bit is EEPROM backed by bit 4 of memory location 7Ch. The factory-programmed value is 1. Bit 1 : AIN1—AIN1 Conversion Valid. This read only bit indicates that the VOUT output was enabled, and a conversion has occurred on the AIN1 pin. When using the VODIS bit, before reading the AIN1 Registers, read the AIN1 bit. Only once the AIN1 bit is set, should the AIN1 Register be read. Bit 0 : AIN0—AIN0 Conversion Valid. This read only bit indicates that the VOUT output was enabled, and a conversion has occurred on the AIN0 pin. When using the VODIS bit, before reading the AIN0 Registers, read the AIN0 bit. Only once the AIN0 bit is set, should the AIN0 Register be read. 17 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge COMMAND REGISTER The Command Register is read/write accessible. Bit values indicate operations requested to be performed by the device. Figure 23. Command Register Format ADDRESS Feh BIT 7 POR BIT 6 0 BIT 5 X BIT 4 X BIT 3 POCV BIT 2 SOCV BIT 1 RCALL BIT 0 COPY Bit 7: POR—Power-On Reset. A value of 1 starts a power-on reset event. The bit is cleared on the next start or stop on the 2-Wire bus, exiting the reset state. Bit 6: 0—Bit always reads logic 0. Bits 5 and 4: X—Reserved. Bit 3: POCV—Present OCV Calculation. When set to one the part is performing an OCV calculation based on the voltage stored in the Voltage Register, and the OCV lookup table values present in the scratch pad. Writing the bit to 1 forces a calculation. This function should be used for test purposes only. Forcing an OCV calculation will create capacity estimation error. The bit is cleared when the hardware completes the calculation. Bit 2: SOCV—Stored OCV Calculation. This command may be used to reset the Relative Capacity calculation after updating OCV cell model data in the Scratchpad. When set to one the part is performing an OCV calculation based on the voltage stored in the Initial Voltage Register, and the OCV lookup table values present in the scratch pad. Writing the bit to 1 forces a calculation. Forcing an OCV calculation will create capacity estimation error. The bit is cleared when the hardware completes the calculation. Bit 1: RCALL—The Recall bit is set to recall the contents of EEPROM into the scratch pad. Bit 0: COPY—The Copy bit is set to start a copy command of the scratch pad to EEPROM. A programming voltage must be present on the VPROG pin prior for the copy to be successful. The COPY bit must be cleared by software within the tPROG time window. USER EEPROM Location 7Fh provides one byte available for storage of user-defined information. This byte does not affect operation of the fuel gauge. Factory default is 00h. 2-WIRE BUS SYSTEM The 2-Wire bus system supports operation as a slave only device in a single or multislave, and single- or multimaster system. The 2-wire interface consists of a serial data line (SDA) and serial clock line (SCL). SDA and SCL provide bidirectional communication between the DS2786 slave device and a master device at speeds up to 400kHz. The DS2786’s SDA pin operates bidirectionally, that is, when the DS2786 receives data, SDA operates as an input, and when the DS2786 returns data, SDA operates as an open-drain output, with the host system providing a resistive pullup. The DS2786 always operates as a slave device, receiving and transmitting data under the control of a master device. The master initiates all transactions on the bus and generates the SCL signal as well as the START and STOP bits which begin and end each transaction. Bit Transfer One data bit is transferred during each SCL clock cycle, with the cycle defined by SCL transitioning low-to-high and then high-to-low. The SDA logic level must remain stable during the high period of the SCL clock pulse. Any change in SDA when SCL is high is interpreted as a START or STOP control signal. 18 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge Bus Idle The bus is defined to be idle, or not busy, when no master device has control. Both SDA and SCL remain high when the bus is idle. The STOP condition is the proper method to return the bus to the idle state. START and STOP Conditions The master initiates transactions with a START condition (S), by forcing a high-to-low transition on SDA while SCL is high. The master terminates a transaction with a STOP condition (P), a low-to-high transition on SDA while SCL is high. A Repeated START condition (Sr) can be used in place of a STOP then START sequence to terminate one transaction and begin another without returning the bus to the idle state. In multimaster systems, a Repeated START allows the master to retain control of the bus. The START and STOP conditions are the only bus activities in which the SDA transitions when SCL is high. Acknowledge Bits Each byte of a data transfer is acknowledged with an Acknowledge bit (A) or a No Acknowledge bit (N). Both the master and the DS2786 slave generate acknowledge bits. To generate an Acknowledge, the receiving device must pull SDA low before the rising edge of the acknowledge-related clock pulse (ninth pulse) and keep it low until SCL returns low. To generate a No Acknowledge (also called NAK), the receiver releases SDA before the rising edge of the acknowledge-related clock pulse and leaves SDA high until SCL returns low. Monitoring the acknowledge bits allows for detection of unsuccessful data transfers. An unsuccessful data transfer can occur if a receiving device is busy or if a system fault has occurred. In the event of an unsuccessful data transfer, the bus master should reattempt communication. Data Order A byte of data consists of 8 bits ordered most significant bit (MSB) first. The least significant bit (LSB) of each byte is followed by the Acknowledge bit. DS2786 registers composed of multibyte values are ordered most significant byte (MSB) first. The MSB of multibyte registers is stored on even data memory addresses. Slave Address A bus master initiates communication with a slave device by issuing a START condition followed by a Slave Address (Saddr) and the read/write (R/W) bit. When the bus is idle, the DS2786 continuously monitors for a START condition followed by its slave address. When the DS2786 receives a slave address that matches its Slave Address, it responds with an Acknowledge bit during the clock period following the R/W bit. The factory default 7-bit 2 Slave Address is 0110110. The upper 3 bits are fixed at 011, the lower 4 bits can be changed by writing the I C Address Configuration Register at location 7Dh. Figure 24. I2C Address Configuration Register Format ADDRESS 7Dh BIT 7 ADDR3 BIT 6 ADDR2 BIT 5 ADDR1 BIT 4 ADDR0 BIT 3 X BIT 2 X BIT 1 X BIT 0 X Bits 7 to 4: ADDR[3:0]—User-adjustable bits of the DS2786’s I2C address. Factory default is 0110. Bits 3 to 0: X—Reserved. Figure 25. DS2786 I2C Address Byte Format BIT 7 0 BIT 6 1 BIT 5 1 BIT 4 ADDR3 BIT 3 ADDR2 19 of 22 BIT 2 ADDR1 BIT 1 ADDR0 BIT 0 R/W DS2786 Stand-Alone OCV-Based Fuel Gauge Read/Write Bit The R/W bit following the slave address determines the data direction of subsequent bytes in the transfer. R/W = 0 selects a write transaction, with the following bytes being written by the master to the slave. R/W = 1 selects a read transaction, with the following bytes being read from the slave by the master. With the ADDR3–ADDR0 bits at their default of 0110, writes occur using address 0x6Ch, while reads occur at 0x6Dh. Bus Timing The DS2786 is compatible with any bus timing up to 400kHz. No special configuration is required to operate at any speed. 2-Wire Command Protocols The command protocols involve several transaction formats. The simplest format consists of the master writing the START bit, slave address, R/W bit, and then monitoring the acknowledge bit for presence of the DS2786. More complex formats such as the Write Data, Read Data, and Function command protocols write data, read data, and execute device specific operations. All bytes in each command format require the slave or host to return an Acknowledge bit before continuing with the next byte. Each function command definition outlines the required transaction format. The following key applies to the transaction formats. Table 5. 2-Wire Protocol Key KEY S Saddr FCmd Maddr Data A N DESCRIPTION START bit Slave Address (7-bit) Function Command byte Memory Address byte Data byte written by master Acknowledge bit—Master No AcknowledgeMaster KEY Sr W R P Data A N DESCRIPTION Repeated START R/W bit = 0 R/W bit = 1 STOP bit Data byte returned by slave Acknowledge bit—Slave No Acknowledge—Slave Basic Transaction Formats Write: S Saddr W A Maddr A Data0 A P A write transaction transfers one or more data bytes to the DS2786. The data transfer begins at the memory address supplied in the Maddr byte. Control of the SDA signal is retained by the master throughout the transaction, except for the Acknowledge cycles. Read: S Saddr W A Maddr A Sr Saddr R A Data0 N P Write Portion Read Portion A read transaction transfers one or more bytes from the DS2786. Read transactions are composed of two parts, a write portion followed by a read portion, and is therefore inherently longer than a write transaction. The write portion communicates the starting point for the read operation. The read portion follows immediately, beginning with a Repeated START, Slave Address with R/W set to a 1. Control of SDA is assumed by the DS2786 beginning with the Slave Address Acknowledge cycle. Control of the SDA signal is retained by the DS2786 throughout the transaction, except for the Acknowledge cycles. The master indicates the end of a read transaction by responding to the last byte it requires with a No Acknowledge. This signals the DS2786 that control of SDA is to remain with the master following the Acknowledge clock. 20 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge Write Data Protocol The write data protocol is used to write to register and shadow RAM data to the DS2786 starting at memory address Maddr. Data0 represents the data written to Maddr, Data1 represents the data written to Maddr + 1 and DataN represents the last data byte, written to Maddr + N. The master indicates the end of a write transaction by sending a STOP or Repeated START after receiving the last acknowledge bit. S Saddr W A Maddr A Data0 A Data1 A … DataN A P The MSB of the data to be stored at address Maddr can be written immediately after the Maddr byte is acknowledged. Because the address is automatically incremented after the least significant bit (LSB) of each byte is received by the DS2786, the MSB of the data at address Maddr + 1 is can be written immediately after the acknowledgement of the data at address Maddr. If the bus master continues an auto-incremented write transaction beyond address 4Fh, the DS2786 ignores the data. Data is also ignored on writes to read-only addresses and reserved addresses, as well as a write that auto increments to the Function Command Register (address Feh). Incomplete bytes and bytes that are Not Acknowledged by the DS2786 are not written to memory. As noted in the Memory Section, writes to EEPROM locations modify the shadow RAM only. Read Data Protocol The Read Data protocol is used to read register and shadow RAM data from the DS2786 starting at memory address specified by Maddr. Data0 represents the data byte in memory location Maddr, Data1 represents the data from Maddr + 1 and DataN represents the last byte read by the master. S Saddr W A Maddr A Sr Saddr R A Data0 A Data1 A … DataN N P Data is returned beginning with the MSB of the data in Maddr. Because the address is automatically incremented after the LSB of each byte is returned, the MSB of the data at address Maddr + 1 is available to the host immediately after the acknowledgement of the data at address Maddr. If the bus master continues to read beyond address FFh, the DS2786 outputs data values of FFh. Addresses labeled “Reserved” in the Memory Map (Table 3) return undefined data. The bus master terminates the read transaction at any byte boundary by issuing a No Acknowledge followed by a STOP or repeated START. PACKAGE INFORMATION For the latest package outline information and land patterns, go to www.maxim-ic.com/packages. PACKAGE TYPE PACKAGE CODE DOCUMENT NO. 10 TDFN-EP T1033+1 21-0137 21 of 22 DS2786 Stand-Alone OCV-Based Fuel Gauge REVISION HISTORY REVISION DATE 030708 DESCRIPTION PAGES CHANGED In the Recommended DC Operating Characteristics, changed the PIO pin range to VPROG pin range and changed the operating range to 15.5V. 2 Corrected bit locations of VDIS and LODIS bits in EEPROM (Figure 14 and Status/Config Register section). 12, 17 Fixed grammatical error under OCV cell model section: “required” to “require.” 13 Fixed grammatical error describing Copy bit under Memory Map section. 15 070808 In Figure 23, changed bit 6 from X (reserved) to 0. 18 101708 Changed operation to 4.5V maximum. 051209 Changed the VDD maximum operating range in the Electrical Characteristics table to 4.5V. Added “VIN pin is limited to VDD voltage” text in the Voltage Measurement section. 2, 3, 5, 8, 13 2, 3 8 22 of 22 Maxim/Dallas Semiconductor cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim/Dallas Semiconductor product. No circuit patent licenses are implied. Maxim/Dallas Semiconductor reserves the right to change the circuitry and specifications without notice at any time. Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 © 2009 Maxim Integrated Products The Maxim logo is a registered trademark of Maxim Integrated Products, Inc. The Dallas logo is a registered trademark of Dallas Semiconductor Corporation.