This is only a preview of the June 1994 issue of Silicon Chip. You can view 35 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 Coolant Level Alarm For Your Car":
Items relevant to "An 80-Metre AM/CW Transmitter For Amateurs":
Items relevant to "Convert Your Phono Inputs To Line Inputs":
Items relevant to "A PC-Based Nicad Battery Monitor":
Articles in this series:
Articles in this series:
Articles in this series:
|
This simple circuit
uses your PC’s games
card to monitor &
display the rate of
charge or discharge
of a nicad battery
pack. It can be
built in just a few
minutes & requires
only the addition of
a low-cost software
package to make it
work.
By DARREN YATES
A PC-based nicad
battery monitor
This project is a logical follow-on
from our “Experiments With Your
Games Card” series in the Computer Bits column. It will allow you to
monitor 7.2V nicad battery packs
during their charge and discharge
cycles, so that you can see how they
are progressing. What’s more, it can be
easily modified to handle 6V, 9.6V or
12V camcorder batteries, which have
become notorious for memory effects.
By using some simple software,
the project will give an analysis of
your battery over time and indicates
whether you have a problem with ei-
ther memory effect, incorrect charging
or excessive discharging. In addition,
you can save the readings to disc and
then pull them out for later analysis
and comparison. And if you have a
graphics printer, you can also do a
print screen to the Clipboard and then
paste the image into Paintbrush (and
then print out from there), provided
you have Windows running in the
background.
This will also allow you to save
the image as a bitmap (.BMP) file and
then import it into just about any
Windows-based program, just as we
have done here to illustrate this article.
Games card interface
Fig.1: the input control circuitry for
a typical games card. There are four
such circuits to cover all the controls
on a joystick.
62 Silicon Chip
By utilising the games card which
appears in just about every PC sold
these days, we can do away with just
about all of the usual circuitry that
would otherwise be required. As a re
sult, our circuit consists of just three
resistors and that’s about all.
As mentioned in previous issues,
the games card has two analog inputs
which are used by the joystick’s X- and
R1
2.2k
7.2V
NICAD
BATTERY
R2
4.7k
56k
PIN 3
GAME CARD
CONNECTOR
PIN4
NICAD BATTERY
MONITOR FOR PCS
Fig.2: the circuit uses just three
resistors. Note that R1 & R2
must be adjusted to suit the
nominal battery voltage – see
Table 1.
Y-axis controls – see Fig.1. These are
just 100-500kΩ pots which vary the
charging current to a 0.01µF capacitor
on the games card PC board. A software
counter keeps tabs on how long it takes
for the monostable controlled by the
joystick to reset and this number is
available to any software.
In our case, we can replace the
variable pot inside the joystick with a
variable voltage (ie, the nicad battery
voltage). The reason this works is that
in a normal joystick arrangement, a
fixed voltage (ie, the 5V rail) and a
variable resistor provide the variable current. In our case, the variable
current is provided using a variable
voltage (the battery under test) and a
fixed resistor. So, in the end, we wind
up with pretty much the same thing.
We simply add the battery to the
our three resistor circuit and the PC
does the rest via our purpose-designed software package, GAMESBVM.BAS/EXE.
Circuit diagram
The project is built using the Games
Breakout Board described in the Computer Bits column for April 1994. Fig.3
shows the parts layout for that board,
while Fig.4 shows the full size board
pattern. However, there is no reason
why you could not use your own board
pattern if you wish, provided you
make all the right connections.
TABLE 1
The battery voltage is plotted on screen as a continuous graph which can then
be saved & reloaded at a later date. In this case, 500 samples were taken at
0.5-second intervals but this time period can be varied to suit the application.
4.7k
Games breakout board
This “screen-grab” shows the opening menu that appears when the software
is booted up. It offers six choices: (1) set the nominal voltage; (2) set the time
between measurements; (3) take readings; (4) save readings to file; (5) load and
display readings from file; and (6) quit.
56k
Vbatt
R1
R2
4.8V
-
-
6V
1k
4.7k
7.2V
2.2k
4.7k
9.6V
4.3k
4.7k
12V
6.8k
4.7k
7.2V
NICAD
BATTERY
2.2k
Let’s now take a quick look at the
circuit diagram – see Fig.2. As shown,
the battery under test is connected to
the circuit and the voltage tapped off
by a 2.2kΩ and 4.7kΩ resistive divider. The resulting output is then fed
to pin 3 of the games card via a 56kΩ
current-limiting resistor, while the
common ground connection is made
via pin 4.
And that’s all there is to it! The
voltage divider is set so that the tapoff point gives close to 5V when the
battery is at its nominal output voltage
(ie, 7.2V). In fact, if you go through
the maths, you will find that a 7.2V
nicad pack will give 4.9V at the tapoff point.
For other battery voltages, we simply adjust the value of the divider to
ensure a 5V output (the 56kΩ current
limiting resistor remains the same in
all cases). Table 1 shows the details.
Note that if you have a 4.8V nicad
pack, then you only need the 56kΩ
current-limiting resistor.
Fig.3: the prototype was built onto the Games Breakout Board described in the
April 1994 issue. You could also connect the parts directly to the back of the
DB15 socket but make sure that all the connections are correct.
June 1994 63
PARTS LIST
1 PC board, code 07103941, 95
x 59mm
1 DB15 female PCB-mount
socket
1 GAMESBVM software disc
Resistors (0.25W, 1%)
1 56kΩ
1 4.7kΩ
1 2.2kΩ
GAMESBVM SOFTWARE
Fig.5: this is the full-size etching pattern for the PC board.
Alternatively, you could even connect the resistor network directly to
the back of the DB15 socket. Be very
careful if you do this though. If you
make a wrong connection or short
any of the pins, you could damage the
games card.
Before you start construction, make
sure that the board pattern is correct
and that there are no shorts or breaks in
any of the tracks. Once you’re satisfied
that the board is OK, install the four
wire links and the three resistors. After
that, it’s simply a matter of installing
the DB15 PC-mount socket and adding
the test leads for the battery.
DB15 cable
If you’re lazy, you can buy a DB15DB15 male-male cable for around $30.
This will be invaluable if you have
other devices to connect to the games
card, since all 15 pins are connected,
but it’s expensive overkill if used
solely for this project. In this circuit,
because you only need two connections to the games card, you can easily
“roll your own” cable but make sure
that the connections are correct.
Software
As you will have probably suspected
with such a simple circuit, most of
the work is done by the PC through
software. The program is too large
for us to publish here but readers can
obtain the source code (GAMESBVM.
BAS), the object code (GAMESBVM.
OBJ) and the complied, executable
program (GAMESBVM.EXE) on either
a 5.25-inch or 3.5-inch disc directly
from SILICON CHIP.
The nominal battery voltage is entered in at this screen prompt. This voltage
must be 4.8V or greater & the circuit must be adjusted for values other than 7.2V.
64 Silicon Chip
The complete GAMESBVM
software package is available
from SILICON CHIP for $7 + $3 p&p.
Please specify either a 5.25-inch or
3.5-inch disc. Send your cheque/
money order to: Silicon Chip, PO
Box 139, Collaroy, NSW 2097;
or phone in with your credit card
details (Visa, MasterCard and
Bankcard) on (02) 979 5644; or fax
your order to (02) 979 6503 (see
the order coupon in this issue).
The software was written in Quick
BASIC 4.5 but should also work quite
happily with DOS 5/6’s QBasic should
you wish to modify it in any way.
The opening menu of the software
offers six choices: (1) set the nominal voltage; (2) set the time between
measurements; (3) take readings; (4)
save readings to file; (5) load and display readings from file; and (6) quit.
The readings are stored on file in
ASCII format so that you can use them
in other programs or even modify them
if you so wish. The screen grabs in this
article give an idea of what to expect
as you go through the various stages
of the software package.
Note that measurements are displayed on the screen as they are taken
but once the voltage falls below 10%
of the bottom scale, then the program
automatically stops and returns to the
main menu.
When saving the measurements, you
can use the standard drive:\ path\filename.ext format to store them where
you wish.
By using the Nicad Battery Monitor
for PCs, you will be able to keep tabs
on just what the battery pack is doing.
It should also show up any early signs
of “memory effect”, thereby allowing
you to take the appropriate counterSC
measures before it goes too far.
|