Programming and Testing a DS2786-Based Circuit

Abstract

This application note describes how to properly test a circuit board containing a DS2786 open-circuit-voltage battery monitor. A step-by-step test procedure is provided that can be followed to ensure that the circuit board has been assembled properly. Additionally, this note instructs the reader on how to properly program the EEPROM of the DS2786 once it is assembled onto the circuit board.

Introduction

The DS2786 open-circuit-voltage (OCV) based fuel gauge leaves the factory with a default OCV profile and default configuration loaded into EEPROM. In order to increase the accuracy of the OCV fuel gauge and adapt the DS2786 to the specific application, it may be necessary to reprogram the EEPROM of the DS2786. This application note describes how to program the EEPROM and test an assembled circuit board.

Performing a Board-Level Test

The following is an example of how to production test a DS2786-based OCV board before final assembly into a cell pack. Figure 1 shows a sample circuit board schematic utilizing all of the functions of the DS2786. All critical test points (there are 7) are indicated with circled numbers in the figure. The test flow assumes all discrete components of the circuit have been tested, and, therefore, the goal is to verify that the board has been assembled properly by validating the connections.

Figure 1. Circuit board nodes that must be verified.

Figure 1. Circuit board nodes that must be verified.

Test 1: Test initialization. The purpose of this test is to determine if there are any direct shorts on the board and verify comminication. Successful communication to the device to read the voltage register in this step verifies the SDA and SCL connection (node 1), as well as the Pack+ to the VDD pin (node 2) and the Pack- to the VSS pin (node 3) connections. Additionally, by reading the voltage register in this step and confirming that it is a valid measurement, the connection to the VIN pin (node 4) can be verified.

Force 4.0V from Pack+ to Pack-.  
Wait 880ms.        Wait for a voltage conversion.
Read the Voltage Register:        2 Bytes.
 
Fail board if communication is not possible.
Fail board if voltage reading is inaccurate.

Test 2: Verify SNS (node 5). Connection to the SNS pin can be verified with a valid current measurement.

Force 4.0V from Pack+ to Pack-.  
Force 1.0A from Pack- to System VSS.  
 
Wait 880ms.        Wait for a current conversion.
Read the Current Register:        2 Bytes.
 
Fail board if current reading is inaccurate.  

Test 3: Verify auxiliary inputs AIN0 and AIN1 (node 6). Proper connection to the AIN0 and AIN1 pins can be verified with a valid resistor measurement. This test is optional.

Connect a 10kΩ resistor from the Pack ID terminal to Pack-.
Connect a 10kΩ resistor from the Therm terminal to Pack-.
 
Force 4.0V from Pack+ to Pack-.  
 
Wait 880ms. Wait for the auxiliary input conversion.
Read AIN0 and AIN1: 4 Bytes.
 
Fail board if the AIN0/AIN1 readings are inaccurate.

Test 4: Verify VPROG and program the EEPROM (node 8). A test point for connecting a programming voltage to the VPROG pin is required in order to program the EEPROM of the DS2786. This connection is verified by writing and copying the EEPROM and verifying that the EEPROM was updated. The Current Offset Bias Register (COBR) is included in the EEPROM, so it may be beneficial to calibrate the COBR prior to programming the EEPROM.

Force 4.0V from Pack+ to Pack-.  
 
Calibrate COBR. If desired. See details below.
Write Parameters EEPROM Block: 32 Bytes.
 
Copy Parameters into EEPROM.  
 
Wait 14ms. Wait for EEPROM Copy.
Write 0xFFh to Parameter Block: 31 Bytes (not Memory Address 0x7Dh)*.
 
Recall Paramenters from EEPROM.  
Read Parameters EEPROM Block: 32 Bytes.
 
Fail board if all 32 bytes read from EEPROM do not match the 32 bytes that were originally written.

*Do not write 0xFFh to Memory Address 7Dh or the Slave Address will change and the device will stop responding to the current Slave Address.

Calibrating the Current Offset Bias Register

The Current Offset Bias Register allows for the current measurement of the DS2786 to be adjusted in 25µV steps to any value between +3.175mV and -3.2mV. The factory default of the COBR is 0x00h. The following example lists the steps to calibrate the current offset of the DS2786 in circuit:

  1. Power the DS2786 and make sure no current is flowing across the sense resistor.
  2. Write 0x00h to the COBR (Memory Address 0x60h).
  3. Wait 880ms for the next conversion cycle.
  4. Read the Current Register.
  5. Repeat steps 3 and 4 as many times as practical to obtain an average-current reading.
  6. Write the opposite value of the average-current reading into the COBR.
  7. Copy the value to EEPROM (this step should be combined with copying all of the values to EEPROM).

Summary

Proper verification of an assembled DS2786 OCV-based fuel gauge requires testing of every solder point in the circuit. Tests 1, 2, and 3 can be combined into a single step to reduce test times, especially the delays that are in place for conversion times.

Additionally, programming the EEPROM during the testing can provide a more efficient test flow, as well as providing a convenient time to apply the required programming voltage that is required to save the parameters to EEPROM, including the current-offset bias.