Nickel-metal-hydride (NiMH) batteries
are made by many manufacturers and
have different charge ratings. Also, with
repeated use, the maximum charge that
NiMH batteries will hold diminishes at
different rates. Therefore, it's difficult to
gauge the useful life and charge capacity of these batteries. To measure NiMH
battery performance, a multichannel
battery discharge unit was designed.
The unit includes a serial interface
through Windows Hyperterminal and is
powered by the interface itself, so it
needs no external power.
A PIC18F2320 microcontroller runs
the tester. The MCU has an 8-MHz internal oscillator with a 1% tolerance over its
operating range. This allows the UART
baud rate to be within error ranges without the need for an external crystal. The
device also offers 10 10-bit analog-to-digital channels, eight of which are used in
this application. Eight 2.2- Ω, 1-W resistors are used to discharge the batteries
under test at approximately 500 mA, a
rate that takes about two to four hours to
fully discharge a battery (). The
tester is powered through the RTS pin of
the serial port, with a 5.1-V zener diode
ensuring a constant reference voltage
level. RTS and CTS are shorted, as are
DTR and DSR.
The code that runs the tester was
compiled using the Microchip MCC18 C
compiler. The code can be found here.
When a battery is inserted into any of
the tester's channels, a timer is initialized for that channel. As long as any
channel's input voltage is above 0.9 V,
the timers for all channels will be updated in the Hyperterminal display every
three seconds. When the channel's
input voltage drops below the 0.9-V
threshold, the timer for that channel will stop incrementing. Thus, once all of the
batteries fall below the threshold, the
timer values will stop displaying. If every
channel has a voltage below 0.05 V
(that is, the tester has no batteries), the
timer for each one will be reset. The format for the timer display is: Hours: Minutes: Seconds.
The tester outputs data using a serial
interface set at 9600 baud, 8 bits, 1
stop bit, and no parity bit. There's no
flow control. Windows Hyperterminal
should be set up for this configuration.
Also, the option, "append line feeds on
incoming line ends," must be enabled
under Properties => Settings => ASCII
Setup. is a screenshot of sample test results in Hyperterminal. It took
about one to three hours to discharge
eight batteries down to 0.9 V. Not all of
the batteries were fully charged.