A simple way to test a battery would be to attach a load resistance to a fully charged battery and monitor the voltage until it drops below its useful value. The amount of time the battery lasts indicates its capacity.
That is a quick solution to the problem, but it involves watching a voltmeter for a few hours. That’s no fun at all. With a microcontroller, like the good old AVR chip, we can make a rechargeable battery tester that does the work for us. My tester puts AA batteries through a discharge test and reports the capacity in milliamp-hours (mAh) so you can compare battery capacity.
The tester can test multiple cells individually, and display the results on an LCD.
The tester discharges the battery while monitoring the voltage of the batteries. When the low threshold is reached, that cell is done it disconnects the load from the battery. When all tests are complete a series of beeps alerts the user. The tester identifies the type of battery by its initial voltage allowing both NiCd and NiMh batteries to be tested.
The design is based on the ATMega168 (or 328) microcontroller, which has 6 A/D converters on the chip, so these will be used to read the battery voltages and determine the load current. Since each battery will require two A/D converters per cell, the maximum number of cells is three.
I built two of the testers, first using an Arduino board as a development system, and then a standalone device that will be more compact, and free up the Arduino for other projects.