MCM Electronics Pro Elec Battery Test - Setup and How To

Posted by John on Jul 16, 2014

Pro Elec Battery Test Setup and How To

Recently, we started carrying our own line of Pro-Elec batteries, and around the office we were wondering how they really stack up against the major brands.

We had the discharge rates and expected run-times from the data-sheets, and most major brands do publish power-curves, but those didn't really give a good head to head comparison. So I grabbed an Arduino, Data-Logger Shield, and a few packs of AA size batteries from stock and got to work.

The easiest type of test to set up is a constant-resistance test (as opposed to a constant-current or constant-power) so rather than get fancy, this is what I decided to use. Since most AA batteries list between 2500 and 3000 Milliamp-Hours capacity I decided on a 6 Ohm load which would draw 1/4W at 1.5V allowing me to easily run one test per day. 

An Arduino isn't actually a voltmeter, but it does have analog inputs that can allow it to act like one as long as you keep your inputs below 5V.  Since I only planned on testing one battery at a time, this wouldn't be a problem.

Test Setup:

For the main load I used three 2 Ohm Resistors hooked in series, wired directly to the positive and negative terminals of the battery holder. Using 3 resistors made it very easy to ensure a solid 6 Ohms.

I then hooked the negative side of the load to the Arduino's ground, and the positive to the A0 pin, each through a 1k Resistor (To keep bypass under control.) I probably could have used 1M resistors, but I had the 1ks handy, and they did the job.

Finally, I wired the Green and Red LEDs on the data-logger board to Digital pins 2 & 3 respectively.

As far as software goes, I am including the sketch that I used:

#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <RTClib.h>
int led = 13;
int redled = 2;
int greenled = 3;
int voltin = 0;
int cutoff = 0.8; //Just used to let you know when the battery is being sensed
float volts = 0;
const int chipSelect = 10; // the card is fed from pin 10
File voltfile;
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(redled, OUTPUT);
pinMode(greenled, OUTPUT);
pinMode(chipSelect, OUTPUT);
voltfile ="voltlog.txt", FILE_WRITE);

void loop() { //enter the loop!
DateTime now =;
int voltin = analogRead(A0);
float volts = voltin * (5.0 / 1023.0); //Adjust to a 5v out of 1023 scale
Serial.print(volts, 4); //Echo volts (to 4 places) to the terminal (If attached)
Serial.print(" ");

voltfile.print(volts, 4); //print volts (to 4 places) to the data file
voltfile.print(" "); // a space makes data export easier
voltfile.print(now.unixtime()); // time-stamp
digitalWrite(redled, LOW);
digitalWrite(greenled, LOW);
if(volts <= cutoff) {digitalWrite(greenled, HIGH);}
if(volts >= cutoff) {digitalWrite(redled, HIGH);}
delay(9982); // wait for 10 seconds

Note that it includes the option of echoing to a terminal if you want to experience the excitement of watching a battery drain : )


Wire.h  //The Real Time Clock uses I2C

SPI.h  // Required for writing to the SD Card

SD.h // For the SD Card

RTClib.h  //For the Real Time Clock


Power Supply:

Originally I was powering the Arduino off of a powered hub attached to my computer, but after setting up an early test, and then powering my computer off, I saw a 0.05V glitch in the data that corresponded to the shut-off. I ran a few more tests and realized that even with the bypass under control; different power-supplies would give slightly different results, so I settled on a single regulated power supply that I used consistently. 


I ran a series of calibration tests using a bench-top power-supply in place of a battery for better control and found that I needed to multiply my raw data by 1.0159 to get an accurate reading.  This is influenced by the power-supply, and possibly by the individual Arduino, so I strongly urge anyone looking to replicate this to do their own calibration rather than to trust my numbers.


I wanted to take samples every 10 seconds.  Using the RTC included in the Data-logging Board, I time-stamped my readings, and found that due to runtime, a "delay(10000)" actually resulted in logging a reading every 10.018 Seconds.  So I changed to a "delay(9982)" which got the timing right where I wanted it.


I ran tests on the Pro Elec AAs batteries, and three major name-brand batteries, all fresh.  I had a four-pack of each, but due to time considerations I only tested three from each pack.  I then averaged the three readings from each set and plotted them.  The curves aligned nicely with the published data from the various manufacturers, so all in all I feel confident that the results.


1) Insert a blank SD card into the data-logger.

2) Plug Arduino into the power-supply, and wait for the lights to stabilize.

3) Allow the data-write light to flash once to ensure that the card is writing.  This means that you will have a couple of null-records, but they are easily removed later.

4) Insert battery into holder.  Within 10 seconds the red light should shut off, indicating that you have a good battery.

5) Wait 17-24 hours.

6) Wait until you see the "data-write" light blink, then unplug the power and remove the battery. (You probably don't have to wait for the light, but I like making sure that you don't catch it during a write)

7) Enjoy your data!



Product Reviews

Add comment

Please register or log in to post a comment.