
This is the first of probably several posts about a battery discharge analyzer I have been perfecting for a little over a year now. I work in the telecommunications field where uninterrupted power is a must. To achieve this, there are large, high-capacity backup battery plants that keep equipment up and running in the event of a commercial power outage. Generally, but not always, these are -48 volt DC lead-acid batteries anywhere from 50 amp-hour to over 2000 amp-hour depending on the application and power requirements of the facility they are backing up. It is important to know how long a battery plant will be able to supply power before a facility goes down. To calculate this, you take into factor the combined current draw of all the equipment, and the amp-hour rating of the batteries. So, if your equipment loads the batteries at 15 amps, and you have 200-AH batteries, you should be able to power the site for 13.3 hours if your batteries are at 100% capacity.
hours of backup power = amp hours / site load 200AH / 15A site load = 13.3 hours (assuming 100% battery capacity)
But what if the batteries are not at 100% capacity? What if they are in poor condition and have much less than 100% capacity? How do you know? The answer is capacity testing with a load bank. IEEE450 describes load testing recommendations for vented lead-acid battery plants and IEEE1188 for valve-regulated lead-acid (VRLA) battery systems. While this load test analyzer will work with any type of battery composition, I have focused on lead-acid batteries.

The picture above shows a characteristic discharge curve of a lead-acid cell under a slight load. It dips into a trough, rebounds, and discharges somewhat logarithmically until it totally drops off. This graph was generated by my load test analyzer, which I refer to as pid3A (pi, as in raspberry pi, data acquisition and analysis). It takes thousands of samples, plots the results on dynamically generated graphs, creates user-defined reports, stores results for download, and displays test results via it’s internal web server.
Right now, I am on my second prototype. It can sample up to 24 individual cells during a load test. It can function as a stand-alone analyzer that travels with a separate load bank, or an online all the time battery monitoring system.

The samples are taken by three MCP3208 12-bit analog to digital converters (ADC). Each chip has eight inputs, and is connected to a dedicated voltage reference. I wrote a bit-banged driver for the ADC chip in perl using my own gpio interface.


The maximum input voltage the ADC’s can sample is 5VDC, so I had to make an adjustable voltage divider network to tune each cell input into the device.

The sampling rate is user defined. During the discharge test, results are written to a CSV file which is used later to process the results, and generate the graphs and reports.
To keep the file small, it contains the unix epoch timestamp, sample number, the cell# being sampled, the binary OP code from the ADC reading, and the voltage relative the negative terminal of the battery plant (calculated from the ADC opcode and some test parameters).
I used the DBD::CSV database driver from cpan to mine data and produce results from the readings contained in the csv file. I also developed a handy desktop application for testing that can generate graphs for my device, or any other general purpose csv database.

Below is a graph produced by pid3A of a 350Ah 24-cell VRLA load test that failed about half way through. You can clearly see that a few cells began failing quickly, and nearly reversed polarity.

Like I said, this is merely an introduction to the pid3A loadtest analyzer with more to follow.
Here is an incomplete whitepaper I did for the first prototype some time ago. It shows how far pid3A has come