diy solar

diy solar

Single 100 Ah lead-acid battery, evaluating the internal resistance in circuit

rin67630

Solar Enthusiast
Joined
Apr 29, 2020
Messages
1,066
Location
Nort-Rhine-Westphlia Germany
Hi, I am currently building and improving a networked battery monitor based on an ESP8266 and an INA226 current monitoring device.
I have been making several experiments trying to find a way of evaluating the internal resistance of the battery in circuit.

I am currently using the variation of current that happens from changing light conditions and am using that formula, running every minute:
Code:
if (battery.voltage < (MAX_VOLT - 1) &&  battery.voltage > (MIN_VOLT + 0.3))
    {
      // Evaluate battery internal resistance (r = dv / di) if inside regular limits.
      if (fabs(delta_current) > 0.05) internal_resistance = fabs(delta_voltage / delta_current);
    }
But I am not satisfied with the results, that are not giving consistent readings.
Apparently the dynamic behaviour of the battery within 1 min prevails over the internal resistance.

I am now planning to use another technique: Checking the internal resistance only once a day, a few minutes before midnight (where I am sure to get stable conditions) and rapidly switching a c/200 load on/off a couple of times with a relay to force the delta_voltage and delta_current.

I am pretty sure, that this will provide good results, but on the other side, it necessitates an additional relay and a power resistor.

Does someone know a method from which I could get consistent (and valid) results without extra hardware?

Of course, any measure of the internal resistance of the battery ( which should be a few milliOhms only) need a shunt close to the battery and sensing lines to compensate the cable losses, but that was part of the design right from the beginning anyhow.
 
There's always some voltage fuzz introduced when going from unloaded to loaded and vice versa. If you can find an opportunity to look at the near instantaneous voltage change between two different loads, you may find more consistent results.
 
If you are dealing with a true sinewave inverter you can use the 120 Hz ripple current.

Need to sample at greater then about 1200 sps and have the voltage and current samples syncronized to near same instant in time.

Inverter filter caps will only have effect on ripple current at low current levels where ripple voltage is too low to be much accuracy anyhow..
 

Attachments

  • Battery Impedance Measurement.pdf
    344.4 KB · Views: 4
There's always some voltage fuzz introduced when going from unloaded to loaded and vice versa. If you can find an opportunity to look at the near instantaneous voltage change between two different loads, you may find more consistent results.
That was my approach. "near instantaneous" is currently the minute. The battery reacts however much differently depending on whether the load change happened at the beginning or at the end of the minute.
That is what I meant with "Apparently the dynamic behaviour of the battery within 1 min prevails over the internal resistance."
I would have to poll much faster to get the voltage change immediately and that in turn would impact the reactivity of the rest of the device tasks.
I have also currenty only very few consumption changes, my load is quasi constant, The changes are almost exclusively coming from the solar panel.
 
If you are dealing with a true sinewave inverter you can use the 120 Hz ripple current.

Need to sample at greater then about 1200 sps and have the voltage and current samples syncronized to near same instant in time.

Inverter filter caps will only have effect on ripple current at low current levels where ripple voltage is too low to be much accuracy anyhow..
I don't have any load inducing ripple (beside buck converters at 150 KHz...).
 
Did you try to do the IR calculation only if dI/dT is above a certain level? because as you saw small and/or slow variations don't provide good data to calculate the IR ;)
 
Did you try to do the IR calculation only if dI/dT is above a certain level? because as you saw small and/or slow variations don't provide good data to calculate the IR ;)
If you look at my code, you will see that I restricted the calculation to a given voltage range (internal resistance is not relevant when close to absorbtion) and restricted it to dI > 50 mA.
My problem is the timely response of the battery. Processing at a 1 minute pace is not good.
I will now change the approach to compute the internal resistance only during nights, but then much faster at a one second pace.
I have found out, that an old smartphone produces 100mA consumption peaks every four hours while idle charging, that could be a good trigger.
1602755404046.png
 
I have changed my approach, this code runs between midnight and 4:00 every second.
Since I surely will not be in absorption, I can even remove the voltage condition.
I just need to plug my phone for charging. :

Code:
  if (Hour < 4)   //Internal resistance evaluated during night, when no solar influence is expected. A load that generates sometimes peaks >50mA is requested for entropy.
    {
      // Evaluate battery internal resistance (r = dv / di) if inside regular limits and smooth it.
      if (fabs(delta_current) > 0.05) battery.ohm = fabs(delta_voltage / delta_current);
    }
That seems to run well, let us see on the long term.
 
If you look at my code, you will see that I restricted the calculation to a given voltage range (internal resistance is not relevant when close to absorbtion) and restricted it to dI > 50 mA.

Yep I saw the dI threshold, but I was talking about dI/dT, not just dI.

My problem is the timely response of the battery. Processing at a 1 minute pace is not good.

Yes, a one minute interval is a bit long if you want to be able to compute the IR reliably. 10 sec would be acceptable, 1 sec will be more than enough ;)

I will now change the approach to compute the internal resistance only during nights, but then much faster at a one second pace.
I have found out, that an old smartphone produces 100mA consumption peaks every four hours while idle charging, that could be a good trigger.

That's super low current, I don't think you'll be able to use that data to compute the IR properly. Ideally you want to use a current jump as big as you can for the IR calculation, 0.5-1 C would be ideal but even 0.05-0.1 C is good enough.

My approach would be to monitor the dI and the dI/dT all the time and if they both go past a certain threshold (for a 100 Ah battery something like 5-10 A for the dI threshold and around 0.5-1A/sec for the dI/dT one would be a good starting point) then compute the IR.
 
Yep I saw the dI threshold, but I was talking about dI/dT, not just dI.

Yes, a one minute interval is a bit long if you want to be able to compute the IR reliably. 10 sec would be acceptable, 1 sec will be more than enough.

That's super low current, I don't think you'll be able to use that data to compute the IR properly. Ideally you want to use a current jump as big as you can for the IR calculation, 0.5-1 C would be ideal but even 0.05-0.1 C is good enough.

My approach would be to monitor the dI and the dI/dT all the time and if they both go past a certain threshold (for a 100 Ah battery something like 5-10 A for the dI threshold and around 0.5-1A/sec for the dI/dT one would be a good starting point) then compute the IR.
I am using what I have.
I am running an off-grid measurement system that draws continuously ~500mA@12W, not a power plant ;-)
Of course if, you run a fridge on battery you can use much higher dI values...

Monitoring during the day is not good: when the battery is at absorption you get high internal resistance values, which just mean nothing.
I will stick with a nightly monitoring, and I don't expect precision, just to get alerted, if the resistance is growing too high.

P.S. the threshold is on dI alone, because dT is constant (now 1 second).
I have also to cope with a lot of muddy days here, where I just would be glad to get more than 500mA out of my 100W panel. I could wait for months until I get a C/10 again...
 
Last edited:
Oh so it's for a really small system?

Actually: what is the specs of the battery you want to measure the IR? what loads are on this battery?
 
I am running an off-grid measurement system that draws continuously ~500mA@12W

The 12V battery is (advertised to) 100Ah, I measured 65Ah. (Vendors are cheating, even more than Trump...)
The panel is (advertised to) 100W, I got a max of 80W out of it. (That's OK, i am not living in the Caribbean)
The regulator is a Chinese (advertised to be a) MPPT, in fact it is a MPPA (Maximum Power Point Adjustable)
The point is, that most MPPT regulators are conceived for grid power feeds and don't really care about their own power consumption.
The mine needs only 6mA.

The tough thing is, that the whole ting must run without interruption 24/365 , and passing a German winter is not easy...
 
Ok, so the only load on this battery is 500 mA?
Yes the regular load is a router, drawing 500mA all the time. I have now a wireless phone in it's charging shell as well, this one does not need a lot of power, but puts some 200mA power peaks from time to time and that's exactly what the internal resistance monitoring needs.
Now with my nightly monitoring from 00:00 to 04:00 every second, I get very consistent and plausible results ranging from 0.075 to 0.065 Ω.
 
Ok, just wanted to confirm because it's a really small load for a big battery.

Well, if you're happy with the 200 mA results then it's fine ;)
 
Then you need more panel, not more battery. A bigger battery will be useless if the panel can't provide enough energy to compensate the consumption of the loads.
 
There are also other aspects to consider while designing an unattended off-grid measurement station.
Vandalism is one of those. The cost of the mechanics is another one. You will not put several 100W panels on a street lamp pole.
And, again, a few hours without clouds are the game changer.
 
Back
Top