SLAA476B February   2011  – July 2019 BQ2040 , BQ2040 , BQ2060A , BQ2060A , BQ2063 , BQ2063 , BQ2083-V1P3 , BQ2083-V1P3 , BQ2084-V143 , BQ2084-V143 , BQ2084-V150 , BQ2084-V150 , BQ2085-V1P3 , BQ2085-V1P3 , BQ20Z40-R1 , BQ20Z40-R1 , BQ20Z70-V160 , BQ20Z70-V160 , BQ20Z80A-V110 , BQ20Z80A-V110 , BQ28400 , BQ28400 , BQ78PL114 , BQ78PL114 , BQ78PL116 , BQ78PL116 , LM5145 , LM5145 , MSP430F5500 , MSP430F5500 , MSP430F5501 , MSP430F5501 , MSP430F5502 , MSP430F5502 , MSP430F5503 , MSP430F5503 , MSP430F5504 , MSP430F5504 , MSP430F5505 , MSP430F5505 , MSP430F5506 , MSP430F5506 , MSP430F5507 , MSP430F5507 , MSP430F5508 , MSP430F5508 , MSP430F5509 , MSP430F5509 , MSP430F5510 , MSP430F5510 , TPS40057 , TPS40057 , TPS40170 , TPS40170

 

  1.   Wide-Vin Battery Charger Using SMBus Communication Interface Between MSP430™ MCUs and bq Fuel Gauges
    1.     Trademarks
    2. Introduction
    3. Hardware
      1. 2.1 Overall System Description
      2. 2.2 MSP430F5510 Daughterboard Subsystem
        1. 2.2.1 Subsystem Description
        2. 2.2.2 MSP430F5510 Port Pins Functionality Description
      3. 2.3 Power Stage Board Subsystem
        1. 2.3.1 Subsystem Description
        2. 2.3.2 Input Protection Features
        3. 2.3.3 Constant-Voltage and Constant-Current Feedback
    4. Software
      1. 3.1 SMBus Protocol Description
      2. 3.2 Software File Structure
      3. 3.3 API Calls Description
        1. 3.3.1  UCS_Init ( )
        2. 3.3.2  Timer_Init ( )
        3. 3.3.3  PWM_Init ( )
        4. 3.3.4  ADC_Init ( )
        5. 3.3.5  Fan_Init ( )
        6. 3.3.6  LED_Init ( )
        7. 3.3.7  SMBus_Initialize ( )
        8. 3.3.8  LED_Control ( )
        9. 3.3.9  Fan_Control ( )
        10. 3.3.10 VI_ADC_Read ( )
        11. 3.3.11 SMBus_Select ( )
        12. 3.3.12 Calibrate_Battery ( )
        13. 3.3.13 Delay_Timer ( )
        14. 3.3.14 PWM_Control ( )
        15. 3.3.15 Smbus_Access ( )
        16. 3.3.16 Smbus_Access_PEC ( )
        17. 3.3.17 crc8MakeBitwise ( )
      4. 3.4 Sample Application Description
    5. SBS Supported Commands Using SMBus Protocol
    6. Detailed Sample Application Flow Chart
    7. Battery Status Register Description
      1. 6.1 BatteryStatus (0x16)
    8. MSP430F5510 Daughterboard Schematics
    9. Setting Up the MSP430F5510 Daughterboard Hardware
      1. 8.1 JTAG FET Debugger Interface (Power Up, Program and Debug Options)
      2. 8.2 eZ430 Emulator Interface (Power Up, Program and Debug Options)
      3. 8.3 Power Stage Board (Power Up Option Only)
    10. Battery Calibration Circuit Setup
    11. 10 Battery Voltage and PWM Conversions
    12. 11 Battery Current and PWM Conversions
    13. 12 Power Stage Board Schematics (Generation 1: 40-V Input)
    14. 13 Bode Plot Measurement for Feedback Loop Stability Analysis
    15. 14 Power Stage Board Schematics (Generation 2: 60-V Input)
    16. 15 Setting Up the Power Stage Board Hardware
    17. 16 References
  2.   Revision History

Sample Application Description

The sample application included with this reference design showcases a demo smart battery charger. The application runs on the MSP430F5510 daughterboard connected to the Power Stage Board by the means of a 10-pin connector. Instructions for setting up the MSP430F5510 daughterboard are listed in Section 8 and instructions for setting up the Power Stage Board are listed in Section 15.

The hardware setup requires connecting the charger setup to a smart battery with access to the battery terminals and the SMBus communication bus. The MSP430F5510 daughterboard has two headers to connect the SMBus lines from two batteries and are illustrated in the schematic as J2 and J3 (Section 7). The Power Stage Board can independently charge two batteries and the output terminals are denoted as J2 and J12 in the illustrated schematic (Section 12 for 40 V and Section 14 for 60 V versions).

If a smart battery is not available, the system can be tested out by using a SMBus battery fuel gauge evaluation module. This reference design was tested with the bq20z90EVM module, which has a four-pin header for SMBus communication and an input connector for resistors. The idea is to apply an external voltage across the resistors connected in series to simulate the cell voltages of a multi-cell Li-ion battery. For additional details on setting up the EVM, see the Quick Start Guide [1] and the bq20z90EVM User’s Guide [9].

Another advantage of this EVM is that the bq device can easily be programmed and configured unlike a sealed battery in which the bq register settings are locked. An example programmer that can accomplish such task is the EV2300. It supports multiple protocols to communicate with fuel gauges such as SMBus, I2C and HDQ [11]. The EV2300 communicates to the PC through USB and the control panel display GUI on the PC allows easy modifications to register settings [12]. For detailed instructions on setting up the evaluation software to communicate with the EVM, see the bqEASY Evaluation Software User’s Guide[13].

Figure 8 shows an abbreviated flow chart of the sample application provided with this reference design. The detailed flow chart with safety checks is presented in Section 5.

sample_app_flow_chart_laa476.gifFigure 8. Sample Application Flow Chart (Brief)

The application initializes the MSP430F5510 in SMBus master mode and assumes that the bq fuel gauge is configured in SMBus slave mode (with broadcasts turned off). With charge broadcasts disabled, the fuel gauge does not seize control of the SMBus by becoming the SMBus master when it detects an idle condition. It is recommended to keep the fuel gauge charge broadcasts disabled for robust operation of this reference design application.

The MSP430F5510 interrogates the fuel gauge for parameters such as charging voltage, charging current, state of charge, and battery status register value. The choice of parameters is governed by two factors: the desired charging power requested by the battery and any indication of error or warning condition with the battery. For a full list of parameters that can be interrogated from the fuel gauge through SMBus, see Section 4.

The MSP430F5510 outputs voltage and current PWM signals at 20 kHz to the DC/DC converters on the power stage board. Based on the values of the desired charging voltage and charging current required, the duty cycle of the PWM signals is adjusted accordingly. Section 10 gives a duty cycle computation example along with mapping table for voltage, and Section 11 gives an example for current.

Another level of protection involves taking the voltage from the battery terminals and the current from the power-stage board and level-shifting down to be sampled by the ADC10 on the MSP430F5510. If the voltage or current sampled by the ADC exceed a certain range reported over the SMBus, then the PWM outputs are switched off to prevent any hazard.