DIY Li-ion Capacity Tester !

13,280

239

26

About: Hi, I'm Nemeen, Electronics Enthusiast! I have seen a huge decline in electronics hobbyist in past few years. I started this channel in order to inspire you to create. Hopefully, you will find something tha...

Intro: DIY Li-ion Capacity Tester !

When it comes to building the battery packs, Li-ion cells are one of the best choices without the doubt. But if you get them from old laptop batteries then you might want to do a capacity test before building the battery pack.

So today I will show you how to make a Li-ion capacity tester using an Arduino.


So let's get Started!

Step 1: Watch the Video !

If you don't want to read all the stuff you can watch my video!

Step 2: Everything We Need

Step 3: What Is Capacity !

Before building the capacity tester we must know what is capacity. Unit for capacity is mAh or Ah. If you take a look at any Li-ion cell they will mention its capacity on it as one shown mentions 2600 mAh on it. Basically what this means is that, if we connect a load across it which draws 2.6A then this battery would last for an hour. Similarly, if I have a 1000 mAh battery and load draws 2A then it would last for 30 min, And this is what an Ah or mAh means.

Step 4: Practically Not Possible

But calculating in this way is practically not possible because we all know V=IR. Initially, our battery voltage will be 4.2V if we keep the resistance constant there will be some current flowing through the load. But over the time battery voltage will decrease and so does our current. This will make our calculations much difficult than expected because we will need to measure the current and the time for every instance.

Now to perform all calculations it is not practically possible so here we will use an Arduino which will measure the current time and the voltage, process the information and in the end give us the capacity.

Step 5: Schematic, Code & Gerber Files

Note!

I had an SPI OLED lying around so converted it to I2C and used it. If you want to learn how to convert SPI to OLED look at my previous tutorial -https://www.instructables.com/id/OLED-Tutorial-Con...

Here is the link to my Project if you want to make changes to PCB and Schematic

https://easyeda.com/nematic.business/18650-Capacit...

Step 6: Working !

And here is how this circuit works, first Arduino measures the voltage drop created by the 10 ohm resistor if it is higher than 4.3v then it will turn off the MOSFET display high voltage, if it is less than 2.9v it will display low voltage and turn off MOSFET and if it is between 4.3v and 2.9v it will turn on the MOSFET and the battery will start discharging through the resistor and measure the current using ohms law. And it also uses the millis function to measure the time and product of current and time gives us the capacity.

Step 7: Soldering !

Then I started the soldering process on the PCBs which I ordered online. I recommend using Female headers as if you want to remove OLED or Arduino for another project later on.

After the soldering when I connect the power sometimes it does not work as expected. Maybe because I forgot to add Pull Up resistors at I2C BUS interface so went back to the code and used Arduinos Built-in Pull Up resistors. After which it works perfectly

Step 8: Thank You !


It works! If you like my work

Feel free to check out my YouTube channel for more awesome stuff:

https://www.youtube.com/c/Nematics_lab

You can also follow me on Facebook, Twitter etc for upcoming projects

https://www.facebook.com/NematicsLab/

https://www.instagram.com/nematic_yt/

https://twitter.com/Nematic_YT

Check out JLCPCB
$2 PCB Prototype (10pcs,10*10cm): https://jlcpcb.com

Share

Recommendations

  • Furniture Contest 2018

    Furniture Contest 2018
  • Metalworking Contest

    Metalworking Contest
  • Tiny Home Contest

    Tiny Home Contest

26 Discussions

0
None
zoomgod

2 months ago

About 25 years ago I was involved in competitive 1/10 scale RC dirt oval racing and I developed A PC based system for creating packs of ni-cads where the 6 or 7 cells were matched based on runtime under a constant current load. There are specification sheets you can get on how the factory tests individual cells. A quick check for a 2600 mah lion shows they test with .52A load. The idea when building high performance packs is to have cells that can all discharge at the same rate and duration. Damage to individual cells occurs when they discharge early and the remaining cells then basically expend energy beating the weak cell up. Your project caught my eye and I naturally found it quite interesting. I have not messed with packs much since then and am not familiar with lion but the same principles should apply. Sub-c ni-cads were rated to be tested at 5A so that naturally created heat on the .1 ohm load resistors. We eventually ended up testing at 30A constant load to better match what the packs endured in a 4 minute race. When our packs were discharged it was almost like a switch turning off. Great project, just wanted to share past experience with cell testing and creating matched packs.

1 reply
0
None
JohnC430zoomgod

Reply 6 weeks ago

Thanks for giving us a bit of history. i designed a capacity tester for 1 Amp. the current does not change during the test. so for a 2.6A-H battery it will take 2.6 hours to discharge. waaaaaa.. i dont like that and then i read ur post that mentioned that they test the batteries at very high currents. i was under the impression that capacity testing is done at 0.5C. so maybe testing a high currents can speed things up but it still does not seem technically correct. at high currents (52 Amps) the battery voltage will sag dues to its internal resistance (not to mention the sharp increase in Temp) so it does not seem correct. what did they actually test at 52 Amps? and what did you test at 30 Amps?

also the power dissipated in a 0.1 Ohm resistor at 5 Amps is only 2.5 W

0
None
frarugi87

7 weeks ago

I have a few comments/questions:

- What is the point when measuring the voltage on the node between transistor and resistor? The Rds-on of the MOS is around 30mOhm, and with a current of roughly 0.5A this means a 15mV drop. Or a 0.3% of precision loss. Totally negligible

- What is the purpose of the resistive dividers (R1-R3 and R2-R4) to measure the voltage? Your max voltage is 4.3V, and you are not usign the internal voltage reference, so the max voltage you can measure is 5V. Why are you dividing it in half?

- Speaking of voltage references, are you sure that the 5V are stable? Even with the OLED? Personally I'd use the internal reference (and then you really need the R1-R3 voltage divider, but the resistors values should change)

- You shouldn't drive a MOSFET that way; you should add a resistor in series (e.g. 220 Ohm) to limit the current peak at power on/off

- Are you sure you can power the buzzer directly? (I couldn't find the data; what is the current it should get at 5V?)

Thank you for sharing anyway :)

0
None
mwbrown

2 months ago

It's like you're reading my mind! I just built my first 21700 lithium cell small pack today, testing the cells for the eventual 4kwh pack for my electric scooter here in Thailand. What I really want is something close to this, a bottom-balancing board that will take multiple cells in the pack down to 2.9V. I had in mind all of your major components, this gives me a great headstart on the final design. Thanks!

1 reply
0
None
JohnC430mwbrown

Reply 2 months ago

Read my post showing how to modify this design so it will work with higher voltage and higher current packs.

0
None
AnielloD

2 months ago

How you can measure the current using ohms law? If you turn on the mos Q1 hou have a very lov voltage on measure point. V=IxR where R is RDS(on) of mos around 17mOhm.

1 reply
0
None
JohnC430AnielloD

Reply 2 months ago

you are not measuring the voltage across the MOSFET. you are measuring the voltage across R1 and R3 which is the battery voltage.

0
None
e.ksciuk

Question 2 months ago

Hi. This is a cool project and i want to build it. But i haven't a 10 ohm resistor. Can i use a 3 ohm resistor when i change the variable Res_Value in the ino file? Greets.

4 more answers
0
None
JohnC430e.ksciuk

Answer 2 months ago

yes of course it will work. however capacity tests are made at about C/5 = 2.6/5 = 0.52 Amps, so with 1.4 Amps you will be exceeding this value and may not get the correct capacity. Resistor power is V^2/R so using the highest value of voltage at the start with a fully charged battery, 4.2^2/3 = 5.88 Watts. so make sure you use at least a 10 Watt, 3 Ohm resistor. or you can use 3 x 3 Ohms in series which will make it 9 Ohms and closer to the design value and then change the value in the code

0
None
Relafe.ksciuk

Answer 2 months ago

A 3 ohm resistor would let more current passing through it. It would result in a faster discharge and a hot resistor. Assure that it is anyways at least 5watts and change the resistor value in the code.

0
None
Iqbal Samine.ksciuk

Answer 2 months ago

That will let too much current flow through the resistor and damage it, may also damage your battery if it can't handle the current 4.2/3 = 1.4Amps

0
None
Nematic!e.ksciuk

Answer 2 months ago

yes it will work, just make sure you are using right wattage resistor

0
None
der_fisherman

Question 2 months ago

To what voltage and current does it work? Or was it only intended for single cells? I ride e-bikes and my present one is 36 volt at 10 amps....

Great project though, many thanks,

Andy

3 more answers
0
None
JohnC430der_fisherman

Answer 2 months ago

you can use it for 36 Volts if u change R1 to 230K Ohms. Between the 36V battery and the Arduino power trace, (You will need to cut the trace to separate the Arduino supply from the power section) you need to make a 5V Regulator so u dont blow the Arduino. The LM317 expensive version LM317HVT/NOPB goes up to 60VDC. or you can use a 15V, 5Watt, Zener part number 1N5352B-TP in series with the regular LM317 to bring down the voltage. This will allow you to use this board to test your 36V bike battery. the voltage regulator is meant to supply power just to the Arduino so it does not supply a lot of current. your battery supplies 10 Amps so u need to also increase the value to 20 Ohms and the wattage of the load resistor 37^2/20 = 68 Watts, so u need a 100 Watt resistor. this will get very hot during the test which will take a long time, so solder wires to it and locate it away from the board, preferably on either a heat sink or a ceramic tile and blow air on it. Obviously you need to know about what ure doing or u can fry the electronics.

0
None
Relafder_fisherman

Answer 2 months ago

It works with one cell at time. The currents depends on the resistor load you choose.

0
None
der_fishermanRelaf

Reply 2 months ago

Many thanks,

I wanted to not have to take the battery apart, I already have a cell tester, it takes too long to test each cell and rebuild the battery...

Many thanks for your time

Andy

0
None
RelafJanL98

Reply 2 months ago

The code file is in this istructable!

0
None
raphan

Question 2 months ago

I've got a lot of old cells lying here and there, this is why I find this tool pretty usefull. The instructable is quite complete as well. Did you test without the 2nd resistor bridge ? I mean the Mosfet impedance is quasi null and measuring between two 10k cannot give a precise result even with precision resistors which isn't the case here. I will make this tester, maybe with a heatsink on the resistor, and an integration of the measures during a given time. Thanks again for this inspiring work.

1 more answer
0
None
Nematic!raphan

Answer 2 months ago

2nd bridge is not mandatory you can remove it