User Guide for Atmel ATA6870 and Atmel ATmega32HVB
Evaluation Kit Hardware
ATA6870-DK10
Features
● Evaluation of Atmel
● Monitoring of 12 battery cells
● Monitoring:
● Overvoltage (every cell)
● Undervoltage (every cell)
● Overheating
● Overcurrent
● Open clamp detection
● 12-bit battery cell measurement
● 12-bit temperature measurement
● Controlling of charge/discharge FETs
● Status LEDs for easy evaluation
● Charge balancing
● Coulomb counting for SOC determination
Figure 1.Atmel ATA6870-DK10
®
ATA6870
9228C-AUTO-02/15
1.Introduction
ATA6 870
Cell 12
Cell 11
ATA6 870
Monitoring (V,T)
Coulomb counting
ATmega32HVB
Charge/
Discharge
Control Unit
Cell 02
Cell 01
The Atmel® ATA6870-DK10 is a demonstration board for the Atmel ATA6870, which offers an easy way to start evaluation of
battery applications using the Atmel ATmega32HVB in combination with the Atmel ATA6870. The included software
demonstrates implementation of a 12 Cell Battery Management System. The supplied code serves as an example of how to
use the Atmel ATMega32HVB and Atmel ATA6870 together. The example is not a complete application intended for use
with smart batteries, and it is best to use the devices in a slightly different way in a smart battery application.
2.Safety Precautions When Using Li-ion Batteries
Please observe the safety guidelines supplied with the batteries. If improperly used or defective, li-ion and polymer batteries
and packs may explode and cause a fire.
3.Demonstration Board
The Atmel ATA6870-DK10 was developed to allow easy evaluation of control software for a microcontroller which controls
multiple Atmel ATA6870s. The sample code supplied demonstrates a simple permanent running measurement of voltages
and temperatures.
Figure 3-1. Board Concept
2
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
3.1System Start
Follow these steps to launch the system.
3.1.1Installing the Hardware
●
Connect the load/charger to be powered between pack+ and pack- on J1
●For demonstration purposes it is possible to use a resistor to simulate a load
●Connect the battery cell stack to the screw connectors on the demonstration board
●Led 1 indicates the enabled status of the demonstration board (controlled by microcontroller SW)
●In case of emulating cells such as a voltage divider, apply sufficient voltage (see Section 3.3 “Powering the Board” on
page 5)
3.1.2Number of Cells
It is possible to run the board with a reduced number of cells. The minimum voltage for each IC is 6.9V. Cell 1 and cell 6
(MBAT) have to be connected. The missing cells should be connected to the upper cell potential of the module. For further
information refer to the Atmel ATA6870 datasheet Section 7.3: Reduced Number of Battery Cells Configuration. For the
voltage range see Section 3.3 “Powering the Board” on page 5. If fewer than 6 cells are used per IC, the config.h file should
be adjusted (CELLSIC# under General Setting). See Section 4.1 “Supplied Code” on page 7 for further information on how to
configure the supplied software correctly.
3.2The Demonstration Board
Figure 3-2. Evaluation Board with 2 Stacked Atmel ATA6870 and Atmel ATMega32HVB
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
3
3.2.1On-board Features
The demonstration board includes the following items:
●2 Atmel
®
ATA6870 QFN 7mm 7mm
●Atmel ATMega32HVB
●12 external N-channel MOSFETs for balancing of battery cells
●Connectors
●ISP connector for programming/debugging the Atmel ATMega32HVB
●Screw connectors for connecting up to 12 battery cells
Table 3-1.Connector Overview
J7FunctionJ8Function
1CELL-1VDDHVM
2PAC K-2
33VCC
4VFET4GND
55IRQ
6GND6CLK
7OD7MISO
8OC8MOSI
9RESET9SCK
10GND10CS_N
J1Connector for charger/device to be powered
J2ISP connector
J3Upper battery stack (cells 7-12)
J4Bottom battery stack (cells 1-6)
J9Jumper to enable/disable MISO line of Atmel ATA6870
J9 should never be set while the Atmel ATmega32HVB is being programmed or while it is entering debug mode. It can be
mounted as soon as AVR Studio prompts for additional SPI lines to be connected in debug mode or after the device has
been correctly programmed.
4
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
Figure 3-3. Connectors
3.3Powering the Board
3.3.1Power Supply
The board supports supply voltages from 13.8V (6.9V per Atmel ATA6870) to 60V. However, to run the board on voltages
below 24V the ZDiode D3 needs to be replaced with a jumper to supply the Atmel
the jumper is mounted, the stack voltage should not exceed 48V! The Atmel ATmega32HVB supports operating voltage from
4V to 24V.
3.3.2Emulating Cells
Battery cells can be emulated by connecting a voltage divider to the specified clamps. Section 3.1.1 “Installing the Hardware”
on page 3 describes how to connect cells. The voltage limits for this setup are the same as for real batteries. Section 3.3.1
“Power Supply” on page 5 specifies these limits.
®
ATmega32HVB with sufficient voltage. If
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
5
4.Software Description: Monitoring of Up to 12 Battery Cells
The supplied code is documented and easy to adjust for verifying the functions of the Atmel® ATA6870 and start BMS
application development work.
After the board has been connected as described above the microcontroller automatically starts a cyclic measurement of
voltages, temperature, and current. LED 1 indicates these cyclic measurements. It toggles in default operation. A
continuously illuminated LED1 indicates an open clamp. See Section 4.2 “Open Cell Check” on page 7 for more information
about open clamp detection. LED 2 indicates that for some reason the MOSFETS have been disabled. The default software
disables the FETs in case of these events:
●Overvoltage (at least 1 cell exceeds the upper default threshold of 4.2V)
●Undervoltage (at least 1 cell exceeds the lower default threshold of 2.5V)
●Overcurrent (the current through the shunt exceeds the default threshold of 80mA)
●Overheating (the temperature exceeds the upper threshold, default value is 60°C)
●Low temperature threshold (the default threshold is -20°C)
LED 3 indicates whether the Atmel ATA6870s are turned on or not. An active LED indicates that the Atmel ATA6870s are
enabled.
Table 4-1.LED Functions
LEDFunction
LED 1
LED 2On indicates disabled MOSFETs for one of the reasons listed above
LED 3On indicates active Atmel ATA6870
Indicates clamp is open when permanently illuminated
Indicates cyclic measurements when blinking
The Atmel ATmega32HVB has no clock divider to provide an external slower clock than 1/2 CPU clock. Requirement of
Atmel ATA6870 is f
of the Atmel ATA6870 and 250kHz for SPI.
CLK
> 2 f
. Hence, the clock frequency of 1MHz is mandatory to provide a 500kHz clock for the ADCs
SPI
6
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
4.1Supplied Code
Voltage (Cell)4V
V
acqVoffset
–
3031 V
offset
–
-------------------------------- -
=
4.1.1config.h
This section refers to the config.h file provided in the zip archive with this Application Note. Only values in the User Setting
paragraph should be changed!
------------- GENERAL SETTING-------------------------------CELLSIC#Selecting which Cells are used Bits 0-5 -> Cells 1-6
------------- TEMPERATURE SETTING---------------------------RES_REF#Value of the mounted reference resistor (default: 3300)
T_TLSTemperature belonging to the first Value in the lookup
T_TLETemperature belonging to the last value in the lookup
T_TLSZTemperature step size used in the lookup table (default:
1)
T_LOWERTHRESHOLDLower temperature threshold
T_UPPERTHRESHOLDUpper temperature threshold
------------- COULOMBCOUNTER SETTING------------------------SHUNT_RESISTANCEValue of the shunt resistor in mOhm
RCC_CONVERSIONPERIODThe cycle times for the Regular Current Check
0x11 - 2s
RCC_DIVIDEDSZ0x01 to enable divided Voltage (Current) stepsize
RCC_CHARGETHRESHOLDThreshold for charging current, exceeding the
RCC_DISCHARGETHRESHOLDThreshold for discharging current, exceeding the
Other values should not be changed in the default HW setup!
table (index 0, default: -20)
table (default: 80)
0x00 - 256ms (default)
0x01 - 512ms
0x02 - 1s
threshold will turn off the Mosfets
threshold will turn off the Mosfets
4.2Open Cell Check
The implemented function checks for open clamps by measuring the cell voltages two times. During the first check a normal
measurement is completed and the values stored. During the second check the voltages are measured while the discharge
function for all cells is active. If the two measurements for the same cell differ by more than 100mV it is very likely that one or
more cells are not properly connected. The implemented method cannot be used to determine which cell is not properly
connected. A continuously illuminated LED1 indicates an open clamp.
4.3Voltage Measurements
The standard software loop measures the voltage ADC value and the offset ADC value for every cell and checks for
overvoltage and undervoltage once per cycle. Further information about the acquiring of voltages can be found in the Atmel
ATA6870 datasheet Section 7.5.1. The formula for calculating the voltage:
The default software only measures channel 1 of chip 1. The temperature sensors are based on a resistor divider using a
standard resistor and an NTC resistor. This resistor divider is connected to the reference of the ADC for temperature
measuring. Because the ADC is sharing the same reference value, the output of temperature measurement with ADC is ratio
metric. Further information is found in the Atmel ATA6870 datasheet Section 7.5.3: Temperature Channel.
For this application Atmel recommends using Res_Ref1 = 3.3k and RES_NTC1 R25 = 10k, B = 3435. The software
supplied for this board uses these values as default. The function uses a lookup table to determine the temperature. This
table has to be edited if an NTC other than the recommended one is used. The values in the lookup table range from –20°C
(index 0) to +80°C (index 100). These values can be edited via the config.h file in the User Settings section. More
Information about this file can be found in Section 4.1 “Supplied Code” on page 7. The calculation of RES_NTC is carried out
based on the formula provided in the Atmel ATA6870 datasheet Section 7.5.3:
When using another NTC, the LookupADC.txt has to be edited to match the NTC used.
4.5State of Charge Measurements
Highly precise SOC measurement is possible by combining the features of the Atmel ATmega32HVB and the Atmel
ATA6870. The coulomb counting feature of the Atmel ATmega32HVB enables highly precise measurements of the change
in the state of charge. Frequent reading of the current in a shunt is used to update the SOC frequently. The acquired cell
voltages and temperatures can be used to determine the SOC without the Atmel ATmega32HVB. The easiest way is to
compare the SOC measured by the added/extracted charge with the calculated SOC using the cell voltage, temperature,
and the data provided by the manufacturer of the cells. Further information regarding the coulomb counting ADC as well as
an implementation suitable for the Atmel ATmega16HVA is found in Application Note AVR352.
4.6Overcurrent Protection
The current through the shunt is calculated by measured voltage drop. The limit can be set via the CADRDC/CADRCC
register. The step size depends on the settings of the CADCSRC register and the shunt used. For further information about
limiting current see the Atmel ATmega32HVB datasheet Section 19.4: Regular Current Detection Operation. The supplied
software allows the feature to be tested by adjusting the values in the config.h file. More Information about this file can be
found in Section 4.1 “Supplied Code” on page 7. Values/part of the code should only be changed if you are aware of possible
consequences. The default implementation continuously measures the current and generates an interrupt if the entered
thresholds are exceeded. The thresholds are defined in the config.h file. The thresholds are written to the registers in the
function CCinit in the Atmel ATA6870_func.c file. Refer to the features of the Atmel ATmega32HVB in the coulomb counter
section to learn more about the time the controller waits for the values to be written.
// Charge Threshold
// Wait values to be written
// Discharge Threshold
// Wait values to be written
8
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
5.Features of the Atmel ATmega32HVB
Since the Atmel® ATmega32HVB is a part of the Atmel AVR® family which is dedicated to battery management there are
several special features such as coulomb counting and the control of the two charge/discharge MOSFETs.
5.1Coulomb Counter
The coulomb counter ADC runs on a different clock than the CPU. This clock is slower and therefore several things have to
be kept in mind before using it. Writing several registers in sequence takes a long time depending on the delays between
each write cycle. A possible solution is given in the supplied software example:
The Update Busy (CADUB) bit in CADSRA is cleared and written by hardware.
5.2Charging/Discharging FETs
The two FETs are controlled by an N-channel FET driver. The pins (OC and OD) are designed for outputting a high voltage
of approx. 13V. The status of the pins is controlled by software via the FCSR - FET control and status register.
C Code Example
void Configure_Fet(unsigned char Fet){
if(Fet&0x01)
SETBIT(FCSR, (1<<DFE));
else
CLEARBIT(FCSR,(1<<DFE));
// Charge Threshold
// Discharge Threshold
// Interrupt Enable
// Voltage Scaling
// ADC Enable, RCC Mode, Sampling
// Interval
if(Fet&0x02)
SETBIT(FCSR,(1<<CFE));
else
CLEARBIT(FCSR,(1<<CFE));
}
The example above implements an easy method to enable or disable the two FETs independently of each other. For more
information, see the Atmel ATmega32HVB datasheet page 148ff.
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
9
6.Power Consumption
There are several ways to reduce the power consumption of the Atmel ATA6870 and the Atmel ATmega32HVB. Sleep
modes are documented in the datasheet of the Atmel ATA6870 Section 7.1.1 and in the Atmel ATmega32HVB datasheet
Section 10. This board allows the Atmel ATA6870 to be enabled/disabled using the Atmel ATmega32HVB software. The pin
PB2 is used to control a transistor for activating/deactivating the Atmel ATA6870. Other options which are not implemented
are the use of interrupts and a timer (sleep between cycles).
10
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
7.Schematic
R59
1kΩ
R34
100Ω
DISCH5
MBAT6ODMBAT7
VDDHV
IRQ_IN
CLK_OUT
CS_N_OUT
SCK_OUT
MOSI_OUT
CS_N
1314151617181920212223
24
4847464544434241403938
37
SCK
MOSI
MISO
MFIRST
DTST
SCANMODE
CS_FUSE
VDDFUSE
DVSS
DVDD
GND
GND
DISCH6
MISO_IN
PD_N
VDDHVP
1
2
3
4
5
6
7
8
9
10
12
11
MBAT5
DISCH4
MBAT4
DISCH3
MBAT3
DISCH2
MBAT2
MBAT1
DISCH1
IC2
Atmel
ATA6870
IRQ
CLK
36
1
2
3
J5
0Ω
D
S
G
35
34
33
32
31
30
29
28
27
26
25
VDDHVM
PD_N_OUT
POW_ENA
PWTST
BIASRES
TEMPREF
TEMP2
TEMP1
TEMPVSS
AVSS
AVDD
ATST
R40
C6
51kΩ
nc (33μF/50V)
+
Q6
FMMT620
121kΩ
GND_2
GND_2
GND_2
GND_2
GND_2
R55
R38
7.5kΩ
R4
10Ω/0.25W
R41
PB2
4.7kΩ
R58
1kΩ
R45
1kΩ
R46
1kΩ
R96
D2
MM3Z13VC
56kΩ
R109
56kΩ
R93
56kΩ
PACK+
R94
56kΩ
T18
ZXMN2F34FH
CELL+
CELL-
J3-7
R30
100Ω
T14
ZXMN2F34FH
R33
100Ω
T17
ZXMN2F34FH
R32
100Ω
T16
ZXMN2F34FH
R31
100Ω
R29
100Ω
T15
ZXMN2F34FH
T13
ZXMN2F34FH
J3-6
J3-5
J3-4
J3-3
J3-2
J3-1
J1-3
R27
0Ω
R86
10Ω/0.25W
C3+
10μF
30V
C19
100nF
30V
C8
2.2μF
25V
C5
100nF
50V
C1+
10μF
30V
C32
100nF
30V
R39
10Ω/0.25W
R12
tbd
R37
150Ω
R14
4.7kΩ
R10
4.7kΩ
D4
LL4148
C10
100nF
Q7
SQ2301ES
Q5
IRF5210SPBF
Q4
IRF5210SPBF
C33
10nF
R66
100kΩ
C38
220nF
C11
100nF
C12
100nF
C13
100nF
C14
100nF
C15
100nF
GND_2
GND_2
GND_2
GND_2
GND_2
R49
R57
3.3kkΩ
3.3kkΩ
R52
R56
NTC
NTC
R47
1kΩ
R53
1kΩ
R54
1kΩ
R25
1kΩ
R19
0Ω
R11
100Ω
D1
D
G
G
S
S
D
MM3Z13VC
DISCH5
MBAT6
MBAT7
VDDHV
IRQ_IN
CLK_OUT
CS_N_OUT
SCK_OUT
MOSI_OUT
CS_N
1314151617181920212223
24
4847464544434241403938
37
SCK
MOSI
MISO
MFIRST
DTST
SCANMODE
CS_FUSE
VDDFUSE
DVSS
DVDD
GND
GND
DISCH6
MISO_IN
PD_N
VDDHVP
1
2
3
4
5
6
7
8
9
10
12
11
MBAT5
DISCH4
MBAT4
DISCH3
MBAT3
DISCH2
MBAT2
MBAT1
DISCH1
IC1
Atmel
ATA6870
IRQ
CLK
LED1
J9
PB2
RESET
CLK
SCK
MOSI
MISO
IRQ
CS_N
LED_0603
LED3
LED2
36
1
2
3
J6
0Ω
35
34
33
32
31
30
29
28
27
26
25
7
PA1 (ADC1/SGND/PCINT1)
PA2 (PCINT2/T0)
PA3 (PCINT3/T1)
PB0 (PCINT4/ICP00)
PB2 (PCINT6)
VCC
IC3
ATMEGA32HVB
VCC
VREG
VREF
VFET
PB3 (PCINT7)
PB4 (SS/PCINT8)
PB5 (SCK/PCINT9)
PB1 (PCINT5/CKOUT)
PA0 (ADC0/SGND/PCINT1)
8
9
10
14
36
6
4
12
13
11
5
15
35
3
44
43
1
2
42
18
OC
OD
16
37
17
27
20
21
22
23
24
25
26
28
29
30
31
2
4
6
VCC
3x2M
MOSI
MISO
SCK
RESET
J2
1
3
5
32
33
34
41
40
39
38
19
VDDHVM
PD_N_OUT
POW_ENA
PWTST
BIASRES
TEMPREF
TEMP2
TEMP1
TEMPVSS
AVSS
AVDD
ATST
C7
nc (33μF/50V)
+
+
121kΩ
R21
R24
1kΩ
R18
nc
opt. ext.supply
TP1
R3
1kΩ
R5
1kΩ
T12
ZXMN2F34FH
Q2
MMBT2222A
OC
J1-2
J1-1
J1-4
R95
4.7kΩ
Q1
MMBT2222A
Q2
NSS60601MZ4
D3
BZV55C6V8-TP
J4-7
R6
100Ω
T8
ZXMN2F34FH
R10
R22nc
100Ω
T11
ZXMN2F34FH
R9
100Ω
T10
ZXMN2F34FH
R8
100Ω
R1
100Ω
R2
1kΩ
T9
ZXMN2F34FH
T7
ZXMN2F34FH
J4-6
J4-5
J4-4
J4-3
J4-2
J4-1
C16
100nF
C20
10nF
R44
100kΩ
R17
5.1kΩ
C24
C24
nc
220nF
C17
100nF
C18
100nF
C21
100nF
C22
100nF
C23
100nF
VDD_HVM
VCC
VCC
R20
5.1kΩ
VCC
R13
R23
3.3kΩ
3.3kΩ
R77
R76
NTC
NTC
R7
1kΩ
R15
1kΩ
R16
C30 100nF
C27
100nF
C31
C34
100nF
100nF
C2 2.2μF
1kΩ
100ΩR89
R113
RSENSE
1kΩR99
100ΩR91
1kΩR100
PACK-
VFET
R88
1kΩ
R281kΩ
R351kΩ
R361kΩ
R26
10/0.25WΩ
PB6 (MOSI/PCINT10)
PB7 (MISO/PCINT11)
PC0 (INT0/EXTPROT)
PC1 (INT1)
PC2 (INT2)
PC4 (SCL)
PC5
PV1
PV2
PV3
PV4
RESET/DW
PC3 (INT3/SDA)
BATT
VCLMP10
GND
GND
GND
PI
PPI
NI
NNI
1
CELL-
RSENSE
10x1F
J7
10x1F
J8
Piggypack Board
for other Microcontroller
VDD_HVM
VCC
CLK
IRQ
CS_N
SCK
MOSI
MISO
PACK -
VFET
OD
OC
RESET
2
3
4
5
6
7
8
9
10
NV
OC
OD
PVT
NC
NC
VREFGND
1
2
3
4
5
6
7
8
9
10
Figure 7-1. Schematic
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
11
Figure 7-2. PCB Top
12
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
Figure 7-3. PCB Bottom
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
13
8.Revision History
Please note that the following page numbers referred to in this section refer to the specific revision mentioned, not to this
document.
Revision No.History
9228C-AUTO-02/15 Put document in the latest template
9228B-AUTO-10/12 Section 4.4 “Temperature Measurements” on page 8 updated
14
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
X
X
Atmel Corporation1600 Technology Drive, San Jose, CA 95110 USAT: (+1)(408) 441.0311F: (+1)(408) 436.4200|www.atmel.com
, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, AVR®, and others are registered trademarks or trademarks of Atmel Corporation in U.S.
and other countries. Other terms and product names may be trademarks of others.
DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right
is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE
ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT
SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDI NG, WITHOUT LIMITATION, DAMAGES
FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this
document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information
contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended,
authorized, or warranted for use as components in applications intended to support or sustain life.
SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where
the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without an Atmel officer's specific written
consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems.
Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are
not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.
X
XX
X
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
Atmel: ATA6870-DK10
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.