DC1652A DC1652A April 8, 2011 LTC6803-2 Battery Monitor HARDWARE/SOFTWARE USERS GUIDE DESCRIPTION Evaluation circuit DC1652A is a Battery Monitoring System to demonstrate the functional operation of the LTC6803-2 integrated circuit. The LTC6803-2 is a complete battery monitoring IC that can measure as many as 12 series connected cells with a total voltage of 60V. A simple SPI serial interface is used to communicate battery state information to a system control processor. Use of an on-board discrete-device SPI-bus daisychain or optional isolated serial interface allows monitoring of completely separate battery cell packs or a series stack of cells. Stacking of cells permits the monitoring of each individual cell in systems requiring 100's of volts from the battery pack, such as those used in Hybrid Electric Vehicles (HEVs). Each device CELLS CONNECTOR ISOLATED SPI PORT MAIN SPI INTERFACE CONNECTOR TOP SPI PORT ADDRESS JUMPERS LTC6803-2 also has a built in high-accuracy reference. In addition, each individual cell connection has a software controlled discharge transistor. This allows the implementation of precision cell charging algorithms including charge shedding of over-voltage cells. A group of up to ten DC1652A boards can be managed through the USB port of a PC using an on screen control panel GUI available from LTC. LTC6803-2 FEATURES 12-bit accurate voltage measurement of 12 battery cells (60V maximum/board). 4-bit addressable serial interface for high cell count systems (16 boards x 12 cells = 192 Cells). Packet error checking (PEC) for all commands. New commands allow measuring of individual or all cell voltages, open wire connections and temperature sensors. Option to measure cell voltages and perform open wire detection with or without the cell discharge transistors conducting. Enhanced self test functions. Thermal Shutdown built in and flagged. Silicon revision code provided DC1652A DEMO FEATURES Graphical User Interface (GUI) for demonstrating new features. Optional isolated main SPI communication port. External discrete circuitry for daisy-chained current mode SPI communication up and down a stack of monitors. ESD and fault protection circuitry included. 1 DC1652A GETTING STARTED WITH ONE BOARD CONNECTED SINGLE BOARD CONNECTION TO PC AND GUI Step 1. Set jumpers on DC1652A to the default positions indicated in Table 1 (and Figure 1). TABLE 1. JUMPER FUNCTIONS JUMPER FUNCTION JP1 Two Jumper Block to Select Voltage or Current Mode for Bottom SPI Port JP6,JP7,JP8,JP9 SPI Daisy Chain Configuration Jumpers: (All Four Jumpers Must be Moved Together) JP2,JP3,JP4,JP5 Board Address Setting (0000 to 1111) JP2 is MSB JP5 is LSB DEFAULT POSITION Voltage Mode 1, 1, 1, 1 Top of Stack (TOS) Setting 0, 0, 0, 0 (for address 0000) Step 2. Before running the DC1652 GUI, a DC590 driver must be installed. To do this, install the Quick Eval Software. Quick Eval can be downloaded from: http://www.linear.com/designtools/software/ After installation close the QuickEval program. Step 3. Connect the DC590 Quick Eval USB cable to PC/Laptop USB port if not already. Connect a ribbon cable from DC590 to the Main connector of DC1652A (H1). Step 4. Launch the GUI control program: LTC6803-2-4_GUI_Vxx_yyyymmdd.exe The version/year/month/day addition to the file name identifies the version as changes are made. When the DC590 Quick Eval board recognizes the String ID code from the DC1652A board, the program will open and present the control screen. The program will not open 2 "1" POSITION "0" POSITION Labeled "V" on board. Sets bottom port for voltage mode SPI communication. For V Mode communication to all boards (e.g. using isolators) set all four jumpers to the 1 position. For SPI daisy chain communication this setting is required for only the board at the top of a cell stack. These settings connect the top daisy chain current source transistors to the top cell at the top of the cell stack. Logic `1' setting Labeled "I" on board. Sets Top and Bottom ports for Current Mode SPI communication using external daisy-chain current source circuitry. For SPI daisy-chain (current mode) communication set all four jumpers to the 0 setting. This enables the top port on each board for current mode communication up/down the stack. Use these settings also for the bottom board in a daisy chain stack, which should also be set to V mode (JP1) for the bottom port communication to a system controller. Logic `0' setting unless DC590 is connected to the computer and the DC1652A board. Step 5. Connect the cells to be monitored to the cells connector J1. This connector is in two pieces. The setscrew piece can be unplugged to make it easier to attach a wiring harness with an up to twelve cell battery stack. The LTC6803-2 demo circuit is intended to measure from four to twelve individual cells with a total stack voltage of 10V to 60V. With fewer than 12 cells to be monitored, the bottom cell of the stack should always be connected as Cell 1 between terminals J1-5(+cell contact) and J1-4(-cell contact). Terminals J1-4 and J1-1 are the ground reference point for the battery cell stack and for the DC1652A board. The second cell on the stack connects between terminals J1-6(+cell contact) and J1-5(-cell contact). All higher numbered terminals on J1 not used for cell connections may be shorted together. The V+ positive supply for the DC1652A is the potential at terminal J1-16 and DC1652A therefore must connect to the top of the battery stack. Figure 1 illustrates a connection for fewer than 12 cells. Step 6. Apply power. Inserting the setscrew piece into connector J1 will apply power to the board from the battery cell stack. Figure 1. Connection of four cells (cell voltages at least 2.5V) 3 DC1652A THE CONTROL PROGRAM THE GRAPHICAL USER INTERFACE (GUI) SCREENS Figure 2 shows the control panel that appears on the computer screen. Controls on this panel are used to communicate with the LTC6803-2. Commands are issued and information is retrieved and displayed on this screen. This panel is useful not only for demonstrating the operation of the LTC6803-2, but also for software developers to observe the Hex codes exchanged with the device. Figure 2. PC GUI Control Panel Hex Code Display for Configuration, System Flags and Packet Error Check Color Coded Status Panel for All Cells Connected Cell Voltage Readings for Selected Board Click-Button Controls for All Commands Board Selection Tabs Set Individual Board Addresses 4 Temperature Programmable Over Readings and Under Voltage Thresholds Configure I/O and Operating Modes Continuous Reading of All Cells Function DC1652A OPERATING THE CONTROL SCREEN FIRST THINGS FIRST - ONLY ONE BOARD CONNECTED also sent to the LTC6803-2 with every command as shown in the GUI. Commands received by the IC and not validated internally with a correct PEC calculation are not processed, thus avoiding corrupted control. The GUI start-up screen appears when the program is launched and the DC590 Quick Eval interface card recognizes that the DC1652A board is connected. Once power is supplied to the board from a stack of cells or a power supply, the communication between the PC and the board can be checked. The oval located at the top of the color-coded status panel for the one board will turn green if the PEC bytes match on the read-back. Read-back data transmission errors will produce red warning indications if the PEC bytes do not match. 1: SET BOARD ADDRESS 3: PROGRAM THE CELL MONITORING VOLTAGE THRESHOLDS A feature of the LTC6803-2 is that each device/board is given a unique 4-bit address. Communication between the GUI and a board will occur only when the address set on the board with jumpers J2 through J5 matches the address set in the GUI for that board. The default selected board and address on power up is Board #1 with the address of 0x80. The actual address byte for each board is 8-bits long, but only the 4 LSBs are programmable. Set the jumpers to the address on the GUI or change the GUI to match the board (using the Set Hex Address box in the lower left corner of the GUI) to enable communication with the DC1652A. 2: READ CONFIGURATION Click the command button labeled READ CONFIG. If all is properly connected and operating the start-up default configuration of the LTC6802-2 (standby mode) will be read from the board. The Hex codes for the six bytes of configuration setting will appear in the CONFIGURATION REGISTERS section in the boxes labeled CONFIGURATION READ FROM LTC6803-2. The initial configuration bytes should be 0xE0 for configuration register 0 (CNFRG0) and 0x00 for the other five bytes. In addition the LTC6803-2 calculates a Packet Error Code, PEC, and appends it to the data stream each time it sends out data. For the six bytes sent by this command and received by the GUI, the control program calculates a PEC in the same manner. This byte is compared with the appended byte to check that the data transmission was properly executed. Both PEC bytes are displayed in the top section labeled PACKET ERROR CODE and both bytes should match. A PEC is In the section labeled SET VOLTAGE LIMITS click on the boxes and enter voltage values for the over-voltage and under-voltage thresholds required for the cells being monitored. After entry completion, the voltage value will be "rounded" to the actual value used by the LTC6803-2 and displayed. The voltage ranges for these thresholds is -0.74V to 5.3V and the program will not allow the `under' to be greater than the `over' voltage threshold. These monitor thresholds can be applied globally to each and every cell in the system or customized for the cells connected to an individual board by clicking the desired option button. Individual boards are selected for programming or viewed by the left hand tabs in multiple board systems. 4: SELECT AN OPERATING MODE The power-on operating mode for the LTC6803-2 is Standby. The GUI initializes to this state also to serve as a reminder that the device must be configured before starting operation. Select one of the seven CDC (Comparator Duty Cycle) options from the scroll box in the SET I/O MODE section at the bottom of the screen. 5: WRITE CONFIGURATION Nothing is changed in the LTC6803-2 until the Write Configuration command is executed. Clicking the WRITE CONFIG command button does this. When the command is sent, the six Hex bytes shown in the CONFIGURATION REGISTERS section in the boxes labeled CONFIGURATION WRITTEN TO LTC6803-2 will become bold type. Software developers can note the exact hex values required by the LTC6803-2 for 5 DC1652A specific conditions in these boxes to facilitate their control program development. Clicking the READ CONFIG button can provide confirmation that the configuration change was actually made. The six bytes read back should generally (unless special GPIO conditions exist) match the six bytes sent and the PEC check bytes should be a match (green PEC oval above the stack status display). IMPORTANT NOTE No configuration changes take effect until the WRITE CONFIG button is clicked. A flashing backlight serves as a reminder that this needs to be performed. Consult the LTC6803-2 data sheet for detailed information concerning the variety of software configurable functions possible. The following is a summary of these functions: Discharging individual cells, Changing Over/Under voltage thresholds, Preventing UV/OV interrupt flags from modifying system operation through masking, Systems status polling type; level or toggle polling, Monitor comparator time interval, GPIO pin functions -Inputs or Outputs, 10cell/12cell conversion mode, Standby Mode-low current drain. All of these can be implemented from the control panel when selected from various points on the screen then followed by a WRITE CONFIG button click. 6: READ TEMPERATURE The LTC6803-2 has three ADC channels dedicated to measuring temperature. The temperature indications are for the internal die temperature of the LTC6803-2 and two externally connected thermistors. The display returns a voltage measurement. The internal die temperature sensor produces a voltages that changes at a rate of 8mV/C relative to absolute zero. To convert the voltage reading to degrees Centigrade, divide the voltage by 8mV then subtract 273C. For example, 25C is a nominal reading of 2.384V. 6 For external temperature measurements connect thermistors across cells connector terminals J1-3 to J1-1 and J1-2 to J1-1. A thermistor with a 25C value of 10K will produce a half of VREF voltage reading at 25C (approximately 1.55V). Any thermistor value may be used but scaling the voltage measurement may require changing the values of resistors R55 and R56 on the DC1652A circuit board. To take a temperature reading simply click the START TEMP command button to make the LTC6803-2 ADC conversion followed by clicking the READ TEMP command button to download the data from the board and display the voltage readings for temperature. 7: READ CELL VOLTAGES The essential function of the LTC6802-2 is to measure and report the voltage on each battery cell when commanded. Once again this is accomplished from the control screen with two command button clicks. First click on the START CELL VOLT button. This commands an A/D conversion of all 12 cell-voltages. NOTE: All 12 cell-voltages are converted every time regardless of the number of cells actually connected to the LTC6803-2. Unused cell connections, if shorted together, will return nominal voltage readings of 0.000 volts. The actual cell voltage measurements are not displayed until the READ CELL VOLT command button is clicked. 8: READ FLAGS When any cell in a stack exceeds the programmed over- or under-voltage threshold limit, one of two flag bits is set in an internal register for that cell to serve as a warning. This is simple feedback for battery charging algorithms to know simply when to start or stop charging. To read the state of these warning flags at any time is a simple click of the READ FLAG command button. The Hex code for the three flag bytes appears in the FLAGS section of the control panel at the top of the screen. One of the configuration options is to mask these flags from appearing in the register bytes that are read from the LTC6803-2. This feature can be used to either prevent or allow these flags to report warnings to a con- DC1652A trol algorithm. A check box is provided for each cell in a stack to select the mask option for that cell. To implement the masking requires checking the box(es) and then writing the new configuration with a WRITE CONFIG button click. 9: DISCHARGE CELLS Another major feature of the LTC6803-2 is the ability to remove charge from individual cells. In connection with a user control algorithm, this can distribute cell charge evenly over a stack of batteries. DC1652A contains a P-channel MOSFET in series with a 33 resistor across each cell connection. When enabled, a cell is loaded and charge is pulled from the cell with energy dissipated in the switch and resistor. A DCC check box is provided for each cell to be discharged. Checking this box and then writing the new configuration with a WRITE CONFIG button push will begin discharging the selected cell(s). IMPORTANT NOTE: The discharge transistors are automatically turned off momentarily while the A/D converter is measuring the cell voltage. This prevents any voltage drop errors caused by the discharge current flowing through the cell inter-connection wiring. An accurate indication of the cell voltages is then obtained. The command set and GUI offer the option of keeping the discharge transistors on while measuring the cell voltages. This is done by using the STARTCELL hold DCC command button. A blue indicator is illuminated when this command is in effect. If established by deliberate resistances, the lower voltage reading due to the discharge current can serve a useful diagnostic purpose. The START OPENWIRE command button connects the built in open wire detection circuitry to all cells. A START CELL VOLT and READ CELL VOLT command button click sequence must follow to determine the result. Ideally an open wire connection to any cell will be indicated by an abnormally high voltage measurement for the cell above the open wire and a near zero measurement for the cell with the open wire. CONTINUOUS OPERATION For convenience, the control panel allows for continuous operation of the DC1652A board. The command button labeled START CONTINUOUS READ CELLS can be clicked and the board control is placed in a continuous loop executing the following commands automatically in the following sequence: Start cell voltage Read cell voltage Start temp Read temp Read flags All values are updated continually. While running, the configuration can be changed on the fly. Simply changing a configuration item (Discharge cells for example) and clicking the WRITE CONFIG button will implement the new configuration and return to continuous operation. A green box in the lower right hand corner indicates that the system is running continuously. A red box means that the system is stopped and waiting for a new command to be sent. OTHER CONTROL FEATURES Three additional command buttons are provided on the control screen. The POLL ADC and POLL INT command buttons are used to test if the ADC is busy making conversion and to test if any of the LTC6803-2 devices in a system have an interrupt condition respectively. The result of these commands can be observed by monitoring the serial data output line of the SPI interface at pin 5 of the SPI BOTTOM connector, H1. There is no indication provided on the control screen. 7 DC1652A SELF TEST FUNCTIONS 24B DATA TRANSFER VALIDATION Each time data is transferred from the LTC6803-2 by the four READ commands (Cell Voltage, Configuration, Flag Status and Temperature), a Packet Error Code, PEC, is calculated based on the data stream sent. The control program also calculates a PEC value based on the data it receives. If the calculated PEC matches the transmitted value the data transfer is assumed to be error free and therefore the data is valid. The LTC6803-2 has built in self test functions. These commands apply test signals to the ADC to check that the internal cell voltage and temperature connections are functioning. The cell voltage and open wire test signals can be applied with or without the discharge transistors active. Checking the functionality of each bit in the internal data registers for cell voltages and temperatures can also be seen by choosing which test code (0x555, 0xAAA, or 0xFFF) to expect to be returned from the device when a self test command is issued. If the two PEC values do not match, the transmitted data stream has been somehow corrupted. This type of data error becomes more of a concern when boards are stacked and the transmit data stream is lengthened. The transmitted and calculated PEC values are displayed on the GUI and turn red when a mismatch occurs. A PEC byte must also be appended to a command issued to the LTC6803-2 which then must pass an internal check to be processed. In this way corrupted commands will not effect operation. The PEC is automatically calculated and sent by the GUI for each command. The PEC hex codes for both write and read operations are shown in the PACKET ERROR CODE area. OTHER CONFIGURATION OPTIONS 25B LOW CURRENT STANDBY An important system consideration is the ability to put the monitoring circuitry into a low current drain condition. This is done by setting the LTC6803-2 into its standby configuration. A command button in the lower right corner of the screen is provided to facilitate this function. Once clicked, all data and configuration settings are restored to initial values and the screen goes white on all indicators. Also in this condition, SPI signals are set to static logic high so that the watchdog timer will trip and external SPI transistors go to an off state. 8 The SET I/O MODE CFGR0 group of checkboxes can be used to adjust other features of the LTC6803-2. Configuring the general purpose I/O pins and setting the polling mode can be set by checking the appropriate boxes, and sending the command with a WRITE CONFIG button push. DC1652A ADDING BOARDS TO MEASURE MORE CELLS An important function of the LTC6803-2 is the ability to communicate with devices connected to up to 16 individually addressable battery cell stacks. Likewise 16 DC1652A boards, monitoring up to 12 cells each, can be controlled and read individually. The control GUI is limited to only 10 boards (120 cells) maximum. The battery cell stacks can be completely separate from each other with an isolated digital control interface or stacked on top of each other. To control more than one board requires the following hardware and software modifications: HARDWARE ADJUSTMENTS 1. Each board needs a unique 4-bit binary address between 0 (0000) and 15 (1111). The LSB of the address is A0 and is set with jumper J5 (1 or 0). Bits A1 through A3 (the MSB), are set with jumpers J4, J3 and J2. Any address can be used with any board so long as no two are the same. The GUI can also be programmed to match the address of each board. To communicate with multiple boards connected to stacked cells requires the addition of an isolator circuit on each DC1652A board for device U5 and connection to the alternative bottom port isolated connector, H3. Power for the isolators can be provided through the DC590 connector at H3 up to 30mA total. If the operating current required by all of the isolators exceeds the available current from this supply, an external 5V power supply connected to terminals E3 and E2 (ground) will ensure proper data communication. Make sure to disconnect the power supplied by DC590 to pin 2 of connector H3. An external supply is shown in the isolated configuration schematics but is not required if the DC590 isolated port and supply are used. CAUTION! CAUTION! CAUTION! As battery cells are stacked on top of each other, great care must be taken to prevent damage and personal injury from the very high voltage potentials that may be present. Do not allow short circuit connections, whether electrical or human, between a high voltage point and the system or chassis ground at the bottom of the stack. Be very careful and respect the potential danger of high voltage & energy! 2. Refer to the following configuration drawings (A through E) for connecting to multiple battery stacks. Just a three-board example is shown for simplicity; more boards will require other individual address settings. 3. Pay close attention to the jumper settings for each board in a stack depending on the configuration chosen. It is essential that the current/voltage I/V Communication Mode and Top-of-Stack (TOS) settings be correct for communication to work properly. EXTERNAL DIGITAL ISOLATOR SUPPLY The DC590 interface is electrically isolated from the controlling computer power. This can allow communication from a PC with full isolation from the main AC power. Several battery stacks which have a common ground connection can be controlled by a single bottom port SPI bus as shown in configuration B. 9 DC1652A DC1652A DC1652A 10 DC1652A DC1652A DC1652A DC1652A DC1652A DC1652A 11 DC1652A DC1652A DC1652A DC1652A DC1652A DC1652A DC1652A 12 DC1652A INITIAL SOFTWARE ADJUSTMENTS CONTINUOUS READING OF ALL CELLS IN A SYSTEM The GUI program can control up to ten boards. When put into continuous mode each board is exercised in succession. The moving LTC logo indicates which board is being measured. The cell voltage and temperature readings are for the Tab selected board only. When stopped, all readings are cleared. Select the number of boards connected from the list box located in the lower left corner of the screen. A tab will appear on the left edge of the control panel for each board on the stack. Click each board tab separately and set the following parameters for the selected board: 1. Select the address for each board to match its jumper-set value. Values range from 0 to F. Make sure that each board has a unique address. 2. Select whether the Over/Under voltage thresholds for each board are to be the same (GLOBAL) or different (CUSTOM) and set the voltage limits accordingly. If Global, the limits need to be entered only once. 3. Since the default power up state of the LTC6803-2 is Standby, the GUI starts up this way to serve as a reminder that the device must be configured before any other operations. Select an operating mode from the Set CDC scroll box at the bottom. 4. Click WRITE CONFIG to configure the board for basic operation. 5. Click READ CONFIG to verify that the proper word was written to the board. 6. Select another board tab on the left and repeat steps 1 to 5. BROADCAST COMMANDS-BE CAREFUL Each LTC6803-2 controlling command has the option to be broadcast to all boards in the system simultaneously. This can be quite convenient, but it can also make unintended changes to some of the boards. When the WRITE CONFIG command B'Cast check box is checked, the settings currently visible on the screen will be sent to all boards and will change their configuration for voltage monitoring threshold and operating mode. If unpredictable results are seen from a board it could be due to the configuration change. Making a READ CONFIG on that board will indicate the present configuration. 13 DC1652A COLOR CODED STATUS PANEL The color-coded status panel will expand to include all boards connected in a stack. Each small square in this array represents an individual battery in the stack of boards. The intent of this display is to provide a way to see the status of all cells at a glance. The meaning of the colors used is explained in the legend on the screen. Any grayed box indicates that the cell's interrupt flag has been masked so the LTC6802-2 is no longer reporting this status. The cell voltage value measured for this cell however is still accurate. The GUI is quite sophisticated with many adjustable variables. As items are changed displayed values may become stale or inaccurate. These will be flagged by either being cleared or grayed. If an item looks different, repeat the desired command to refresh the displayed information. The schematics for DC1652A follow. Consult the data sheet for detailed information on the operation of the LTC6803-2 battery monitoring system. Figure 3. GUI screenshot showing 3 boards being continuously monitored. Cell voltages and Temperature readings shown are for board 1 only. Color-coded cell status is for all boards connected. 14 ' * + , - ( ) $" . / . (%#$' 0 ' # ! " # $# % " # " $& % ' ( # ) * % " # " $& + " , # - $& # #' .& # / *! / *0 # # ' % 1 & () # * ' ' ! + ' + $ # # # " " & & & & % % % % * * * * ' ' ' ' "#$!%&$' & & & & & & & & % % % % % % % % * * * * * * * * ' ' ' ' ' ' ' ' !" ! ' * + , - ) ( ) $" ( . ) ) ) " ( ( . " ( , #-( # (- ) ") , $ (%#$' ! " # $# % " # " $& % ' ( # ) * % " # " $& + " , # - $& # #' .& # / *! / *0 # # ' % 1 & # 34 " ( ( ( ( ' # ' # ' # ' # () () () () & % # ) . # ( ( ( ( ( ( ( ( ( ( "5 / # , & 2 " " . -( ) ' - ( ( "2 ) # # " " + - ( . ( ( - (' # & + , - - # & # ( 2 % # % # # 0 ( ( . ( ( - 0 #( / 1 / 1' ' # ' # ' # ' # #( () () () () & "#$!%&$' & " " " ) # # ) ) " ( ( . ) ( ( . " #-( # (- ) ") , "(( / " + ( ( % & ) !" " ( . ( & ! ' * + , - ( ) $" (%#$' ! " # $# % " # " $& % ' ( # ) * % " # " $& + " , # - $& # #' .& # / *! / *0 # # ' % 1 & ( . ( . ) ( ( #-( # (- ) ") ) ) " ) ( ( . " () () ) ' # " () () ' # ' # ' # # ( & 1 . 2 0 (-$ ) . #- / ) - ' ' ' ' ) ) 2# - "!! '2 2( 4 $(- ) (6 0# / ) ) "!! / -) & % ) . ( "#$!%&$' ( - ( ( . " !" !