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

Introduction

Smart-battery fuel gauges made by Texas Instruments (TI), such as the bq20Zxx, bq78PLxxx, bq2060A, and bq3060 (or any other SMBus-compatible fuel gauge) provide safety and protection functions as well as detailed information on a battery’s present state and allow the application to set the desired charging parameters. These fuel gauges can be programmed for different battery chemistries such as Li-ion or NiMH and have built-in algorithms for charging and discharging cycles to optimize battery performance. Additionally, battery fuel gauges monitor many different parameters throughout the life of the battery to provide accurate state-of-charge information [1]. All of this information can be easily read by a microcontroller such as the MSP430 devices.

The MSP430 microcontrollers are 16-bit RISC instruction set processors with an ultra-low-power architecture and a variety of peripheral options. The peripheral options include ADC (slope, sigma-delta, or SAR), DAC, op-amps, comparators, LCD drivers, USART, and other integrated analog and digital components, all on one silicon die. The MSP430F550x family of microcontrollers features a rich peripheral set such as 10-bit SAR ADC10_A module, multiple timers (capture or compare registers with PWM output capability), USB interface for firmware upgrades, USCI module, watchdog timers, and more [2].

Communication between the microcontroller and the fuel gauge uses the System Management Bus (SMBus) communication protocol. The SMBus standard was developed by a group of companies collaborating together under the umbrella of Smart Battery System (SBS) Implementers Forum to implement one standard communication protocol for smart batteries and other digital devices [3]. SMBus is based on the popular Inter-IC Communication (I2C) standard and adds enhancements and restrictions to the original I2C protocol [4]. SMBus is the primary method of communication with the smart-battery fuel gauges. On the MSP430F550x MCUs, the SMBus protocol can be implemented using the I2C USCI module.

Figure 1 shows a high-level system block diagram of this reference design smart-battery charger.

high_level_system_bd_smart_bat_laa476.gifFigure 1. High-Level System Block Diagram of Smart-Battery Charger

This battery charger reference design employs the MSP430F5510 as the microcontroller configured in the SMBus (I2C) master mode to interrogate the fuel gauge for desired charging voltage, current, and other parameters [5]. The MSP430F5510 then outputs two PWM signals per battery to control both charging voltage and current provided by the DC/DC converter power stage.

Based on the parametric values received through SMBus, the MSP430F5510 either adjusts the PWM duty cycle or shuts off the PWM outputs, if the battery is fully charged or reports a terminate charging condition. A smart-battery containing the bq20z90 fuel gauge with open access to the SMBus terminals was used to test this reference design. If an open smart battery is not available, the bq20z90 fuel gauge evaluation module kit can be used to emulate a smart battery [6]. The reference design assumes that the bq20z90 is configured with charging broadcasts disabled (BCAST = 0 in Operation Cfg B register). However, if the battery fuel gauge does place charging broadcast requests on the SMBus lines, the MSP430F5510 ignores them. Therefore, the fuel gauge responds with parameters only when the MSP430F5510 addresses commands to it.