This is only a preview of the April 2001 issue of Silicon Chip. You can view 34 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "A GPS Module For Your PC":
Items relevant to "Dr Video: An Easy-To-Build Video Stabiliser":
Items relevant to "A Tremolo Unit For Musicians":
Items relevant to "The Minimitter FM Stereo Transmitter":
Items relevant to "Intelligent Nicad Battery Charger":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
This “intelligent”
Nicad battery charger
was designed for
high-current,
rapid-charge
applications, such as
cordless power tools
and model racing
cars. It’s just the shot
for recharging battery
packs ranging from
7.2V to 14.4V.
By PETER HAYLES
Intelligent Nicad Battery
Charger for Power Tools
A
S A KEEN HANDYMAN, I
have a number of power tools,
including a few cordless types
that run off nicad battery packs. These
battery packs range from 7.2V to 14.4V
and almost inevitably contain Sanyo
or Panasonic nicad cells, regardless
of the brand of the tool itself.
Properly treated, these battery
packs should be good for hundreds of
charges and can potentially last many
years. Unfor
tunately, proper nicad
chargers are usually expensive and
the cheap chargers supplied with the
original equipment often incorrectly
charges the cells and dramatically
shortens their life.
66 Silicon Chip
Recently, I found that my 2-year-old
9.6V cordless drill battery wouldn’t
perform to its rated capacity after
charging. Unfortunately, battery packs
are fairly expensive to replace, sometimes costing almost as much as the
entire drill kit – and that’s if you can
purchase the battery pack separately
at all. Often, you will simply be told
to just “buy a new drill”.
In fact, it is far cheaper to purchase
your own cells and manufacture a
“new” battery pack using the old
case. This involves soldering leads
between the battery tags to connect
them in series. Note, however, that
you should never solder directly to
the cell cases – that can damage them
and is quite dangerous.
In selecting replacement cells, I
researched the manufacturer’s specifications on charging and guess what?
– the battery charger that came with
the drill didn’t comply with these
specifications. Instead, the supplied
charger is a very simple device that
applies a constant current to the battery pack and doesn’t cut out once the
pack is fully charged.
As a result, once the cells are fully
charged, the battery starts to heat and
the internal pressure builds up. This
can lead to permanent cell damage
and in serious cases, the battery can
rupture or vent electrolyte.
Having paid good money for a new
battery pack, I decided to design a new
charger that would not damage the
battery. In particular, I wanted a charger that not only met the specifications
but would also sense the condition of
cells and charge accordingly.
In short, I wanted to be able to
“throw” the pack on the charger and
know that it would be “good” the next
time I reached for it. And that meant
it had to be fully automatic, with no
switches to set.
Meeting these requirements also
meant that the charger required some
inbuilt “intelligence”, so logic control
circuitry was required. At the same
time, I wanted to keep the design
as simple as possible and keep the
component count down – after all,
reducing the size of a PC board and the
number of holes in it leads to major
cost savings.
In the end, I decided on a very
simple 1-chip design based on a PIC
microcontroller (PIC is a registered
trademark of MicroChip and refers
to a range of microcontrollers). That
way, it’s the software that’s programmed into the PIC that does all the
hard work. If you don’t have a PIC programmer, don’t panic! – programmed
PICs to suit this design are available
inexpensively from the author.
Other than this, only a few commonly available components are
required to complete this project.
The “all-up” cost should be about $60
which is a lot cheaper than your next
battery pack!
Nicad characteristics
Even if you don’t want to build this
charger, you can still learn how to get
the most from your nicad batteries.
To start with, a “cell” is defined as
a single vessel containing electrodes
and electrolyte for generating current.
A battery consists of two or more
cells. Nicad cells are rated at 1.2V
for design purposes, although they
normally develop about 1.25V and
require a charging voltage of 1.5V
(during full charge).
Nicad cells can supply very large
amounts of current and display a
remarkably flat discharge characteristic, maintaining a consistent 1.2V
throughout discharge. The voltage
then drops quite suddenly and a cell
is almost completely flat at 0.8V. This
is called the “knee” characteristic
because of the shape of the graph of
voltage against time.
Nicad battery capacity is rated in
mAh (milliampere-hours) and is commonly referred to as “C” – ie, it can
supply 1C mA for 1 hour, 2C mA for 30
minutes, etc. Three different charging
techniques are commonly employed:
trickle charging whereby the battery
is “topped up” at 3.3% of C to 5% of
C; slow charging at 10-20% of C; and
fast charging at 50-100% of C.
Slow charges are not meant to be
continually applied and since nicad
Below: the unit is easy to build since
virtually all the parts are on the PC
board. Keep the wiring neat and tidy
by using cable ties and note that the
large metal diecast case is necessary
for heatsinking.
April 2001 67
Fig.1: this flow chart shows the
basic operation of the software
that’s programmed into the PIC
microcontroller.
batteries are about 66% efficient, this
type of charging normally takes about
8-15 hours. On the other hand, fast
charges at 100% of C should be terminated after about 1.5 hours, assuming
that the battery is flat to begin with.
Once a battery is fully charged, it
produces gas and this creates a high
internal pressure and a sudden rise
in tempera
ture. At this point, the
battery should be switched to trickle
charging, otherwise it will begin to
vent and release its electrolyte. And
that permanently damages the cells.
As a matter of interest, my old battery was rated at C = 1300mAh and my
old charger was rated 400mA (30%
of C). This means that the charger
should have been switched off after
about four hours, provided that the
battery was almost flat to begin with.
However, there is no way of knowing if C was actually 1300mAh or if
it had decreased a bit. Once a battery
starts to deteriorate, it becomes a
vicious cycle and the battery then
deteriorates rapidly due to more and
more overcharging. According to the
manufacturer, the cells supplied with
my drill should have been good for
500-1000 cycles if properly treated!
The memory effect
Possibly the biggest misconception
that surrounds Nicad cells is a result
of the so-called “memory effect”.
Almost every one quotes it as the
reason that cells have to be completely
flattened (ie, to 0V) before charging –
otherwise they develop some sort of
memory and can only hold a partial
charge from there on.
The “memory effect” was discovered during the early days of satellites.
They used solar cells to charge nicad
batteries and these batteries were
subjected to precise charge/discharge
cycles many hundreds of times, as the
satellite alternated between darkness
and sunlight during its orbit. However, memory effect isn’t a problem if the
charge/discharge cycles are varied – it
certainly isn’t a significant problem in
normal home usage.
Although it may be OK (but not really a good idea) to discharge individual
cells to 0V, this is certainly not recommended for an entire battery of cells.
The reason is simple – when a battery
is discharged below 0.8V per cell,
one of the cells is inevitably weaker
than the others and goes to 0V first.
If the battery is further flattened, this
68 Silicon Chip
Fig.2: the PIC microcontroller (IC1) is at the heart of the circuit. It continually
samples the battery voltage and outputs a PWM waveform which controls
constant current source REG2 via transistor Q1.
battery becomes reverse charged (ie,
it reverses polarity) and this weakens
it even further. This creates an effect
called “voltage depression” and it’s
quite common in battery packs that
are treated this way.
Eventually, the battery’s performance drops off quite sud
d enly
which ironically is the very thing
that the user is trying to prevent.
Preventing this problem is quite
straightforward – don’t discharge the
battery to 0V.
Most users know where the battery’s “knee” occurs; it is when the
tool first starts to show signs that
the battery performance (and hence
battery voltage) is suddenly dropping. It is a good idea to immediately
recharge the battery from this point.
Usually, there will be less than 5% of
C remaining anyway.
One other thing – Nicad batteries
don’t like getting too hot or too cold.
They will not take a full charge and
they actually discharge (even under
no load) much faster when over 40°C
or below 0°C. For this reason, you
should avoid leaving cordless tools
inside a hot car. In addition, a nicad
battery pack builds up internal heat
when working, so don’t over-work
the tool.
Nicad batteries should also be left to
cool down for a while after discharge
before recharging them. Note also that
Nicad batteries do self-discharge and
the rate is also temperature related.
As a rule of thumb, they will hold a
full charge (with no load) for about a
month or two but when they get old
or hot, they might only last a day.
So what can you learn from this?
The rules are:
(1). Don’t flatten a nicad battery
below 0.8V per cell.
(2). Don’t overcharge your battery
beyond 100% of C.
(3). Nicads don’t like to get too hot
or too cold (0-40°C is usually best).
Nicad charging
The nicad batteries used in cordless
tools and model racing cars generally
have a value of “C” ranging from 10003000mAh. The first step is to determine what “C” is for your cells. You
can do that either by directly inspecting the cells (assuming that the battery
pack can be easily disassembled) or
by contacting the manufacturer for
the part number. The value for “C”
is often included in the part number
and its specifications can be checked
out on the manufacturer’s website.
For my new battery, the value for
“C” was 1700mAh. Note that the “C”
of the individual cells is the same as
the “C” of the complete battery.
When designing a charger, you
should first consider how the cells
are to be used. For power tool and
model car applications, the charge
use is termed “cycle use” because
the battery is repeatedly charged and
discharged. In addition, the charge
time required is usually as fast as
possible – ie, between 1 and 2 hours.
My batteries were capable of
taking a fast charge of 100% of C,
which equates to 1.7A. Despite this,
I conservatively selected 1.25A as my
charge current because I wanted to
be able to charge 1300mAh (1.3Ah)
batteries as well. This value should be
OK for most readers and it doesn’t really matter if it is a bit less than 100%
of C, because the charger will eventually detect a peak anyway. However,
some readers will want to adjust the
maximum charging current and this
procedure is described later on.
For “cycle use”, there are two
recommended methods of detecting
charge termination – either using a
temperature sensor in the battery pack
or using a “negative delta V” cutoff
system. The temperature technique
relies on detecting the sudden rise in
battery temperature when the battery
is fully charged and using this to shut
down the charger. There is nothing
wrong with doing this but battery
packs do not always come with temperature sensors built in. Furthermore
those that do, often sense the temper
ature of one cell only.
The “negative delta V” system reApril 2001 69
Fig.3: follow this wiring diagram to build the Intelligent Nicad Charger. Make sure that all semiconductors are correctly orientated and note that the 1Ω 5W resistor should be mounted slightly
proud of the PC board, to aid cooling.
lies on the fact that the battery voltage
peaks and then drops about 15-20mV
per cell when fully charged. This
charger will detect a minimum peak
of about 84mV and so can be used
to charge battery packs ranging from
7.2V to 14.4V (ie, 6-12 cells). Note
that the upper limit is determined
by the maximum output voltage of
the charger.
No matter how discharged the
battery is, this technique will give
enough charge to restore the battery
to its full state. The battery is then
continually “topped up” with a trickle
charge to prevent slow leakage due to
its internal resistance.
Another thing to consider is the
requirement to let the battery cool
down before recharging. If a battery is
hot, its output voltage will rise slightly as it cools. This battery charger is
programmed to wait until the battery
voltage is stable for about 30 seconds
before starting to charge. If the battery
has just come off discharge and is
hot, it may take a minute or so for the
charge to begin to start.
In addition, new batteries may
show false peaks during the first four
minutes of charging. For this reason,
the charger starts with a slow “soft
start” charge for four minutes, to
allow the battery to cool and get past
this point.
In order to make the unit fully
70 Silicon Chip
automatic, it also automatically detects when a battery is connected for
charging. There’s just one proviso
here – the battery voltage must be
above 2V (open circuit) for the charger
to recognise it. If a battery pack is discharged to 0V, it won’t be recognised
and the charger won’t start.
In practice, this isn’t a problem
since a cordless tool or model car
stops working altogether when the
pack gets down to about half voltage
(ie, 3.6V for a 7.2V pack, or 7.2V for
a 14.4V pack). Of course, no-one uses
a tool until it stops working altogether – instead, the battery is placed on
charge as soon as there is a marked
deterioration in performance.
The charging algorithm used by the
PIC microcontroller is shown in Fig.1.
Note that the first LED is on continually during the “bulk charge” process,
while the second LED indicates the
type of charge being applied.
The operation of the charger is fairly straightforward. Normally, when
the charger is switched on, both LEDs
flash once. The charger then waits in
standby mode until a battery is connected. Once a battery is connected,
the charger progresses though several
modes: ie, cool, soft, fast and trickle.
At the end of the charging process,
the battery can be left on trickle
charge indefinitely, or removed from
the charger at this point. When the
battery is removed, the charger reverts
to standby.
Basic operation
Fig.4: this diagram shows the
mounting details for the LM317K
regulator (REG2). Make sure that
it is electrically isolated from the
case.
Fig.2 shows the full circuit details
of the Nicad Battery Charger. It uses
a PIC microcontroller (IC1) to generate a pulse width modulated (PWM)
waveform and this signal switches
a constant current supply based on
REG2 which is used to charge the
battery.
In operation, the PIC microcontroller senses the battery voltage and
converts this to a digital value using
an internal A/D (analog-to-digital)
converter. It then adjusts its PWM
output signal to control the charging
rate accordingly. It also drives the two
LEDs, to indicate the charging status.
The smallest and cheapest microcontroller that could be used to
perform the A/D conversion and still
have the necessary func
tions and
control lines is the PIC16C711. This
device is an 8-bit, high-performance
4MHz CPU and it includes four A/D
converter stages, a brown-out timer
and a watchdog timer.
The timers are used to reset the
chip if problems occur due to power
transients or interruptions.
The PIC16C711 comes in an 18pin dual-in-line package and has a
“massive” 1K words of program memory and 68 bytes of data. It’s hardly
enough to load Windows 2000 but it’s
quite enough for a relatively simple
control program.
Circuit details
OK, let’s look at how the circuit
works in greater detail. As shown, the
circuit runs off an AC plugpack and
its output is fed to a bridge rectifier
(BR1) and a 4700µF filter capacitor.
This capacitor reduces the DC ripple
to about 1V under full load (1.5A).
REG1, a 7805 3-terminal regulator,
produces the +5V rail for the PIC
microcontroller. A 0.1µF capacitor
is used to decouple this rail.
Crystal X1 and its associated 27pF
capacitors provide a stable and accurate 4MHz timebase for IC1. This
is necessary to ensure accurate time
delay functions for charging. The
two LEDs (LED1 & LED2) are driven
directly from pins 8 & 9 of IC1 via
100Ω current limiting resistors.
Pin 18 (RA1/AN1) is used to “sense”
the battery voltage. This input samples the battery voltage via a voltage
divider consisting of 3.3kΩ and 1kΩ
resistors. These resistors are neces
sary to “divide” the battery charging
voltage of about 0-21.5V down to
0-5V, which is the range of the PIC’s
A/D converter.
Note that the PIC uses an 8-bit A/D
converter, so we have 256 (28) possible values. This gives us a resolution
of 21.5/256 = 84mV which means that
a 6-cell (7.2V) pack is the smallest
pack that the charger will peak detect.
The PWM waveform from IC1
appears at pin 6 (RB0) and drives
switching transistor Q1 via a 3.3kΩ
resistor. Q1 in turn drives the ADJ terminal of REG2, an LM317K adjustable
3-terminal regulator.
In operation, the LM317 maintains
a constant 1.25V between its OUT
pin and the ADJ pin. In this circuit, a
1Ω 5W resistor is connected between
these two terminals and this ensures
that a constant 1.25A is applied to the
battery pack.
If necessary, you can adjust this
value to suit your appli
cation. All
you have to do is choose the charging
current that you want and use Ohm’s
Law (V = IR) to calculate the resistor
value; ie, divide 1.25V by the current
that is recommended for full charge.
For example, a 0.68Ω resistor will
provide a charging current of about
1.7A, while 1.2Ω will provide 1A.
The circuit works like this: when
Q1 is biased on, it effectively pulls
the ADJ pin of REG2 to ground and
so the output of REG2 will only be
at about 1.25V. However, very little
current will flow in the output since
D1 is reverse biased and there is a 1kΩ
resistor in series between the 1Ω 5W
resistor and the ADJ terminal. In fact
Q1 is biased on by default, so that the
unit is “fail-safe”.
Conversely, when Q1 turns off due
to the PWM waveform from IC1, REG2
behaves as a constant current source
and it charges the battery pack via D1.
Diode D1 ensures that the battery
cannot discharge back into REG2 if
the power is accidentally turned off!
If the power is interrupted with a fully
charged pack, D1 isolates the output
circuit and the nicad battery will
slowly discharge through the 3.3kΩ
and 1kΩ voltage divider resistors.
When power is subsequently restored,
the charger will detect the voltage
peak again and return to trickle charge
after just a few minutes.
Built-in self-test
A final feature of the software is
that there is a “Built-In-Test” (BIT) on
power up. This effectively tests all the
components except the capacitors (ie,
more than 80% of the components).
During power up, if no battery is
detected (ie, less than 2V on the output), the output is turned on for one
second and the voltage checked. The
output is then turned off. If the voltage
does not reach at least 10V when high
and go below 2V when low, then an
error is detected. The LEDs are both
Parts List
1 aluminium diecast case, 171 x
121 x 55
1 PC board, 77.5 x 85mm
1 front panel label
1 4MHz parallel cut crystal (X1)
4 2-pin PC-mount terminal
blocks (4A, 0.2-inch pitch)
1 18-pin DIL IC socket
1 TO-3 insulating pad
2 TO3 insulating bushes
3 M3 x 12mm machine screws,
nuts & washers
4 M4 x 12mm machine screws,
nuts and washers
2 5mm LED bezels
1 5.5mm ID rubber grommet
1 2.5mm DC panel socket
1 2.5mm DC plug
1 4mm crimp lug
4 plastic cable ties
2 plastic cable tie mounts
3 300mm lengths heavy-duty
multistrand cable (red)
1 180mm length heavy-duty
multistrand cable (black)
1 200mm length heavy-duty
multistrand cable (white)
1 600mm length heavy-duty
figure-8 cable
Semiconductors
1 PIC16C711-04/P programmed
microcontroller (IC1)
1 BC548 transistor (Q1)
1 7805 3-terminal regulator
(REG1)
1 LM317K adjustable regulator
(REG2)
1 4A or 6A 400V single in-line
bridge rectifier (BR1) (DSE
Cat Z3310; Jaycar Cat ZR1360; Altronics Z0076)
1 1N5404 power diode (D1)
2 5mm red LEDs (LED1, LED2)
Capacitors
1 4700µF 35VW electrolytic
(36mm high)
1 0.1µF monolithic
2 27pF ceramic
Resistors (0.25W, 1%)
2 3.3kΩ
3 1kΩ
2 100Ω
1 1Ω 5W wirewound
Miscellaneous
Thermal grease (see text),
heatshrink sleeving, solder.
April 2001 71
sinking for this device.
It’s a good idea to mount the 5W
resistor about 3mm proud of the
board, as it gets quite warm during
operation. This will allow the air to
circulate beneath it for cooling.
Unlike the other parts, the two
LEDs are mounted from the copper
side of the PC board. The top of each
LED should be about 13mm above
the board, so that they pass through
matching holes drilled in the base of
the case when the board is mounted
in position. Note: the base of the case
becomes the front panel.
Mounting REG2
The connecting cable for the battery pack emerges from a grommetted hole in
one end of the case. The adjacent socket is for the external AC plugpack supply.
powered on simultaneously during
this BIT. If there is an error the LEDs
then flash alternately.
This mode can be verified by
shorting the output on power up or
plugging in a battery during the BIT.
The error mode will also be invoked
and the LEDs will flash if no peak is
detected after three hours of main
charge. The unit will then time out
and switch off automatically.
Construction
All the parts except for REG2
are mounted on a PC board coded
14104011 and measuring 77.5 x
85mm. This board is mounted in a
substantial metal diecast case, which
is necessary to ensure adequate heatsinking for REG2.
Fig.3 shows how the parts layout
on the PC board. The board is easy to
assemble but take care with the orientation of Q1, IC1, D1 and the 4700µF
electrolytic capacitor. Pin 1 of IC1 is
adjacent to a small dot in the body at
one end of the device.
Regulator REG1 is mounted flat
against the PC board, with its leads
bent at right angles to pass through
the holes. It is secured to the board
using an M3 screw and nut and the
copper pad on the underside of the
board provides all the necessary heat
Fig.5: you can
make your own
PC board from this
full-size etching
pattern or buy a
ready made board
from RCS Radio.
72 Silicon Chip
The LM317 (REG2) is mounted on
the side of the aluminium diecast case
using a standard TO-3 insulating kit
to ensure electrical isolation. Fig.4
shows the mounting details.
Use the insulating pad as a template
to mark out the hole positions, then
drill the holes and use an oversize
drill to remove any metal swarf.
Carefully inspect the mounting area
to ensure that it is completely smooth
and free of any swarf before mounting the device, as a sharp edge could
“punch-through” the insulating pad
and short the device to the case.
The insulating pad can be either a
mica washer or a silicone impregnated washer. If you use a mica washer
be sure to smear all mating surfaces
with thermal grease to aid heat transfer, before bolting the assembly down.
Once the regulator is in position, use
your multimeter to confirm that its
metal body is indeed isolated from
the diecast case.
Note that the LM317 will dissipate
about 12W when charging smaller
batteries so don’t use a smaller case
than the one speci
fied, otherwise
the heatsinking will be inadequate.
If even higher power dissipation is
required (eg, if you are fast-charging at
more than 1.25A), then REG2 should
be fitted to a substantial heatsink.
Once the board assembly has been
completed, it can be mounted inside
the case. To do this, you will need to
mark and drill out four 4mm holes for
the mounting screws, plus two holes
for the indicator LEDs. Another two
holes are required in one end of the
case to accept a small rubber grommet
(8mm) and the power socket.
The PC board is mounted on 10mm
standoffs and secured using four M4 x
12mm countersunk screws, nuts and
washers. Note that the screws must
have countersunk heads, because they
have to go under the label. The two
LEDs should be pushed into matching holes in the case as the board is
mounted, with their tops just flush
with the case surface.
The internal wiring is shown in
Fig.3 and the photo. The external
lead to the battery pack is run out
via the 5.5mm ID grommet and is
fitted with a 2.5mm DC power plug.
The AC power leads are connected
to an adjacent 2.5mm panel socket
(note: choose a size that suits your
AC plugpack supply).
To ensure reliability, it’s a good
idea to secure the wiring using four
cable ties. Two of these cable ties pass
through cable tie mounts, as shown
in the photo.
Finally, the front panel label can be
affixed in position. The two LED can
be dressed up by fitting plastic bezels
if you wish.
Testing & operation
This unit requires a 24VAC input to
charge 14.4V batteries, although only
16VAC is required to charge anything
smaller. The AC power source must
be rated at the chosen supply current
or better – typically 1.5-2A. This can
come from an external AC plugpack
supply.
The bridge rectifier and 4700µF
filter capacitor should produce about
1.4 times the AC RMS input. So if
using a 16VAC supply, the main rail
should be about 22VDC. If using
24VAC, this rail should be about
30VDC. You should also check that
the 5V rail is present at the output of
REG1 and that there is at least 2.5V
across the LM317, the 1Ω current
sensing resistor and diode D1.
For the connection to the battery,
I used my existing charger pack after
first removing the internal circuitry –
which was no more than a transistor
and LED to indicate that current was
being delivered. For power connections, EIAJ DC voltage connectors and
plugs are standard, with the positive
usually being the centre pin.
The front panel artwork includes a
legend that explains all the possible
states for the LED indicators. If both
LEDs are flashing, it indicates that
there has been an “error”. This simply means that the unit has failed to
detect a peak voltage as the battery
pack charged and has timed out (ie,
Fig.6: the front panel artwork shows the mounting points for the PC board and
indicator LEDs and also indicates the LED flash codes.
after three hours) but this should
rarely happen.
Conclusion
This unit has halved the charging
time for my drill battery pack, from
3-4 hours to 1.5 hours maximum. It’s
nice to know that I can now “throw”
the battery pack on the charger and
that it will be fully charged and the
next time I want to use it – and that’s
SC
the way it should be.
Where TO BUY PARTS
A programmed PIC microcontroller for this project is available from the author
for $A20 plus $A5 for post and packaging (in Australia). Payment may be
made by bank cheque or money order. Contact: Peter Hayles at peterhayles<at>hotmail.com
Note: copyright of the PIC software and PC board associated with this design
is retained by the author. Individuals can make their own PC boards on a
one-off basis or purchase a board from RCS Radio – phone (02) 9738 0330.
April 2001 73
|