Measuring internal battery resistance

Could someone please give me some pointers on measuring internal battery resistance.

I'm currently building a AA battery capacity tester via help on this website (LINK) in another thread. Works well so far - thanks all. However I'm wanting to also be able to measure the battery internal resistance (and eventually charge the battery and change the circuit/code to deal with multiple batteries consecutively).

I've read multiple threads online, this forum and video's but methods all seem to be different. The only one that seems based on battery facts, is from Julian Ilet (LINK). He refers to a document by "Energizer" (LINK). The data sheets says:
image

Julian confirmed this with the following equation:
image
The document highlights:

  1. Total effective resistance = the electronic resistance + ionic resistance
  2. The electronic resistance is seen after the first few milliseconds after the battery is under laod
  3. Ionic resistance occurs more slowly than electronic resistance
  4. It suggests a dual "pulse" test - place the battery on a low background drain, allow it to stabilize, then pulse it with a heavier load for about 100ms.
  5. It also mentions a method of testing by using "flash amps".

I haven't found online anyone trying to use this info in their code to date, so I doubt their testers accuracy. Also, Julian hasn't followup with a circuit. He noted in the comments thread "I think there may be problems with precision measurement of the cell voltage". Not sure what that means.

Can anyone help here?

Knowing the current that flows in you circuit, measure the battery terminal voltage.

R(battery) = V(battery) / total current flowing

I think the guy in the youtube link doesn't fully know what he is doing.
The document seems a better lead. Will read through it later.
I experimented with Ri of NiCad batteries many moons ago (35+ years), and had the idea of subjecting the battery to current controlled AC. Like charging/discharging with 1Amp current.
Then measure peak/peak voltage on AC source (reference) and battery (result).
Never finished the project, and it's too long ago to remember the details.
Leo..

Can you explain this bit please , I’m unsure what you are trying to achieve by wanting to measure this parameter and how it will affect any charging system or measure of capacity?

@hammy , I'm working on a project to make a unit that:

  1. Checks the capacity of a AA battery (that I've already done)
  2. Measures the internal resistance of a battery to monitor battery health (currently to work out)
  3. Charges the battery (also currently breadboarding)
  4. Then increase the circuit/code to allow for 4 AA NiMh batteries.
    I'm wanting to then make one of these for each of my 4 kids.

You might want to consider using an OLED display (SSD1306) and a INA219 module ( up to ±3.2A current measurement, with ±0.8mA resolution) for current an voltage.

Thanks Larry.
I will be using an OLED display that I have, but I'd prefer to have Arduino read the voltages and calculate the current based on voltage and the shunt resistance.

Sorry Larry I cant see how that works at all. Doesnt that measure the resistance of the LOAD?

@cjcj
For simplicity I'd use the method described by the "energizer" link:
Phase 1: Discharge at a low current for a while to let the battery stabilise
Phase 2: measure the terminal voltage; then apply a "heavy" drain for a short while (maybe 0.1 - 1 second) and measure the new terminal voltage.

To simplify the circuit even further, omit phase 1. And since the terminal voltage should not change MUCH in a second, you can use a resistor as the load.

image

The total internal resistance Rint is given by:

dV = Voc (the voltage you measure with the load disconnected) - V onLoad

dI = VonLoad / Rload

Rint = dV / dI

the result wont be "exact" - ( the internal resistance is heavily dependent on the INTERNAL temperature of the cell) but this method will give you a good indication of the battery health, with only two or three new components as shown.

That apparently didn't work (see OP's original thread).
Leo..

That was a different circuit, and the OP was trying to implement a constant current load; with a lot of confusion and errors.

I use this circuit (ok mine is a little simpler with a switch instead of the FET) and it works fine.

@johnerrington , sorry, but I have a few issues here. Below is my measurements and calculation (assuming DeltaV / I) using a DMM:
image

As I think this is like a voltage divider circuit, I used the equation Vout = (Vsource x R2) / (R1 + R2)
Flipping this around, I ended up with:
R1 = V1R2/V2 - R2
= 0.0549 = 55mΩ

If this is correct, do I need to do the whole "dual pulse" test with a low load, then a larger load 100ms after - as per datasheet? They suggest a current of 5mA and 500mA (which I calculate for a 1.44 battery would be 290Ω & 2.9Ω respectively)?

V1 is the open circuit voltsge. Since the circuit is not closed no current can flow.
V2 is the terminal voltage on load.
The curent flowing is V2 / R = V2 / 1.2 ohm
and if V2 is 1.332V Iload = 1.332/1.2 = 1.1A

so 1.1A is also flowing through Rint giving a voltage drop of V1 - V2 = 0.061V

whence Rint = 0.061 / 1.1 = 55.4 mohm

only if you NEED very high precision; which would only make sense if you measure the internal temperature of the cell, and then apply a correction. Which we dont know how to do.

Suppose you measure "my" way. Then "their" way with a period of stabilisation; then Leo's way by meausing Rint while charging, by varying the charging current; then the "flash amps" way
..
they will all give different answers. Which is "correct"?

The one that is most useful is the result that most closely applies to your specific use.

Your Rload is too small at 1.2 ohm, I'd use 3.3 ohm

What was I thinking :woozy_face:

@johnerrington , I've taken your advice and calculated the resistance as you mentioned above. With a resistor of value 1 Ohm, I ended up with a resistance of 33mΩ.
V2=1.305V, R=1Ω, I=1.305A, V1=1.349, so Rint=33mΩ. And yes, I agree I have to draw the line somewhere in regards to accuracy. Also, the 3.3Ω resistor you mentioned - I'm trying to achieve a 500mA discharge as per data sheets.

I might need @Wawa help here now. In my orginal project (LINK), I have tried to get the circuit to measure the resistance using the additional code below. It runs just before discharging the battery begins:

void resistanceCheck() {
  delay(1000);
  analogWrite(PWM_Pin, 0);   // Set PWM to zero to read battery "at rest" voltage
  measureBattery();          // Measures the existing battery voltage
  bR = batteryVoltage;       // This is used in calculating internal battery resistance
  Serial.println(bR,3);
  PWM = ((500.0 / 1000) * 255) / 3.317 * ((90.2 + 46.8) / 46.8); // Calculate PWM to set battery under 500mA load
  analogWrite(PWM_Pin, PWM); // Load battery
  delay (400);               // pulse for 100ms, then read voltage
  measureBattery();          // read voltage
  Serial.println(batteryVoltage,3);
  float resistance = (bR - batteryVoltage)/1.0;  // Resistance = (Delta V) / Load resistance
  Serial.print(resistance*1000,0); // display voltage in mΩ
  Serial.println("mΩ");
}

Now still trying the whole "pulse" thingy as the data sheets suggest, I've tried taking voltage checks at different msecond values and hence Rint values.

I am however getting in knots a bit because I'm using a 1 ohm resistor in the circuit, sending a PWM pulse to a mosfet to drain the battery at a set current. So below I've picked a current of 500mA as suggested in the datasheet. However, I think I may be mucking things up in the calculation in the code in working out V2/R. I'm trying to measure the voltage at rest, then x mSeconds after:
image
The above looks nothing like the data sheet on batteries mentioned at the start of this thread. Also, if I apply the load for longer than 150mS (10 seconds), I get the graph below:
image
(image above amended as I added a duplicate of the other graph above it)
"If" my calclations are correct giving the graphs above, to reach 33mΩ, I'd have to load for 400ms (contrary to the data sheet that suggested 100ms).

Any thoughts anyone?

Haha.
I think the problem lies in the PWM filter, The RC values were choosen for a smooth DC voltage for the opamp. But that 100k:45k/47uF filter has a settle time of about 7 seconds. Current will ramp up, and after 7 seconds, you have a stable current draw.
You can wait for 10 seconds to measure voltage under load, or lower the cap to 1uF (ceramic).
Then waiting time drops to ~150ms (wait 200ms), with only a minor ripple in the battery current.

I used LTspice to simulate.
Leo..

Do you mean to change the 47uF electrolytic to a 1uF electrolytic? My guess is "yes", as I just tried it and got the following results:


sdf

This is a completely different result as compared with the 47uF. Looks stable from about 30ms onwards, so reading at 100ms as noted in data sheet would be ok.

The figure I arrived out manually without the circuit was 69mΩ, so this sounds goods to me. Thanks @Wawa @johnerrington & @LarryD . Next, adding a charge circuit to the schematic/code...

Yes for the value, no to electrolytic.
Common low voltage low value electrolytic caps are not very good in my book.
Ceramic or tantalum are ok.
You can of course remove that 100n cap there. 1uF or 1.1uF won't make a difference.

Are you sure you have used 1uF. You should have a ramp until about 150ms.
It looks like you only had the 100n cap in there, which will have a too high discharge ripple current.
Leo..

You were spot on the money. I had 0.1uF electrolytics mixed with 1uF's. So I used a 0.1uF instead.

I've now tested it with a 1uF electrolytic, followed by a 1uF ceramic. They both are so close (fractionally smoother on the electrolytic). But you were bang on with the ramp up to 150ms. :smiley:


Just a heads up if you can...
I now want to start to add charging to the circuit. Can I use the same mosfet and the other side of the opamp for this?

Reading only the snippet of code presented here, it seems that batteryVoltage() is setting a global variable. It would be far better if it would return that value.

Nice experiment. Would be interesting to test an old battery or even a dead battery for comparison.
And als, the contact resistance in your battery holder may be significant at these very low values.