AN676
APPLICATION NOTE
Battery charger using the ST6-REALIZER
INTRODUCTION
Because competition becomes greater and greater it is important to reduce time to market.
The ST6 Realizer helps to fullfill this duty. The time needed to realize a design is dramatically
reduced. Design of an application takes a few days instead of a few weeks.
Users who develop ST6 applications are systems electronics engineers; Often they do not
know the assembler well and there are reluctant to use it. The ST6 Realizer allows users to
design their applications using symbols known by hardware designers such as comparators,
counters, multiplexers. Once the design is over, the ST6 Realizer generates assembly code or
executable code for the different ST6 target hardware.
June 2008 Rev 2 1/14
BATTERY CHARGER USING THE ST6-REALIZER
APPLICATION NOTE GOAL
This note aims at introducing the different features of the ST6 Realizer graphic tool. It is also a
tutorial to firstly help you get started with ST6 Realizer design, then for you to implement
advanced features to optimize your design or to evaluate the target hardware requirements.
The application note describes a battery charger because it illustrates the different features of
the ST6 Realizer throughout it. The charger implements a simple charging method.
Nevertheless charging end points using the negative voltage slope detection method or voltage
inflection points can be implemented with this battery charger ST6 board.
HARDWARE SCHEMATICS
The schematics describes the different hardware parts of the application:
The microcontroller connections
The power supply
The charging indicators
The start push button
The power command
2/14
BATTERY CHARGER USING THE ST6-REALIZER
Figure 1 : Simple Battery Charger Circuit Schematic
HIGH
POWER SUPPLY
J1 JACK
GND
Battery cell: AA type / 1.2V - 0.5Ah
GND
22MF
C1
VCC
R10
470
R2
LOW
R8
470
T1
CURRENT
VOLTAGE
68 ohms
GND
U1
10 ohms
R4
BATTERY
NiCd BATTERY
BT1
2 ohms
R6
BD236-PNP-45V
GND
T3
7805
IMAX
VCC
GND
MAX CURRENT
ADJUST
RV1
50K-RV
READY
LED_LO
LED_HI
8MHZ-XT-P
GND
C310pF
GND
10pF
XT1
C2
1MF
CHARGE CURRENT
INDICATOR
LD3
LED-RED-5MM
LED-RED-5MM
LED-RED-5MM
LD2
LD1
GND
GND
470
GND
START PUSH-BUTTON
SW1
R1
470
R2
470
R7
START
C4
VCC
CURRENT
VOLTAGE
ST6210/20 MCU
IMAX
GND
6
7
8
9
10
ST6210
NMI
TEST
RESET/
PB7
PB6
PB5
PB411PB312PB213PB114PB015PA316PA217PA118PA019VSS
START
HIGH
LOW
100K
4
5
OSCOUT
LED_LO
DISCHRG
VCC VDD
1
2
3
U2
TIMER
OSCIN
20
READY
LED_HI
Note that in the circuit diagram the Microcontroller is shown as a simple box. The objective of
the ST6 Realizer is to enable you to write the program code for the microcontroller with the
same ease and in the same manner as you have drawn the hardware schematic.
3/14
BATTERY CHARGER USING THE ST6-REALIZER
Figure 2 : Functional Diagram
Start
Imax
READY
HIGH
Icharge
Vcharge
The MCU manages all the functions of the application:
At reset the READY LED blinks to indicate that the charger is ready to charge.
The user pushes the START button to begin the HIGH charge.
The READY LED switches off. The HIGH LED highlights.
The LOW charge takes place when the VOLTAGE threshold of 1.5 V is reached.
The HIGH LED switches off. The LOW LED switches on.
The battery charge is over when the delay of LOW charge is reached.
The LOW LED switches off. The READY LED blinks.
When the current in the battery is too high, HIGH charge or LOW charge are bypassed.
MCU
LOW
HIGH CHARGE
LOW CHARGE
4/14
Figure 3 : Flow Chart
BATTERY CHARGER USING THE ST6-REALIZER
Start
HIGH charge
Voltage > 1,5V
Yes
LOW charge
Charging time
expired
Yes
No
Current Too High
No
No
No
Current Too High
Yes
5/14