This ATMega168-based battery tester allows you to find out the overall capacity of the rechargeable battery. It can shows how long will a battery last from the time it’s fully charged to the time that the “low battery” indicator comes on your device. It can be used to 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.
For more detail: Rechargeable Battery Capacity Tester using ATMega168 microcontroller