Maker Pro
Maker Pro

LC tank circuit for measuring inductance with LM319

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Hello there, I am trying to measure the inductance of hand-made coils by observing the frequency of an LC tank circuit. The method seems to work fine in simulator (albeit using an LM339 model because there was no LM319 model):

lm319sim.png

The ADC has Vref at ground so any small blip in the tank circuit should produce a HIGH on the output.

Now the problem arises when I try to implement this in real life. Instead of the neat digitized output seen above, I get the following output:

Here is the input at the diode: (high points are around 1V)

pulsein.png

And the output from the ADC (high points are 4.6V, the lower points are when diode is connected to +V)
pulseout.png
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Which ADC? Do you mean the comparator?
What is the timescale on your scope images? When the diode is at Vcc, the LC oscillator cannot oscillate, the + input of the comparator is at Vcc-Vdiode, the output is high. If you see any oscillation at all, the only shortly after the switch has returned to GND.
Your real world setup may (no, will) have additional losses (not seen in the simulation) which will prevent oscillation altogether. Consider e.g. the series resistance of the coil. Adding 10 Ohm series resistance to the coil in your simulation will suppress the LC circuit's oscillation after approx. 10ms. Your real world coil certainly has some resistance. Put this into your simulation and compare the resulats.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Hey, if you get this working, as a bonus, your circuit can also be used to measure the Q of the coils by counting the oscillations. This will also allow it to spot shorted turns by the low Q of the inductor.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Harald: Yes I was referring to the LM319 when I said ADC
The timescale is something like 5-10 seconds - I'm using the arduino as a scope as it is my only option.
However after pulling the v+ from the diode even if it is for a few ms surely I should be able to see the 319's spike to Vcc/0V ?
If this method won't work, how else could I measure inductance of an unknown inductor?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Your timescale is way too long. Set the scope to 1ms/div or 2ms/div. Trigger on the falling edge of the signal from the switch. I don't know to which resolution the arduino can measure.

Another option is building a real LC oscillator (Google for circuits), digitizing the signal with a comparator and measuring the frequency using the capture timer unit of the Arduino.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Thank you for the advice Harald, what do you mean by a 'real' LC oscillator though, as opposed to my one? Like with a square pulse connected to the diode or something? When looking up LC oscillators I simply got back an inductor connected to a capacitor in parallel.

Edit: Oh I see, you mean something like the Hartley circuit where a transistor is used to provide feedback, thus overcoming the circuit losses you were talking about?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hey, if you get this working, as a bonus, your circuit can also be used to measure the Q of the coils by counting the oscillations. This will also allow it to spot shorted turns by the low Q of the inductor.

Steve, I don't understand this. I would think that shorted windings would reduce the inductance and increase Q. My logic is ... Shorted windings equate to less coil resistance. The lower the coil resistance the higher the Q.

Chris
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Oh I see, you mean something like the Hartley circuit where a transistor is used to provide feedback, thus overcoming the circuit losses you were talking about?
Exactly. A Hartley circuit is just one example.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I would think that shorted windings would reduce the inductance and increase Q. My logic is ... Shorted windings equate to less coil resistance. The lower the coil resistance the higher the Q.

The shorted turn sucks power out of changes in the magnetic field. Since this results in loss of energy it lowers the Q.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I have to jump in the shower. I'll ponder that while in there. No guarantee that I'll agree when I'm drying off though. :)

Chris
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Ok I am trying out a Colpitts oscillator and get the following results:

In simulator it works fine as usual:
colpitts_sim.png
However when implementing it in real life I get the following output:

Base voltage (channel A/ red line in the simulator)
colpitts_chanA.png

Collector voltage (channel B/ yellow line in the simulator)
0.7u hand made coil:
colpitts_07u_chanB.png

0.15mH shop-bought inductor:
colpitts_chanB.png

As you can see, the 0.15mH provides no oscillation, and the 0.7uH hand-made coil seems to oscillate but right at the top of 5V. The base doesn't seem to oscillate in a class C fashion (or at all).

Do you think this can be summed up to a limitation in my arduino scope or is there something else I should be checking here?
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Reduced the values of all resistors used and i get a smallish but visible oscillation at the output, appears to be the correct frequency but will have to run more tests to ascertain that it isn't just a fluke. However the oscillation only goes from 2.2~2.6V, even after putting it through the capacitor connected to the collector output of the transistor. Shouldn't this be oscillating from negative to positive? What is causing this extra DC bias on the output?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Reduced the values of all resistors used and i get a smallish but visible oscillation at the output, appears to be the correct frequency but will have to run more tests to ascertain that it isn't just a fluke. However the oscillation only goes from 2.2~2.6V, even after putting it through the capacitor connected to the collector output of the transistor. Shouldn't this be oscillating from negative to positive? What is causing this extra DC bias on the output?
Place a 10 Meg resistor across the scope input.

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
CDRIVE thanks for that advice, I suppose it is the low input impedance of the scope, I will also test using an emitter-follower buffer on the output to see if it helps
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
CDRIVE thanks for that advice, I suppose it is the low input impedance of the scope, I will also test using an emitter-follower buffer on the output to see if it helps

Actually just the opposite. You're Spice scope most probably has an input Z = infinity. Spice doesn't like caps with no DC return to GND. It makes it difficult to resolve the hanging node. A 1Meg will help spice resolve the node even better. The smaller the coupling cap is the higher R can be. Of course the inverse is also true.

I think I see. Thanks for the info, Chris.

You're welcome Harald.

For those that don't see the similarities keep in mind that the Vcc is considered to be at signal ground potential.

Chris
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Actually just the opposite. You're Spice scope most probably has an input Z = infinity.
Chris, I think he's talking about his real-world scope (arduino) which in fact will have an impedance << infinity.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
You're Spice scope most probably has an input Z = infinity. Spice doesn't like caps with no DC return to GND

Ah, sorry I wasn't more clear, I was actually talking about the real version not the simulation. The simulation actually works as it should (large amplitude oscillating around the 0v point)
 
Top