“Measuring the capacity of a battery
As a boat owner, I always wanted to know the capacity of a used battery. Not the charge state, not the internal resistance, but how many Ampere-hours the battery can actually contain. A partially worn-out battery can obviously contain less than the rated Ah. The standardized way to rate a new battery is Ah = 20 * (the current that the battery can be loaded by for 20 hours). So to measure it, load the fully charged battery with 1/20 of the rated Ah (keeping the current constant while the voltage decreases), then measure the time until the voltage is below the threshold, typically 10.5V for a 12V battery. If it turns out to be 20 hours, you are happy to have a fresh battery; if it is, say, 10 hours, then the battery has lost half it’s capacity.
The load is created using a heatsink-mounted resistor and a transistor. The Arduino measures the voltage across the resistor and uses it to control the transistor’s base current. A driver transistor is used to amplify the Arduino PCM output. A rotary encoder and a bushbutton is used together with the LCD to show menus, input settings and start and measurement: Battery rated capacity, testing time (nominally 20 hours, but can be chosen otherwise), and end-voltage threshold. After the test is finished, the result is stored in NVRAM, so it doesn’t disappear.
With the chosen components, a max of 10 Amps is possible, allowing for at 200 Ah battery test.
A provision for calibration is added: Hold down the button when powering-on, then a series of menus will guide you through voltage- and current- calibration. Ideally, two multimeters should be used, one for voltage, one for current. In the first menu you turn the button until the correct voltage is displayed, in the next two menus the button is turned until the measured current is 1 an 5 Amps.
It is vital that the battery be charged immediately after the test, so a relay is added to switch on an external charger after the test is finished.”