Author Topic: Arduino Inductance measuring meter  (Read 6412 times)

Offline picclock

  • Hero Member
  • *****
  • Posts: 613
  • Country: gb
Arduino Inductance measuring meter
« on: October 16, 2017, 03:07:03 AM »
I found myself needing some moderately accurate inductors for a project. If you have experience of electronics you will know that designers have a reluctance ( :zap:) to use inductors because of size, cost and the large range of values, operating frequencies and currents.

A quick search around the net shows a design using a mini(328) arduino an op amp and a handful of components. I figure that I can go one better and use just an arduino,  some resisters and 1 capacitor. So this thread will be a record of my attempt to do so.

To achieve these economies I will use the internal comparator amplifier and the tri state characteristics of one or more of the port pins.

Method of operation is to cause the IUT (inductor under test) to resonate with a known value of capacitor. Then measure the period of induced oscillation to ascertain the frequency and hence the inductor value. For a readout I will use the serial monitor from the arduino compiler, though I may add a simple oled display if I think its a keeper.

Attached is proposed circuit.

Best Regards

picclock





 
« Last Edit: October 23, 2017, 08:53:46 AM by picclock »
Engaged in the art of turning large pieces of useful material into ever smaller pieces of (s)crap. (Ferndown, Dorset)

eskoilola

  • Guest
Re: Arduino Inductance measuring meter
« Reply #1 on: October 16, 2017, 05:08:11 AM »
It all depends on how accurate readings and what type of inductors and what range of inductances You are planning to measure.

Some suggestions:

Make the capacitor(s) switchabe to a few known values. this way You can extend the measure range. Mechanical Switch is far the best but one might use J-fet for switching as well. Analog Switches (4066) might be useful as well but they have some internal capacitances and are not suitable for higher frequencies aka lower inductance values.

Use a separate oscillator circuit and buffer the output before feeding to MCU. Using the MCU OpAmp as oscillator is of course tempting but that brings in quite a few limitations.

Another Approach is to inject known frequency to the IUT + known capacitor circuit and use it as a filter. Then just detect the Signal Level (J-fet) and You will get a frequency response of the resonant circuit. This allows You to measure the Q-value as well as the inductance of the coil.


Offline picclock

  • Hero Member
  • *****
  • Posts: 613
  • Country: gb
Re: Arduino Inductance measuring meter
« Reply #2 on: October 16, 2017, 06:11:24 AM »
Hi eskoilola

Easy to extend the range by extending the time count. Should not need any range selection.

Problem with filter circuit is it adds to complexity without increasing accuracy. Finding resonant frequency can often result in multiple modes of resonance, again, problems with no benefit.

As it stands its a simple circuit with no switches or extras. Just connect an inductor and get the value. Highest frequency I reckon can be reliably measured is in the 100's of khz. Combine this with a large (non inductive  :palm:) capacitor and the jobs a good'un (well as long as your in the uH range and upward).

Best Regards

picclock

 
Engaged in the art of turning large pieces of useful material into ever smaller pieces of (s)crap. (Ferndown, Dorset)

Offline PK

  • Sr. Member
  • ****
  • Posts: 369
  • Country: au
Re: Arduino Inductance measuring meter
« Reply #3 on: October 16, 2017, 07:43:49 AM »
Rather that finding resonance (where your accuracy depends, in part, on Q) would you not just use an inductance bridge? 

Offline picclock

  • Hero Member
  • *****
  • Posts: 613
  • Country: gb
Re: Arduino Inductance measuring meter
« Reply #4 on: October 16, 2017, 08:43:21 AM »
hi pk

For a bridge you would have to have much higher complexity and many more components, plus as a bridge is required to balance, different frequencies of operation and or different bridge components.

The circuit above once in resonance will have minimal loading so Q should not be a factor. The input pins of the processor only contribute pF, swamped by the external capacitor, and have high resistance in the order of MOhms, so once ringing frequency should be unaffected.

By enabling/disabling the counter on a positive going edges the interrupt generated delays will be canceled giving quite good accuracy for a minimum component device (I hope).

Best Regards

picclock
Engaged in the art of turning large pieces of useful material into ever smaller pieces of (s)crap. (Ferndown, Dorset)

eskoilola

  • Guest
Re: Arduino Inductance measuring meter
« Reply #5 on: October 16, 2017, 02:18:03 PM »
Ok.

The circuit cannot easily measure inductances below 10 microhenries or so and be able to measure indutances in millihenry class. That assuming You have the same capacitor all the time. For millihenry class inductance the capacitance might be neglible and for millihenry class and under all too large. This has an impact on the accuracy.

The frequency injection might be difficult as then You had to generate the injection frequency. On the other hand this might enable You to figure out the Q-value of the inductor.

Another way of figuring of the Q-value might be to use Your suggestion but adjust the gain of the amplifier somehow. Then just figure out where the circuit starts to oscillate and there You have Your Q-value.


Offline picclock

  • Hero Member
  • *****
  • Posts: 613
  • Country: gb
Re: Arduino Inductance measuring meter
« Reply #6 on: October 17, 2017, 11:01:31 AM »
A quick test and a small bit of code and its starting to look very good. Clear ring with well defined frequencies. Will definitely make for keeps and power with a lipo or lithium ion battery.

Capacitor was 5x1uF I found in my scrap box, already soldered together, measuring 5.21uF.

Should finish the software over the next day or two.

Best Regards

picclock

Engaged in the art of turning large pieces of useful material into ever smaller pieces of (s)crap. (Ferndown, Dorset)

Offline picclock

  • Hero Member
  • *****
  • Posts: 613
  • Country: gb
Re: Arduino Inductance measuring meter
« Reply #7 on: October 23, 2017, 09:43:39 AM »
Well its finished. Seems pretty good to me. 100uH inductor measures 100uH - highly suspicious but its for real, 4mH choke reads 4.31mH, small inductor reads 6uH no idea what its supposed to be but scope and frequency seem to indicate correct measurement, likewise small mains txfmr primary at 124mH. 

Original schematic has been amended to include input protection resisters.

Hopefully source code attached (you will have to remove the .txt extension to make it a .ino file type for the arduino IDE).

Best Regards

picclock
Engaged in the art of turning large pieces of useful material into ever smaller pieces of (s)crap. (Ferndown, Dorset)