1 /* This file has been prepared for Doxygen automatic documentation generation.*/
\r
2 /*! \file *********************************************************************
\r
5 * Li-Ion specifications
\r
7 * Contains example definitions of Li-Ion battery specifications.
\r
9 * \par Application note:
\r
10 * AVR458: Charging Li-Ion Batteries with BC100
\r
12 * \par Documentation:
\r
13 * For comprehensive code documentation, supported compilers, compiler
\r
14 * settings and supported devices see readme.html
\r
17 * Atmel Corporation: http://www.atmel.com \n
\r
18 * Support email: avr@atmel.com \n
\r
19 * Original author: \n
\r
24 * $URL: http://svn.norway.atmel.com/AppsAVR8/avr458_Charging_Li-Ion_Batteries_with_BC100/tag/20070904_release_1.0/code/IAR/LIIONspecs.h $
\r
25 * $Date: 2007-08-10 09:28:35 +0200 (fr, 10 aug 2007) $\n
\r
26 ******************************************************************************/
\r
28 #ifndef LIIONSPECS_H
\r
29 #define LIIONSPECS_H
\r
32 //******************************************************************************
\r
34 //******************************************************************************
\r
35 // This is for common NiMH batteries.
\r
36 #define CELL_VOLTAGE_SAFETY 0 /*!< \brief Buffer for unmatched batteries.
\r
38 * If we are charging a multicell battery and the cells aren't matched, we
\r
39 * may risk overcharging at least one. Therefore, we may subtract this constant
\r
40 * per additional cell in battery to allow for a "buffer".
\r
42 * \note Set to 0 if batteries are properly matched.
\r
44 * \note If this is changed to something higher than (CELL_VOLTAGE_MAX -
\r
45 * CELL_VOLTAGE_LOW), and the number of cells is great enough, the limit
\r
46 * BAT_VOLTAGE_LOW will become higher than BAT_VOLTAGE_MAX. This will cause
\r
47 * the charger to keep trying to charge, but instantly finishing because
\r
48 * the battery voltage is already at max.
\r
50 //! Maximum charge voltage for cell, in mV.
\r
51 #define CELL_VOLTAGE_MAX 4200
\r
53 //! Minimum voltage to consider cell charged at, in mV.
\r
54 #define CELL_VOLTAGE_LOW 4050
\r
56 //! Minimum voltage to start charging at, in mV.
\r
57 #define CELL_VOLTAGE_MIN 2750
\r
59 //! Target voltage during prequalification, in mV.
\r
60 #define CELL_VOLTAGE_PREQUAL 3000
\r
63 //******************************************************************************
\r
65 //******************************************************************************
\r
66 // Battery-definitions.
\r
67 //! Number of cells in battery.
\r
68 #define BAT_CELL_NUMBER 1
\r
70 //! Maximum cell temperature (Celsius).
\r
71 #define BAT_TEMPERATURE_MAX 45
\r
73 //! Minimum Cell temperature (Celsius).
\r
74 #define BAT_TEMPERATURE_MIN 0
\r
76 //! Maximum time for prequalification, in minutes.
\r
77 #define BAT_TIME_PREQUAL 9
\r
79 //! \brief Constant charge current, in mA, during prequalification mode.
\r
80 //! \note This is typically lower than the main charge current.
\r
81 #define BAT_CURRENT_PREQUAL 150
\r
83 //! Charge current hysteresis, in mA.
\r
84 #define BAT_CURRENT_HYST 5
\r
86 //! Charge voltage hysteresis, in mV.
\r
87 #define BAT_VOLTAGE_HYST 10
\r
89 //! Maximum battery voltage, in mV.
\r
90 #define BAT_VOLTAGE_MAX (CELL_VOLTAGE_MAX * BAT_CELL_NUMBER) - \
\r
91 ((BAT_CELL_NUMBER - 1) * CELL_VOLTAGE_SAFETY)
\r
93 //! Minimum voltage, in mV, to consider battery charged.
\r
94 #define BAT_VOLTAGE_LOW (CELL_VOLTAGE_LOW * BAT_CELL_NUMBER)
\r
96 //! Minimum voltage, in mV, to consider battery safe to charge.
\r
97 #define BAT_VOLTAGE_MIN (CELL_VOLTAGE_MIN * BAT_CELL_NUMBER)
\r
99 //! Charge voltage to achieve, in mV, during prequalification mode.
\r
100 #define BAT_VOLTAGE_PREQUAL (CELL_VOLTAGE_PREQUAL * BAT_CELL_NUMBER)
\r
102 #endif // LIIONSPECS_H
\r