Determine internal resistance, capacity and condition
The concept
When working for the repair café and electronics projects, the question always comes up: "How fit is this battery? How healthy is this battery?". In the article "Measuring battery internal resistance with the TDMM" we had already got to know the basics.
If you use the voltmeter to explore the condition of a battery or a battery by measuring the idle voltage, you usually make the first mistake. At best, the idle voltage says something about whether a voltage source is completely unusable. The Li-ion battery is an exception. For him, idle voltage and battery status are correlated.
These components are needed:
-
Performance MOSFET Buk101-50GL (electronics specialist trade)
Measure the internal resistance
A quick but well -founded statement allows the device with an internal resistance measurement within a few minutes. Because in fact, the internal resistance of many drying batteries and batteries also depends on the load. Life expectancy (the expected residual performance in MAh) can significantly limit high loads.
Collect and compare measured values
For some time now I have been collecting measured values of batteries and batteries various art and from various manufacturers. From this I made my personal "expert system" - not much more than a database that I would like to donate a modest AI component (more for fun) in the future.
In new projects, I can see which power supply best suits a device and what my personal experiences with the product and manufacturer are. So I can no longer install very fresh batteries where you can still expect a number of operating hours.
In addition, I regularly refresh alkaline batteries ("Charging" is not) and sometimes significantly extend the service life. This works if you document the number of charging processes and adapt the subsequent use of the batteries (current load, duration of the load) to the "biography of the battery". The database mentioned is used.
That has something of alchemy, because the results sprinkle considerably. This also becomes recognizable when overlaid material has been sold again or a manufacturer has worsened its product (which happens). The database also shows me which AA battery type of a manufacturer can be refreshed up to 6 times for a specific project and used again.
Determine the battery capacity
Some manufacturers of dry batteries provide information about the capacity of their products. There is a certain range for all types of battery. The article mentioned shows a rough overview.
What is mostly missing is information on how the capacity was determined. If you buy a 1.5 V AA cell with a capacity of X and it delivers half of this capacity with 0.9 V voltage, the capacity specification may be correct, but it is senseless for practical use.
For this reason, batteryatt-fitness test determines the Usable battery capacity. You specify the lowest voltage for the measurement process up to which you still want to use the cell. You can no longer use the rest (>> see my project "Battery Vampire". That works there too :-))
In my database I collect information about which battery type after 0, 1, 2… n refreshments still brings how much capacity. These values still sprinkle about 25%, which makes this effort seem sensible.
The circuit
The circuit is simple and straightforward. It essentially includes four assemblies:
-
Nano V3 MCU
-
Load assembly with electronic potenta as well as LM358 and the MOSFET
-
Analog/digital converter ADS115 as a module
-
RTC3231 Timer/Clock module
The circuit is easy to build. There is even a printed circuit board, which is currently being revised again. An improved version is to be completed in 2025.

Image 1: circuit of the battery/ battery fitness tester
Circuit description
The battery or the battery is connected to the connections "DUT+" and "DUT-" with correct polarity. Tension sources can be connected with up to 4.8 V. It is therefore also a fully charged Li ion battery, for example, in 18650. The measuring range can be expanded.
Five in parallel resistors of 5.1 Ω together form the stress resistance of approx. 1 Ω. For this, I recommend resistances with 1 W resilience each. If we assume a 4.4 V battery that is loaded at 1,000 mA (1a), this dimensioning is sufficient. With my prototypes, I can also connect an external load resistance.
If you look into the data sheet of the Mosfet Buk101-50GL, you will find the "on-resistance" of 0.06 Ω. This can be called a "short circuit".
But be careful: this is the resistance of the MOSFET in a function as Switch. We run the MOSFET as controllable resistance, i.e. not in the area in which its drain source route is completely "switched". We have significantly more dissipation. The MOSFET must therefore give up some heat at 1A and e.g. 3 Ω interior resistance, which it has in my example:
Total resistance 4Ω => 1Ω on the load resistance + 3Ω on the MOSFET at 1A electricity and 4.4 volts.
So we have 4.4 watts (p = 1a * 4.4 V), which we turn into heat. 1.1 W at the load resistance, 3.3 W in the Mosfet. This heat must be removed. The load resistances on the board remain cool.
The MOSFET should therefore get a suitable heat sink if we want to measure and check in this area. With ordinary drying batteries, a simple "U-cool body" is sufficient.
Our BUK101-50GL tolerates up to 26a in the appropriate cooling Switch-Iity. However, it is not a simple MOSFET, but also brings a "protection circuit" with it, which is supposed to protect it from too high temperatures and overflow. This circuit reacts to overload by drastically reducing the drain source current.
An expansion of the measuring range is not a problem. For example, if you want to measure up to 14.4 V, then give the device a (switchable) voltage divider 3: 1 and still introduce a variable in the sketch so that correct measurements are delivered. This allows you to measure entire battery packs.
Please also note the limit values here!
The operating amplifier LM358 is switched as an addator. It gets an adjustable preload via the trimmer RV1 and from the digital potentiometer MCP42050 via R5 its output voltage. The digital potentiometer is controlled by the processor via SPI. It knows 255 settings of 0… 255.
This controlled the MOSFET, the gate of which has an extremely high input resistance. You could have saved the resistance. But he reduces the tendency to swing.
A module with the ADS1115 takes over all voltage measurements. We measure the differential voltage on the load resistance on A0 and A1 in order to indirectly determine the load current and directly the voltage drop that we use for the internal resistance measurement.
At the connection A2 we measure the output voltage of the test subject (DUT) for mass (in contrast to the differential voltage measurement).
We use the timer module to document the processes during capacity measurement.
In order to make the operation as simple and clearly as possible, we use the proven Library
{ "H", Handler Help, "", "Help", 0 },
{ "Ca", Handlerca, "", "Set the minimum current", 0 },
{ "Ri", Handlerri, "In the", "Measure Ri - Enter maximum current in MA", 0 },
{ "WP", Handlerwp, "WP", "Set Wiper directly 0-255", 0 },
{ "Me", handler, "", "Perform individual measurement", 1 },
{ "in the", Handlerim, "", "Define imax in MA", 1 },
{ "PM", HandlerPM, "", "Set pmax in MW", 1 },
{ "CP", Handlercp, "", "Cap. Measurement: load current: final voltage", 1 },
{ "CV", HandlerCV, "", "CSV output of the last measurement", 1 },
{ "TM", Handlertm, "", "Spend the date and time", 2 },
{ "TS", handler, "", "Set the date and time", 2 },
Function Ca
For clean measurements and a perfect function of the load circuit, start the first commissioning of the circuit with this instruction "CA" for "calibration".
Connect any test subject to DUT+ and DUT-. Please check whether the line ending for "linefeed only" is set in the serial monitor.
Then enter the "WP 0" and Enter instruction to put the electronic potentiometer to zero. The instruction follows approx. Without parameters and again the Enter key. In this way, all instructions are handed over to the Command processor.
You now get a continuous current display for one second each 10 times in a row. Enough time to set a minimum current of approx. 1 mA with the trimpoti RV1 - carefully -. This setting is only made once. This ends the comparison.
handlerri
Perhaps you still have the contribution "Battery inner resistance with the TDMM trade fair". There the measurement was already completely correct, but not as comfortable as in this project.
The most important difference: You set a maximum current in which the internal resistance is to be measured. The sketch begins the first measurement ⅒ of the specified maximum current and gradually increases ⅒. In this way you can see when the tension of the dut breaks below the limit, which you still tolerate for your project. By the way, it becomes clear how the internal resistance behaves as a function of the load current.
In the case of several measurements in a row, you will also find that each stress cycle takes a little of its “life expectancy” to the DUT. A voltage measurement without stress shows that the idle voltage of the DUT is always a little lower after each load than before the first measurement. Ideally, the voltage only drops after several loads - a good do!
handler
Plants the electronic potentiometer to a value between 0 .. 255. I had installed this function for testing and used again and again for tests. It can be removed without any problems.
handler
Measures the voltage between DUT+ and mass without stress, So the idle voltage of the dut.
Handlerim | handler
These functions serve to limit electricity or power at the MOSFET. In the sketch are intended as standard values: IMAX = 250 mA, Pmax = 2,500 MW.
These values are settings for typical dry batteries. I would like to set the limit values by hand for measuring to Li Ion batteries. But this is a matter of taste and has something to do with how I currently work with the device and how you will use it in practice.
In the Repaircafé we mainly work with classic Li Ion batteries. If the hand vacuum cleaner does not want to run again, I take one battery after the other and measure it. After 10 minutes it is clear that a battery has an internal resistance of 1.5 Ω ... So the vacuum cleaner cannot work. I then exchange this one battery and my guest cannot believe that he will get a device back for a few euros that is now running for 2… 3 years.
handler
For me, this is the most valuable function of the device because it helps me to protect our environment and save some money. But first of all to the function itself.
For example, you enter: CP 250: 1.2 and the Enter key.
The correct syntax is important: between CP and the “250” current for “250 mA” is an empty space (space button). The colon follows immediately after the "250", then the final voltage 1,2 volts in the form "1.2". As everywhere in our IDEs: the point is the comma. You already know that.
This instruction now makes the following:
The DUT is loaded with a current of 250 mA. The current is not gradually increased. It is set to the desired value by the sketch and remains constant.
At the same time, the timer is started so that you can get documented how the measurement runs. It ends as soon as the desired final voltage is reached. We chose you so that it is the lowest voltage that is just acceptable for your project.
You now know exactly how many millions of people keep the power supply. If a battery brings 250 mAh capacity, it can - purely mathematically - now deliver 25 mA for 10 hours, for 100 hours for 2.5 mA or for 1 hour 250 mA. It is practical that it lasts significantly longer with less load than it corresponds to the invoice.
When I test a new battery type, I “sacrifice” a battery from the 10 pack and determine the factual capacity at medium load. I load a 250 mAh battery with 50 mA and then mostly find that it lasts for more than 5 hours. I collect this information in my records. This is exactly how I proceed when the battery has been refreshed.
Attention: You know that Li ion batteries can react very dangerous if they are overloaded. Therefore the current limitation and therefore the final voltage is so important, which must be chosen in such a way that the battery is not deeply discharged!
Li ion batteries are already dangerously deep-loaded at 2.5 V and cannot be charged in the normal charger, but only with a lot of lower streams. Otherwise it can go to "Thermal Runaway " come. The battery literally flies around your ears and may catch fire - the Gau.
At 3.3 V it still has about 10% residual capacity and can be charged with a suitable charger. Your voltage limit should not be set deeper!
Please, take care of the capacity measurement that you set sensible limit values and in particular do not overwhelm your batteries! Better make several attempts.
handler
Self -explanatory: You get the current measurement data as CSV via the serial interface. This means that a Python application can be "feeded", for example, which, for example, acts as a database.
Handlertm and handlers
They put the clock and spend time.
So far, I have always been sufficient for capacity measurements. If you need more, you can convert the algorithm a little, with which the start and end times of the capacity measurement are stalled.
How does this application help protect the environment and save money?
If you work a lot in computer eggs and electronics, maybe also helps others, you need a lot of batteries of all kinds. This is exactly where this project comes in.
For me, the battery consumption had gotten out of hand. There was no easy way to test the condition of my voltage sources quickly and safely.
In fact, my battery consumption has now been approx. ⅓ reduced. I use dry batteries in their “second life” in devices with less power consumption. With my circuit "battery vampire", I also use the very last remnants from very old dry batteries.
I am a little proud that every measurement, every battery refreshment and battery charging takes place 100% with solar power. Regardless of whether the cost/ user relationship is perfect ... I always like fewer batteries.
Power supply of this project
The circuit diagram shows the supply of the operating amplifier with 12 V. The rest of the circuit runs with the USB power supply from the controlling computer. The opamp works at 12 V because the MOSFET does not manage 5V as a control voltage. He needs the 12 V.
In the circuit diagram I have drawn a connection to the connection Vin of the Nano V3. This connection can be used if the entire circuit should be supplied from 12 V because the USB connection is used, for example, with a Bluetooth module for control via a tablet or smartphone. This works perfectly, see the blog post "Control projects with the cell phone".
You can also only supply the entire circuit via the USB connection and create the 12 V with a Stepup converter MT3608, which effortlessly delivers the necessary operating current. In this case, please connect the Vin PIN not With 12 V.
The Nano V3 has a Shottky protection diode SS13PL that prevents accidents if USB is connected to the computer and at the same time The external 12 V supply. Otherwise, your computer - depending on the protection - could be damaged. Please avoid it if possible, but pension was hit.
outlook
Like some other projects, this project has already been interested in the circle of my electronics fans and radio amateurs.
A printed board and different prototypes of the device were created. If you know a little bit, you may be wondering why the electronic potentiometer used, as well as the operating amplifier are only used half.
Yes, this device could also test two dots at the same time with an extended sketch - without any problems. The device is equipped with a second load circuit that will be ads1115
Different and we're done. Otherwise, all components are already available.
We decided one Cabat fitness II To develop and reach a little deeper into the trick box. Despite a lack of time - it is a fun project that irritates. Let yourself be surprised.
The replica of battery fitness in the presented version is definitely worth it.
Now I look forward to the replicas of this project, your comments, ideas and questions.
Until soon
8 commentaires
Michael Klein
Batterievampir
Hallo Dieter,
der Vampir ruht noch im Sarg und wartet ab bis Mitternacht – er hat sich nur noch nicht entschieden, an welchem Tag er wieder zuschlägt. Noch ist er satt und faul :-)
Ich habe das Projekt noch nicht ganz fertig gestellt, denn es kamen mir noch neue Ideen. Es wird noch ein wenig dauern, bis ich den Beitrag liefern kann. Jetzt muss ich erst mal Urlaub machen, sonst bekomme ich Ärger …
Danke für das Interesse und die Nachfrage!
Herzliche Grüße
Michael Klein
Michael Klein
Dear Helge Fabricius-Hansen,
thanks for your valuable hint! For my prototype I am using the 5 V supply option for the ADS1115 and a 3.3V<>5V converter. The circuit that was published is for 3.3V and therefore working until 3.6V, as you mentioned perfectly correct. I mixed up the both versions – sorry.
Thanks a lot and
regards
Michael
Michael Klein
Rückfrage wegen: Degradation von Solarmodulen überwachen
Hallo Roland,
danke für den Kommentar/ die Rückfrage. Ich finde, das ist eine ziemlich coole Idee. Eine sofortige Antwort habe ich darauf im Moment noch nicht. Aber ich schaue mal bei meiner Solaranlage, ob ich eine Idee dazu entwickeln kann.
Grundsätzlich ist die Art der Beschaltung natürlich das A und O für die Messung. Sind mehrere Module in Serie geschaltet (wie bei mir), dann müsste ich die Module für den Messvorgang auftrennen (durch geeignete, wetterfeste Relais bestimmt machbar) und separat an die Messeinrichtung schalten. Nach und nach Modul für Modul messen … müsste gehen, aber halt nur, wenn es wirklich keine Sonnenbestrahlung gibt … meine Module liefern bei Mondlicht immer noch ein paar mA …
Also: So ganz direkt wird man die Schaltung nicht übernehmen können. Aber schon spannend, eine Aussage zu gewinnen, denn die Module altern tatsächlich individuell.
Wenn ich eine tolle Idee habe, melde ich mich nochmal :-)
Viele Grüße
Michael Klein
Roland
Ich hatte die Frage ob man hiermit auch mehrer Solarmodule überwachen könnte?
& Module die aktuell neu sind , sie sind an einem String angeschlossen und ich möchte mitbekommen ob alle gleichmäßig altern.
also 24/ in Spannung Strom überwachen und somit erkennen wenn sich etwas zum schlechten ändert.
Da sie alle parallel liegen sollte es also die gleiche verschattung ergeben, Bei den alten , jetzt erneuerten Module ist mir jetzt erst ein Mechanisches Problem klar geworden, Weshalb ich jetzt eine Einfache überprüfung der einzelnen Module suche,
Durch ein ständiges Protokoll könnte somit früher eingegriffen werden
Für eine Antwort oder eine private telefonische Reaktion würde ich mich freuen
Roland STEPHAN
Hallo ich habe eine IDEE zu Innenwiderstand bei Solarmodulen und würde mich gerne erst einmal auf direktem Weg mit Dir darüber unterhalten. Deshalb würde ich mich freuen wenn Du Dich meldest
Danke
Roland
Anstela
Dear Dieter,
Thank you for your interest. Are you refering to the article: “Measure battery internal resistance with the TDMM”? If yes, here is the link to it: https://www.az-delivery.de/blogs/azdelivery-blog-fur-arduino-und-raspberry-pi/batterie-innenwiderstand-mit-dem-tdmm-messen
It has now been uploaded and linked for easier access.
Please don’t hesitate to reach out if you encounter any issues or have further questions.
Best regards,
Anstela
Helge Fabricius-Hansen
Nice article.
The analog input range for the ADS1115 is max Vdd+0.3 Volt. That means that if you measure a battery above 3.6 Volt it will break the ADS1115.
I would suggest a low side measure of the current and a resistor divider for the voltage. Then you can go way higher in battery voltage.
Dieter Zumkehr
Desr author,
I would like to know, where you published the before mentioned article “Battery Vampire”, I coud not find it anywhere.
Best regards
Dieter