Capacitance meter - and inductance, and PWM, and, and, and...

Started by R.G., September 01, 2007, 11:18:02 PM

Previous topic - Next topic

R.G.

http://members.cox.net/berniekm/super.html
A probe/meter doing 17(!?) different functions on the same set of hardware using an embedded PIC.

Someone was asking how to measure capacitance.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Kornell


QSQCaito

:O

If you haven't worked with PIC in your life. How difficult this would be? Including the thing to send the code to the chip :D


Good entry RG ;)


Just wondering, shouldn't this be in DSP?
D.A.C

R.G.

QuoteIf you haven't worked with PIC in your life. How difficult this would be? Including the thing to send the code to the chip
It's perhaps even easier then. Just do the following:
1. Locate someone who has programmed PICs. May take some time and email, but it's probably free.
2. Apply beer.
3. Repeat 2 until you get a programmed PIC.
:icon_biggrin:

QuoteJust wondering, shouldn't this be in DSP?
Probably. I was lazy.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

MetalGuy

Interesting gadget. Unfortunately I still can't find a PIC/AVR based project that would measure inductance up to say 20-30H - all projects I've seen so far suffer from low inductance "disease".

R.G.

Yeah, big inductors, especially with lots of resistance - you're obviously measuring transfomers or similar - are hard to do with standard instruments, just like caps in the deci-farad range (0.1 up) are hard to measure.

It can't be that hard to cook one up though. The key to the big devices is to time them.

V=L di/dt, so L = Vdt/di

Which is Mother Nature's way of saying, "Put a fixed voltage across your inductor, and measure how long it takes the current to rise to some value; then multiply the voltage times the inverse of the rise of current divided by the time, and you have the inductance in Henries."

So for 20H, 5V, di/dt = 5/20 = 0.25 amps/second.

For inductor plus resistor, the current starts at 0 and rises to V/R, and does it at a time constant of R/L, so you can measure R, apply a fixed V, then time how long it takes for the current to rise to some value less than V/R.

V = V0* (1-e^ - (t*L/R)) so
V/V0 = 1-(exp)
(exp) = 1-v/v0
-t/(R/L) = ln (1-v/v0)
R/L = (ln(1-V/V0))/-t
L = R / (ln(1-V/V0))/-t

Which is all in arithmetic that can be done in a PIC. Ln gets tricky, so there may be some table lookup to do, but a series expansion can probably get you under 1% error in a few terms.

Most people make the sign of the cross at inductors of any stripe, so there is not much fame and glory in making a meter to test them.

But it's no harder than a big capacitor meter.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Rob Strand

The pulse method works OK for caps but if usually crap for inductors (unless the inductors you use happen to fit the constraints of it working).  At least that guy indicates the limitation:

"Note:  this function assumes that the DC resistance is not more than a few ohms."


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MetalGuy

Thanks for the formulas and ideas.
I was thinking what if the measured inductor forms a filter with a cap and a frequency sweep is applied to that filter. At some frequency a resonance will occur which can be detected  by the PIC. What do you think about that?
There are digital multimeters which can measure inductance up to 20H. How accurate and/or reliable are those?

Rob Strand

>There are digital multimeters which can measure inductance up to 20H. How accurate and/or reliable are those?

There's a few good ones and a lot of crap ones.  Usually the *known* good ones are more expensive.  The bench top RLC meters, which are *very expensive* work very well.  There were some good hand held ones but I don't know i they are available anymore.

The problem is most simple methods have some flaw and if the inductors you are measuring falls into that category then the results are rubbish.  As a rough guide they fall apart when the DC resistance is close to the impedance at the test frequency, and/or, the DC resistance is just to high overall.   If the inductors you measure don't expose the flaws you might be lucky and get good reading with a cheapie.

There's no way to tell a good one from a bad one from the specs you need to go along with a few inductors and put resistances in series with them to see how they hold up. You can use any old resistor you need to calculate out the inductor reactance at the test frequency and then pick a suitably high resistance.  YOu need to o this over the whole range.  It's a tedious process to do in a shop.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Jaicen_solo

That seems like an awesome litte device, and very easy to make too. If I can find a suitable display, it's getting added to my toolbox for sure!
I can burn PIC's for anyone in the UK that needs one.

MetalGuy

QuoteThere's no way to tell a good one from a bad one from the specs you need to go along with a few inductors and put resistances in series with them to see how they hold up.

Maybe that's what I should do. I can do that with inductors that measure mHs /values known in advance/ and several Ohms, but if I try to measure an output transformer's primary where inductance /not known in advance/ is several Henry and DC resistance 100-150 Ohms you mean I can't get reliable results from the reading?

Jaicen_solo

When I did my dissertation on guitar pickups, I did some inductance measurements, but they tend to saturate a little too easy, so accurate meausurements aren't all that achievable.