Saturday, 23 January 2016 05:56

Simple Li-ion and Ni-MH battery true capacity and internal resistance tester using Arduino

Written by
Rate this item
(2 votes)

Recently I have bought a bunch of  a Lithium-ion batteries at Aliexpress. Their capacity is declared  a 1200 mAh  for UltraFire YF 14500, and even a 6000 mAh for UltraFire SJ 18650.

But it is not very reasonable to believe that ambitious numbers are true – according to their price. So I decided to make a simple schematic that can measure the true capacity of these accumulators. One more possible problem may be the high internal resistance. It may result in a major voltage decrease under load. So it will be nice to measure it, too.


What are these milliampere-hours that are printed on a battery labels? Roughly speaking, the capacity of 6000 mA*h means that the accumulator can provide a 1-ampere current for 6 hours before it will be discharged to it’s lower voltage limit. And if dredge up a physics schoolbook, a current multiplied by time gives a value of electrical charge. So 1 milliampere-hour is 3.6 Coulombs.

How to measure this property? You must connect an accumulator to a load, and measure the electric current passing through it. As the current will decrease according to decrease of voltage - the current must be measured  in a regular time intervals. All obtained values of current are multiplied by the value of a time intervals, and the results are summed.
The next question is how to measure the current in a cirquit? Well, this is easy. According to the Ohm’s law (I=U/R), if we know the load resistance and the voltage drop at this resistance – then when we shall divide the voltage drop by a resistance we’ll receive the value of a current.

Battery load schematic

And  the voltage drop may be measured using an Arduino, which has such a feature as an ADC – an analog-to-digital converter. It compares the voltage at the ADC input to Arduino’s feeding voltage (+5 V) and produces a value from 0 to 1024. We take this value, multiply it by 5 volts, divide it by 1024 – and here is a voltage. As I need the difference between thise two points – I’ll use two Arduino ADC inputs, and subtract ADC1 from ADC0.

The last question is how to measure the internal resistance of a battery. First we must measure the voltage of unloaded accumulator, then switch on the load, and measure the voltage under load. The difference of these two voltages is the voltage that is dropping at internal resistance of a battery. Dividing this voltage drop by the current – we’ll have the value of internal resistance.

And some words about the schematic design.

To switch the current in a cirquit on and off – I’ll use the MOSFET transistor and connect Arduino digital pin 7 to it’s base.
The results will be displayed at Nokia 5110 LCD screen.
In order to switch between working modes, I’ll connect the tact switch to Arduino digital pin 6.
When the measuring will be done, the Arduino will notify me by the tone from the speaker connected to it’s digital pin 5.

The parts list

 - an Arduino

 - load resistors. I used 6 pieces  1 — Ohm resistors and connected them in series. You may use one with a resistance from 2 to 10 Ohms. It must be designed for at least  5 Watts power — because all energy that is stored in a battery will dissipate at this resistor.

- 10 kOhm resistors — 2 pieces

- 100 kOhm resistor

- 1 kOhm resistor

- 100 Ohm resistor

- a MOSFET. I used one of the most popular and cheap - IRFZ44N.

 - Nokia 5110 LCD screen

 - a small speaker

 - a tact switch

 - wires

Schematic and program: 

Arduino battery capacitu tester schematic

This time I made the schematic in Fritzing - taking into account that this device barely will be often needed, and it may be assembled an a breadboard in 10 minutes. The download link is below.

I have wrote the program for Arduino from scratch. It does not contain any complex logical constructions - so it will be easy to understand it even for beginners.

The assembly process is recorded to video in details - so you may look at it:

The measuring results were even worse than I supposed them to be. 

"1200 mAh" UltraFire YF 14500 appeared to have just 378 mAh, and the "6000" mAh UltraFire SJ 18650 has only 1119 mAh. That's the result of discharging to 3.5 volts. Later I performed one more test with SJ 18650 and discharged it to 3.1 volts through a 3 Ohms. This added about 20% to capacity - but it's still too small charge.

The internal resistance was 0.35 - 0.5 Ohms. I couldn't find the proper values for internal resistance of such an accumulators - so let it be for now.

You can download the schematic and Arduino program here.

Well, that's all of it! If you have any questions - don't restrict yourself, write it in the comments!

Read 11079 times Last modified on Sunday, 24 January 2016 21:44


Login to post comments