Bro, i made this today to check the inductors, and it works perfectly!!! I had to reduce the delay time after the power in to the circuit is off ( i used a 0.1uf cap though).. keep up the good work!!! Thanks!
As a noob I thought "Dang son, this LM339 is gonna be hard to find!" Looked in my junkbox anyway. Litteraly the first place I looked I found two LM339N chips, on an old partly scrapped PCB from a computers ATX powersupply. This is cool!
@Electronoobs Thanks for this tutorial video. I know that it is a bit old, but I am hoping that you are still monitoring and responding to questions about this project. I have a few questions: 1. Why not use the Atmega328p internal comparator (available on the analogue input pins) instead of an external comparator chip? It may need a more accurate method of measuring the frequency period, but this could, perhaps, be done with an assembler code loop. 2. If an external comparator is absolutely needed, why not use a LM393 dual comparator (smaller IC package) instead of the LM339 quad comparator? Is there a difference in characteristics between the LM393 and LM339? 3. Also, if an external comparator is needed, why not use the internal digital input pin pullup (i.e. INPUT_PULLUP mode) instead of the external 330R resistor? Thanks.
Would be great if the code actually worked. It's either incomplete or bad.. the only thing it does is print "Why hello" in the serial monitor (115200 baud rate). I've also noticed some differences between the supplied code on the blog and the one being used in the video, but neither actually seem to work lol
... after a week or so of swearing and frustration caused mainly by bad breadboards, with bad contacts, i made this thing working. yes, 1 uF, but changing the value in the code, it will work, too, but with another set of coils. next, if your inductor/coil/solenoid is shorted (very rarely, but sometimes happen, check with an ohmmeter, to see if reads a short!), the signal will be grounded, and measuring will never happen. same for a too high or too low inductance: no measuring, nothing will be displayed. without anything unless the cap, nothing will be measured, too. i use just one 1 uF cap, and finally started this thing. results from serial monitor: 91 us 5494.51 Hz 0.82 uH with another coil: 312 us 1602.56 Hz 9.66 uH without any change in code, i put another 1 uF cap in parallel (so, a total of 2 uF, or around...), and i get, for the same coil from the first results: 130 us 3875.97 1.65 uH tried an axial inductor marked DLA 10 mH, not working at all. but with some inductors randomly harvested from ATX power supplies and "economical fluorescent bulbs", it worked nice. too low or too high coil resistance will cause that thing, again, to not work... so, first time, try it without any coil, and check if you get a signal on comparator's input pin. be sure your capacitor is not shorted, too! looks like i can measure, with a 1 uF cap a 0.10 uH coil... hmmm... this was the lowest one: 31 us 16129.03 Hz 0.10 uH i tried to measure a mains trafo, primary and secondary side... nothing, maybe too high inductance in primary side, and on secondary, too low resistance of winding... now... is time to put this thing on a small perfboard, and doing stuff... code is working, but the oscillator is not working with ANY coil. so, try to find a similar coil like that one from video. be sure about your soldering, too... a wiggly or poor soldered wire will drive you crazy! :D ah, i used an SSD1306 display. just a question of using the correct library, and invoking the correct statements. easy. because i have no I2C LCD here... just a lot of 16 pin LCD's, and a lot of SSD1306, 128x64 or 128x32. good luck.
should be pretty easy to put them together but of you are gonna use an I2C display you may need something other than an arduino uno since it only has 6 analog inputs and 2 of them are used my I2C. the hardest part would be the menu code but there are a lot of examples of menu code out there.
After a long search, I found all the errors, both in the code and in the wiring. Unfortunately, the published code is NOT the working code as shown. - Definition of the variables: inductance__mH (with 2 instead of 1 underlines) - look at the pinMode (11 and 12), INPUT and OUTPUT changed - pin 13 in code comment and breadboard schematics is not in use. Only pin 11 and 12 needed! Video, Schematics and Code do not match. Inductance meters now working fine and amazingly accurate for a DIY. Thank You!
Why not use the comparator built in to the ATmega338p? I know I’m a bit late to the video, but I think the built-in comparator has a response rate of something like 125-250 ns (4-8MHz) It seems silly to use a dedicated comparator when an arduino uno already has one Edit: in fact, I think the ATmega328p’s comparator has roughly the same response time as the as the LM339 you used
6:54 You'd probably do better to use a rectangle wave with a duty cycle of 10% , You'll get a better ring off the inductor and depending on the inductor value you could drop that to 5%, Although this doesn't work for every inductor. 10% is the way to go in my opinion
One will face trouble while attempting to measure an unknown inductor with a very low series resistance(inductors made with thick copper wires or fewer turns or both)! The charge will get grounded first(because of the low resistance) before it can charge the capacitor!! As an upgrade- Either disconnect the inductor from ground while the capacitor is being charged or eliminate the diode & resistor arrangement and instead simply charge the capacitor through the unknown inductor. At the end of charging cycle connect the inductor to ground !
bro I want to make a crossover frequency for my DIY speaker Project that's why I needed an Inductance meter please help me it's going to be center Chanel on my home theater system I got 8-ohm tweeter and dual 8-ohm woofer in parallel that becomes 4 ohms in total my tweeter is Dayton Audio DC28F-8 and woofer is Dayton-Audio-DA135-8 I know u have a lot to do but it's my first DIY project and I am really excited about it thank you
Hi Electronicnoob, this is a great video for LC meters. My question is that is this project work WITHOUT a i2c connector? The arduino itseft can function directly connect to 1602 lcd.
After a secong view of your video i can finally undertand the concept. The 5 volts desapear , the rosanance began but just live for a short time, you count this pulses. This is correct ??
I think that would give you just a small peak each time you have 0 crossing. using the pulse in function you need a 50% duty signal in order to double the time and get the period. But i guess you could manage to count the time between each peak
it doesnt really matter what length is the pulse because i want to use interrupts instead of pulsein() because it locks up the whole mcu while its waiting for the end of the pulse
In the schematic you presented it looks as though nothing is preventing the voltage on the charging pin from being swung into the negative, something I'm sure the arduino doesn't appreciate much. I would suggest using that arduino pin to drive a small, robust mosfet which rings the circuit.
Thanks for providing such a great video, I had implement the capacitance as well as resistance meter and it worked. Now, I am building this inductance meter and here, problem arises with lm741 as comparator, and now circuit is not working Pls provide schematic diagram for lm741 as well.
this no longer seems to work for some reason. also there are several errors in the code available from your website. and the library provided does not seem to want to cooperate. I would appreciate some help, as I would like to have one of these handy for quick and dirty approximations of inductors.
If I only want to measure a "large" inductance, say mH, would it be possible to measure the inductance accurately using the same method as for measuring the capacitance? From what I understand, the reason we can't use the same method to measure inductance is because as we increase the resistance we are lowering our "charge time" in the LR circuit, thus our arduino at 9 kHz sampling frequency (76 kHz if you play around with if for a while) isn't fast enough. But if I use 76 kHz I get a "resolution" of 0.01 mH, so that should be enough to measure mH accurately, right? Also, we should be able to least square fit the exponential curve to get a good accuracy despite noise in the measurements, right?
bit of an old video but @electronoobs after looking at your webpage and video really closely I cannot get this project to work using both a 220uF nonpolar electrolytic cap as well as a 1uF ceramic cap. With both circuits it does not output anything, I have changed the value in the program. I have tried different ICs as well as different Arduinos. I don't have a scope so I can't check anything else really.
theres some problems with the supplied code and the schematic, the input pins are not proper defined, you need to change the pin numbers around a little bit.
its not a big deal :) i just noticed the fritzing pins being different than the code, also, i noticed measuring toroidal coils is a bit of a difficulty, any idea why this is ??
sorry for this noob question sir but can i use lm358 op-amp as a commparator??? beacause its the only component available for me at this time...your answer is very appreciated
Its been a long time since then,but the non polarized capacitors have better capacitor accuracy and stability over the time compared to the electrolytic capacitors.
Plz Help I have this message error when compiling code: #error insert your used capacitance value here. Currently using 2uF. Delete this line after that
Electronoobs thanks! I have a 319 home and i will use it. To be honest, as far as i've seen from your schematic, you are using just one comparator out of 4
Please fix this line in your code: "double pulse, frequency, capacitance, inductance, inductance__mH;" You used two underline in "inductance__mH" but you used 1 underline later.
hey man thanks for this great tutorial. But in my circiut it outputs about 10 time right value then it decreases for one time then again and again. Can you help me for that
sorry i can not understand full concept of the circuit. The pulse is stop and the compartor read the residual resonance or the arduino sweep a lot of frecuncy ??
Is not residual. The resonance begin when you cut the pulse. When you go from 5V to 0, the LC tank will resonante and we read the frequency of that resonance. Good day!
Bro, i made this today to check the inductors, and it works perfectly!!! I had to reduce the delay time after the power in to the circuit is off ( i used a 0.1uf cap though).. keep up the good work!!! Thanks!
Hi how did you make this? Would you share your shematic and code? Thank you
Is the measurement accurate for inductors below 80uH?. Thank you inadvance for your response.
Bro this full theory and math was amazing... Really was looking for such a inductor meter.. And you did it
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
As a noob I thought "Dang son, this LM339 is gonna be hard to find!" Looked in my junkbox anyway. Litteraly the first place I looked I found two LM339N chips, on an old partly scrapped PCB from a computers ATX powersupply. This is cool!
@Electronoobs Thanks for this tutorial video. I know that it is a bit old, but I am hoping that you are still monitoring and responding to questions about this project. I have a few questions:
1. Why not use the Atmega328p internal comparator (available on the analogue input pins) instead of an external comparator chip? It may need a more accurate method of measuring the frequency period, but this could, perhaps, be done with an assembler code loop.
2. If an external comparator is absolutely needed, why not use a LM393 dual comparator (smaller IC package) instead of the LM339 quad comparator? Is there a difference in characteristics between the LM393 and LM339?
3. Also, if an external comparator is needed, why not use the internal digital input pin pullup (i.e. INPUT_PULLUP mode) instead of the external 330R resistor?
Thanks.
This is good questions, i also need the answers. I am building a lc meter with lm339
Woow You are too exceptional, your teaching is top notch, i will be following your page
Would be great if the code actually worked. It's either incomplete or bad.. the only thing it does is print "Why hello" in the serial monitor (115200 baud rate).
I've also noticed some differences between the supplied code on the blog and the one being used in the video, but neither actually seem to work lol
hi , made it and it works fine , but if you use 2.5uF capacitor and DON`T change the code , it works even better :)
... after a week or so of swearing and frustration caused mainly by bad breadboards, with bad contacts, i made this thing working.
yes, 1 uF, but changing the value in the code, it will work, too, but with another set of coils.
next, if your inductor/coil/solenoid is shorted (very rarely, but sometimes happen, check with an ohmmeter, to see if reads a short!), the signal will be grounded, and measuring will never happen.
same for a too high or too low inductance: no measuring, nothing will be displayed.
without anything unless the cap, nothing will be measured, too.
i use just one 1 uF cap, and finally started this thing.
results from serial monitor:
91 us
5494.51 Hz
0.82 uH
with another coil:
312 us
1602.56 Hz
9.66 uH
without any change in code, i put another 1 uF cap in parallel (so, a total of 2 uF, or around...), and i get, for the same coil from the first results:
130 us
3875.97
1.65 uH
tried an axial inductor marked DLA 10 mH, not working at all. but with some inductors randomly harvested from ATX power supplies and "economical fluorescent bulbs", it worked nice. too low or too high coil resistance will cause that thing, again, to not work...
so, first time, try it without any coil, and check if you get a signal on comparator's input pin. be sure your capacitor is not shorted, too!
looks like i can measure, with a 1 uF cap a 0.10 uH coil... hmmm... this was the lowest one:
31 us
16129.03 Hz
0.10 uH
i tried to measure a mains trafo, primary and secondary side... nothing, maybe too high inductance in primary side, and on secondary, too low resistance of winding...
now... is time to put this thing on a small perfboard, and doing stuff...
code is working, but the oscillator is not working with ANY coil. so, try to find a similar coil like that one from video.
be sure about your soldering, too... a wiggly or poor soldered wire will drive you crazy! :D
ah, i used an SSD1306 display.
just a question of using the correct library, and invoking the correct statements.
easy.
because i have no I2C LCD here... just a lot of 16 pin LCD's, and a lot of SSD1306, 128x64 or 128x32.
good luck.
Can u share the code?
can you conbine all these meter series in one arduino that would be awsome.
I will in the future!
Electronoobs its already 6 months. How more time, would it take..??
yes !! I also want this ( LC with frequency meter ) , plz write code for both serial monitor and 16x2 parallel ports in one :)
should be pretty easy to put them together but of you are gonna use an I2C display you may need something other than an arduino uno since it only has 6 analog inputs and 2 of them are used my I2C. the hardest part would be the menu code but there are a lot of examples of menu code out there.
@@Nithuigim1 lel, he just do it
Works perfectly. Good job sir
Hello, we made very nice Inductance meter according your schematic and program. Thanks
However, when we try to measure the inductance value from your said uH to mH. It is out of range, how can we modify the circuit?
After a long search, I found all the errors, both in the code and in the wiring.
Unfortunately, the published code is NOT the working code as shown.
- Definition of the variables: inductance__mH (with 2 instead of 1 underlines)
- look at the pinMode (11 and 12), INPUT and OUTPUT changed
- pin 13 in code comment and breadboard schematics is not in use. Only pin 11 and 12 needed! Video, Schematics and Code do not match.
Inductance meters now working fine and amazingly accurate for a DIY. Thank You!
can u share the working code please?
Why not use the comparator built in to the ATmega338p? I know I’m a bit late to the video, but I think the built-in comparator has a response rate of something like 125-250 ns (4-8MHz)
It seems silly to use a dedicated comparator when an arduino uno already has one
Edit: in fact, I think the ATmega328p’s comparator has roughly the same response time as the as the LM339 you used
Try and you understand why he did not used internal comparator.
Freakin youtube. It took way to long for your channel to show up on my frontpage. Subbed.
Micky S. thank you very much!
6:54 You'd probably do better to use a rectangle wave with a duty cycle of 10% , You'll get a better ring off the inductor and depending on the inductor value you could drop that to 5%, Although this doesn't work for every inductor.
10% is the way to go in my opinion
You are so cool and very simple to teach people. Thank you.
One will face trouble while attempting to measure an unknown inductor with a very low series resistance(inductors made with thick copper wires or fewer turns or both)! The charge will get grounded first(because of the low resistance) before it can charge the capacitor!!
As an upgrade- Either disconnect the inductor from ground while the capacitor is being charged or eliminate the diode & resistor arrangement and instead simply charge the capacitor through the unknown inductor. At the end of charging cycle connect the inductor to ground !
Excellent tutorial. Kudos. Thanks for educating viewers like me.😀😀
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
Thanks for making this so detailed 🙏
A really well explained project!
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
Excellent job in explaining how it works , You are a Guru
Thanks for caring and shearing
bro you are a LEGEND
bro I want to make a crossover frequency for my DIY speaker Project that's why I needed an Inductance meter
please help me
it's going to be center Chanel on my home theater system
I got 8-ohm tweeter and dual 8-ohm woofer in parallel that becomes 4 ohms in total
my tweeter is Dayton Audio DC28F-8
and woofer is Dayton-Audio-DA135-8
I know u have a lot to do but it's my first DIY project and I am really excited about it
thank you
Hi Electronicnoob, this is a great video for LC meters. My question is that is this project work WITHOUT a i2c connector? The arduino itseft can function directly connect to 1602 lcd.
Can I use an Oamp instead?
This is very good, the first of yours that I have seen. I'll check out your other videos. I've subscribed!
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
By increasing the capacitance you can achieve a bigger precision?
Just charging inductor and rapidly checking current is good design?
During negative peak won't the diode be forward biased🤔 ... I think you have assumed the Arduino power supply to have a diode too?
After a secong view of your video i can finally undertand the concept. The 5 volts desapear , the rosanance began but just live for a short time, you count this pulses. This is correct ??
Thank You
did you have any inductane meter more precise between 1uH and 80uH ? it's also very usefull
Great job man! Congratulation! Can i use a oled display in it?
Super instructive video! Very good project. Thanks much.
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
How accurate is this ?
Can i use an optocoupler zero crossing point circuit instead?
With changed programming of course
I think that would give you just a small peak each time you have 0 crossing. using the pulse in function you need a 50% duty signal in order to double the time and get the period. But i guess you could manage to count the time between each peak
it doesnt really matter what length is the pulse because i want to use interrupts instead of pulsein() because it locks up the whole mcu while its waiting for the end of the pulse
Then ok. Using interrupts you increase a timer ant count how often dose that pulse oscillate. Sounds perfect!
@@ELECTRONOOBS I think such a circuit should be made on a PCB as the breadboard construction adds parasitic capacitance to the circuit.
great video as always
Where do you get the 1602 with straight pins? All the ones I see have the pins bent. Even you link shows 90 degree pins. Do you straighten them?
Hi, Great video, just came across it. Is it possible to read inductors as low as 1nH, or is uH its limit?
Do you gave any designs on a loudspeaker impedance tester?
In the schematic you presented it looks as though nothing is preventing the voltage on the charging pin from being swung into the negative, something I'm sure the arduino doesn't appreciate much. I would suggest using that arduino pin to drive a small, robust mosfet which rings the circuit.
Atlas WalkedAway
A clamping diode to ground on the input pins should eliminate risk of negative voltage damage.
You’re absolutely right sir.
Thanks for providing such a great video,
I had implement the capacitance as well as resistance meter and it worked.
Now, I am building this inductance meter and here, problem arises with lm741 as comparator, and now circuit is not working
Pls provide schematic diagram for lm741 as well.
LM741 is OP AMP not comparator so you need other circuit and code.
Great video!
Great tutorial. Thanks
why are we using non polar capacitor? is it possible if use polarized ones?
Yes, of course.
What is the range of measurement?
Amazing videos Bro
this no longer seems to work for some reason. also there are several errors in the code available from your website. and the library provided does not seem to want to cooperate. I would appreciate some help, as I would like to have one of these handy for quick and dirty approximations of inductors.
I also cannot get it to function. Have you had any luck?
Bro it's awesome 👌
Can you tell me if the LM311 comparator is suitable?
Can i use ordinary lm324 or lm358 instead??
What ranges does it measure inductance?
Great I will make this.
Where is all in one lcrf meter code ?
Nice, thank you.😉👍
Great video. Thanks!
Hey man can I use any other operation amplifier like lm358
can i buy a ready to use inductance meter from you sir?
Nice video
If I only want to measure a "large" inductance, say mH, would it be possible to measure the inductance accurately using the same method as for measuring the capacitance?
From what I understand, the reason we can't use the same method to measure inductance is because as we increase the resistance we are lowering our "charge time" in the LR circuit, thus our arduino at 9 kHz sampling frequency (76 kHz if you play around with if for a while) isn't fast enough. But if I use 76 kHz I get a "resolution" of 0.01 mH, so that should be enough to measure mH accurately, right?
Also, we should be able to least square fit the exponential curve to get a good accuracy despite noise in the measurements, right?
LM339 is Quad Comparator but you only use one. You can also use LM393 Dual Comparator or LM397 single general-purpose comparator
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
How to get this to work without ic2 disply? Just a normal none ic2??
Hi, can i use lm358 instead lm339??
Hey!!what is the mainimum value of inductance it can measure Very accurately ????
How can one use the digital display on this inductance meter without the i2c interface. if possible ,what going to bet the code adjustment. thanks
bit of an old video but @electronoobs after looking at your webpage and video really closely I cannot get this project to work using both a 220uF nonpolar electrolytic cap as well as a 1uF ceramic cap. With both circuits it does not output anything, I have changed the value in the program. I have tried different ICs as well as different Arduinos. I don't have a scope so I can't check anything else really.
theres some problems with the supplied code and the schematic, the input pins are not proper defined, you need to change the pin numbers around a little bit.
Thanks. I'll check that out!
its not a big deal :) i just noticed the fritzing pins being different than the code, also, i noticed measuring toroidal coils is a bit of a difficulty, any idea why this is ??
Hello
the whole time built up loud instructions only get it not at run somewhat does not fit there shows nothing at display is however okay.
can I use a op amp as a comparator like lm348 op amp????
Your code not work.... the library i2c can installed but after install not happened
thanks for your excellent job, it is so useful
How accurate is this meter. Is it within say 10% . How does it compare with the basic meters on sale in shops. Please advise ANYONE ??
Hi Sir! Do you have emf meter?
Awesome brother, Can you make a vfd using arduino
sorry for this noob question sir but can i use lm358 op-amp as a commparator??? beacause its the only component available for me at this time...your answer is very appreciated
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
What changes in program for make it without I2C
Hi, can i replace lm339 op amp with other op amp
Can we measure about 0.5uH with this circuit
Is it possible to mearsure inductance of DC motor using this circuit? Also should i lock the shaft (so that it can't rotate) for the test?
you could. Depends of the motor. If it is very big it might be out of range.
Mili theMUFFIN I would lock it up if I were you so that it doesn't change inductance when and if it turns
can i use ceramic or polar capacitor.because i cannot find non polar capacitor in my country
polar capacitor can not be used because it can only be charged in one direction but for oscillations to happen it should be able to charge both sides.
Its been a long time since then,but the non polarized capacitors have better capacitor accuracy and stability over the time compared to the electrolytic capacitors.
Very interesting, thanks for sharing!.
Great tutorial...thank you!!
Bro what is the refresh rate of display?
Sir, Can we use 100nf capacitor instead 1uf?
yes of course. In general you have to select proper cap.
Plz Help I have this message error when compiling code:
#error insert your used capacitance value here. Currently using 2uF. Delete this line after that
can i use 1n4007 diode istead of 1n4001 diode
Get a fast diode instead
Sir display not work properly. Display show to blank
Скетч не такой как на сайте. Есть новый?
hi bro can it meter industance from ferrite core inductor??
Can LM319 be used instead of LM339? Thanks!
Yes!
Electronoobs thanks! I have a 319 home and i will use it. To be honest, as far as i've seen from your schematic, you are using just one comparator out of 4
Yes, single OPAMP is more than enough. I've used that because is what I had, Keep up!
can lm393 be used , i had buy 393 mistakenly instead 339 or 319 ??
@@hacksci4fun439 Yes!
Radio shake in my country dont have non-polarize 1uf
what happen if i use polarize 1uf.????
great work ♥♥
Hello
the whole time built up loud instructions only get it not at run somewhat does not fit there shows nothing at display is however okay.
Sir which software r u using for video editing
Awesome job, just make sure you smash that like button an odd number of times :)
LOL, thanks!
Please fix this line in your code:
"double pulse, frequency, capacitance, inductance, inductance__mH;"
You used two underline in "inductance__mH" but you used 1 underline later.
ok, thank you!
can it work with TL072 op-amp
What frequency it is measuring the capacitance at?
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
can measure under 10uh like 1uh. I really need it
What is the maximum inductance can be measured with this setup?
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
hey man thanks for this great tutorial. But in my circiut it outputs about 10 time right value then it decreases for one time then again and again. Can you help me for that
th-cam.com/video/6mQ-LN3PGwY/w-d-xo.html
sorry i can not understand full concept of the circuit. The pulse is stop and the compartor read the residual resonance or the arduino sweep a lot of frecuncy ??
Is not residual. The resonance begin when you cut the pulse. When you go from 5V to 0, the LC tank will resonante and we read the frequency of that resonance. Good day!
@@ELECTRONOOBS thanks dude, saludos from Argentina, sorry for my english
Sera muy complicado hacer un medidor de resistencia equivalente "ESR". Estaria bueno hacer uno con Arduino o FPGA. !!!!!