This project was inspired by the Martin OSSMANN battery checker. I found it can be enhanced and simplified. My scheme shows these improvements:
1 - The ATMega328 is programmed by means of Arduino : this makes me easier for programming.
2 - I use a 4 x 20 char LCD display: The Ossmann displays are for Elektor readers and specialists ! My displays are for friends and family who are not familiar with these purposes.
3 - I add a "START" button, so the user follows the operation (not absolutly usefull !).
4 - The LCD circuit is simpler (no negative voltage generation).
5 - I add a resistor (pull-down) to detect when the battery is removed from the socket (10 kOhm).
6 - The time counter uses the Timer 1 (ISP socket no more available, programming is done only on the Arduino Uno).
7 - The discharge current is selected by a switch depending on the battery size (AA or AAA size) : 500 mA or 250 mA. The switch position must match with battery size, else the check will not start. Very easy to use !
8 - I write the program using ARDUINO language, not ATMEL Studio. It is very simple to read and understand.
The other parts of the scheme are not modified significantly. The program works correctly. The program counts (Timer1) the discharge duration; during this time, the current in the FET is regulated to drain 250 mA (AAA battery), or 500 mA (AA battery) by Timer2 used as PWM generator.
Buildt it and post here your battery load results, or send an email !
All ideas and suggestions are welcome !