-
AbstractThis Application Note demonstrates Zilogs Z8
Encore!-based battery charger that charges various rechargeable
batteries in a fast, efficient, and safe manner.
All the important rechargeable battery types, Sealed Lead Acid
(SLA), Nickel Cadmium (NiCd), Nickel Metal Hydride (NiMH), and
Lithium Ion (Li-Ion), are addressed in this Application Note. The
Z8 Encore!-based charger manages each bat-tery type according to
its individual charging pro-file.
The source code file associated withthis application note,
AN0137-SC01.zip is available for down-load at www.zilog.com.
Product OverviewZ8 Encore! products are based on the new 8-bit
eZ8 CPU, and introduce Flash memory to Zilogs extensive line of
8-bit microcontrollers unit (MCU). The Flash in-circuit programming
capabil-ity allows for faster development time and program changes
in the field. The new eZ8 core maintains backward compatibility
with Zilogs popular Z8 MCU.
FeaturesThe features of Z8 Encore! are as follows:
New high-performance 20 MHz eZ8 CPU Up to 64 KB Flash memory
with in-circuit pro-
gramming capability
Up to 4 KB register SRAM 12-channel, 10-bit analog-to-digital
converter
(ADC)
Two full-duplex UARTs Two Infrared Data Association (IrDA)
compliant
endecs
SPI and I2C ports Four 16-bit timers with capture, compare,
and
PWM capability
Watchdog Timer (WDT) with internal RC oscillator
3-channel DMA Up to 60 I/O pins 24 interrupts with configurable
priority On-Chip Debugger Voltage Brownout protection (VBO)
Power-On Reset (POR)
Note:
Application Note
Z8 Encore!-Based Battery Charger
AN013703-0708 Featuring Zilogs high performance
register-to-reg-ister based architecture (eZ8), the new Z8 Encore!
MCUs combine a fast 20 MHz core, up to 64 KB of Flash memory, up to
4 KB of linear register SRAM, and an extensivals. These peripherals
mfor a variety of applicatrol, security systems, helectronic
devices, and
The Z8 Encore! CPU is capable of a nominal 10 MIPs throughput at
20 MHz. The 4 KB SRAM extends the Z8 Encore!s reach to a wider
range of applications. The 10-bit sigma/delta ADC provides high
measurement resolution, and the SPI, UART,
e Copyright 2008 by Zilog, Inc. All rights reserved.
sensors.e array of on-chip peripher-ake Z8 Encore! suitable
tions including motor con-ome appliances, personal
and I2C interfaces can be used concurrently. Thversatile DMA
controllers can be configured inmany useful combinations to free
the CPU fromperforming unnecessary data transfer
overhead.www.zilog.com
-
Z8 Encore!-Based Battery ChargerDiscussionA discussion on
designing a battery charger is pre-sented in this section. For
further details, see Refer-ence on page 8.
Theory of OperationWhen designing a battery charger, the
following aspects are considered:
Power control techniques to suit different battery types and
capacities.
Charging and charge termination techniques to avoid
overcharging, thus facilitating fast charg-ing.
Safety techniques to ensure safe operation throughout the
charging process.
These aspects are discussed in the following section.
Power Control TechniquesAt the core of a battery charger is the
DCDC converter that acts as a regulated power source. The charger
hardware is capable of regulating its output in various modes, such
as constant voltage, constant current, or constant voltage with a
current limit. The charger can be viewed as a control sys-tem in
itself.
In Figure 1, an initial setpoint is a charger output value
chosen by you. In a battery charger, the type and capacity of the
battery is the determinant of the mode of operationnamely, a
constant current source or a constant voltage source. It also
deter-mines the required current and voltage setpoints. These
setpoints can be expressed as ISET or VSET.
The feedback circuits displayed in Figure 1 measures actual
output. The difference between the initial setpoint and the actual
value (feedback signal) is called an error. The controller
generates a control signal according to the magnitude and direction
of the error. It minimizes the steady state error and also responds
quickly to transient fluctua-tions during input or output.
Controllers usually work at lower power levels and therefore
require an external actuator to generate the appropriate
In a battery charger, the actuator is a step-down DCDC
converter, also known as a buck converter. The buck converter
converts a higher DC voltage to a lower one depending on the Pulse
Width Modulated (PWM) control signal generated by the controller.
The frequency of the PWM signal is maintained at a constant while
the width of the pulse or the duty cycle of the signal varies. This
variation is reflected as a change in voltage and/or current at the
output.
Figure 1. Feedback Control System
Feedback Circuits
ControllerError
Control Signal(PWM) Actuator
(Buck Converter)Setpoint(V /I )SET SET
Feedback Signal(V /I )FB FB
Output(V /I )OUT OUT
+-AN013703-0708 Page 2 of 17
output.Controllers are differentiated according to the way they
handle errors generated during regulation of
-
Z8 Encore!-Based Battery Chargerthe system output (in the case
of a charger, these errors are either voltage or current errors).
In a pro-portional controller, the actual value and the set value
are compared, and the resulting error value is used. In such a
system, there exists the possibility of a steady state error, which
is a drawback for the proportional controller. Adding an integral
compo-nent to the proportional controller eliminates this steady
state error.
The equation for a proportional plus integral (PI) controller
is:
To be useful for a microcontroller-based (discrete) system, the
integral is approximated by a running sum of the error signal.
Thus, an equation can be expressed as follows called Equation
1:
where C1 and C2 are constants.
Equation 1 is the position algorithm. A better rep-resentation
for Equation 1 is described in Equation 2, as follows:
Subtracting Equation 2 from Equation 1 and rear-ranging the
terms yields Equation 3, as follows:
where Kp and Ki are the proportional and integral constants,
respectively.
Equation 3 is the velocity algorithm. It is a conve-nient
expression, as only the incremental change in the manipulated
variable is calculated.
For a detailed discussion on controllers, see Refer-ence on page
8.
Charging and Charge Termination TechniquesDifferent battery
types require different charging methods. The basic charging
methods are the con-stant current and constant voltage charging.
The NiCd and NiMH batteries are charged using the constant current
method, whereas the SLA and Li-Ion batteries are charged via the
constant voltage method. An on/off current limiter is required when
performing constant voltage charging. These charging methods are
based on the type of battery and the present state of charge for
that battery.
In a constant current method of charging, fast charging occurs
when the charging current equals the rated battery capacity, C.
Fast charging requires constant monitoring of battery parameters
and precise termination techniques. It is therefore important to
know when to terminate charging.
The behavior of different batteries near full charge varies and
demands different termination tech-niques. The most common
termination techniques are the negative V, zero V, and the absolute
battery voltage, all of which are based on battery types. For more
information, see Appendix DBattery Technology on page 15.
Safety TechniquesA battery charger must ensure the safety of
batter-ies. Battery safety is implemented by monitoring
t( ) k1 e t( ) k2 e t( ) td+( )=
k[ ] C1 e k[ ] C2 e j[ ]j 0=
k 1+ =
k 1[ ] C1 e k 1[ ] C2 e j[ ]j 0=
k 2+ =AN013703-0708 Page 3 of 17
the battery terminal voltage and current against the battery
ratings provided by the manufacturer. When battery ratings are
exceeded, the charging voltage or current is switched off.
k ][ k 1[ ] Kp e k ][ Ki e k 1 ][+( )=
-
Z8 Encore!-Based Battery ChargerZ8 Encore!-Based Battery
ChargerThis section offers an overview of the functional
architecture of the battery charger implementation using Z8
Encore!.
Hardware ArchitectureThe Z8 Encore!-based charger features the
follow-ing hardware blocks. Figure 2 displays the follow-ing
hardware blocks:
Z8 Encore! MCU Step-down DCDC (buck) converter Feedback section
Battery selector (jumper settings) LED status indicators
In this application, the Z8 Encore! MCUs Ports E and H are used
as GPIO; Port B is used as an ADC
The step-down DCDC (buck) converter provides appropriate voltage
or current for the set battery type and parameters. The buck
converter modu-lates a higher voltage (from the external source)
with a varying pulse width (PWM method) to generate a lower
voltage. The pulse width is con-trolled by the control algorithm
based on the values obtained from the feedback section. The output
of the external source is preferably set to twice the value of the
converter output voltage (VOUT).
The feedback section consists of three differential
amplifiers/attenuators. The corresponding parame-ters are the
converter voltage (VOUT), battery volt-age (VBATT), and battery
current (IBATT). The battery current and the converter current are
the same.
The battery type is selected by setting one of the four jumpers
provided. The jumper status is read initially, and the
corresponding routine is selected for charging.
The charger indicates the charger status via LEDs, which are
used to indicate various states such as successful completion of
charging, safety error, no battery selection, and the specific
battery type undergoing the charging process. Table 1 lists the
status indicators along with a brief description.
Figure 2. Block Diagram of Battery Charger Hardware
Step-Down (Buck)Converter
Batter Selector(Jumper Settings)
Status Indicator(LED Port)
Converter V/I,Battery Voltage
Feedback
Ba
tte
ry
Z8
En
co
re!
MC
U
ExternalPower Source
-
+
PWM Output
ADC Channels
GPIO as Inputs
GPIO as Outputs
Table 1. LED Status Indicators
LED Status Description
D4 ON SLA battery is selected and charging is ON.
D5 ON NiCad battery is selected and charging is ON.
D6 ON NiMH battery is selected and charging is ON.
D7 ON Li-Ion battery is selected and charging is ON.
D8 ON No battery is selected.
AN013703-0708 Page 4 of 17
input. Timer1 is used in PWM mode and the output is tapped at
the pin PC1/Timer1 out.
D9 ON Safety errorcharging is aborted.
D10 ON Charging is successfully completed.
-
Z8 Encore!-Based Battery ChargerFor the battery charger
schematics, see Appendix BSchematics on page 10.
Software ImplementationAll Z8 Encore! peripherals are
initialized to the required mode of operation. The jumper settings
are read and the battery type is validated. When the battery type
is fixed, the battery parameters are loaded into the variables. At
present, these battery parameters are defined in the header
file.
Initially, based on battery ratings, each module sets the safety
and termination thresholds. Then type-dependent settings, such as
converter voltage, cur-rent outputs, and current limit are
calculated. When these one-time calculations are completed, the
charger software enters an infinite loop, which is broken only by a
successful charge completion or a safety error.
Inside the loop, the ADC reads the actual values for the
converter output voltage, the battery volt-age, and the current.
The ADC measures the output voltage and output current of the DCDC
converter as a feedback to the controller. It measures the volt-age
at the battery terminals as an input to determine the charge
termination.
When the actual values are known, they are checked for safety
limit compliance. The safety routine is responsible for the overall
safety features associated with the battery charger. The charger
ensures safety by comparing the actual converter voltage and
battery voltage with the calculated thresholds. Crossing these
thresholds switches off the PWM output, which turns off the
converter out-put and terminates charging functions. Such
ter-mination protects the batteries in case of a device failure.
The LED status indicator reflects an unsuc-cessful termination.
If everything is within limits, the battery is tested
fully charged, charging terminates and the LED indicators are
updated. If the battery requires fur-ther charging, the controller
calculates the required duty cycle for maintaining the setpoint at
the con-verter output.
The controller implements proportional plus inte-gral (PI)
control to derive the PWM output based on the equations mentioned
in the Theory of Oper-ation on page 2. The timer ISR is invoked
every 5 ms. The PWM value computed by the controller is loaded into
the PWM generators to be sent out via the output pin.
The 16-bit timer PWM mode offers a programma-ble switching
frequency based on the reload value. This flexibility allows you to
trade off between accuracy and frequency of the PWM switching
signal. The higher the frequency, the lesser the reload value and
the lower the resolution in the pulse width variation; and vice
versa.
The timer ISR also updates the charge termination variables
every 10 seconds.
TestingThis section contains a detailed test procedure to
demonstrate the working of the Z8 Encore! battery charger as
described in this Application Note. The test setup to demonstrate
the battery charger using Z8 Encore! is displayed in Figure 3.
AN013703-0708 Page 5 of 17
for full charge. Full charge is tested using different methods
for different batteries (see Appendix DBattery Technology on page
15). If the battery is
-
Z8 Encore!-Based Battery ChargerThe test setup consists of an
oscilloscope and a PC running the HyperTerminal application. For
test-ing, the Z8 Encore! Evaluation Board is used with the DCDC
converter and the feedback circuits. An external DC source supplies
necessary voltage and current for the various circuits
involved.
The external DC power supply provides two differ-ent voltages to
the charger circuitsthe DCDC step-down converter and the feedback
attenuators. The operational amplifier based feedback attenua-tor
circuits are fed with a 12 V supply. The DCDC converter works on a
812 V DC input for the
batteries tested. The control algorithm provides the necessary
line regulation to sustain the voltage variation at the input.
During testing, HyperTerminal is set at 57600 baud, 8-bit data,
no parity, 1 stop bit, and no flow control.
Table 2 lists the equipment used to test the Z8 Encore!-based
battery charger.
Figure 3. Battery Charger Test Setup
External DC Power SupplyOscilloscope
Z8 Encore!Evaluation
Board Battery
PC-HyperTerminal
DC-DC Step-Down Converter
Feedback Attenuators
Charger Hardware/External Circuits
PWM
Table 2. Z8 Encore! Battery Charger Test Equipment
Z8 Encore! Evaluation Board (Z8ENCORE000ZCO)
External power supply
Oscilloscope (Tektronix TDS 724D; 500 MHz/1 GSps)
Multimeter
PC (The HyperTerminal utility is used via the COM2 port of the
PC)
Batteries Used Make Type Ratings
BPT40 Sony Sealed Lead Acid 4 V, 500 mAhAN013703-0708 Page 6 of
17
BPT16 Sony Nickel Cadmium 3.6 V, 270 mAh
CP2010H T014 Panasonic Nickel Metal Hydride 3.6 V, 150 mAh
-
Z8 Encore!-Based Battery ChargerThe circuits are connected as
per the schematics in Appendix BSchematics on page 10.
When the external power supply and the Evalua-tion Board power
supply are switched on, the PWM waveforms are observed on the
oscilloscope. The battery/converters actual values are indicated in
the HyperTerminal window. The LED status indicators, as displayed
in Figure 2, reflect the charging status during the charging
operation. Figures 4, 5, and 6 display the test results obtained
while charging various types of batteries.
For SLA batteries, initially the current is effec-tively limited
to 200 mA; it continually falls while battery voltage increases.
The charging profiles also demonstrate the constant voltage output
(Vout) of the DCDC converter at 4900 mV. See Figure 4.
The NiCd charging profile displayed in Figure 5 indicates a
marked hump towards the full charge, before dropping down. The
software effectively detects this drop and the charging is
terminated.
The NiMH charging profile displayed in Figure 6, lacks a
significant drop and is thus terminated using the zero V
termination scheme.
The charging profiles for NiCd and NiMH batteries demonstrate
constant current outputs of 270 mA
Figure 4. SLA Charging Profile
3500
3700
3900
4100
4300
4500
4700
4900
1 31 61 91 121
151
181
211
241
271
301
331
361
Time in minutes
Vba
tt / V
out i
n m
Volts
020406080100120140160180200
I out m
Am
ps
Vbatt
Vout
Iout
Figure 5. NiCd Charging Profile
Figure 6. NiMH Charging Profile
4000
4500
5000
5500
6000
6500
1 11 21 31 41 51 61 71 81 91 101
Time in MinutesV b
att /
Vou
t in
mVo
lts
230
240
250
260
270
280
290
300
310
I out i
n m
Am
ps
Vbatt
Vout
Iout
4000
4200
4400
4600
4800
5000
5200
5400
5600
5800
6000
1 9 17 25 33 41 49 57 65 73 81
Time in minutes
V bat
t / V
out i
n m
Volts
100
110
120
130
140
150
160
170
180
190
200
I out i
n m
Am
psVbatt
Vout
IoutAN013703-0708 Page 7 of 17
and 150 mA respectively. These are equal to their rated battery
capacity measured in mAh. The
-
Z8 Encore!-Based Battery Chargercharging times for NiCd and NiMH
are 1 hour, 45 minutes and 1 hour, 25 minutes, respectively.
Because the SLA and Li-Ion batter-ies follow similar charging
(constantvoltage with limited current) and ter-mination profiles
(absolute voltage),only the SLA battery was charged.The results are
provided in this document.
SummaryThis Application Note demonstrates the use of Z8 Encore!
in a battery charger implementation. Ordi-nary battery chargers can
charge batteries of a par-ticular type and of a particular voltage.
The Z8 Encore!-based hardware/software provides flexi-bility such
that batteries of different types can be charged with the same
charger.
The Z8 Encore! 10-bit ADC ensures accurate charge termination,
facilitating faster recharge. Such termination avoids overcharging
and prolongs battery life. The flexibility of the PWM mode allows
for accurate DCDC buck/step-down converter implementation with
excellent line/load regulation.
The test results clearly demonstrate the charging and
termination mechanisms used by the charger to successfully charge
different battery types.
ReferenceThe documents associated with Z8 Encore! avail-able on
www.zilog.com and electronics references are provided below:
Z8 Encore! Flash Microcontroller Develop-ment Kit User Manual
(UM0146)
Power Electronics Design Handbook: Low
High Frequency Switching Power Supplies: The-ory and Design;
author: George Chryssis; ISBN: 0-07-010949-4; Publisher:
McGraw-Hill Book Company
Digital Control Systems, Volume 1Fundamen-tals, Deterministic
Control; author: Rolf Iser-mann; ISBN: 0-387-50266-1; Publisher:
Springer Verlag
Yuasa Technical
Manualhttp://www.yuasab-atteries.com/literature.asp
Duracellhttp://www.duracell.com/batteries
Eveready/Energizerhttp://data.energizer.com Panasonic Li-Ion
battery documentshttp://
www.panasonic.com/industrial/battery/oem/chem/lithion/index.html
Sanyohttp://www.sanyo.com/industrial/bat-teries/index.html
Note:AN013703-0708 Page 8 of 17
Power Components and Applications; author: Nihal Kularatna;
ISBN: 0-7506-7073-8; Pub-lisher: Oxford; Newnes, 1998
-
AN013703-0708 Page 9 of 17
Z8 Encore!-Based Battery Charger
Appendix AGlossaryDefinitions for terms and expansions for
abbreviations used in this application note that are not commonly
used are listed in Table 3.
Table 3. Glossary
Term/Abbreviation Definition/Expansion
ADC Analog-to-Digital Converter
ISR Interrupt Service Routine
Li-Ion Lithium Ion
mAh milli-Ampere-hour: a unit of battery capacity
NiCd Nickel Cadmium
NiMH Nickel Metal Hydride
PI Proportional plus Integral
PWM Pulse Width Modulation
SLA Sealed Lead Acid
-
AN01 Page 10 of 17
Z8 Encore!-Based Battery Charger
AppThis
1
1
D
C
B
A
5V
RESET
3.3V VDD
VDD
GND
VCC
GND
VDD
Rev
Sheet o f
ore!
1 13
C50
0.1uF
D6GREEN
2
1
4
C45
0.1uF
47805C/TO220/0.5A
OUT 3
G
N
D
2
C17
0.1
+C23
100/6.3
R14
680
C46
0.1uF
+ C15
100/10227uF
C49
0.1uF3703-0708
endix BSchematicssection provides the schematics for the Z8
Encore! battery charger implementation
Figure 7. Schematic for Z8 Encore! Interface
5
5
4
4
3
3
2
2
D
C
B
A
G
N
D
VCC
V
D
D
V
D
D
G
N
D
EXTAL XTAL
RESETVDD
GND
VDD
GND
VDD
GND
VDD
V
D
D
P
H
1
_
A
L
G
9
P
H
0
_
A
L
G
8
P
B
1
_
A
L
G
1
P
B
0
_
A
L
G
0
P
H
2
_
A
L
G
1
0
P
B
3
_
A
L
G
3
P
B
2
_
A
L
G
2
P
H
3
_
A
L
G
1
1
XTAL
G
N
D
EXTAL
PH3PH2PB2PB3PB1PB0PH1PH0
PC1
PE5PE6PE7
PA5
PE3
PE2PE1PE0
PE4
PA4
Title
Size Document Number
Date:
Battery Charger using Z8 Enc
A
Tuesday, January 07, 200
RESET
Z8 Encore! Interface
U1
Z8F
PA0/T0IN1PD22PC2/SS3PF64RESET5VDD6PF57PF48PF39
PE311PE410
GND12PE213PE114PE015GND16PF217PF118PF019VDD20PD1/T3OUT21PD0/T3IN22EXTAL23XTAL24
P
A
1
/
T
0
O
U
T
8
0
P
A
6
/
S
C
L
6
5
PA7/SDA 64
G
N
D
2
5
A
G
N
D
4
0
GND 41
A
V
D
D
2
6
P
H
0
/
A
L
G
8
2
7
P
H
1
/
A
L
G
9
2
8
P
B
0
/
A
L
G
0
2
9
P
B
1
/
A
L
G
1
3
0
P
B
4
/
A
L
G
4
3
1
P
B
5
/
A
L
G
5
3
2
P
B
6
/
A
L
G
6
3
3
P
B
7
/
A
L
G
7
3
4
P
B
3
/
A
L
G
3
3
5
P
B
2
/
A
L
G
2
3
6
P
H
2
/
A
L
G
1
0
3
7
P
H
3
/
A
L
G
1
1
3
8
V
R
E
F
3
9
PC0/T1IN 42PC1/T1OUT 43
DBG 44PC6/T2IN 45
PC7/T2OUT 46PG7 47VDD 48PG6 49PG5 50PG4 51PG3 52PE7 54PE6 55PE5
56PG2 57PG1 58PG0 60
PD7/RCOUT 61PC3/SCK 62
PD6/CTS1 63
P
A
5
/
T
X
D
0
6
6
P
A
4
/
R
X
D
0
6
7
P
C
4
/
M
O
S
I
7
0
P
D
5
/
T
X
D
1
7
1
P
D
4
/
R
X
D
1
7
2
P
D
3
7
3
P
C
5
/
M
I
S
O
7
4
P
F
7
7
5
P
A
3
/
C
T
S
0
7
8
P
A
2
7
9
G
N
D
7
7
V
D
D
7
6
G
N
D
6
8
V
D
D
6
9
GND 59
VDD 53
P3
PWR JACK
231
R3 1M
C21
0.1
SW4
C2
0.1
U1LMIN1
D5
S2G
U19
DS1233A-15
GND1RESET 2
VCC 3R17
100K
F1
RXE160
C2
18pF
U16
LT1086-3.3/TO220
GND1VIN3 VOUT 2
+ C4
Y1
18.432MHzC30
0.01
C1
18pF
-
AN01 Page 11 of 17
Z8 Encore!-Based Battery Charger
1
1
D
C
B
A
V_out(-)
V_batt(+)
V_out(+)
I_out(+)
I_out(-)
V_batt(-)
Rev
Sheet o f
0.0
rger
1 2
(+)
(-)
nse
TO BE CHARGEDBATTERY3703-0708
Figure 8. DCDC Step-Down Converter and LED Indicator Port
5
5
4
4
3
3
2
2
D
C
B
A
PC1/ T1OUT
PE7
PE1PE2PE3PE4PE5PE6
Vp
3.3 Volts
Title
Size Document Number
Date:
Using Z8 Encore! as a Battery Cha
A
Tuesday, January 07, 2003
DC-DC Step Down Converter
Rse
LED Indicator Port
D4LED
L1
120uH
D2
MBR360
D10LED
R4470E
R7560E
Q1IRF9540
D1LED
D5LED
D6LED
R13560E
D7LED
R579E
D8LED
R6B 10E
R8560E
D9LED
R9560E
R10560E
R37
18E
R6A 10E
R11560E
R2
2.2K BT1
C1
100uF
Q22N2222
R3
1K
R12560E
D3MBR360
R1
3.3K
C3 0.1uF
C2
100uF
-
AN01 Page 12 of 17
Z8 Encore!-Based Battery Charger
gs
1
1
D
C
B
A
PB3/ANA3
PB1/ANA1
Rev
Sheet o f
0.0
tery Charger
2 203
rounds are connected on
Converter Output Voltage
Battery Voltage
1AM324
1
0.1uF
1BM324
7
1K
0.1uF
1K3703-0708
Figure 9. Feedback Section and Battery Type Selector Jumper
Settin
5
5
4
4
3
3
2
2
D
C
B
A
PB2/ANA2
PH3PH2PH1PH0
12V
12V
12V
VCC
3.3 Volts
I_out(-)I_out(+) V_batt(+)
V_batt(-)
V_out(+)V_out(-)
Title
Size Document Number
Date:
Using Z8 Encore! as a Bat
A
Tuesday, January 07, 20
Note:1. R14 - R30 all 1% MFR.2. Signal, Digital, and Power G the
evaluation board.
Battery Current
Feedback Circuits
Jumpers for Battery Selection
SelectNiCd
SelectNiMH
SelectSLA
SelectLi-Ion
R15
10K
-
+
UL
3
2
4
1
1
R241K
R3110K
R201K
-
+
U1CLM324
10
98
4
1
1
C7
J4
12
-
+
UL
5
6
4
1
1
R3410K
C810uF
R17
C11100uF
R221K
R1810K
R3310K
R161K
J3
12
R23
1K
C90.1uF
R3010K
R19
10K
R1410K
R3210K
J5
12
C70.1uF
R25 1K
J2
12
C100.1uF
C7
R21
-
Z8 Encore!-Based Battery ChargerAppendix CFlowchartsThe main
battery-charging routine is displayed in Figure 10.
Figure 10. Flowchart for the Main Routine
Start
Terminate
Initialize peripherals
Read and verify battery type
Get the battery parameters
Calculate safety limits and thresholdsfor charging and
termination
Read feedback values for battery voltage,current, and converter
voltage
Within safety limits?
Is the battery charged?
Calculate the duty cycle
No
Yes
Yes
NoAN013703-0708 Page 13 of 17
-
Z8 Encore!-Based Battery ChargerThe ISR return routine is
displayed in Figure 11.
Figure 11. Flowchart for the ISR Return Routine
Start ISR
Return from ISR
Reload PWM Value
Update charge ending data every 10 secondsAN013703-0708 Page 14
of 17
-
Z8 Encore!-Based Battery ChargerAppendix DBattery TechnologyThe
four mainstream battery chemistries discussed in this Application
Note feature different charging and discharging characteristics.
Long-term battery life and performance are critically dependent
upon how batteries are charged. Therefore, it is impor-tant to
charge batteries with a mechanism specific to their
requirement.
It is also important to know when to terminate charging, because
overcharging of a battery invari-ably results in poor performance
and can damage the battery in extreme cases. Different battery
types behave differently near full charge condition and thus
require specific charge termination tech-niques. During charging,
all batteries exhibit a marked rise in voltage above the rated
battery volt-age.
The four major rechargeable battery typesSLA, NiCd, NiMH, and
Li-Ion, are briefly discussed below. For further details, see
Reference on page 8.
Sealed Lead Acid (SLA)Sealed Lead Acid batteries are most
commonly seen in automobiles. The single cell voltage for SLA is 2
V. According to their use, several such cells are connected in
series to get higher voltages such as 12 V/24 V.
SLA batteries are usually charged with a constant voltage supply
of 2.45 V per cell. For this Applica-tion Note, 4.90 V is used as
the charging voltage for the 4 V SLA battery.
At the start of charging, depending on their state of charge,
SLA batteries require huge amounts of cur-rent. If this current
uptake is not controlled, the bat-tery electrolyte may boil,
producing gasses inside the battery. It is therefore necessary to
limit the charging current. When the battery achieves some
The charge termination mechanism is simple and is achieved as
battery voltage reaches the charging voltage. At the same time,
there is a corresponding drop in charging current.
Nickel Cadmium (NiCd)NiCd batteries are used in camcorders,
Walkmans, and other similar consumer portable equipment. The
single-cell voltage for NiCd batteries is 1.2 V.
These batteries are charged using the constant cur-rent charging
method. While charging, as the volt-age crosses the full charge
point, it starts dropping. This drop is approximately 15 mV per
cell in the battery. This drop is recognized as a full charge
condition, and charging is terminated. This termi-nation mechanism
is named as V termination. During charging, battery voltage rises
to 1.65 V per cell.
The disadvantage of the NiCd battery is that the battery must be
periodically discharged to protect performance. In battery
parlance, this phenomenon is known as memory effect.
Nickel Metal Hydride (NiMH)NiMH batteries exhibit higher power
density com-pared to NiCd batteries. The per-cell voltage of the
NiMH battery type is 1.2 V, similar to NiCd batter-ies.
NiMH batteries are charged via the constant cur-rent charging
method. While charging, as the volt-age crosses the full charge
point, the voltage drop is not as low as for the NiCd batteries. As
a conse-quence, V charge termination is usually not rec-ommended
for these batteries. Instead of the fall in cell voltage, the
battery tends to plateau after a small drop. This flat region is
the preferred indica-AN013703-0708 Page 15 of 17
charge, the current is limited and constant voltage charging is
enforced.
tion for full battery charging, rather than the drop.
Consequently, this termination mechanism is named zero V
termination.
-
Z8 Encore!-Based Battery ChargerNiMH batteries do not suffer
from memory effect as do NiCd batteries. As a result, they replace
NiCd battery types in applications such as cell phones because the
increase in price is justified by the reduction in weight and
absence of memory effect.
Lithium Ion (Li-Ion)Li-Ion batteries are lighter in weight than
NiCd and NiMH batteries. Available with a high voltage rat-ing of
3.7 V, one Li-Ion battery can replace three NiCd/NiMH battery
types. These two features make Li-Ion high-energy density
batteries. They exhibit flat discharge characteristics and are free
from memory effect.
If the starting voltage of these batteries is initially too low,
a small constant current is applied until the battery reaches a
certain threshold specified by the manufacturer. The battery is
charged with constant voltage when this threshold is crossed.
Charging is terminated when battery voltage reaches the rated
voltage.AN013703-0708 Page 16 of 17
-
AN013703-0708 Page 17 of 17
Z8 Encore!-Based Battery Charger
DO NOT USE IN LIFE SUPPORT
LIFE SUPPORT POLICYZILOG'S PRODUCTS ARE NOT AUTHORIZED FOR USE
AS CRITICAL COMPONENTS IN LIFESUPPORT DEVICES OR SYSTEMS WITHOUT
THE EXPRESS PRIOR WRITTEN APPROVAL OFTHE PRESIDENT AND GENERAL
COUNSEL OF ZILOG CORPORATION.
As used hereinLife support devices or systems are devices which
(a) are intended for surgical implant into the body, or (b)support
or sustain life and whose failure to perform when properly used in
accordance with instructions foruse provided in the labeling can be
reasonably expected to result in a significant injury to the user.
Acritical component is any component in a life support device or
system whose failure to perform can bereasonably expected to cause
the failure of the life support device or system or to affect its
safety oreffectiveness.
Document Disclaimer2008 by Zilog, Inc. All rights reserved.
Information in this publication concerning the
devices,applications, or technology described is intended to
suggest possible uses and may be superseded. ZILOG,INC. DOES NOT
ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACYOF THE
INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS
DOCUMENT.ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL
PROPERTYINFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION,
DEVICES, ORTECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The
information contained within thisdocument has been verified
according to the general principles of electrical and mechanical
engineering.
eZ8, Z8, Z8 Encore!, and Z8 Encore! XP are trademarks or
registered trademarks of Zilog, Inc. All otherproduct or service
names are the property of their respective owners.
Warning:
Z8 Encore!-Based Battery ChargerAbstractProduct
OverviewFeatures
DiscussionTheory of Operation
Z8 Encore!-Based Battery ChargerHardware ArchitectureSoftware
Implementation
TestingSummaryReferenceAppendix A-GlossaryAppendix
B-SchematicsAppendix C-FlowchartsAppendix D-Battery Technology
/ColorImageDict > /JPEG2000ColorACSImageDict >
/JPEG2000ColorImageDict > /AntiAliasGrayImages false
/CropGrayImages true /GrayImageMinResolution 300
/GrayImageMinResolutionPolicy /OK /DownsampleGrayImages true
/GrayImageDownsampleType /Bicubic /GrayImageResolution 300
/GrayImageDepth -1 /GrayImageMinDownsampleDepth 2
/GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true
/GrayImageFilter /DCTEncode /AutoFilterGrayImages true
/GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict >
/GrayImageDict > /JPEG2000GrayACSImageDict >
/JPEG2000GrayImageDict > /AntiAliasMonoImages false
/CropMonoImages true /MonoImageMinResolution 1200
/MonoImageMinResolutionPolicy /OK /DownsampleMonoImages true
/MonoImageDownsampleType /Bicubic /MonoImageResolution 1200
/MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000
/EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode
/MonoImageDict > /AllowPSXObjects false /CheckCompliance [ /None
] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false
/PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000
0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true
/PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ]
/PDFXOutputIntentProfile () /PDFXOutputConditionIdentifier ()
/PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped
/False
/Description > /Namespace [ (Adobe) (Common) (1.0) ]
/OtherNamespaces [ > /FormElements false /GenerateStructure true
/IncludeBookmarks false /IncludeHyperlinks false
/IncludeInteractive false /IncludeLayers false /IncludeProfiles
true /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe)
(CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /NA
/PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged
/UntaggedRGBHandling /LeaveUntagged /UseDocumentBleed false
>> ]>> setdistillerparams> setpagedevice