# Inductor Meter on Arduino

#### parmaja

Joined Jul 2, 2008
41
#Story#

I need to build inductor 330uH for LM2575, but I can't find it in our store, and the LCR meter is expensive, so I built Arduino inductor meter.

http://reibot.org/2011/07/19/measuring-inductance/

I used it for marked inductors for testing, big size of 100uH is passed, but small 100uH (small like a resistors), or 150uH it give me wrong numbers
for example
150uH -> 180uH
100uH(small) -> 40uH

I modified the circuit to make it permanent oscillator instead of just a ring (based on page on AAC), I just added a resistor (560ohm) then I changed the code, I had removed the delay function, and measure the full wave. (random value of 560ohm )

It work with fine and all my marked inductors, it get me same numbers on the covers.

#But#
I feel there is something wrong, especially, I have wrong number every 10 numbers, it is like a heart beating, not sure if my chinese Arduino or this circuit.

Code:
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:58.00   Frequency:17241.38Hz   Inductance:82.33uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
Can you look at it to check if there is a wrong, or can to optimize it?

I published it on github

#### DickCappels

Joined Aug 21, 2008
6,790
That does not look like an "regular" oscillator, more like circuit to measure the zero crossings as the circuit rings. If that's the case, then the problem might be that the ringing voltage in some cases not large enough to trip the comparator on each cycle and that could be because the circuit has a low Q in the resonant circuit. The 1 uF capacitor might be hurting the Q of the circuit. Going to a good quality film capacitor might solve the problem.

For 330 uH the oscillation would be running at 13 kHz. The 1N4007 is way too slow for that and it should be replaced with a faster small signal diode like 1M914, 1N916, 1N4148, etc.

If those ideas don't get it working you might want to use the most popular circuit for this application. It is shown in the circuit below.

You can use a 16 bit counter in your Arduino to measure count the transitions on the output of the comparator for a fixed period of time and then calculate the frequency from that and the value of the resonating capacitor

#### parmaja

Joined Jul 2, 2008
41