Inductor Meter on Arduino

Discussion in 'Embedded Systems and Microcontrollers' started by parmaja, Dec 14, 2015.

  1. parmaja

    Thread Starter Active Member

    Jul 2, 2008

    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.

    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 :p )

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

    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 (Text):
    2. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    3. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    4. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    5. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    6. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    7. Pulse:58.00   Frequency:17241.38Hz   Inductance:82.33uH
    8. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    9. Pulse:64.00   Frequency:15625.00Hz   Inductance:100.24uH
    10. 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


    Thank you in advance.
  2. DickCappels


    Aug 21, 2008
    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 likes this.
  3. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    Thank you for your respond

    That circuit that I am trying to find it, the heart of it is the comparator, but I will remake it with Arduino, as u
    suggest, I will make it as a new project.

    For diode 4007 only used to trigger the capacitor/inductor so not needed to be fast, i kept it from the original circuit cuz i noticed the tank stopped when I replaced the inductor.
  4. parmaja

    Thread Starter Active Member

    Jul 2, 2008