Inductance is a key part of many technologies in daily life, for example:
- charging - electric toothbrushes, the latest smartphones and some wireless, in-ear headphones;
- heating - induction cooking with metal cookware;
- communication - contactless smartcards using NFC, RFID tags and traditional tuning circuits for radios;
- power supplies - transformers reduce the mains AC voltage to a more practical level;
- metal detection - airport security, automatic car park exit gates, pipe/cable finders and hunting for treasure.
A current flowing produces a magnetic field around it. Inductors are electrical components designed to store energy in that magnetic field. These are typically coils and often wrapped around a core. The magnetic field can be affected by:
- the material it passes through, this property is referred to as magnetic permeability;
- the presence of a conductor nearby changing the effective inductance of the coil from the induced eddy currents in that conductor creating their own magnetic field;
- other magnetic fields.
These first two properties make the inductor useful for detecting conductive objects.
The effect of nearby conductors on an inductor makes them a useful component for detecting metal. A classic implementation of this in electronics uses heterodyning where the beat frequency from mixing an inductor-based search oscillator with a reference oscillator is output to headphones.
Beat Frequency From An Oscillator Pair
The schematic on the left from R.M. Marston's 20 Solid State Projects For The Home (1969) shows a transitor-based detector with two colpitts oscillators. One oscillator uses the search coil and the other a tuneable reference coil which the users adjust to reduce the beat frequency audio output to near 0Hz away from the target material.
Filters can easily be created with a resistor (R), an inductor (L) and a capacitor (C). There are a variety of configurations of RLC filters and many of them could be used to filter the square wave output from a microcontroller which could then be sampled to check the attenuation of the filter which would vary with the inductance.
An initial test of this approach with an Adafruit CLUE and a low-pass filter didn't yield promising results. The plots below show theoretical plots for a band-stop (notch) filter made with a resistor and a parallel LC circuit which might be worth exploring.
The lower resistor values might not be practical as they put a higher current demand on the GPIO port.
The annotated linear plot below is better for seeing how this attenuation could potentially be used to detect small variations in inductance.
This would require sampling the 989Hz signal to determine the attenuation by the filter. A high inductance is attractive here as it will lower the frequency making the determination of the attenuation more accurate.
A frequency sweeping approach is an alternative for finding the frequency of the filter. This is likely to be slower but it would be less ambiguous. A simple measurement approach at one frequency, say 2.741V, corresponds to two frequencies and therefore two different inductance values.
Charging a Capacitor with RLD
- A few pulses are output through the circuit to charge the capacitor. A higher inductance will result in a higher final voltage across the capacitor.
- An analogue input then measures the capacitor's voltage with over-sampling aiming to improve the accuracy.
- The analogue input is changed momentarily to output mode to empty (sink) the charge from the capacitor.
A C++ program (sketch) on the Arduino Uno offers precise timing. This is essential for this approach to give accurate results for the inductance.
In CircuitPython, the pulseio library can be used for creating PWM signals and pulse trains with microsecond precision. In general, as an interpreted language with garbage collection, it does not offer precise timing. The unpredictable delay between step 1 and step 2 is likely to affect the final accuracy of the measurement causing sporadic, spurious indications.
Continuous Charge/Discharge with RLD
The previous approach can be used in a continuous fashion where a constant series of pulses flow through the RLD. A circuit diagram from the Falstad Circuit Simulator is shown below.
This design could be considered as an RL filter with an envelope detector.
The value of the capacitor affects how quickly it discharges. A tiny capacitance will cause a rapid discharge causing a ripple which may reduce the accuracy or complicate the voltage measurement. A large capacitor value will take time to charge and discharge and this could make the sensing unresponsive.
A value of 0.1uF (which can be written as 100nF) was chosen from experimental testing. For comparison, a simulation with 100pF (top left) shows a very undesirable 197mV of ripple whereas 0.1uF only has ~1mV ripple.
A small amount of steady voltage drop around 1mV is actually useful here to ensure over-sampling is an effective technique to improve the resolution. In the (unlikely) absence of noise or variation, a theoretically perfect analogue to digital converter (ADC) would output the same value repeatedly for a constant voltage. The ADC Analysis page takes a closer look at this.
Two Coil Systems
Modern metal detectors using the induction balanced approach use two, often partially overlapping search coils. One is used for transmitting and one for receiving. A relatively small overlap will create a section with increased sensitivity. These detectors can discriminate to some extent between metals by reporting on the phase difference between the transmitted and received signal. This is typically presented to the user as a numerical value with different ranges giving an approximate identification. Garrett's chart for their AT Pro metal detector is shown below.