Electronic – arduino – 4 channel inductance meter with LM339

arduinoinductance-measurement

I'm working on project where I would like to measure inductance of 4 different springs (to measure weights) using uC – Arduino. I found out that you can do that by measuring frequency of LC circuit and then converting signal to digital using LM339 comparator.

Since you can only do accurate time measurement using Timer1 and its interrupt on pin 8, I thought it would be best to just connect all comparator outputs on LM339 together and using different uC output pins to charge up LC circuits. It all worked fine if only one coil has been connected, but if I connected another one, I got no output from them.

I used modified version of this code: http://codinglab.blogspot.si/2013/02/measuring-inductances-using-arduino.html
to read times and calculate frequencies on pin 8.
Edit: Principle is you charge one LC and measure the output frequency and then charge another and do the measurement and so on.

I suspect that those LC circuits interfere with each other, but I have no idea how to solve that problem. The circuit that I made:

2 channel measurement used in test

Best Answer

The topology isn't bad, but there are several critical problems:

  • Comparator input biasing: Both inputs are held at DC ground. You need to provide a small positive bias to the (+) inputs so the static state of the comparator open-collector outputs is an open circuit. This way the inactive comparators won't interfere with the active one.
  • The ringing LC tank circuit will go positive and negative, but your comparator inputs aren't designed for below-ground inputs. The biasing I mentioned above can help here.
  • Resonant frequency: What value is this spring inductance? I assume it's in the microhenry region. You have 2uF capacitors. This tank circuit will not ring enough to be useful, given the internal resistances of the components. Look up "Q".
  • The 1N4001 diodes have a large reverse recovery characteristic, and will further dampen any ringing in the circuit.
  • In general, with (I suspect) microhenry-range inductors, you will only get useful ringing in the MHz region, using much smaller capacitors. Neither the comparator, or the Arduino timer input are likely to work very well at these frequencies.