DIY Li-ion Capacity Tester !

57K35062

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

37 Comments

You could also just use a constant current load
fatal error: u8glib.h: file o directory non esistente
Ho risolto, grazie del progetto che hai condiviso
Can you please send me a .ZIP file of the code.
Thanks in advance
C6patchman
Please can you send me the arduino sketch, as i cannot find the code anyware on this site.
Thanks
C6patchman
Great Project, tnx for sharing.
I made it with 5110 LCD (I haven't OLED). MOSFET driven this way works in saturation region, not in linear, and heats a bit, but nothing critical. I use 6.8Ohm/5W Resistor, and on Breadboard the measurements are not very precise, but enough to see which of my batteries is in better condition, ie which has a higher capacity . I omit R4/R2 Voltage divider, the Voltage on MOSFETs Drain is too small to be further divided, so the measurement is more accurate
I like the project alot! However there are quite a few mistakes that make this project unusable as it is. First of all, use a low value shunt resistor in series with the load resistor to calculate the voltage drop. The 10 ohm resistor heats up alot and a chunk of the power is "lost" as the resistor's actual value changes. A0 and A1 should defenitely be normal inputs - not input pullups. These inputs are leaking over 2V and makes defining the open battery voltage difficult.

I would add a resistor between mosfet gate, D2 and ground to avoid potential voltage rising and power leakage. Adding 100nF capacitors in parallel to R2 and R3 wouldn't do any harm either.

Cheers
Could you please explain the part of A0, A1 being normal inputs vs pull-ups?
if the GPIO's are capable of ~5V then yes; must look at GPIO Vmax.

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.

We used to wire 4-6 Car brake lights to discharge the packs. After the race you timed how long it took for the bulbs to go out. based on the time left was how much you could adjust your gearing in your car. The idea was to have the packs flat line with only 1 to 2 laps left. Nicads could take a beating, doing that with Li-ion is asking for problems. I miss those racing days:) Funny when people got the time wrong, car would flatline on last lap.. Got it right and you had full voltage to the end.

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

If I use the EasyEDA link to buy the PCB I have to buy a quantity of them. I only want one board. Where can I buy.
wy burning wire? and no screen in oled display :(

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 :)

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!

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

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.

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

More Comments