DEMO MANUAL DC2732A LTC2949 Battery Stack Monitor DESCRIPTION The DC2732A demonstrates a high voltage battery pack monitor based on the LTC(R)2949. The LTC2949 is a high precision current, voltage, temperature, charge and energy meter for electrical and hybrid vehicles and other isolated current sense applications. It infers charge and energy flowing in and out of the battery pack by simultaneously monitoring the voltage across two sense resistors and the battery pack voltage. The LTC2949 is typically powered from an isolated supply and directly connected to the battery stack on the low or high side depending on the shunt position. Resistive high voltage dividers provide connections to high voltage terminals that need to be supervised. Design files for this circuit board are available. All registered trademarks and trademarks are the property of their respective owners. Protected by U.S. patents, including Patents 8908779, 9182428, 92701. Due to its compatible protocol, the LTC2949 can share the same communication bus with ADI battery stack monitors that contain the isoSPITM interface. BOARD PHOTO Rev. 0 1 DEMO MANUAL DC2732A TABLE OF CONTENTS Description.................................................. 1 Board Photo.................................................. 1 Performance Summary.................................... 3 Hardware Setup............................................. 4 Hardware Description...................................... 5 Jumper Functions...................................................... 5 Connector Functions.................................................. 6 Connector J3 Pin Assignment................................... 7 Pin Functions.............................................................7 Solder Jumpers and Other Functions........................ 8 Hardware Setup Examples................................ 9 Option 1: Nonisolated SPI Setup................................ 9 Option 2: Isolated isoSPI DC2617 Setup.................. 10 Option 3: Isolated isoSPI DC1941 Setup.................. 11 Option 4: Isolated isoSPI DC2792 Setup.................. 12 Option 5: Isolated Reversible isoSPI DC2792, DC2350 Setup......................................................... 13 Connecting a High Voltage Battery.......................... 14 Software Setup Overview.................................15 Arduino IDE Setup................................................... 15 LTC2949 Windows GUI Usage...........................18 LTC2949 GUI Setup................................................. 18 Operation Control.................................................... 19 Multimeters............................................................. 21 Plots/Data Collection...............................................22 Plot Zoom Fit...........................................................23 Plot Pan, Zoom, Labels............................................23 Change Thresholds On-The-Fly................................ 24 Plot Trackers............................................................25 Export Plot Data......................................................25 Plot Time Axis.........................................................25 Register Map...........................................................25 Edit Register Values.................................................25 Register Context Menu............................................26 Display Format Selection.........................................26 Register Map Tooltips.............................................. 28 Register Details....................................................... 28 Auto Read Menu...................................................... 28 Tools Menu..............................................................29 Basic Operation Example.........................................29 2 Appendix A: Usage of SPI Isolator Instead of isoSPI.....32 Appendix B: CAN Based Evaluation.....................33 Hardware Requirements..........................................33 Software Requirements...........................................33 Setup the Hardware.................................................33 DC2732A_CAN: LTC2949 CAN Firmware................34 CAN Messages Overview.........................................34 Basic Operation Examples.......................................40 Current, Power, BAT (100ms)..................................40 I1, P1, BAT (100ms), I2fast, BATFast (1ms to 2ms)....... 40 I1, P1, BAT (100ms), I2fast, BATFast (average 10ms)....41 Additional Operation Examples................................43 Usage of RAWRW....................................................43 Fast Measurement...................................................46 Serial Monitor via Linduino's USB Port.................... 49 Convert .DBF to .DBC File........................................ 51 Resistive Divider Equation....................................... 52 Definitions............................................................... 52 Appendix C: Isolation Measurement with LTC2949....52 Case I: Switch M1 Open...........................................53 Case II: Switch M1 Closed.......................................53 Combine Equations of Both Cases...........................53 Calculate YISO - from Case II:...................................54 Simulation with Switch Leakage Error.....................54 Appendix D: Measure Hall Sensor with DC2732A_Basic............................................54 Appendix E: Synchronous Measurements with Cell Monitors and LTC2949..............................56 Appendix F: GUI Troubleshooting & Linduino Programming...............................................62 Appendix G: Log Measurements with Tera Term......66 Log Measurement Data from DC2732A_BASIC to TEXT/.CSV - File......................................................66 Appendix H: LTC2949.CPP/.H Basic Library Functions... 69 Rev. 0 DEMO MANUAL DC2732A PERFORMANCE SUMMARY The l denotes the specifications which apply over the full operating temperature range (-40C to 125C), otherwise specifications are at TA = 25C. The test conditions are VCC = 12.0V, JP11 set to 12.4V operation, unless otherwise noted. JP4-JP6 set to isoSPI, unless otherwise noted. SYMBOL PARAMETER CONDITIONS MIN TYP MAX UNITS Isolated Supply (Flyback LT8301) |VGND-LGND| Isolation Working Voltage VCC Input Supply Voltage 800 l V 5.0 12.0 V 5.0 32.0 V IVCC Input Supply Current Sleep (Note 1) Standby (Note 1) 10 25 mA mA VUVLO+ Under Voltage Lockout Rising (Note 2) 4.2 V VUVLO- Under Voltage Lockout Falling (Note 2) 3.1 V VOUT Output Voltage JP11 = 5.3 JP11 = 12.4 JP11 = 9.0 5.3 12.4 9.0 V V V Nonisolated ADVCC Supply, VCC = 0V/JP9 = Dis ADVCC Input Supply Voltage IADVCC Input Supply Current l Sleep (Note 1), ADVCC = 12V Standby (Note 1), ADVCC = 12V 4.5 14.5 V 10 25 mA mA isoSPI Interface J1, J2, ISO+/ISO- |VGND-LGND| Isolation Working Voltage 800 V RTERM Differential Bus Termination Resistance 100 Operation Mode Indication LEDs D2 Sleep LED LTC2949 Core Sleep D3 Active LED LTC2949 Core Standby/Measure Green Red Resistance at 25C 100k NTC Temperature Sensor NTCG164KF104FT/TDK R1 Shunt Temperature Resistor R2 Board Temperature Resistor A, B, C Steinhart-Hart Parameters 1 = A +B *InRNTC +C *(InRNTC )3 T A = 9.85013754e-4 B = 1.95569870e-4 C = 7.69918797e-8 Current Sense Resistor (Note 3) Manufacturer: Isabellenhuette Tolerance of Nominal Resistance: 5%, Temperature Range of Given TC: 20C-60C Manufacturer Part Number BAS-M-R0001-R-5.0 DC2732A-B: 50e-6, RTHI = 1.5K/W, TC = 100 ppm/K, P140C = 20W (I140C 630A) BAS-M-R00005-AEU-5.0 DC2732A-A: 100e-6, RTHI = 2.0K/W, TC = 50 ppm/K, P140C = 15W (I140C 380A) BAS-M-R0002-R-5.0 DC2732A-C: 200e-6, RTHI = 3.0K/W, TC = 50 ppm/K, P140C = 10W (I140C 220A) Note 1: The sleep current does not reflect the sleep current of LTC2949, which is in the A range. The DC2732A uses the LT8301 isolated flyback converter, that requires a minimum load current for stable regulation. To maintain this minimum load and to have some visual feedback on operation mode of LTC2949, the DC2732A has a red LED that indicates sleep and a green LED that indicates standby/measure state. Note 2: The undervoltage lockout is calculated according to LT8301's data sheet and the nominal resistance values of R16 (R1), R23 (R2). Note 3: All given specifications of the current sense resistor are from Isabellenhuette's data sheet of the BAS series precision and power resistors. Note 4: When evaluating the current measurement accuracy of the DC2732A the shunt resistance must be calibrated. Also the remaining temperature dependency of the resistance (TC) can be calibrated. To allow precise temperature measurement of the current sense resistor, the DC2732A contains an NTC (R1) placed close to the shunt with good thermal connection (also electrically connected to one pad of the shunt). Rev. 0 3 DEMO MANUAL DC2732A HARDWARE SETUP The DC2732A can be setup for different applications. The power supply and communication interface can be a nonisolated connection via J4 or the individual turrets IOVCC, MISO, MOSI, SCK, CS, ADVCC, GND. An isolated connection is possible using the onboard flyback converter LT8301 sourced by VCC, LGND and using the isoSPI communication via J1, J2 or iso+, iso- test points. If not needed, the onboard power supply can be left unpowered, or be disabled by connecting the enable signal to LGND (put jumper JP9 to DIS). If not using the onboard power supply, any external (also isolated) power supply can be VIN(UVLO+) = VIN(UVLO-) = connected to ADVCC and GND (e.g., Analog Devices integrated isolated DC-to-DC converters - isoPower). The communication mode (SPI or isoSPI) must be set using jumpers JP3-JP6. In case J4 is directly connected to a Linduino(R), it provides 7V and JP3-JP6 must be set to SPI operation. The Hardware Description section gives more details about different hardware setup options. In most cases, the DC2732A is operated together with a DC2026, which is referred to as a Linduino. 1.242V * (R1+ R2) R2 1.228V * (R1+ R2) + 2.5A * R1 R2 R1 = 430e3; R2 = 270e3; UVLOP = 1.242 * (R1 + R2)/R2 + 2.5E-06 * R1; UVLON = 1.228 * (R1 + R2)/R2; UVLON, UVLOP (3.18, 4.30) Figure1. Undervoltage Lockout Calculation for LT8301 According to the Schematic of DC2732A 4 Rev. 0 DEMO MANUAL DC2732A HARDWARE DESCRIPTION a) Top b) Bottom Figure2. DC2732A2 Rev. 0 5 DEMO MANUAL DC2732A HARDWARE DESCRIPTION JUMPER FUNCTIONS JUMPER DEFAULT NAME DESCRIPTION JP1 On isoSPI Term Enable/disable 100e isoSPI bus termination. If LTC2949 is the only device on the isoSPI bus or connected on top of a cell monitor isoSPI daisy chain, the termination must be enabled. If LTC2949 is connected in parallel to a daisy chain (LTC2949 is fed into the input of a daisy chain via J1, J2) of cell monitors, the termination must be disabled. JP2 EN Auto Sleep Enable/disable automatic entering of sleep state after power-up. The LTC2949 automatically returns to sleep state if no wake-up confirmation command is received within 1 second after entering standby state, after power-up. Wake-up confirmation can be either writing 0x00 to register 0x70 or starting of a measurement. LTC2949 will not go automatically to sleep if SDA is pulled low (JP2 at position DIS) during power-up. As SDA is also used for the optional external EEPROM, it must be released from GND to allow communication to the EEPROM. In most applications, the Auto Sleep will stay enabled and the muster will send the wake-up acknowledge. Still, for debugging purposes, this jumper may be set to DIS to force LTC2949 to stay in standby mode. JP3-JP6 isoSPI SPI/isoSPI Select between nonisolated SPI or isolated isoSPI communication mode. All jumpers must be either set to the left (SPI) or the right (isoSPI) position. In case the QuikEvalTM connector J4 is connected to a Linduino, the interface must be set to SPI. JP7, JP8 Low High/ Low Side Select between high or low side current sensing. To avoid the sense resistor being floating, it can be tight to either LTC2949's GND (low side sensing) or to LTC2949's A/DVCC (high side sensing). It is also possible to remove both jumpers (or set JP7 to low and JP8 to high) if the shunt is applied somewhere between LTC2949's supply rails by external connections. See following sections for example setups. JP9 EN PWR JP10 7V ADVCC Enable (7V)/disable (off) connection of LTC2949's A/DVCC supply input to V+ of J4. If Linduino is connected to J4, V+ is supplied with 7V from a SMPS with post LDO on the Linduino. The Linduino allows to override this voltage up to LTC2949's max. operating voltage of 14.5V via turrets ADVCC and GND. If JP10 is set to off, it is also possible to apply any voltage between 4.5V and 14.5V to ADVCC and still use the Linduino connected via J4. JP11 5.3V VOUT Onboard isolated flyback converter LT8301 output voltage selector. Select one of three (5.3V, 9.0V, 12.4V) pre-configured output voltages for the flyback converter. Higher supply voltages are useful to take advantage of LTC2949's GPOs being able to drive the output to one of LTC2949's supply rails. This allows for example to ensure sufficient gate-source voltage when using MOSFETs to switch high voltage resistive dividers connected to LTC2949's voltage inputs. See Hardware Setup Examples section and LTC2949 data sheet for more details. 6 Enable/disable the onboard flyback converter LT8301. The isolated onboard supply can also be disabled by disconnecting VCC, LGND or setting VCC, LGND to less than 3V (see VUVLO-). Rev. 0 DEMO MANUAL DC2732A HARDWARE DESCRIPTION CONNECTOR FUNCTIONS CONNECTOR J1, J2 NAME DESCRIPTION SPI Master, Cell isoSPI connectors. Pin 1 (iso-) and Pin 2 (iso+) of both connectors are connected in parallel. Thus, any of the two Monitors connectors can be used as the interface to the isoSPI master. For clarity, they are still named differently to indicate one connector can be used to interface to the isoSPI master and one to a cell monitor. Having two connectors allows the DC2732A to be easily inserted into the isoSPI bus between a LTC6820 and a LTC681x/ADBMS681x cell monitor by using two standard Ethernet cables. Physically the LTC2949 is then connected in parallel to this isoSPI bus and the isoSPI termination resistor (see JP1) must be disabled. J3 EXT J4 QuikEval General purpose I/O connector. Allows connection to LTC2949's analog inputs V2 to V7, VBATP, VBATM, general purpose I/Os V8 to V10, reference output VREF and supply voltage A/DVCC. See Pin Functions or schematic for pinassignment. Linduino QuikEval connector. Connect the 14-pin flat ribbon cable between this connector and Linduino for nonisolated SPI operation. Keep in mind that the Linduino has an isolated USB interface, meaning also in this setup the DC2732A is isolated from the PCs USB port. Also note, that the Linduino's default VCCIO output voltage setting (Pin 2) is 5V, whereas LTC2949's max. IOVCC operating voltage is 4.5V. The absolute maximum voltage for IOVCC of LTC2949 is 5V plus some safety margin Analog Devices puts on such parameters, thus no damage will happen even with Linduino's VCCIO tolerances. Still, for operation within LTC2949's specifications, it is recommended to set the jumper JP3 of the Linduino to any of EXT, 2.5V or 3.3V. It is also allowed to remove the jumper which sets VCCIO to 1.8V. In case EXT is selected, an external voltage of 1.8V to 4.5V must be applied to JP1 of Linduino or to test point IOVCC of DC2732A. J5 I2C I2C test points. Allows to connect a scope or 2nd I2C master to the onboard I2C EEPROM for debugging purposes. J6 EXTCLK External clock interface. In case the internal oscillator and the optional onboard 4MHz crystal is not used, an external oscillator between 10kHz and 25MHz can be connected to those test points. J7 NTC (V1) External NTC connection. The DC2732A, as default, has an onboard NTC that is connected to V1 and to IM (negative shunt terminal). This allows a good thermal (via big copper plane) connection to the shunt for sensing its temperature. As the NTC is put into a voltage divider between VREF and GND, it requires the shunt to be configured for low side sensing (IM connected to GND via JP8). To allow the temperature measurement of the shunt also in high side current sensing applications, it is possible to remove the onboard NTC R1 and connect an external, wired NTC to J7. For tight thermal coupling the external NTC can then be clued to the shunt (electrical isolated). If shunt temperature measurement is not required in high side sensing applications, it is not necessary to remove the onboard NTC. Still, if leaving the NTC R1 populated, the analog input V1 can't be used for other purposes. To allow usage of V1 for other analog input signals, the NTC R1 and the reference resistor R3 must be removed. J8 GPO J9 Heart Beat J8, J9 Isolated digital interface to LTC2949's alert signals (heart-beat signals DO4, DO5). If enabled, the heart beat signals of LTC2949 toggle at 400kHz at normal operation. They are transferred via capacitors and the dual isolation transformer T4 over the isolation barrier, rectified and buffered via the dual comparator LT6700. The open-drain output signals are driven to VCC by weak 150k pull-up resistors, as long the heart beat signals are toggling. The weak pull-up resistors allow to connect low-ohmic (e.g., 3.3k) external pull-up signals to a different I/O voltage if required. In case of an alert (e.g., over current), the associated heart beat signals stop, and the comparator's output is pulled low indicating the alert on the isolated, low voltage side. See LTC2949's data sheet for details on the heart beat signals. Test points to the heart beat signals after the isolation transformer and before the rectifier. For debugging purposesonly. In addition to the alert and heart-beat signals, those connectors also allow access to the supply voltage input VCC and LGND of the onboard flyback converter. Rev. 0 7 DEMO MANUAL DC2732A HARDWARE DESCRIPTION CONNECTOR J3 PIN ASSIGNMENT PIN NAME DESCRIPTION PIN NAME DESCRIPTION 15 GND LTC2949's GND 16 VREF Negative BAT Input 14 VBATP Analog Input, a 100k NTC/RREF is Connected Onboard 12 V3 Analog Input V3 LTC2949's 3V Reference Voltage Output 13 VBATM 11 NTC2+V2 Positive BAT Input 9 V4 Analog Input V4 10 V5 Analog Input V5 7 V6 Analog Input V6 8 V7 Analog Input V7 5 V8_DO1 Analog Input V8/Digital Output DO3 (Note 4) 6 V9_DO2 3 V10_DO3 Analog Input V10/Digital Output DO3 (Note 4) 4 GND 1 GND LTC2949's GND 2 ADVCC Analog Input V9/Digital Output DO2 (Note 4) LTC2949's GND LTC2949's ADVCC Supply Voltage Note 1. All dual purpose pins (GPIOs) do not have their filter capacitor populated on the PCB. This was done to not interfere with the digital output function (including the 400kHz toggling mode) of those pins. It is recommended to assemble an input filter capacitor (C14, C19, C20) to the GPIOs that are used in analog input only mode for best noise filter performance. PIN FUNCTIONS PIN/ TURRET NAME DESCRIPTION PIN/ TURRET NAME DESCRIPTION E1 BATP See J3 VBATP E10 VREF See J3 VREF E2 BATM See J3 VBATM E11 ADVCC See J3 VBATP E3 V3 See J3 V3 E12, E13 GND See J3 VBATP E4 V4 See J3 V4 E21 MISO LTC2949's SPI Interface (When Configured to SPI Mode, See JP3-JP6) E5 V5 See J3 V5 E22 MOSI E6 V6 See J3 V6 E23 SCK E7 V7 See J3 V7 E24 CS E8 V8 See J3 V8_DO1 E9 D2 See J3 V9_DO2 E18 D4 Isolated, Rectified and Buffered Heart Bit Signal V11_DO4 E17 HB4 Isolated Heart Bit Signal V11_DO4 E19 D5 Isolated, Rectified and Buffered Heart Bit Signal V12_DO5 (Over Current Comparator Output) E20 HB5 Isolated Heart Bit Signal V12_DO5 (Over Current Comparator Output) E14, E15 LGND Negative Supply Input to Onboard Isolated Flyback Converter LT8301 E16 VCC Positive Supply Input to Onboard Isolated Flyback Converter LT8301 Note: 8 = Signals on the low voltage side, isolated from LTC2949 Rev. 0 DEMO MANUAL DC2732A HARDWARE DESCRIPTION SOLDER JUMPERS AND OTHER FUNCTIONS REF SJ1-SJ4 PCB PICTURE DESCRIPTION Normally closed solder jumpers to allow disconnection of onboard shunt RSNS1. Those are small PCB footprints that can be cut with a small knife. SJ1, SJ2 allow to disconnect I2P, I2M from the shunt. SJ3, SJ4 allow to disconnect I1P, I1M from the shunt. Once a channel is disconnected, it is possible to connect an external shunt to the test points right below the solder jumpers. After being cut, it is still possible to close them again by applying some solder. SJ5, SJ6 BYP2, IOVCC Normally closed solder jumpers to allow disconnection of onboard 4MHz crystal. Test points to LTC2949's IOVCC supply input and BYP2 3.3V supply output. The BYP2 supply output can be used to load external circuits with up to 10mA, for example to supply an external SPI isolator like ADuM141E or ADuM4154. In such applications IOVCC can be connected to BYP2 via those test points. See also Appendix A: Usage of SPI Isolator Instead of isoSPI for more details. Figure3. Solder Jumpers SJ1-SJ4, Allow Separation of the Two Current Channels Rev. 0 9 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES The DC2732A demo board can be operated in four different setup options. 1. Nonisolated SPI interface with DC2026 (Linduino) Options 2 thru 5 are isolated. 2. isoSPI interface with DC2617 (CAN to isoSPI shield) plugged on top of DC2026 (Linduino) 3. isoSPI interface with DC1941 (LTC6820 SPI to isoSPI bridge) connected to DC2026 (Linduino) 4. isoSPI interface with DC2792 (dual LTC6820 SPI to isoSPI bridge) connected to DC2026 (Linduino) 5. isoSPI interface parallel to a reversible daisy chain of cell monitors (as above with DC2792, DC2026) For option 1, the LTC2949 is supplied with 7V by Linduino. In all other cases a 5V to 12V (or up to 32V, OPTION 1: NONISOLATED SPI SETUP see performance summary) supply needs to be connected to turrets LGND and VCC on the lower left side of thedemo board. For option 1, the LTC2949 is galvanically connected to the Linduino. Still, the Linduino has a galvanic isolation to its USB port. For the other two options, the communication and supply to LTC2949 is isolated by an isoSPI transformer and flyback converter. Make sure to set the SPI/isoSPI selection jumpers J3-J6 to the correct position depending on the chosen option (SPI for option 1, isoSPI for all other options). In all setups it is possible to operate LTC2949 together with cell monitors ADBMS68xx/LTC681X. As the DC2732A has two RJ45 isoSPI connectors, this is especially easy when operating in isoSPI mode, as shown in option 5. Figure4 thru Figure6 show how DC2732A is configured and connected with above mentioned demo circuits. Figure4. Nonisolated SPI Communication and Supply via Linduino (Linduino's USB Port is Still Isolated). Supply via Turrets VCC, LGND is Not Necessary in This Setup; This is Also the Recommended Initial Setup when Using the GUI Software, the First Time as It Allows Easy GUI Installation via QuikEval; After the GUI is Installed Any Other Setup Can Also Be Used 10 Rev. 0 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES OPTION 2: ISOLATED ISOSPI DC2617 SETUP Figure5. Isolated isoSPI Communication via LTC6820 on DC2617, Isolated Supply via Turrets VCC, LGND. Optional CAN Interface via DC2617; The Linduino Sketchbook for LTC2949/DC2732A Also Contains a Software Example, that Allows Measurements Done by LTC2949 to Be Controlled and Communicated Into a CAN Environment; See Appendix A: Usage of SPI Isolator Instead of isoSPI Rev. 0 11 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES OPTION 3: ISOLATED ISOSPI DC1941 SETUP Figure6. Isolated isoSPI Communication via LTC6820, Isolated Supply via Turrets VCC, LGND; Note the Jumper Settings of DC1941 (LTC6820) Demo Board for Proper isoSPI Communication 12 Rev. 0 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES OPTION 4: ISOLATED ISOSPI DC2792 SETUP Figure7. Isolated isoSPI Communication via Dual LTC6820 Demo Board (DC2792), Isolated Supply via Turrets VCC, LGND; Note: DC2792 Can Also Be Plugged on Top of DC2026 Without Using the 14-Pin Flat Ribbon Cable Rev. 0 13 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES OPTION 5: ISOLATED REVERSIBLE ISOSPI DC2792, DC2350 SETUP Figure8. Isolated, Reversible isoSPI Communication via Dual LTC6820 Demo Board (DC2792) Together with DC2350 (LTC6812-1/LTC6813-1) 14 Rev. 0 DEMO MANUAL DC2732A HARDWARE SETUP EXAMPLES CONNECTING A HIGH VOLTAGE BATTERY Figure9. Connecting a High Voltage Battery with Resistive Divider to DC2732 for Low Side Current Sense Operation Figure10. Connecting a High Voltage Battery with Resistive Divider to DC2732 for Low Side Current Sense Operation with ChassisGND Isolation Measurement; See Appendix C: Isolation Measurement With LTC2949 for Operation and Calculation Details Rev. 0 15 DEMO MANUAL DC2732A SOFTWARE SETUP OVERVIEW The DC2732A can be controlled by the Linduino One (DC2026) board. The Linduino is an Arduino compatible platform with example code that will demonstrate how to control multicell battery stack monitor ICs and the stack monitor LTC2949. Compared to most Arduino compatible microcontroller boards, the Linduino offers conveniences such as an isolated USB connection to the PC, built-in SPI MISO line pull-up to properly interface with LTC2949's open-drain SDO, and an easy ribbon cable connection for SPI communication through the DC2732A 14-pin "QuikEval" J4 connector. Please see the Linduino web page for more details. Besides using the Linduino as a host controller, the DC2732A can also operate with any other host controller, that offers a SPI interface. Linux based evaluation, for example using a Raspberry Pi, is also supported; please contact Analog Devices for details. ARDUINO IDE SETUP 1. Download and install the Arduino IDE to the PC. Detailed instructions can be found under the quickstarttab. 2. Set the Arduino IDE to open LTC2949 Sketchbooks. From within the Arduino IDE, click on File menu select Preferences. Then under Sketchbook location: select Browse and locate the path to the extracted LinduinoSketchbook2949.zip file that was provided by ADI. a.If there is already a BMS Sketchbook, it can be extracted into the same folder as the bmsSketchbookBeta.zip. b. Also, if there is already a local copy of LinduinoScketchbook2949.zip, it can be extracted into the LTSketchbook folder. Figure11. Arduino IDE Preferences, Sketchbook Location 3. Close then re-open the Arduino IDE to enable the use of the Sketchbook Location that was previously set. 4. Select the correct COM port to allow communication to Linduino through USB. Under the Tools menu, select Port Select the highest number COMxx with the "" check mark symbol. There may be more than one option; Linduino is usually the highest COM port number. The PC screenshots used in this example show the Linduino connected to COM6. To identify the right COM port, unplug the USB cable and check which port disappears from the Tools/Port menu. 16 Figure12. Arduino IDE, COM-Port Setting Rev. 0 DEMO MANUAL DC2732A SOFTWARE SETUP OVERVIEW 5. Select the correct Arduino compatible microcontroller board. Under the Tools menu, select Board Arduino/ Genuino Uno with the "*" black dot symbol. Figure13. Arduino IDE, Board Setting 6. Open one of the programs, called "Sketches," associated with the DC2732A. In this example DC2732A_BASIC Sketch will be opened. Under the File menu, select Sketchbook Part Number 2000 2900 2949 DC2732A_BASIC. Figure14. Arduino IDE, Sketchbooks for LTC2949/DC2732A Rev. 0 17 DEMO MANUAL DC2732A SOFTWARE SETUP OVERVIEW 7. Upload the DC2732A_BASIC Sketch onto the Linduino by clicking on the Upload button on the top left corner. When this process is completed there will be a "Done Uploading" message on the bottom left corner. Figure15. Arduino IDE, Sketchbook Upload 8. Open the Arduino Serial Monitor tool. Click on the Serial Monitor button on the top right corner then the Serial Monitor window will open and show on the top left corner the COMxx used. Figure16. Arduino IDE, Serial Monitor 9. Configure the Serial Monitor to allow communication to the Linduino through USB. On the bottom of the Serial Monitor window, set the following starting from bottom left to bottom right. a.Enable "Autoscroll" b.Select Both NL and CR on the left dropdown menu. c.Select 1000000 baud on the right dropdown menu (see Serial.begin within DC2732A_BASIC.ino for the baud-ratesetting). Note: In case Arduino DUE is used, the max. supported baud rate is 250000. d.As shown in Figure17, when configured correctly the DC2732A_BASIC Sketch will start to output measurement data. Figure17. Arduino IDE, Serial Monitor Output of DC2732A_BASIC Sketch 18 Rev. 0 DEMO MANUAL DC2732A SOFTWARE SETUP OVERVIEW LTC2949 GUI SETUP Various features of the DC2732A can be demonstrated by using Analog Devices' QuikEval Software. QuikEval is a USB-based product demonstration and data acquisition software meant to be used in conjunction with the Linduino programmed with the DC590B Sketch (factory default) that connects to individual daughter cards for specific Analog Devices products. Connect the Linduino to a PC using the USB cable provided with the Linduino. Now, connect the Linduino to the DC2732A configured to SPI mode, see Hardware Setupsection. Once setup is complete (also wait for Windows installing the drivers after Linduino is connected the first time to the PC), run the QuikEval Software. QuikEval should autodetect the DC2732A and check if the LTC2949 GUI is already installed. QuikEval will automatically download and install the GUI if necessary and launch it. Once the LTC2949 GUI is installed, QuikEval is not necessary anymore and the GUI can be opened directly from the Windows Start Menu (named LTC2949). In case the DC2732A is operated in isoSPI mode in which the Linduino is not connected via the 14-pin ribbon cable directly to DC2732A but to some isoSPI demo board (DC1941, DC2792, DC2617), QuikEval is unable to detect the DC2732A as it will only read the identification EEPROM on the isoSPI demo board and thus try to launch other GUIs that are not compatible with LTC2949. Still, if the LTC2949 is opened directly from the Windows start menu it will operate normally (QuikEval should be closed before opening the LTC2949GUI). LTC2949 WINDOWS GUI USAGE The DC2732A software user interface was designed to allow users to quickly evaluate the LTC2949. The user has the ability to plot/monitor voltage, current, power, charge and energy, and fully access LTC2949's register map to make any configuration. Also, operation of LTC2949 together with ADBMS68xx/LTC681x cell monitors e.g., to do synchronous measurements of cell voltage and battery stack current is supported. After the connection is established, most typical basic operation steps are: Once the graphical user interface (GUI) is started, the user can connect to the LTC2949 via Linduino and the GUI will initially read out all the register values from the LTC2949. The LTC2949 GUI is split into several sub-windows that can be rearranged and even detached from the main window by dragging the title, moving around and dropping to a new position. Some sub-windows are hidden and can be shown by enabling them in the View menu. All this allows 1. Starting continuous conversion. 2. Enabling Register Auto Read (data transfer from device to PC). 3. Clearing device's accumulators and trackers and GUI'splots. Figure18. GUI: Connect Device Rev. 0 19 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE the GUI to be adjusted to any screen size and to show only the information that is of interest for a given application without overwhelming the user with the large feature-set of the LTC2949. Figure19. GUI: Main Window Any custom GUI layout may be set as the default (View Set Default Layout), stored to a specific file (View Save Layout...) or reloaded (View Get Default Layout or Load Layout...). The default layout will always be reloaded on start-up. The GUI may be reset to the factory default layout by View Reset Default Layout. OPERATION CONTROL The Operation Control functions are: 1. Connect/Disconnect Device via USB (Linduino/ DC2026). 2. Enable/Disable Continuous measurement. 3. Make Slow Channel Single conversion. 4. Shutdown Device. 5. Reset Device. 20 6. Time Base Control to set internal or external clock frequency including calculation of PRE/DIV values for a given clock (see also Tools Menu section). 7. Enable/Disable Register Auto Read. If enabled data is automatically transferred from device to PC every 100ms (default), see Auto Read Menu section. 8. Manually Update All Registers (manually transfer all data from device to PC). 9. Clear Accumulator and Tracking registers. 10.Clear Accumulator and Tracking registers and reset all data in all plot windows. 11.Update Configuration from 2nd memory page (ADJUPD which is necessary when changing gain correction factors, ADC configuration etc.). 12.Configure ADCs (requires ADJUPD to become effective). Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE 13. Configure Fast Channel (only possible when in Continuous mode). 14. Configure AUX multiplexer. 15. Set NTC parameters (requires ADJUPD to become effective). 16. Configure sense resistor's nominal value and ratio in case two separate sense resistors are used (only change of ratio requires ADJUPD to become effective). Figure20. Operation Control Functions Rev. 0 21 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE In case the GUI is not connected to the device, all controls but the green "Connect Device via USB" button are disabled. Hit the green button to establish the connection. A window is shown allowing to specify the COM port of the Linduino, the used chip select (CS) line and the optional configuration of attached cell monitors. In case the dual LTC6820 demo board (DC2792) is used, the CS configuration can be set to Aux or Main to allow usage of one of the two isoSPI ports of DC2792. For any other hardware setups, where DC2792 is not used, CS must be set to Main. clicked. If Register Auto Read is enabled, the Time Base Control values won't be updated if the user is making changes to it. Any changed values will be discarded and replaced by the current device values if the Write button is not clicked. If Register Auto Read is disabled, a click on the Read button will get the current values from thedevice. Once the connection is established all sub-windows are enabled and the GUI will be ready to control the device. The COM port used for communication will be reported in the Status Bar. The buttons labeled "Continuous", "Shutdown" and "Register Auto Read" are two-state-buttons, meaning, they change color if they are enabled (highlighted, e.g., blue) or disabled (default e.g., grey). Figure20 shows the GUI running continuous measurements and Register Auto Read enabled. Shutdown will put the device into a low power state. Any serial transaction to the device will wake it up immediately. For this reason, Register Auto Read will always be Figure22. GUI: Multimeters MULTIMETERS The GUI shows all measurement quantities in digital multimeter styles. As default all multimeter views are enabled in the View menu, but accumulators C2, E2, TB2, C3, E4, TB3, TB4 are hidden under the Charge, Energy, Time 2 tab. Figure21. GUI: Sleep/Shutdown Note disabled before issuing the shutdown command to the device. The GUI will report this as shown in Figure21. Figure23. GUI: Charge, Energy, Time Most of the GUI controls will take effect immediately once they are clicked or a value is entered. The only exception is the Time Base Control. Any changed configuration and entered value will only take effect after the Write button is Accumulated quantities are shown in units of h, Wh, Ah by default. The units can be changed by right mouse clicking on a specific multimeter and selecting a different unit from the opened context menu. The Charge, Energy, Time 22 Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE 1 multimeter in Figure23 shows the context menu for unit selection. The Charge, Energy, Time multimeters include a calculated mean power display. This value is calculated by the GUI using Energy E1 and Time Base TB1 from the device and equals E1/TB1. PLOTS/DATA COLLECTION The GUI provides several plots of collected data. There is a plot for slow channel non-accumulated measurements such as current, voltage, power and temperature. Another plot is for accumulated charge. There is also a plot for energy over time and a plot for fast channel measurements. These plots will collect data whenever the device is in continuous measurement mode and measurement results are read from the device either by a manual read (e.g., Update All Registers or read via the register map) or by the Registers Auto Read function. * Enable Register Auto Read. * Optional: clear device's accumulators, trackers and GUI's plots to have a clean start for data acquisition. The order of those steps does not matter. Any time Continuous and Auto Register Read are activated, data collection is performed automatically. By default, the plots do not show all available inputs/channels. Some channels are hidden but may be enabled via the plot's context menu, which can be shown by right mouse clicking in the plot area. The sub-menu Channels will list all available data inputs, see Figure24 as an example for the fast and slow channel plots. The plot context menu's functions are: 1. Clear All plot data. 2.Zoom. 3. Zoom All Plots. The basic steps to start data collection in Register Auto Read mode are: 4. Export plot data to Clipboard as CSV (Commaseparated values). * Set continuous conversion. 5. Export plot data to File in CSV format. Figure24. GUI: Plot Window's Context Menu, Select Channels Rev. 0 23 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE 6. Display/Hide Channels. 7. Display/Hide Trackers (minimum/maximum values, not available for fast channel and not for accumulated quantities like charge, energy). 4. Show label with data point values by left mouse click on a data line. 5. Zoom vertically by rotating mouse wheel over theY-Axis. 8. Display/Hide Thresholds (low/high alert values, not available for fast channel). PLOT ZOOM FIT The plots may be zoomed in different ways. "Zoom Fit All" will fit all data except trackers and thresholds into the plot area. "Zoom Fit X-Axis/Y-Axis" will do the same for X/Y axis only. "Zoom Fit Limits" will again fit all axes but will include trackers and thresholds. The latter is helpful Figure26. Plot Pan Vertically by Right Mouse Clicking on Y-Axis Figure26. Plot Pan Horizontally by Right Mouse Clicking X-Axis Figure25. GUI: Plot Window'S Context Menu, Zoom to show the device's thresholds which may be far above/ below typical measurement values. The low thresholds, for example, are set to the most negative register value. In case of power the threshold's low (P1TL) default value is -7650.41 Watts (assuming 100 shunt). Figure27. Plot Pan Vertically and Horizontally by Right Mouse Clicking in Plot Area The Menu "Zoom All Plots" provides the same functionality but applies the zooming to all plots at the same time. PLOT PAN, ZOOM, LABELS The following mouse gestures are supported by the plotwindows. 1. Pan vertically by right mouse clicking the Y-Axis. 2. Pan horizontally by right mouse clicking the X-Axis. Figure28. Plot Show Label by Left Mouse Clicking on Data Line 3. Pan vertically and horizontally by right mouse clicking the plot area. This will pan the first visible channelonly. 24 Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE 6. Zoom horizontally by rotating mouse wheel over theX-Axis. 7. Zoom vertically and horizontally by rotating mouse wheel over the plot area. This will zoom the first visible channel only. See also Figure26 thru Figure28 on how to pan, zoom and showlabels. CHANGE THRESHOLDS ON-THE-FLY Once the thresholds are visible, they can be dragged by the mouse and set to a new desired value. Dragging is indicated by a bold threshold line in the plot, see Figure29. The new value is written to the device immediately. The threshold's visibility may be changed in the context submenu Thresholds. Figure29. Voltage Plot, Dragging of TH/TL BAT Indicated by Bold Threshold Line Figure30. Plot Window Show Min/Max Trackers Figure31. Plot Window Export Data Rev. 0 25 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE Figure32. Import Plot CSV Data Into Excel PLOT TRACKERS The trackers show the minimum and maximum values of the non-accumulated quantities (Current, Voltage, etc.). Overwriting trackers is not possible from the plot window but can be done in the register map control, see the Register Map section. EXPORT PLOT DATA There are two ways to export the collected data as CSV (comma-separated values) from the plot. Export to Clipboard will copy the selected channel data to the clipboard to be able to paste it to some other program like MS Excel. Export to File allows the user to choose a file to store the data. See Figure31. The CSV data can be easily imported into MS Excel using the Text Import Wizard as shown in Figure32. PLOT TIME AXIS All data is plotted over time, but the meaning of time differs for the two plots. Non-accumulated quantities (current, voltage, etc.) are plotted over real time of the PC. The time starts when the first values are read from the device while in continuous mode or when the plots are cleared. 26 The accumulated quantities charge and energy are plotted over the corresponding time base. Whenever a triplet of charge, energy and time of any of the two accumulator sets is read, it is added to the plot. Charge, energy and time may be modified during measurement either by a direct write or by issuing the Clear (Clear Accus, Trackers) command. Doing so will result in a jump in the plot. If the time base after this modification is lower than the last time read, the plot will even go backwards. If this behavior is not desired, it is recommended to clear accumulators and trackers together with the plot data (Clear Accus, Trackers, Plots) or clear the plot data manually (Clear All from the plot's context menu). REGISTER MAP The Register Map allows direct access to all device Registers/Values (see Figure33). All data is shown in a table where each cell corresponds to a single-byte register or multiple-byte registers grouped to a single device value like charge, energy and current. EDIT REGISTER VALUES Register values can be edited either by selecting a cell and typing a new value or by double clicking on the cell to modify the current value. New values are written to the Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE Figure33. Register Map Control LTC2947 after pressing enter or leaving the cell. An entered value may be discarded by pressing the Escapebutton. REGISTER CONTEXT MENU By clicking on any register header (e.g., Status) or right clicking on any register value (shown underneath the header), a context menu with the functions is shown: 1. Change cell's display format. 2. Show cell/register details. 3. Write cell/register value to device. 4. Read cell/register value from device. 5. Select all cells. 6. Export all to Clipboard. Format and Details will be explained in the following paragraphs. The Write and Read command will immediately write or read the selected cell value to or from the device. Select All will select all the cells. It is also possible to select a range of cells or some individual cells by using Ctrl or Shift key plus the mouse button. The procedure is the same as for other Windows programs like MS Excel, for example. The purpose of selecting more than one cell is to read and write or change the formats of several cells at once. DISPLAY FORMAT SELECTION Each cell's display format may be set to either Hexadecimal, Decimal, Binary or Physical. The Physical format (in A, As, W, V, etc.) is only available for cells having a physical value representation as the measurement, tracking and threshold values. Rev. 0 27 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE The default cell format is Decimal. All cell values may be changed at once to the physical format, for example. This is done by first selecting all cells, either using the shift key plus mouse button or by using the Select All function from the context menu. Then right click on any of the selected cells to open the context menu and set the new format. The binary and hexadecimal formats are indicated by a 0b and 0x suffix. The physical and decimal format can be distinguished by the tooltip that is shown after the mouse has rested for a short while over the cell value. This tooltip will show the corresponding unit if it is a physical value or the corresponding LSB value for all the other formats. Figure34. Register Details View, OPCTRL Example Figure35. Register Details View, FCURGPIOCTRL Example Figure36. Change Format of Register Values 28 Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE Figure37. Tooltip Showing Register Description Figure38. Tooltip Showing Register Value LSB Size REGISTER MAP TOOLTIPS The register map includes a lot of helpful information shown in tooltips. They appear after the mouse has rested for a short while over an element of the register map. REGISTER DETAILS For registers that have bits assigned to functions, the register context menu provides access to a details view. Figure34 shows as an example the access to the details view of OPCTL. Click on the name OPCTL or right click on the cell value, select Details from context menu. All bits with defined functions are listed with check boxes next to them indicating if the corresponding bit is set or not. Tooltips show more detailed descriptions for each bit. Any changes may be performed by clicking on the check boxes. After clicking on Confirm changes the new value is assigned to the cell, still allowing to make changes to it. The new value will be written to the device after hitting the ENTER key or leaving the cell (e.g., clicking somewhere else in the register map). Figure39. Auto Read Menu The update time may be adjusted between 1ms and 10s. An error will be reported if the entered value is outside this range. Note, that the update time is not the period at which data is read from LTC2949, but rather the delay between performed updates. This means the period will always be longer than this time and depends also on the performance of the used PC. Still, the main limitation of update speed is the serial interface to the Linduino. Update speed can usually be increased by selecting only the measurements from the Auto Read menu that are of interest for the current evaluation purpose and disable all the others. It is then still possible to manually read other values from the Register Map, even while Auto Read is enabled. AUTO READ MENU The Auto Read menu allows users to specify which registers/values are read from the device if Register Auto Read is enabled. The update time may also be specified here. Once Register Auto Read is clicked the first time, it will automatically make the configuration to read Current, Voltage, Power, Temp. from slow channel and set the update time to 100ms. Figure40. Valid Range of Update Time Rev. 0 29 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE 8. Go to "Auto Read" menu and select. a.Fast all. b.Page0 Registers/Values. c.Enable. 9. The Plot: "Fast Channel" and the "Fast Channel Multimeter" will show the fast measurements. From the fast channel plot context menu select "Channels" "BAT..." to also enable plot of battery voltage. 10.From MUX Settings set Fast to V8 - GND (Note: V8 is one of the dual purpose pins GPIO1). Figure41. Tools Menu TOOLS MENU The Tools menu provides access to a stand-alone TBC Calculator and to report functions that generate C-compliant source code for register, bit and LSBdefinitions. BASIC OPERATION EXAMPLE The following shows an example of basic configuration and operation of LTC2949 with the GUI. 1. Enable default Layout of the GUI. a.View Reset Default Layout. 2. Connect to device from operation control. 11. From the center low Element of the GUI Window select "Register Map", from which all registers of LTC2949 can be accessed. 12. Scroll down little bit to see the register row "OPCTRL, FCURGPIOCTRL, FGPIOCTRL, ...." 13.Right click on FGPIOCTRL. 14.Enable GPIO1CTRL1 (all other disabled). 15.Hit Enter (from you keyboard) two times to confirmchanges. 16. The new configuration is now written to LTC2949 and activates the toggling on GPIO1 (V8) 17.Watch the effect in the Plot: fast channel. 4. Click Update Configuration from Operation Control/Misc. 18.Change GPIO1 setting from register map from FGPIOCTRL: Values can also be just entered in the cell of FGPIOCTRL and confirmed by pressing the enter key (Figure47). 5. Click Continuous from Operation Modes. 3.Enable P2 as voltage from ADC config. 6. Enable Ch2 fast and AUX fast from Fast Channel Control. 7. From MUX Settings set Fast to VREF2 - GND (any other channel is also possible, e.g., if some external signal is applied). 30 a.Alternate between 0, 1, 2, 3 and watch the effect in the Plot: fast channel, Auxiliary fast channel (Figure48). 19.Note: Setting the GPIO control bits to 1,1 (decimal 3) will enable the output driver to go to DVCC which can be above the full-scale range of the ADC, depending on the power supply voltage of AVCC, DVCC. The ADC will just saturate to its full-scale value. Rev. 0 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE Figure42. Auto Read Menu for Basic Operation Example Figure44. Plot Channels Menu for Basic Operation Example Figure43. Fast Channel Plot for Basic Operation Example Rev. 0 31 DEMO MANUAL DC2732A LTC2949 WINDOWS GUI USAGE Figure45. Register Map Access for Basic Operation Example Figure46. FGPIOCTRL Register Details View to Control GPO1 for Basic Operation Example Figure47. FGPIOCTRL Register Direct Access for Basic Operation Example Figure48. Fast Channel Plot for Basic Operation Example Showing Alternating AUX Measurements 32 Rev. 0 DEMO MANUAL DC2732A APPENDIX A: USAGE OF SPI ISOLATOR INSTEAD OF ISOSPI If required by customer, it is also possible to use a SPI isolator instead of LTC2949's integrated isoSPI. One example is the ADuM141E which could be inserted into the SPI interface using the Linduino QuikEval connector J4 and then connect to the Linduino or any other host controller, as shown in in Figure49. In this scenario IOVCC of the LTC2949 is shorted to BYP2 which will then also supply VDD1 of the ADuM141E. Usage of other SPI isolators with additional chip select lines is also possible, which would allow to connect additional SPI slaves together with LTC2949. Please contact Analog Device for details on this evaluation setup. Figure49. ADUM141E SPI Isolator Schematic Rev. 0 33 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION The DC2732A can be used in conjunction with the Linduino and the DC2617A in a CAN based evaluation and test environment, which is described in the followingparagraphs. HARDWARE REQUIREMENTS * DC2732A_CAN.dbf loaded to the CAN analyzer software. *Optional: Serial terminal software (e.g., Arduino IDE's serial monitor) connected to the Linduino's COM port. * DC2617A (CAN to isoSPI shield). SETUP THE HARDWARE * DC2732A (LTC2949 demo board). Put the DC2617A on top of the Linduino. Connect LTC2949 demo board via an Ethernet cable to the RJ45 connector. Connect power to the Linduino (either via USB or AC ADAPTOR IN). Set JP1 on DC2617A to ARD and JP2 to ON to enable 120R CAN bus termination. * Ethernet cable. * 5V power supply. * Linduino (DC2026). * Power to the Linduino (either via USB or AC ADAPTORIN). Note 1: If the Linduino is connected to a USB port of a PC, depending in the operating system, the board will make periodic resets. This is caused by Windows and the USB COM port driver accessing the COM port assigned to the Linduino. This can be prevented by either making a connection via a serial terminal to the COM port or by connecting a 120R pull-up on Linduino between RST and IOREF. If a plain external USB power supply or the "AC ADAPTOR IN" is used to power the Linduino, this problem does not appear. Note 2: 5V supply input of the LTC2949 demo board may be connected to VCC, GND turrets of DC2617A. Still this is not recommended as it shorts the galvanic isolation between LTC2949 and DC2617A. *Optional: 120 reset pull-up on Linduino between RST and IOREF to prevent Linduino reset in case Linduino is connected to the USB port of a PC, but its COM port is not opened. SOFTWARE REQUIREMENTS * Some CAN analyzer or CAN master to control the DC2732A_CAN and receive messages (e.g., BUSMASTER). * DC2732A_CAN.ino programmed to the Linduino. Figure50. 34 Rev. 0 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Connect 5V to 12V supply to DC2732A demo board. Connect Ethernet patch cable between RJ45 connectors of DC2732A and DC2617A. The DC2732A_CAN uses CAN messages listed in Table 1. See also DC2732A_CAN.dbf / DC2732A_CAN.dbc for scaling factors and units. All current dependent measurement quantities have to be scaled with 1/RSNS, where RSNS is the resistance of the shunt resistor. Example ACC_C1/ACC_E1: The scaling factors and units from the .dbc file are: BO_ 293 ACC_C1: 6 Vector__XXX SG_ C1 : 7|48@0- (0.377887,0) [-5.31829e+013|5.31829e+013] "uVms" Vector__XXX BO_ 294 ACC_E1: 6 Vector__XXX SG_ E1 : 7|48@0- (2.32175,0) [-3.26757e+014|3.26757e+014] "uVVms" Vector__XXX BO_ 295 ACC_TB1: 4 Vector__XXX SG_ TB1 : 7|32@0- (0.397777,0) [-8.5422e+008|8.5422e+008] "ms" Vector__XXX Figure51. DC2732A Demoboard DC2732A_CAN: LTC2949 CAN FIRMWARE DC2732A_CAN's CAN baud rate is set to 500k Bit/s but may be changed via the Serial monitor. CAN Messages Overview The DC2732A_CAN uses CAN messages listed in Table1. See also DC2732A_CAN.dbf. The factors are taken from LTC2949 data sheet: Table 26. Accumulated Results Register Parameters for Use with Crystal or Internal Clock but scaled for units ms and V. Charge is given in microvolts times milliseconds, Energy is given in microvolts times volts times millisecond. The conversion to As/Ws in case of a 100 shunt is: Charge = ACC_C1[uV*ms] / 1e6[uV/V] / 1000[ms/s] / 100e-6[Ohms] = ACC_C1 * 1e-5 [Vs/Ohms = As] Energy = ACC_E1[uV*V*ms] / 1e6[uV/V] / 1000[ms/s] / 100e-6[Ohms] = ACC_E1 * 1e-5 [V2 s / Ohm = VAs = Ws] Figure52. FSSHT, FIFOAUX, FIFOBAT, FIFOI2, FIFOI1, FIFOAUXAVG, FIFOBATAVG, FIFOI2AVG, FIFOI1AVG Use the Little-Endian Representation for Their Signal Data (All Other Messages Use Big-Endian Format) Rev. 0 35 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Table1. CAN Messages with Measurement Values Send by DC2732A_CAN ID NAME SIGNAL T, [BYTES], BITS CFG2949 FLAG DESCRIPTION 0x110 IP1V I1 Int, [2:0], 24 MEAS_I1 Current1 P1 Int, [5:3], 24 MEAS_P1 Power1 BAT Int, [7:6], 16 MEAS_BAT Battery Voltage P1 Will Be Reported by This Message If P1ASV Flag is Not Set. Otherwise Battery Voltage by Power ADC Will Be Reported by PASV Message. 0x111 IP2T I2 Int, [2:0], 24 MEAS_I2 Current2 P2 Int, [5:3], 24 MEAS_P2 Power2 TEMP Int, [7:6], 16 MEAS_TEMP IC Temperature P2 Will Be Reported by This Message If P2ASV Flag Is Not Set. See Also Note Above. 0x112 SVR SLOT1 Int, [1:0], 16 MEAS_SLOT1 Slot1 voltage SLOT2 Int, [3:2], 16 MEAS_SLOT2 Slot2 voltage VREF Int, [5:4], 16 MEAS_VREF Reference Voltage (VREF Pin) VCC Int, [7:6], 16 MEAS_VCC IC Supply Voltage SLOT1/SLOT2 Voltage Will Be Reported by This Message If SLOT1NTC/SLOT2NTC Flag Is Not Set. Otherwise Temperature by NTC Measurement Will Be Reported by SLOTSNTC Message. 0x113 SLOTSNTC NTC1 Int, [1:0], 16 MEAS_SLOT1, SLOT1NTC NTC Temperature Measurement via Slot1 NTC2 Int, [3:2], 16 MEAS_SLOT2, SLOT2NTC NTC Temperature Measurement via Slot2 NTC1/NTC2 Temperature Will Be Reported by This Message If SLOT1NTC/SLOT2NTC Flag Is Set. 0x114 PASV P1V Int, [2:0], 24 MEAS_P1, P1ASV Power1 as Voltage P2V Int, [5:3], 24 MEAS_P2, P2ASV Power2 as Voltage P1V/P2V (Power ADC in Voltage Mode) Will Be Reported by This Message If P1ASV/P2ASV Flag Is Set. 0x115 No used 0x116 No used 0x125 ACC_C1 C1 Int, [5:0], 4 8 ACC Charge1 0x126 ACC_E1 E1 Int, [5:0], 48 ACC Energy1 0x127 ACC_TB1 TB1 Int, [3:0], 32 ACC Time1 0x128-0x12E Optional, See Below. C2, C3, E2, E4, TB2, TB3, TB4 are not reported as default. Values can still be read via RAWRW if required. Alternatively, if dedicated CAN messages for those additional accumulators are needed, they can be enabled within the DC2732A_CAN.ino source code via the preprocessor definition ENABLE_CAN_ ID_ACC_C2_TO_TB4. Those messages will have the CAN IDs 0x128-0x12E. Notes: 1. "T, [Bytes], Bits' indicates the type, byte order (typically big-endian) and number of bits. For example, "Int, [0:2], 24" refers to a 24-bit big-endian integer value stored in CAN message data bytes 0 to 2 where byte 0 is the MSB. 2. CFG2949 flag refers to the Boolean signal within CFG2949 that enables the related measurement signal. Above CAN messages will be send if any of the related CFG2949 flags are enabled. Signals within CAN messages that are not enabled will report the most negative value. 36 Rev. 0 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Table2. CAN Messages Send to DC2732A_CAN to Configure Fast Measurements ID NAME SIGNAL T, [BYTE], BITS DESCRIPTION 0x11D FASTRQ SAMPLES UInt, [1:0], 16 Number of samples to be read on demand or per cycle. Or number of samples of moving average filter for I2. FAST_MEAS_ PERIOD UInt, [2], 8 Fast measurement cycle time in milliseconds. If greater than zero, fast measurements are reported periodically. If zero a single measurement (on demand) is reported. Fast conversion request. For fast continuous measurements SAMPLES is the number of samples to be read from FIFO. If SAMPLES is 0 or 1, no samples will be read from the FIFO, instead only the latest converted sample is read via RDCV command and reported. For fast continuous measurements with FAST_MEAS_PERIOD = 1, no samples will be read from the FIFO, instead only the latest converted sample is read via RDCV command and reported. For fast single shot measurements SAMPLES sets the number I2 samples moving average filter. Set to 0 or 1 to disable. If set to >1 and <129 the moving average filter of I2 fast samples is enabled and filtered I2 fast single shot result will be transmitted via FSSHTMA. This is for a typical configuration where I1 is doing slow precision measurements for coulomb counting and only I2 (and optional BAT and AUX) is doing fast conversions. Table3. CAN Messages Send by DC2732A_CAN to Report Fast Measurement Results ID NAME SIGNAL T, [BYTE], BITS 0x118 FIFOI1 S0 Int, [1:0], 16 0x119 FIFOI2 S1 Int, [3:2], 16 0x11A FIFOBAT S2 Int, [5:4], 16 0x11B FIFOAUX S3 Int, [7:6], 16 DESCRIPTION Four fast continuous conversion results. N samples read from the FIFO will be reported by N/4 CAN messages. If N is not a multiple of 4, the last message will be truncated accordingly (e.g.,if 10samples are reported, the last message will contain only S0 and S1 and thus only have 4 bytes). Signal format is little endian. 0x11C FSSHT I1 Int, [1:0], 16 I2 Int, [3:2], 16 BAT Int, [5:4], 16 AUX Int, [7:6],16 Fast single shot conversion result or last conversion result in fast continuous mode. This message is used to report fast single shot conversion results. In case fast continuous mode is activated and 0 or 1 (= signal SAMPLES of message FASTRQ) samples are requested, this message will be used to report the last acquired sample from the fast channel. Signal format is little endian. 0x120 FIFOI1AVG 0x121 FIFOI2AVG 0x122 FIFOBATAVG 0x123 FIFOAUXAVG ...AVG Int, [3:0], 32 Average of all samples multiplied by 1024 (= fixed point representation with 10 fractional bits) LEN UInt, [5:4], 16 Number of samples acquired to calculate the average The LSB size of the above average signals is those of FIFOI1, FIFOI2, FIFOBAT, FIFOAUX Divided by 1024. Signal format is little endian. 0x124 FSSHTMA I2MA Int, [3:0], 32 Moving average of fast single shot I2 conversion results This message is used to report moving average of fast single shot I2 conversion results. Signal format is little endian. Rev. 0 37 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Table4. CAN Message Send by DC2732A_CAN to Signal Errors ID NAME 0x11E ERR SIGNAL T, [BYTE], BITS COMMERR Bool, [0] (4) FIFOWROVR Bool, [0] (5) FIFOTAGERR Bool, [0] (6) OTHER Bool, [0] (7) TIMEOUT Bool, [0] (3) FIFOALLERR Bool, [0] (2) PECERR UInt, [0] (1:0) DESCRIPTION Error message. Combination (ORing) of error codes (bits [7:2]) and PEC error counter (bits [1:0]). The PEC counter counts the PEC errors when receiving data from the LTC2949 and will stop counting at 3. Note: "T, [Byte], Bits" indicates the type and number of bits. For example, "Int, [0], 8" refers to an 8-bit integer value stored in CAN message data byte 0. Table5. CAN Message Received by DC2732A_CAN to Configure Measurements ID Name Signal T, [Byte], Bits Description 0x11F CFG2949 CH1FAST Bool, [0] (0) CH1 fast enable flag CH2FAST Bool, [0] (1) CH2 fast enable flag AUXFAST Bool, [0] (2) AUX fast enable flag FCONT Bool, [0] (3) fast continuous enable flag (fast measurements will be stored within FIFO, otherwise fast single shot measurements will be performed upon request, see FASTRQ) SLOT1NTC Bool, [0] (4) SLOT1 temperature measurement via NTC enable flag SLOT2NTC Bool, [0] (5) SLOT2 temperature measurement via NTC enable flag If enabled an NTC must be connected to the voltage inputs selected via SLOTxP/N which then will be used for temperature measurements. P1ASV 38 Bool, [0] (6) Power1 as voltage enable flag Power2 as voltage enable flag P2ASV Bool, [0] (7) SLOT1P UInt, [1] (3:0) Positive voltage input channel for SLOT1 SLOT1N UInt, [1] (7:4) Negative voltage input channel for SLOT1 SLOT2P UInt, [2] (3:0) Positive voltage input channel for SLOT2 SLOT2N UInt, [2] (7:4) Negative voltage input channel for SLOT2 SLOTFP UInt, [3] (3:0) Positive voltage input channel for SLOTF (AUX fast) SLOTFN UInt, [3] (7:4) Negative voltage input channel for SLOTF (AUX fast) MEAS_I1 Bool, [4] (0) Current1 measurement enable flag MEAS_I2 Bool, [4] (1) Current2 measurement enable flag MEAS_P1 Bool, [4] (2) Power1 measurement enable flag MEAS_P2 Bool, [4] (3) Power2 measurement enable flag MEAS_SLOT1 Bool, [4] (4) Slot1 measurement enable flag MEAS_SLOT2 Bool, [4] (5) Slot2 measurement enable flag Rev. 0 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Table5. CAN Message Received by DC2732A_CAN to Configure Measurements ID Name Signal T, [Byte], Bits Description MEAS_BAT Bool, [4] (6) Battery voltage measurement enable flag MEAS_TEMP Bool, [4] (7) IC temperature measurement enable flag MEAS_VCC Bool, [5] (0) IC supply voltage measurement enable flag. MEAS_VREF Bool, [5] (1) Reference voltage (VREF pin) measurement enable flag. Any combination of measurement enable flags may be set to NTC1_TYPE Bool, [5] (3:2) NTC2_TYPE Bool, [5] (5:4) Selects on of 3 predefined NTC parameters. NTCx_TYPE MPN A B C RREF 0 NTCALUG01A104F/TDK 9.85013754e-4 1.95569870e-4 7.69918797e-8 100e3 1 NTHCG143/Murata 8.39126e-4 2.08985e-4 7.13241e-8 100e3 2 Reserved 8.39126e-4 2.08985e-4 7.13241e-8 100e3 For NTCx_TYPE = 3, no configuration of NTC parameters will be written to LTC2949 with the CFG2949 message. This allows user defined values provided via a RAWRW message. ACC Bool, [5] (6) Battery voltage measurement enable flag. If set the accumulators C1, E1, TB1 are reported via CAN messages ACC_C1, ACC_E1, ACC_TB1. MEAS_ ENABLE Bool, [5] (7) Global measurements enable. Only if this flag is set DC2732A_CAN will do measurements and react on FASTRQ. MEAS_ PERIOD UInt, [6],8 Measurement period in multiples of 100ms. For example, if set to 10 all enabled measurement CAN messages will be send every second. If set to zero messages will be send at the update rate of LTC2949 which is ~100ms. A value of 1 (100ms) may result in a jitter of the actual send message period as the internal update rate of LTC2949 may vary and messages will never be sent before LTC2949 updates its measurement registers. Setting a value of 255 will completely disable reading of slow channel registers. Fast channel values may still be reported. FAST_MEAS_ PERIOD UInt, [7],8 Fast measurement cycle time in milliseconds. If greater than zero, fast measurements are reported periodically. Same as signal FAST_MEAS_PERIOD of CAN messageFASTRQ. Notes: 1."T, [Byte], Bits" indicates the type and number of bits. For example ,"Int, [0], 8" refers to an 8-bit integer value stored in CAN message data byte 0. 2. For Boolean signals the bit index is given in round brackets, for example, "Bool, [4] (7)" refers to a flag stored at bit position 7 within CAN data byte 4. 3. For signals covering only part of a byte the bit range is given in round brackets, for example, "UInt, [3] (7:4)" refers to an unsigned integer value covering bits [7:4] within CAN data byte 3. Rev. 0 39 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION Table6. CAN Message Send and Received by DC2732A_CAN for RAW LTC2949 Register Access ID NAME SIGNAL T,[BYTE],BITS 0x117 RAWRW WRITE Bool, [0] (7) COUNTDOWN UInt, [0], (6:1) DESCRIPTION Write flag. Set for write commands, clear for read commands. In the responding message send by DC2732A_CAN this flag will be inverted (e.g., after a write send to DC2732A_CAN the WRITE flag will be cleared in the response message) Countdown tag for multi RAWRW CAN message bursts. For RAWRW messages with up to 6 data bytes COUNTDOWN must be zero. If more than 6 bytes must be written in a burst to LTC2949 COUNTDOWN must be decremented with every message till zero for the last message. If the number of bytes is not a multiple of 6 bytes only the first message of the multi RAWRW CAN message bursts may have less than 6bytes. WRITE, PAGE and ADDR must be equal for all sub-messages of a burst. The following table shows an example how to write a burst with 16 bytes (e.g., a full row in LTC2949's register map). MESSAGE COUNTDOWN CAN DATA LENGTH DX SIGNALS 1 2 6 D0 - D1 (4) 2 1 8 D0 - D5 (6) 3 0 8 D0 - D5 (6) Messages send by DC2732A_CAN in response to a read command will make the same usage of COUNTDOWN to pack more than 6 bytes into several CAN messages. PAGE Bool, [0] (0) Register page flag. Set for page 1, clear for page 0. ADDR Int, [1], 8 Register address D0 Int, [2], 8 Write: Data byte 0/Read: Length (number of bytes to be read) D1 Int, [3], 8 Register byte 1 D2 Int, [4], 8 Register byte 2 D3 Int, [5], 8 Register byte 3 D4 Int, [6], 8 Register byte 4 D5 Int, [7], 8 Register byte 5 Notes: 1. Page as MSB followed by 8-bit address is equivalent to a 9-Bit address value as defined in DC2732A_CAN.dbf and in the register constants in LTC2949.h. 2. The number of register bytes Dx to be send in a RAWRW CAN message is defined by the CAN message data length - 2, as two bytes are always reserved for WRITE, PAGE, COUNTDOWN and ADDR. 40 Rev. 0 DEMO MANUAL DC2732A APPENDIX B: CAN BASED EVALUATION BASIC OPERATION EXAMPLES Current, Power, BAT (100ms) Examples shows measurement of Current (I1), Power (P1) and battery voltage (BAT) at LTC2949's update rate of100ms. ***BUSMASTER Ver 3.2.2*** ***PROTOCOL CAN*** ***NOTE: PLEASE DO NOT EDIT THIS DOCUMENT*** ***[START LOGGING SESSION]*** ***HEX*** ***RELATIVE MODE*** ***CHANNEL 1 - PCAN-USB Driver Id 16 - 500000 bps*** ***START DATABASE FILES*** ***DC2732A_CAN\DC2732A_CAN.dbf*** ***END DATABASE FILES*** ***