Inductive metal sensing relies on an LC resonant tank circuit. When an alternating current flows through the sensor coil, it generates an oscillating magnetic field. If a conductive metal target enters this field, eddy currents are induced on the metal's surface. These eddy currents generate their own opposing magnetic field, which effectively reduces the inductance (L) of the coil and shifts the resonant frequency upward. Conversely, ferrous metals with high magnetic permeability will increase the coil's inductance, pulling the frequency down.

Unlike simple digital proximity switches that only yield a binary HIGH/LOW, a dedicated inductive sensing Analog Front End (AFE) like the Texas Instruments FDC2214 measures this frequency shift with 28-bit resolution. By tracking the precise resonant frequency of the LC tank, your microcontroller can determine not just the presence of metal, but estimate the distance, thickness, or specific alloy of the conductive target based on the magnitude and direction of the inductance shift.

LC Tank Specifications and Target Response

The heart of any metal detector sensor circuit is the LC tank. The FDC2214 drives this tank and measures its oscillation. Your choice of coil geometry and tank capacitor dictates the base frequency, which in turn determines your maximum detection range and sensitivity to specific metals. The table below provides proven baseline configurations for a 1-layer PCB spiral coil paired with the FDC2214.

Table 1: LC Tank Component Selection & Detection Ranges
Target Metal Type Coil Outer Diameter Coil Turns / Trace Width Tank Capacitor (C) Base Resonant Freq Max Detection Range Frequency Shift Direction
Copper (Non-Ferrous) 10 mm 15 turns / 0.15 mm 330 pF (C0G) ~10.2 MHz 3.0 mm Increases (+Δf)
Aluminum (Non-Ferrous) 15 mm 20 turns / 0.20 mm 100 pF (C0G) ~8.4 MHz 5.5 mm Increases (+Δf)
Carbon Steel (Ferrous) 20 mm 30 turns / 0.25 mm 47 pF (C0G) ~5.1 MHz 8.0 mm Decreases (-Δf)
Brass (Non-Ferrous) 10 mm 15 turns / 0.15 mm 330 pF (C0G) ~10.2 MHz 2.2 mm Increases (+Δf)
⚠️ Component Warning: Never use standard X7R or Y5V ceramic capacitors for the LC tank. Their capacitance varies wildly with applied voltage and temperature, which will completely mask the picohenry-level inductance shifts caused by distant metal targets. You must use C0G/NP0 dielectric capacitors with a 1% or 2% tolerance.

Wiring the FDC2214 to a 3.3V Microcontroller

The FDC2214 communicates via I2C and requires a strict 3.3V logic environment. If you are using a 5V Arduino Uno or Mega, you must use a bidirectional logic level shifter on the SDA and SCL lines, or you risk bricking the AFE. ESP32 and Raspberry Pi Pico users can wire directly.

Table 2: FDC2214 Pinout and Wiring Matrix
FDC2214 Pin Function ESP32 / 3.3V MCU Pin Notes & Supply Range
VCC Power Supply 3.3V Supply range: 3.0V to 3.6V. Do not exceed 3.6V.
GND Ground GND Connect to a clean, star-grounded MCU ground plane.
SDA I2C Data GPIO 21 (ESP32) Requires 4.7kΩ pull-up to 3.3V.
SCL I2C Clock GPIO 22 (ESP32) Requires 4.7kΩ pull-up to 3.3V.
ADDR I2C Address Select GND or 3.3V GND = 0x2A, 3.3V = 0x2B.
SD Shutdown 3.3V (or MCU GPIO) Active low. Tie to 3.3V to keep always on.
IN0 / IN1 Sensor Inputs LC Tank Coil Keep traces from these pins to the coil under 5mm.

Physical Assembly Steps

  1. Prepare the Coil: If etching your own PCB coil, ensure the substrate is standard 1.6mm FR4. Keep the ground plane cleared at least 2mm outside the outermost coil turn to prevent parasitic capacitance from detuning the tank.
  2. Mount the Tank Capacitor: Solder the C0G capacitor directly across the IN0 and GND pins of the FDC2214 breakout. Minimize trace length here; every millimeter of trace adds parasitic inductance.
  3. Wire the I2C Bus: Route SDA and SCL away from the LC coil and any high-current motor drivers. Add 4.7kΩ pull-up resistors physically close to the microcontroller.
  4. Verify Voltages: Before plugging in the MCU, use a multimeter to verify the VCC rail reads between 3.25V and 3.35V. A 5V USB rail accidentally shorted to VCC will instantly destroy the FDC2214 silicon.

Output Signal Math: Raw I2C Data to Inductance

The output of the FDC2214 is not an analog voltage; it is a 28-bit digital I2C word representing the ratio of the sensor oscillation frequency to the internal reference clock. To use this in a metal detector sensor circuit, you must convert this raw register data into a physical unit (Inductance in Henries), which then serves as your proxy for metal proximity.

First, read the Data MSB and Data LSB registers via I2C and combine them into a single 28-bit integer (Dout):

D_out = ((Data_MSB & 0x0F) << 24) | (Data_LSB << 8) (Note: Adjust bit-shifting based on your specific library's register mapping; conceptually, it yields a 28-bit value).

Next, convert Dout to the actual sensor frequency (fsensor) using the reference clock frequency (fref, typically 40 MHz on standard breakboards):

fsensor = (Dout / 228) × fref

Finally, calculate the physical inductance (L) of the coil using the known tank capacitance (C) in Farads:

L = 1 / [ (2π × fsensor)2 × C ]

💡 Pro-Tip for Code Optimization: Calculating floating-point squares and Pi on an 8-bit AVR (Arduino Uno) is slow and causes jitter. If you only need to detect changes in metal proximity, skip the final inductance calculation. Simply track the raw Dout value. A dropping Dout means frequency is dropping (ferrous metal approaching), while a rising Dout means frequency is rising (non-ferrous metal approaching).

Calibration, Scaling, and Interference Mitigation

Raw frequency readings will drift. To build a reliable metal detector, you must account for environmental variables and electromagnetic interference (EMI) that plague high-frequency LC tanks.

Baseline Calibration and Scaling

Upon boot, the system must take 100 rapid samples of the LC tank with no metal present, discard the top and bottom 10 outliers, and average the rest to establish Dbaseline. Your runtime detection logic should then calculate the delta: ΔD = D_current - D_baseline. Because the relationship between distance and inductance shift is highly non-linear (roughly following an inverse-cube law for small targets), you cannot use simple linear mapping. Instead, log empirical data points at 1mm increments in a spreadsheet, generate a 3rd-order polynomial regression equation, and hardcode those coefficients into your Arduino sketch to map ΔD to estimated millimeter distance.

Common Interference Sources

  • 50/60 Hz Mains Hum: If your sensor is near AC wiring, the magnetic field can induce low-frequency noise. The FDC2214's internal digital filters handle this well, but you should set the RCOUNT register high enough (e.g., 0xFFFF) to increase the conversion time and average out the AC cycle noise.
  • Temperature Drift: Even C0G capacitors have a slight temperature coefficient (±30 ppm/°C), and the copper coil's resistance changes with heat. If your circuit is deployed outdoors, mount a cheap digital temperature sensor (like a BME280) next to the coil and apply a software temperature-compensation offset to your baseline.
  • Parasitic Capacitance from the User: The human body acts as a massive dielectric. If you hold the PCB coil in your hand, your skin's capacitance will detune the tank. Always mount the coil in a rigid, non-conductive plastic housing (ABS or PETG) and keep your hands at least 50mm away from the active sensing face during operation.

For deeper technical implementation details regarding drive current settings and deglitching filters, refer to the Texas Instruments FDC2214 Product Page and the foundational theory on All About Circuits - Inductive Reactance. By respecting the physics of the LC tank and keeping your signal chain strictly digital, you can achieve sub-millimeter metal detection resolution that off-the-shelf proximity switches simply cannot match.