![Atmel ATA6870 Скачать руководство пользователя страница 8](http://html1.mh-extra.com/html/atmel/ata6870/ata6870_user-manual_3003454008.webp)
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
8
4.4
Temperature Measurements
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.5
State 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.6
Overcurrent 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.
adc (out)
2048
1
RES_NTC(1)
(RES_NTC(1) + RES_REF(1))
---------------------------------------------------------------------------
8
15
------
8
10
------
–
+
=
C Code Example
CADRCC = RCC_CADRCC;
while(CADCSRA & (1 << CADUB));
CADRDC = RDC_CADRDC;
while(CADCSRA & (1 << CADUB));
// Charge Threshold
// Wait values to be written
// Discharge Threshold
// Wait values to be written