0% found this document useful (0 votes)
134 views

3 To 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2

Uploaded by

dharmendra patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

3 To 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2

Uploaded by

dharmendra patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Application Report

SLUA707 – March 2014

3 to 6 Cells Battery-Management System Based On


bq76925 + MSP430G2xx2
Richard Tang, Andy He Power FAE, MCU FAE / Shenzhen China

ABSTRACT

This application report describes how to use bq76925 and MSP430G2xx2 to implement a
high-accuracy digital battery-management solution, which can support a complete pack
monitoring, balancing, protection, and gas gauging system for 3 to 6 series cell Lithium-
Ion / Polymer battery. This solution is designed to focus on power tool projects, while it
can be also a reference design for other similar applications.
Please send questions or comments about this template to Richard Tang (mailto:Richard-
[email protected]) or Andy He (mailto:[email protected]).

1
SLUA707

Contents
1 Features ........................................................................................................................................ 3
2 Introduction .................................................................................................................................. 3
3 Description ................................................................................................................................... 4
3.1 Major Hardware Functions and Design Guidelines ................................................................. 4
3.1.1 Cell Voltage Sense Circuits ......................................................................................... 4
3.1.2 External LDO .............................................................................................................. 5
3.1.3 SC Protection and Wake-up Circuits ........................................................................... 6
3.1.4 Voltage and Current Measurement ............................................................................. 7
3.1.5 Drivers ........................................................................................................................ 8
3.1.6 Precharge Control ....................................................................................................... 9
3.1.7 Load Removal Detection ............................................................................................. 9
3.2 MCU Software Description ................................................................................................... 10
3.2.1 MSP430G2xx2 Software Flow .................................................................................. 10
3.2.2 Accuracy ................................................................................................................... 15
3.2.3 Low-power Mode ...................................................................................................... 16
3.2.4 Over Temperature (OT) ............................................................................................ 17
3.2.5 Under Temperature (UT)........................................................................................... 18
3.2.6 Over Current (OC) .................................................................................................... 19
3.2.7 Short Current (SC) .................................................................................................... 21
3.2.8 Over Voltage (OV) .................................................................................................... 24
3.2.9 Under Voltage (UV)................................................................................................... 25
Appendix A. user.h ............................................................................................................................ 26

Figures
Figure 1. Overall Schematic ........................................................................................................... 4
Figure 2. Cell Voltage Sense Circuits ............................................................................................ 5
Figure 3. External LDO .................................................................................................................... 6
Figure 4. SC Protection and Wake-up Circuits.............................................................................. 7
Figure 5. Voltage and Current Measurement................................................................................. 7
Figure 6. Drivers .............................................................................................................................. 8
Figure 7. Precharge Control ........................................................................................................... 9
Figure 8. Load Removal Detection ............................................................................................... 10
Figure 9. Mainloop Flow................................................................................................................ 11
Figure 10. Measuring Flow ............................................................................................................. 12
Figure 11. Function Flow ................................................................................................................ 14

2 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

1 Features
To implement a high-accuracy digital battery-management solution, bq76925 + MSP430G2xx2
can support a complete pack monitoring, balancing, protection, and gas gauging system for 3 to
6 series cell Lithium-Ion / Polymer battery. This solution is designed to focus on power tool
projects, while it can also be a reference design for other similar applications.

2 Introduction
The bq76925 is a dedicated analog front end (AFE) for 3 to 6 series cell application that
provides 3 analog outputs that allow a microcontroller to easily monitor cell voltage, current, and
temperature. Cell voltages are level-shifted, scaled, and multiplexed to the VCOUT pin. Cell
current is monitored through a sense resistor placed in series with the cell stack. The voltage
across the sense resistor is amplified and driven to the VIOUT pin. The VTB pin supplies a
switched bias to stimulate a thermistor network for temperature measurement. The bq76925
supplies a 3.3-V regulated output to power the MSP430G2xx2 and an accurate 3.3-V reference
voltage for the MSP430G2xx2 analog-to-digital converter (ADC). The AFE also includes
integrated cell balancing FETs that are under control of the MSP430G2xx2. Finally, the on-board
comparator of the AFE signals an overcurrent condition to the MSP430G2xx2 for fast fault
response.
The MSP430G2xx2 series is an ultra-low-power microcontroller with one built-in 16-bit timer, a
fast 10-bit ADC with integrated reference, built-in communication capability using the universal
serial communication interface, and up to 24 I/O pins. The architecture, combined with five low-
power modes, is optimized to achieve extended battery life in portable measurement
applications. The MSP430G2xx2 application circuit is provided to read the analog signals from
the bq76925 and let the user create custom firmware based on the application code.
With the AFE of bq76925, the MSP430G2xx2 is evaluated as the host to control bq76925 by I2C
of USI module, the MSP430G2xx2 can read the data of analog signals from
bq76925 by ADC10.Then the MSP430G2xx2 can easily monitor individual cell voltages, pack
current, and temperature to achieve battery charge and discharge management. Although it is
only a 10-bit ADC result for the MSP430G2xx2, bq76925 can calibrate it into a high-accuracy
value with the particular compensated algorithmic of correction factors. For example, the ADC10
value deviation of cell voltage does not exceed 5 mV, which can strongly make this solution
outstanding in this field requirement. To make this solution more competitive, the MSP430G2xx2
is selected for its advantages of low power and low cost.
The user can choose the part number of the MSP430G2xx2 from MSP430G2x32/G2x52, as
there are eight part numbers for the different configurations, like flash size, Comparator_A+.
More software functions mean more flash size is need. The user can choose the right part
number based on the necessary functions of the MSP430G2xx2.

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 3


SLUA707

3 Description
This application note, which can help designers evaluate the bq76925 + MSP430G2xx2 battery-
management system, discusses the important setup and operation of the module, and contains
schematics, bill of materials, and printed circuit board layout. Before designing a battery-
management system based on the bq76925 + MSP430G2xx2 solution, designers are advised to
read the bq76925 and MSP430G2xx2 data sheet.

3.1 Major Hardware Functions and Design Guidelines J1


TestPoint

1
BATT+ PACK+
PAD1 1 PACK+ 1 PAD3
1 1

0.1uF R1 D1
100K
D2 Q1
R2 C1 18V
D3 ZXTP25040DFH
BZT52C4V7-7-F
MBR0540T1G 100R
D4 R50 Q2
J25
+ C2 D5 BSS84P R4
TestPoint DNP R3 1M C3 0 100K
10uF/50V wakeup circuits
BZT52C30-13-F 4.7uF/10V C4 C5 U2 MSP430G2452IPW20
R5 R7 CD4148WT 10uF R6
J26 J27 J28 J29 J30
1

RIN1 U1 D6 0.1uF 10K


VC6 TestPoint TestPoint TestPoint TestPoint TestPoint 3.3K 3.3K DVCC 1 20 DVSS Q3
DVCC DVSS 2N7002E
47 1 20 2 19 LED1/XIN ALERT
CIN1 VCTL V3P3 P1.0/A0 XIN/P2.6
1

RIN2 1uF 2 19 SCL R8 3 18 LED0/XOUT


VC5 BAT SCL 10K P1.1/A1 XOUT/P2.7 R9 0.1uF D7
3 18 SDA 4 17 TEST 18V 0.33uF/50V
47 VC6 SDA D21 P1.2/A2 TEST 100KC6 C7
CIN2 4 17 VREF 5 16 RST
RIN3 VC5 VREF R10 P1.3/A3 RST/NMI PACK-
1uF
VC4 5 bq76925 16 THERM BAT46W 6 15
CON7 VC4 VTB 10K P1.4/Vref /A4
SDA/P1.7
7 47 6 15 VCOUT 7
LOADADCIN 14
6 CIN3 VC3 VCOUT R11 0 P1.5/A5 SCL/P1.6
5 RIN4 1uF 7 14 VIOUT DSG 8 13 DISP/LOADCHK
4 VC3 VC2 VIOUT R12 0 P2.0 P2.5 SMBJ28CA
3 8 13 ALERT CHG 9 12 LED3/COM1 D8
2 47 VC1 ALERT P2.1 P2.4
1 CIN4 9 12 PRECHG 10 11 LED2/COM2
RIN5 VC0 SENSEP C10 C11 C12 P2.2 P2.3
1uF
VC2 10 11 D10
J2 VSS SENSEN C13 C14 C8 NTC1 C9 DNPDNPDNP MURS120T3
47 10K CB1 VDRV
CIN5 J31 1uF 0.1uF 470pF 0.1uF
RIN6 1uF TestPoint PACK+ 1 2 VDRV
D23 VC1 R13
SMBJ28CA CIRCUIT BREAKER 1M
47 Q4
1

CIN6 PACK+ VDRV


RIN7 1uF C15 0.1uF Q5
VC0 R15 C16 BSS84P
R14 1K 2N7002E 1M
47 1K R16 1uF/25V
CIN7 VC3 R17
1uF
1K Q6 R18
Driver improvement BSS84P 2.2M CD4148WT
D11
R19
2.2M
Q8
2K R21 1K 2N7002E R22
Q7 R20 CHG 1K
R23 1K 2N7002E
DSG R24
5.1M J3
R25 R26 TestPoint
5.1M
100R
RSENS1
2N7002E D12 R27 R28 D13

1
Q9 18V
10M 2.2M 18V
BATT-
PAD2 1 0.002/1W 1% PACK- 1
1 1 PAD4
RSENS2 DVCC Q10 Q11 PACK-
IRFS3206PBF IRFS3206PBF
C18 0.1uF/50V
R49 BSS84P
0.002/1W 1% 1M C17 0.1uF/50V 1K
J24 Q15

1 PRECHG BSS84P R75


Q14
12VDC
TestPoint Z5
200K 1M

R64 R74
CB10
D14
J4 J5 J6 J7 J8 1 2

DVCC 1 DVCC 1 SCL 1 VREF 1 VCOUT 1 CD4148WT CIRCUIT BREAKER

BSS84P
TestPoint TestPoint TestPoint TestPoint TestPoint R29
J9 J10 J11 J12 J13 LOADADCIN PACK-

DVSS 1 DVSS 1 SDA 1 THERM 1 VIOUT 1 R30 R52 47K


C19 D15 Q16 2M
3.3V NA
TestPoint TestPoint TestPoint TestPoint TestPoint 0.1uF
J14 J15 J16 J17 J18 CB2 Q12
CIRCUIT BREAKER R31 2N7002E
ALERT 1 LOADADCIN 1 TCK 1 DSG 1 CHG 1 DVCC 1 2 R53
1M
3.3K R32
TestPoint TestPoint TestPoint TestPoint TestPoint 1M Load removal detection
J19
Display button detection
LED R33 471 TEST 1 CB3
LED0/XOUT D16 DVCC C20 12p R34 Q17
LED0/XOUT 1 2 200R DVCC
LED R35 471 TestPoint 2N7002E
LED1/XIN D17 J20 CIRCUIT BREAKER
Y1 R40
LED R36 471 RST 1 47K
LED2/COM2 D18
CB4 32768
LED R38 471 TestPoint R37 DISP/LOADCHK
LED3/COM1 D20 LED1/XIN 1 2 CB5 BSS84P 1M LED
D22 D19
12p CIRCUIT BREAKER Q13 J21
CIRCUIT BREAKER C21 ALERT 1 2 C22
1 2 SW1
MBR0540T1G 3 4 0.1uF
R41 5 6
CB6 EVQPE504K
TCK CIRCUIT BREAKER 7 8
J22 SCL 1 2 9 10
331 R42 100R R43 100R
5 TEST
4 SDA 1 2 R44 100R R45 100R SMBUS
3 RST CIRCUIT BREAKER J23
2
1

CB7
1 DVCC R47 CB8 R48 R46 Z1 1
47K C23 SW2 CIRCUIT BREAKER 1M 1M AZ23C5V6-7-F 2
LED3/COM1 1 2 3
SBW DVSS 1000pF EVQPE504K
3

LED2/COM2 1 2
MCU CIRCUIT BREAKER COM
CB9

Figure 1. Overall Schematic

3.1.1 Cell Voltage Sense Circuits


At each cell voltage input port, an RC filter circuit is necessary (as are RIN and CIN in the
following circuits), which can filter the input noise to improve the accuracy of cell voltage sense.
Considering the internal cell balancing current, input resistor RIN cannot be selected too largely.
For example, selected 47-Ω RIN can provide balancing current of about 40 to 50 mA. Moreover,
because the pack current will be up to hundreds of amperes when SC occurs, a very large peak
voltage exists when SC protection occurs, which may exceed the max input voltage range of the
device. One TVS diode D23 can provide good protection for this situation.

4 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
RIN1 U1
VC6

47 1 20
CIN1 VCTL V3P3
RIN2 1uF 2 19
VC5 BAT SCL
3 18
47 VC6 SDA
CIN2 4 17
RIN3 VC5 VREF
1uF
VC4 5 bq76925 16
CON7 VC4 VTB
7 47 6 15
6 CIN3 VC3 VCOUT
5 RIN4 1uF 7 14
4 VC3 VC2 VIOUT
3 8 13
2 47 VC1 ALERT
1 CIN4 9 12
RIN5 VC0 SENSEP
1uF
VC2 10 11
J2 VSS SENSEN
47
CIN5
RIN6 1uF
D23 VC1
SMBJ28CA
47
CIN6
RIN7 1uF
VC0

47
CIN7
1uF

Figure 2. Cell Voltage Sense Circuits

3.1.2 External LDO


bq76925 integrates one internal LDO but the drive capability is only 3 mA. To provide enough
power to the MCU and external controlling circuits, external LDO is necessary. bq76925 can
support the external LDO extension. The VCTL pin can control an external NPN transistor or
MOSFET to generate the 3.3-V power supply to bq76925 and other external circuits.

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 5


SLUA707
BATT+
PAD1 1
1

D2 Q1
R2
D3 ZXTP25040DFH
BZT52C4V7-7-F
MBR0540T1G 100R
D4
+ C2 D5
DNP R3 1M C3
10uF/50V
BZT52C30-13-F 4.7uF/10V

U1

1 20
VCTL V3P3
2 19
BAT SCL
3 18
VC6 SDA
4 17
VC5 VREF
5 bq76925 16
VC4 VTB
6 15
VC3 VCOUT
7 14
VC2 VIOUT
8 13
VC1 ALERT
9 12
VC0 SENSEP
10 11
VSS SENSEN

Figure 3. External LDO

3.1.3 SC Protection and Wake-up Circuits


bq76925 integrates a hardware comparator for current sense, which can be used for SC
protection. The output of the comparator is the ALERT pin that can be connected to the external
interrupt input pin of the MSP430G2xx2. When an SC event occurs, the protection activity can
execute most quickly. The ALERT pin is an open-drain structure, so one pullup is necessary just
as R8 and D6. Moreover, the ALERT pin can be used to wake up the bq76925 from sleep mode.
As shown in Figure 4, R1, R4, R6, R9, Q2, and Q3 form the wake-up circuits that can wake up
bq76925 when the charger is plugged in. D6 blocks the high voltage to 3.3-V power supply. The
special attention that should be paid is that D21 is mandatory. The ESD structure of the
MSP430G2xx2 I/O pin inducts a reverse diode to the VDD pin, which clamps the voltage level of
the ALERT pin so that the bq76925 cannot be woken up successfully. Here, D21 is used merely
to remove the clamp effect of the internal diode.

6 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
PACK+

0.1uF R1 D1
100K
C1 18V

R50 Q2
BSS84P R4
C3 0 100K
wakeup circuits
4.7uF/10V C4 C5 U2 MSP430G2452IPW20
R5 R7 CD4148WT 10uF R6
U1 D6 0.1uF 10K
3.3K 3.3K DVCC 1 20 DVSS Q3
DVCC DVSS 2N7002E
1 20 2 19 LED1/XIN ALERT
VCTL V3P3 P1.0/A0 XIN/P2.6
2 19 SCL R8 3 18 LED0/XOUT
BAT SCL 10K P1.1/A1 XOUT/P2.7 R9 0.1uF D7
3 18 SDA 4 17 TEST 18V
VC6 SDA D21 P1.2/A2 TEST 100KC6
4 17 VREF 5 16 RST
VC5 VREF R10 P1.3/A3 RST/NMI PACK-
5 bq76925 16 THERM BAT46W 6 15
VC4 VTB 10K SDA/P1.7
P1.4/Vref /A4
6 15 VCOUT 7
LOADADCIN 14
VC3 VCOUT R11 0 P1.5/A5 SCL/P1.6
7 14 VIOUT DSG 8 13 DISP/LOADCHK
VC2 VIOUT R12 0 P2.0 P2.5
8 13 ALERT CHG 9 12 LED3/COM1
VC1 ALERT P2.1 P2.4
9 12 PRECHG 10 11 LED2/COM2
VC0 SENSEP C10 C11 C12 P2.2 P2.3
10 11
VSS SENSEN C13 C14 C8 NTC1 C9 DNPDNPDNP
10K
1uF 0.1uF 470pF 0.1uF

Figure 4. SC Protection and Wake-up Circuits

3.1.4 Voltage and Current Measurement


bq76925 can accurately transfer the cell voltage and current of the AFE to a single-end analog
signal. This signal, in turn, can be output to the input channels of the ADC of the MSP430G2xx2.
Thereby, the MSP430G2xx2 can accurately monitor the voltage, current, and temperature.
Moreover, bq76925 provides a very accurate reference voltage that can be used for the ADC
reference. Here, C8 and C14 are used to filter some noise. See Figure 5.
R50

C3 0

4.7uF/10V C4 C5 U2 MSP430G2452IPW20
R5 R7 CD4148WT 10uF
U1 D6 0.1uF
3.3K 3.3K DVCC 1 20
DVCC DVSS
1 20 2 19
VCTL V3P3 P1.0/A0 XIN/P2.6
2 19 SCL R8 3 18
BAT SCL 10K P1.1/A1 XOUT/P2.7
3 18 SDA 4 17
VC6 SDA D21 P1.2/A2 TEST
4 17 VREF 5 16
VC5 VREF R10 P1.3/A3 RST/NMI
5 bq76925 16 THERM BAT46W 6 15
VC4 VTB 10K P1.4/Vref /A4
SDA/P1.7
6 15 VCOUT 7
LOADADCIN 14
VC3 VCOUT R11 0 P1.5/A5 SCL/P1.6
7 14 VIOUT DSG 8 13
VC2 VIOUT R12 0 P2.0 P2.5
8 13 ALERT CHG 9 12
VC1 ALERT P2.1 P2.4
9 12 PRECHG 10 11
VC0 SENSEP C10 C11 C12 P2.2 P2.3
10 11
VSS SENSEN C13 C14 C8 NTC1 C9 DNPDNPDNP
10K
1uF 0.1uF 470pF 0.1uF

Figure 5. Voltage and Current Measurement

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 7


SLUA707
3.1.5 Drivers
The drivers must solve two problems. One problem is that the driver power must provide
enough high voltage and driving capability; the other problem is to ensure that the FETs can be
turned on and off quickly enough. Because the controlling signals come from the
MSP430G2xx2, the voltage level transfer circuits are necessary. Certainly, the user must also
carefully consider total power consumption.
R7, C16, and Q4 generate the driver power supply that avoids cell imbalance by getting the
power from the top side of the pack, and also gets the suitable driver power level with the
simplest structure. C16 is the buffer capacitor that can provide the dynamic current when the
FETs are switched.
Q6, Q7, Q9, R16, R19, R20, and R26 form the discharging controlling circuits. When DSG is
high, Q6 and Q7 are turned off and Q9 is turned on to turn off the discharging FET quickly.
Special attention must be paid when selecting these resistors. R16 and R19 should not be too
small; otherwise, the power consumption will be large. However, it is better to select bigger
proportion for R20 and R26. Because the turn-off speed of Q7 is somewhat slow, both Q7 and
Q9 are turned on for a short period. The low voltage on R26 must be able to turn off the
discharging FET quickly and reliably. If necessary, one 0-Ω resistor can be used. But R20 must
ensure enough driving capability.
Q5, Q8, R13, R18, R22, R28, and D11 form the charging controlling circuits. When CHG is high,
the driver turned on the charging FET through R22. When CHG is low, Q5 is turned off then the
charges on the gate of the charging FET are discharging through R28 to turn off the charging
FET. Here, R28 cannot be too large; otherwise, the turn-off time will be too long. D11 is used to
block the reverse high voltage when discharging FET is turned off.
CB1 VDRV

PACK+ 1 2 VDRV
R13
CIRCUIT BREAKER 1M
Q4
PACK+ VDRV
Q5
C16 BSS84P
2N7002E 1M
R16 1uF/25V
VC3 R17

1K Q6 R18
Driver improvement BSS84P 2.2M CD4148WT
D11
R19
2.2M
Q8
2K R21 1K 2N7002E R22
Q7 R20 CHG 1K
R23 1K 2N7002E
DSG R24
5.1M
R25 R26
5.1M
100R
2N7002E D12 R27 R28 D13
Q9 18V
10M 2.2M 18V

Q10 Q11
IRFS3206PBF IRFS3206PBF
C18 0.1uF/50V

C17 0.1uF/50V

Figure 6. Drivers

8 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
3.1.6 Precharge Control
Q14, Q15, Z5, R49, R64, R74, and R75 form precharge controlling circuits that can support 0-V
charging. When the pack voltage is 0 V, the chip does not work and DVCC is 0 V. When a
charger is plugged in at the moment, Q14 is turned on and the pack is charged through R75. If
the pack voltage arises up to a certain level, the chip is powered on and DVCC is 3.3 V. The
MSP430G2xx2 will work and output high PRECHG signal. The pack continues to be charged
through R75. When the pack voltage rises to exceed the threshold of rapid charging, PRECHG
outputs low, the precharge path is turned off, and the main charging path is turned on.

DVCC Q10 Q11


IRFS3206PBF IRFS3206PBF
C18 0.1uF/50V
R49 BSS84P
1M C17 0.1uF/50V 1K
J24 Q15

1 PRECHG BSS84P R75


Q14
12VDC
TestPoint Z5
200K 1M

R64 R74

Figure 7. Precharge Control

3.1.7 Load Removal Detection


C19, D15, R29, Q16 (optional), and Q17 (optional) form the detection circuits for load removal.
When an SCD or an OCD event occurs, the discharging FET is turned off. If the load is still
present, the voltage of PACK– is close to that of PACK+. But if the load is removed, the voltage
of PACK– drops to 0 V. By checking the voltage of PACK–, the load removal can be detected to
release the protection. When the load is present and protection works, the discharging path for
the PACK– causes somewhat larger power consumption; Q16 and Q17 can be used to control
the detection path. If the detection is finished, the discharging path can be cut off to reduce the
power consumption. If Q16 and Q17 are not used, the circuits are simpler but R29 must be
larger to limit the discharging current. Moreover, the relevant detection interval must be selected
accordingly.

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 9


SLUA707
CB10
D14
1 2

CD4148WT CIRCUIT BREAKER

BSS84P
R29
LOADADCIN PACK-

R30 R52 47K


C19 D15 Q16 2M
3.3V NA
0.1uF

R53
1M

Q17
DVCC
2N7002E

R40
47K

DISP/LOADCHK

C22
SW1
0.1uF
EVQPE504K

Figure 8. Load Removal Detection

3.2 MCU Software Description


The MSP430G2xx2 can monitor individual cell voltages, pack current, battery alert, and
temperature, in order to achieve battery charge and discharge management. Basically, the user
can set user.h to adjust these parameters of BMS. See Appendix A for more detail on user.h.
User can also refer to the following sections for software flow.

3.2.1 MSP430G2xx2 Software Flow

3.2.1.1 Mainloop and Initial


After the Initial loop, the MSP430 keeps running the Measure and Func loop. In the Initial loop,
BQ Init is to get the correct factor, which is used for the ADC calibrated in Measuring. There are
eight sections for the Measure and Func loop: Alert Measuring, Temp Measuring, Vol
Measuring, Cur Measuring, Func Set, Func Ctrl, Func Resume, and Gauging Display. These
sections can be defined in two main sections (Measuring and Func); in other words, the
MSP430 must monitor the status of cells by Measuring, and then do the charge and discharge
management by Func.

10 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
As for the interrupt-enables in this system, TimerA0 INT is used for the counter to meet the
required function delay time, such as LPM keep time, Balance keep time, OC keep time, and so
on. Port1 INT is for Alert monitor. ADC10 INT is for ADC sample conversion trigger. USI INT is
for I2C communication control.
Figure 9 shows the Mainloop flow.

Figure 9. Mainloop Flow

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 11


SLUA707
3.2.1.2 Measure and Function Loop

Measuring Section

• Alert Measuring monitors whether there is short circuit among the batteries of pack.

• Temp Measuring monitors the temperature for pack.

• Vol Measuring monitors the voltage for each cell.

• Cur Measuring monitors the current for pack.


In the Measuring section, although it is only 10-bit ADC result for MSP430G2xx2, it can be
calibrated into a high-accuracy value with the particular compensated algorithmic of correction
factors in bq76925. TI does not recommend that users modify the particular compensated
algorithmic in Measuring.
Figure 10 shows the Measuring flow.

Figure 10. Measuring Flow

12 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
Function Section

• Func Set sets the flag for each cell status.

• Func Ctrl controls the cell in the right status by the flag of cells.

• Temp Ctrl protects the pack from OT and UT.

• Cur Ctrl protects the pack from OC and UC.

• Vol Ctrl protects the pack from OV and UV.

• Balance Ctrl balances the cell current when the voltage and offset are both over range.

• Sleep Check Ctrl, lets BQ go to sleep by checking the Min-voltage of cells.

• Open Cell Check Ctrl checks if the cell pack was open in connect.

• LPM Check Ctrl lets the MSP430 go to sleep by checking the idle time.

• Func Resume reset s the flag by the cells status.

• Gauging Display shows the capacity of the pack (increased number of LEDs indicates
greater capacity).
To match the different condition of protected mode, the user can also customize the parameter
which is defined in user.h (see Appendix A). For example, the threshold value.
Figure 11 shows the Function flow.

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 13


SLUA707

Figure 11. Function Flow

14 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

3.2.2 Accuracy
A test platform was set up with battery pack to test the measurement accuracy of cell voltage,
current, and temperature. We determined the Calculated Value by the MSP430G2 software
algorithm. See the following tables.

Cell Voltage

ADC Value Calculated Value Measured Value Delta


Cell (mV) (mV) (mV) (mV)
1 2179 3631.7 3636.6 4.9
2 2180 3633.3 3638.2 4.9
3 2179 3631.7 3633.9 2.2
4 2182 3636.7 3640.6 3.9
5 2162 3603.3 3606.8 3.5
6 2188 3646.7 3650.0 3.3

Current

ADC Value Calculated Value Measure Value Delta


(mV) (mV) (mV) (mV)
111 13.88 14.67 0.80
366 45.75 46.14 0.39

Temperature

ADC Value Measured Value


(mV) (mV) Delta (mV)
1068 1065.1 –2.9

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 15


SLUA707
3.2.3 Low-power Mode
Set up the test platform with battery pack. When the system continues to remain in normal mode
(there is no OV, UV, COC, DOC, SC, charge current, discharge current, and balance) for longer
than a user-defined time, MSP430G2 enters low-power mode (LPM). In LPM, MSP430G2 only
keeps the current comparator enabled for SC detection, while turning off bq76925 current
amplifier, cell amplifier, thermistor bias, and voltage reference. Then MSP430G2 enter s LPM to
save power consumption. Also, LPM is kept for a user-defined time. MSP430G2 does not detect
anything during this time and does not wake up until time-out. After wakeup, if there is still no
OV, UV, COC, DOC, SC, charge current, discharge current, and balance, MSP430G2 re-enters
LPM. If any of these events occur, the system wakes up from LPM.

Total Current MCU Current 925 Current


Current (uA) (uA) (uA)
Normal 165 115 50
LMP 55 43 12

Ch1 = MSP430 DSG pin, Ch2 = MSP430 CHG pin, Ch3 = Voltage on NTC

16 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

3.2.4 Over Temperature (OT)


Set up the test platform with battery pack. The system detects the voltage on NTC once in main
loop. If the voltage is lower than the OT protection threshold, the system will keep detecting it;
after voltage detection exceeds the user-defined times, both CHG and DSG will be off.

Ch1 = Voltage on NTC, Ch2 = MSP430 CHG pin, CH3 = MSP430 DSG pin

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 17


SLUA707

3.2.5 Under Temperature (UT)


Set up the test platform with battery pack. The system detects the voltage on NTC once in main
loop. If the voltage is higher than the UT protection threshold, the system will keep detecting it;
after voltage detection exceeds the user-defined times, DSG will be on, but CHG will be off.

Ch1 = Voltage on NTC, Ch2 = MSP430 CHG pin, Ch3 = MSP430 DSG pin

18 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

3.2.6 Over Current (OC)


OC occurs when battery is in discharge (DOC) and in charge (COC), and the protection is
different.

• COC: OC in charge
Set up the test platform with a DC source to charge the battery. The system detects the
charge current once in main loop. If the charge current is higher than the COC protection
threshold, the system will keep detecting it; after charge current detection exceeds the user-
defined times, CHG will be off. After 4 seconds in COC protection, CHG will be on again.

Ch1 = Voltage on sense resistor tranferred from Current, Ch2 = MSP430 CHG pin

• DOC: OC in battery discharge


Set up the test platform with battery pack. The system detects the discharge current once in
main loop. If the discharge current is higher than the DOC protection threshold, the system
will keep detecting it; after discharge current detection exceeds the user-defined times,
DSG will be off. If the load is removed in DOC protection, DSG will be on again.

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 19


SLUA707

Ch1 = MSP430 DSG pin, Ch2 = MSP430 CHG pin, Ch3 = Voltage on sense resistor

Ch1 = MSP430 DSG pin, Ch2 = MSP430 load detection pin, Ch3 = Pack–

20 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

3.2.7 Short Current (SC)


Set up the test platform with the real battery. System will detect the discharge current once
in main loop, if it is higher than the SC protection threshold, system will keep detecting it
and after it exceeds 80 µs, DSG will be off. The SC delay time depends on the voltage on
the sense resistor. The higher for the voltage, the less for the SC delay time.

SC threshold is 50 mV, SC delay time is 418 µs, Ch1 = MSP430 DSG pin, Ch2 = Gate of MOS,
Ch3 = Voltage on sense resistor current transferred by current

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 21


SLUA707

SC threshold is 50 mV, SC delay time is 90 µs, Ch1 = MSP430 DSG pin, Ch2 = Gate of MOS,
Ch3 = Voltage on sense resistor transferred by current
During SC protection, MSP430G2 simply waits for the release condition. If the load is removed,
DSG will be on after one main loop time.

Ch1 = MSP430 DSG pin, Ch2 = MSP430 load detection pin, Ch3 = Pack–

22 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
In LPM, DSG will be off immediately. MSP430G2 will not wake up from LPM until timer-out.

Ch1 = MSP430 DSG pin, Ch2 = Main loop count, Ch3 = Pack–

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 23


SLUA707

3.2.8 Over Voltage (OV)


Set up the test platform with battery emulator of resistance. Adjust the DC source output voltage
to higher than the OV protection threshold. The system detects the cell voltage once in main
loop. If any cell voltage is higher than the OV protection threshold, the system will keep
detecting it; after cell voltage detection exceeds the user-defined times, the OV protection will be
enabled to turn off CHG. After OV protection, CHG will remain off. The OV protection, however,
will turn on CHG if there is discharge current, and then CHG will turn off again if there is no
discharge current.

Ch1 = MSP430 DSG pin, Ch2 = MSP430 CHG pin, Ch3 = Voltage on sense resistor

24 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707

3.2.9 Under Voltage (UV)


Set up the test platform with battery emulator of resistance. Adjust the DC source to less than
the UV protection threshold. Use another DC on PACK+ and PACK– to act as the charger. The
system detects the cell voltage once in main loop. If any cell voltage is less than the UV
protection threshold, the system will keep detecting it; after cell voltage detection exceeds the
user-defined times, the UV protection will be enabled to turn off DSG. After UV protection, DSG
will remain off. The UV protection, however, will turn on DSG if there is charge current, and then
DSG will turn off again if there is no charge current.

Ch1 = MSP430 DSG pin, Ch2 = MSP430 CHG pin, Ch3 = Voltage on sense resistor

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 25


SLUA707

Appendix A. user.h

This appendix provides easy-to-understand explanations of the data in user.h.

// =============================================================================
// Define the operation function for choosing
// Defined => Chosen, Undefined => Not chosen
// =============================================================================
//#define MSP430_ADC_Cal 1 //Enabled if ADC value need calculated by Gain and Offset
//#define ADC_MultSamples 1 //Enabled if ADC need sample for multiple times to get the average value
//#define PRE_RELEASE_SAMPLES 1 //Enabled if it is the prereleased samples
#define OpenCell_ADCDet 1 //Enabled if open cell need to be detected

// =============================================================================
// Define references for measurement calculations
//
// VREF_NOM : Nominal reference voltage. Set by writing REF_SEL in the CONFIG_2
// register (REF_SEL = 0, 1 => VREF_NOM = 1.5, 3.0).
// GVCOUT : Nominal cell voltage gain. Also set by writing REF_SEL in the
// CONFIG_2 register (REF_SEL = 0, 1 => GVCOUT = 0.3, 0.6) .
// GVSENSE : Current amplifier gain. Set by writing the I_GAIN bit in the
// CONFIG_1 register (I_GAIN = 0, 1 => GVSENSE = 4, 8).
// FS_CNT : ADC full-scale count. For an 'n' bit ADC, FS_CNT = pow(2,n) - 1.
// =============================================================================
#define VREF_NOM 3
#define GVCOUT 0.6
#define GVSENSE 8
#define FS_CNT 1023L

// =============================================================================
// Define fault thresholds
//
// The fault thresholds are transformed using function like macros. The trans-
// formation reduces code size by avoiding floating-point arithmetic and
// division.
//
// VC_TRANS(x) : Transforms voltage threshold. 'x' is in Volts.
// VI_TRANS(x) : Transforms current threshold. 'x' is in Volts.
// VT_TRANS(x) : Transforms temperature threshold. 'x' is in Volts.
// =============================================================================
#define VC_TRANS(x) ((unsigned int) (x * GVCOUT * 1000)) //unit mV
#define OV_THRESHValue 4.250 // OV threshold in Volts/V
#define OV_ResetValue 4.050 // OV Reset threshold in Volts
#define UV_THRESHValue 2.800 // UV threshold in Volts
#define UV_ResetValue 3.000 // UV Reset threshold in Volts
#define PreCHG_Value 2.500 //Cell voltage for Prechange in Volts
#define PreCHG_ResetValue 2.600 //Cell reset voltage for Prechange in Volts
#define CELL_BalMax 3.500 //Cell max voltage value for balance in Volts
#define CELL_BalDif 0.100 //Cell difference voltage value for balance in Volts
#define BQSleep_THRESHValue 1.500 // BQSleep threshold in Volts/V

26 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


SLUA707
#define BQSleep_ResetValue 1.600 // BQ Reset threshold in Volts

#define VI_TRANS(x) ((unsigned int) (x * GVSENSE)) // x*8


#define DOC_THRESHValue 20.000//1 // OC threshold in Volts //2mv 1mohm => 2*8 = 16(A)
#define COC_THRESHValue 20.000//1 // OC threshold in Volts //2mv 1mohm => 2*8 = 16(A)
#define OC_ResetValue 19.000//1 // OC threshold in Volts //2mv 1mohm => 2*8 = 16(A)

#define VT_TRANS(x) ((unsigned int) (x * 1000)) //unit mV


#define DOT_THRESHValue 0.469 // DOT threshold in Volts/V, 0.469V->70 degree
#define DOT_ResetValue 0.547 // DOT Reset in Volts, 0.547V->65 degree
#define COT_THRESHValue 0.855 // COT threshold in Volts/V, 0.855V->50 degree
#define COT_ResetValue 0.992 // COT Reset in Volts, 0.992V->45 degree
#define UT_THRESHValue 2.475 // UT threshold in Volts/V, 2.475->0 degree
#define UT_ResetValue 2.360 // UT Reset in Volts, 2.360V->5 degree

#define VL_TRANS(x) ((unsigned int) (x * 1000)) //unit mV


#define OL_THRESHValue 2.000 // OverLoad Reset in Volts/V

// =============================================================================
// Define Protect condition enable times.
// Detect multiple times to confirm the protection start and keep some delay.
// =============================================================================
#define UV_EnData 10 //UV detect times to delay confirm
#define OV_EnData 10 //OV detect times to delay confirm
#define OC_DSG_EnData 10 //Discharge OC detect times to delay confirm
#define OC_CHG_EnData 10 //Charge OC detect times to delay confirm
#define COT_EnData 10 //Charge OC detect times to delay confirm
#define DOT_EnData 10 //Discharge OC detect times to delay confirm
#define UT_EnData 10 //UT detect times to delay confirm
#define PreCHG_EnData 10 //Pre-Charge detect times to delay confirm
#define AL_EnData 10 //Alert detect times to delay confirm
#define OpenCell_EnData 90 //Cell open detect times to delay confirm
#define OpenCell_Cycle 100 //Cell open detect once in mainLoop times
#define OpenCell_CompCycle 200 //Clear once in mainLoop times when keep cell open

// =============================================================================
// Define operation parameter.
// Set it for the battery-management system requirement.
// =============================================================================
#define ADCCur_Idle 3 //ADC current value offset set for charge and discharge confirm
#define OCTime_4s 255 //OC flag clear and time for resume from OC, 255*8ms = 2s
#define BLANCE_TIME 255 //Set for cell balance time set, 255*8ms = 2s
#define CB_LPMKeepTime 2 //Set keeping time in LPM, 125*32ms = 4s
#define CB_LPMCount 8000 //Set time to go to LPM when idle, 2000 -> 16S
#define LoadCheck_Times 3 //Detect times for load check to confirm
#define OpLoad_Interval 60 //ADC margin set for open load check, 60->0.6 mV

// =============================================================================
// Define coulometer LED display level.
// Set it by cell voltage for reference, it is different from gauge level.
// =============================================================================

3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2 27


SLUA707
#define V_SOC100 4.180 //Cell voltage set when in 100% coulometer
#define V_SOC75 3.800 //Cell voltage set when in 75% coulometer
#define V_SOC50 3.400 //Cell voltage set when in 50% coulometer
#define V_SOC25 2.800 //Cell voltage set when in 25% coulometer

28 3 to 6 Cells Battery-Management System Based On bq76925 + MSP430G2xx2


IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products Applications
Audio www.ti.com/audio Automotive and Transportation www.ti.com/automotive
Amplifiers amplifier.ti.com Communications and Telecom www.ti.com/communications
Data Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computers
DLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-apps
DSP dsp.ti.com Energy and Lighting www.ti.com/energy
Clocks and Timers www.ti.com/clocks Industrial www.ti.com/industrial
Interface interface.ti.com Medical www.ti.com/medical
Logic logic.ti.com Security www.ti.com/security
Power Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defense
Microcontrollers microcontroller.ti.com Video and Imaging www.ti.com/video
RFID www.ti-rfid.com
OMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.com
Wireless Connectivity www.ti.com/wirelessconnectivity

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2014, Texas Instruments Incorporated

You might also like