Computing stuff tied to the physical world

Trying to measure capacitor leakage

In Hardware on Apr 7, 2012 at 00:01

Capacitors have a “leakage current”, i.e. when you charge them up fully, the leakage current will cause them to slowly lose that charge. I was wondering about this in the context of an ultra-low power JeeNode, which has a 10 µF buffer cap right after the voltage regulator. Does its leakage affect battery lifetimes?

Time to do a quick test – I used the 47 µF 25V cap included with JeeNode kits these days:

DSC 2981

So how do you measure leakage currents, which are bound to be very small at 3.3V? Well, you could charge up the cap and then insert a multimeter in series in its most sensitive range. This multimeter goes down to 0.1 µA resolution, although its accuracy is specified as 1.6 % + 5 digits, so the really low values aren’t very precise.

A simpler way is to use the RC time constant as a basis. The idea is that a real-world cap can be treated like a perfect cap (which would keep its charge forever) plus a resistor in parallel. That resistor merely “happens” to be situated inside the cap.

What I did was charge the cap from a 3x AA battery pack which was just about 4.0V, then disconnect the battery and watch the discharge on the oscilloscope:


As you can see, it took 500 seconds for the charge in the capacitor to drop by some 2.5V – note the exponential decay, which matches the assumption that the leakage comes from a fixed resistance.

Can we derive the leakage from this? Sure we can!

The formula for RC discharge is:

    T = R x C

Where T (in seconds) is the time for the cap to discharge by 63.2 percent, R is the discharge resistor (in ohms), and C is the capacitor size (in farads).

Above, it took 500 seconds to drop from 3.98 V to 1.48 V, which by pure accident is almost exactly 63.2 %, so T = 500 and C = 0.000,047 – giving us all the info needed to calculate R = 500 / 0.000,046 = 10638298 ≈ 10.6 MΩ.

Using ohm’s law (E = I x R), that means the leakage current at the start is 4 V / 10.6 MΩ = 0.376 µA.

The good news is that such a result would not be of any concern with ultra-low power JeeNodes – the regulator + ATmega + RFM12B use an order of magnitude more than that, even when powered down.

But the bad news is that this result is in fact completely bogus: to measure the charge, I placed the oscilloscope probe over the cap, and it happens to have 10 MΩ internal resistance itself. So basically the entire discharge behavior shown above was caused by the probe i.s.o. the capacitor’s own leakage!

So it looks like I’ll need a different setup to measure real leakage, which is probably in the nanoamp range…

  1. Without knowing much about analog stuff an FFT response to a frequency sweep might give a hint seeing the cap as an RC filter. I believe the frequency would be quite low though and maybe the FFT analyzer can’t cope with sub Hz frequencies…

  2. The first thing that comes to mind is building a buffer out of either discrete FETs or FET op-amps. That will at least put the error in the same order of magnitude as the signal…

  3. here is a thought: take some descrete measurements every hour or so, by connecting the probe, taking a shot and quickly disconnecting. after some measurements you will be able to deduce the discharge curve using an approximation. from that you can find the rc constant.

    the quick measurement minimizes the effect of the probe’s internal resistance.

  4. The voltage decay ramp is a powerful method to estimate tiny leakage currents as illustrated (the probes can be connected just once in a while as suggested by dzach to take a sample). The reason the estimated R came out higher than the known scope probe impedance is not from an error in the method, but a tolerance issue from the cap.

    Due to process variations, the actual C value has a wide tolerance band (20% is typical) and since the actual value reduces with age, most vendors offset the tolerance bands (e.g. + 15%, -5%). So the C value needed in the calculation is likely to be ~10% higher than the marking on the can.

    Then a result something less than 10MΩ makes sense, scope probe in parallel with ~100MΩ leak equivalent.

    One work around for this is to charge the cap from a constant current source at ~1000 times the leakage expected. Estimate C from the up ramp, estimate R from the down ramp.

    • Thanks Martyn, both for the up/down ramping tip, and for explaining the outcome. I’m not sure it’s the C tolerance in this case – it sounds absolutely plausible, but measuring it with several multimeters, I get about 48 µF. The scope resistance seems to be exactly 10 MΩ. No worries, I’ll revisit this using your tips at some point.

  5. I don’t know if the difference is significant, but note that electrolytic caps are very “poor” (non-ideal) capacitors, in particular there may be a significant voltage coefficient: capacitance at low voltage != capacitance at higher voltages. The multimeter probably uses a fairly low voltage for testing C.

    • If we were to do a very accurate measurement over time of the charge level with fixed R and fixed supply voltage, maybe these effects can be measured? After all, any deviation from the perfect exponential curve ought to give us some clues about such voltage effects? Or perhaps a fixed supply voltage with a small periodic pulse “ripple” super-imposed? (IOW, a square wave with an offset, produced by a signal generator)

  6. A CD4066 could occasionally switch on (open switch leak current 0.1nA) for sample and hold the voltage. Another thought for measuring capapcity near Vmax of the capacitor: your scope shows this red line of total energy use; if you keep the cap charged over time by either hooking it up to Vmax or by timed topping up, that should tell you how much mC flows in the cap over time; the only way it could have leaked away is through the resistors of scope probe and cap?

Comments are closed.