PIC-controlled SLA battery capacity meter
Sealed lead acid (SLA) batteries are ideal for wide variety of
applications and they are maintenance-free. With correct charging and use, they
can last for many years on standby and hundreds of discharge cycles.
However, if they are deeply discharged, over-charged or left
discharged, their life can be greatly reduced. And even with proper care, all
SLA batteries eventually need replacing but how do you work out when? You could
try a number of load cycles to estimate the battery’s capacity but unless this
is carefully controlled, you can very easily end up with a completely discharged
battery which will never recover.
The solution is this battery capacity meter built around a
PIC16-F877A microcontroller. The circuit monitors the battery under test and
terminates the discharge at a user-defined voltage. It also computes the battery
capacity in amp-hours (Ah) as it goes. It allows the discharge rate to be varied
between 0.25A and 2A to cater for different battery sizes. Even when the battery
voltage drops to a level where it cannot deliver the set current into the load,
the circuit constantly monitors the current so it can correctly calculate the
In operation, the PIC measures the battery voltage using the
internal ADC at pin 2 via a potential divider. The PIC produces a range of
analog control voltages between 0.25V and 2V using a resistor ladder (pins 15-18
& 23-26). The output voltage of this ladder is varied by grounding it at
various PIC pins.
The control voltage is fed to the non-inverting input of op amp
IC2 which controls power FET Q4. This controls the current flowing through
Lamp1. The voltage across Q4’s 1W source resistor is fed to the inverting input
of IC2 to provide precise current control. A second ADC at pin 5 measures this
voltage and therefore the current.
The PIC keeps track of time using integral interrupts and it
drives the LCD panel to show the cumulative battery capacity, the instantaneous
current, battery voltage and elapsed time. Once the voltage drops to the
threshold value, the discharge is terminated and measurements are displayed. An
audible beep indicates the end of test.
The load is one of four different wattage 12V lamps, selected
to suit the required discharge current and so minimise the power dissipated in
Q4. Settings are stored in the PIC’s EEPROM for subsequent recall. The user is
prompted via the LCD interface, with control via two pushbuttons for selecting
discharge settings and modes.
The software will be available on the SILICON CHIP
website at www.siliconchip.com.au