4.1
Supplied Code
4.1.1
config.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#
------------- TEMPERATURE SETTING----------------------------
RES_REF#
T_TLS
T_TLE
T_TLSZ
1)
T_LOWERTHRESHOLD
T_UPPERTHRESHOLD
------------- COULOMBCOUNTER SETTING-------------------------
SHUNT_RESISTANCE
RCC_CONVERSIONPERIOD
RCC_DIVIDEDSZ
RCC_CHARGETHRESHOLD
RCC_DISCHARGETHRESHOLD
Other values should not be changed in the default HW setup!
4.2
Open 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.3
Voltage 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:
Voltage (Cell)
=
4V
Selecting which Cells are used Bits 0-5 -> Cells 1-6
Value of the mounted reference resistor (default: 3300)
Temperature belonging to the first Value in the lookup
table (index 0, default: -20)
Temperature belonging to the last value in the lookup
table (default: 80)
Temperature step size used in the lookup table (default:
Lower temperature threshold
Upper temperature threshold
Value of the shunt resistor in mOhm
The cycle times for the Regular Current Check
0x00 - 256ms (default)
0x01 - 512ms
0x02 - 1s
0x11 - 2s
0x01 to enable divided Voltage (Current) stepsize
Threshold for charging current, exceeding the
threshold will turn off the Mosfets
Threshold for discharging current, exceeding the
threshold will turn off the Mosfets
V
–
V
acq
offset
-------------------------------- -
3031 V
–
offset
ATA6870-DK10 [APPLICATION NOTE]
9228C–AUTO–02/15
®
7
Need help?
Do you have a question about the ATmega32HVB and is the answer not in the manual?