Search This Blog

Wednesday, July 25, 2012

Arduino & LM393 Inductance-meter!


Lately I have been working allot with inductors, ex: DC/DC converters and had a problem not knowing the inductance of most coils I worked with so I decided to build an inductance meter using Arduino and LM393 Comparator. I found the AVR  LC meter with frequency measurement  project by Kerry D. Wong very helpful, it made me understand the concept behind the measurement . The schematic and Arduino code based on similar project by  ReiBot.orgThis meter is not very accurate compared with profesional ones but it does the job.
Update: A better Arduino sketch by ultimoistante:  code here




Using iCircuit App for iPhone

26 comments:

  1. Hello,
    The link to the source code is dead, is it possible to re-upload please?
    Thank you.

    ReplyDelete
  2. Hi,
    I have just checked the link, its not dead. just try again!

    ReplyDelete
  3. hi,
    when i running the program it is not working, please help
    i am using arduino uno rev 3
    thank you

    ReplyDelete
  4. Hi sayber, What do you mean with "Not Working" !? Does the upload process complete successfully? Or you mean it does not give a correct measurement? please be more specific. Thanks

    ReplyDelete
    Replies
    1. Hello , i made everything exactly the same but instead of using LCD i am using Serial Terminal , but it keep giving me "Insert Inductor" message , i am using 1uf electrolytic capacitor
      what might be wrong ?

      Delete
    2. Hi, I guess you changed the print command to show results on the terminal instead of the LCD! It could be a wiring error ... check the arduino pins you are using opposite the code ... or maby make a detailed video of your setup and post it somewhere with the code you are using, then it would be easier to help you with it. Have a good time

      Delete
    3. Thanks for the fast reply :) , i removed everything on the breadboard and then assembled it again this time i used 10 ceramic capacitors to form a 1uf value , and yes i only changed the print.lcd to serial.println
      , now when i put any inductor i have i get 10uh +-1 and never changes no matter the size of any inductor i use not sure now why this is happening

      Delete
    4. I would suggest that you make changes to the code, specially the function measuring the time constant .. and see what happens ! Im sorry I dont know what kind of problem is causing this !

      Delete
    5. I tried electrolytic capacitor, it not work, you need u polarity capacitor

      Delete
    6. نعم يا عزيزي الكاتب المرهف. سعدت لمرورك
      تحياتي القلبية لدمشق ولسوريا العريقة
      شدة وتزول

      Delete
  5. Hello,

    I completed the circuit however, it seems Ι can't get the right values. For every coil I measure, the values I get are 13.84uH or 11.71 uH. Could you help me with my problem?

    Thank you,
    Jim

    ReplyDelete
    Replies
    1. nice job i have a problem when load program said expected unqualified-id before numeric constand ( ShiftLCD (2, 4, 3); ) what is the problem ? thank u

      Delete
  6. This works great, but I'm trying to tighten things up a bit.
    How did you convert 1uF to 95.E-8 for the capacitance.
    I measured my cap and it's 1.1uF how would I get the proper value to put here:
    capacitance = 95.E-8;

    ReplyDelete
  7. Greetings.
    I have 1.70 uF on my board. So I write 1.70 x 1.E-6. It's that correct?

    ReplyDelete
  8. hi shadi soundaton! please help me. i cant get the code please send me to my email 5thgee35@gmail.com. i hope that you will help me. thankyousomuch sir! :)

    ReplyDelete
  9. THE LINK TO THE CODE IS BROKEN ! (believe me)

    ReplyDelete
    Replies
    1. I do believe you , I will check if I still have the code and update the link as soon as possible .

      Delete
    2. new link .. code was added/updated !

      Delete
  10. Hello i get only Insert indcutor have test it with 1µF elko and 1µF tantal but still the same error any idea what is wrong?

    ReplyDelete
    Replies
    1. I would suggest you check the wiring again .. and use ceramic capacitors. Best luck

      Delete
  11. Worked first time around, wonderful!
    I used 1uF cap with 100mH, 10mH, and 1mH inductors, all accurate (1.08mH reading for 1mH +/-5%, seems good)
    However, arduino's pulseIn has a minimum of 10uS (https://www.arduino.cc/en/Reference/PulseIn), which is not good enough for measuring smaller inductances. What I really need is to measure small inductors in the nano-henry range.

    Any ideas on how to do so with the arduino?
    Nice job with the simple schematic!

    ReplyDelete
    Replies
    1. I forgot to add, I made a bunch of random parts substitutions. Because I didn't have any LM393's, I used both LM2901N and LM339 (not LM393) comparators, both worked just fine.
      The diode I replaced with a 1N4001. I used a pretty accurate 1uF metalized Film capacitor (rated for 250W) from RadioShack. Using Arduino pro mini.

      Delete
    2. Think direct pin manipulation.
      http://forum.arduino.cc/index.php?topic=125550.0

      I guess this will answer your question. Best luck

      Delete
  12. There is a slight bug in the github code ... Film capacitors should be used for one, and the capacitance value should be :
    'capacitance = (value in uf)1.E-6 * 2;'
    without the 'cap val * 2' you will not get the correct inductor value.
    Tested on known inductors... 33mh showed as 70mh, with correction: 31mh measured

    ReplyDelete