Arduino Metal Detector

Intro: Arduino Metal Detector

Arduino is an open source computer hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world.

In this Instructable, we are going to make a Metal Detector. PS : This is not intended for total beginners.

A metal detector is an electronic instrument which detects the presence of metal nearby. Metal detectors are useful for finding metal inclusions hidden within objects, or metal objects buried underground.

But the metal detector we are going to make won`t be useful in actual cases, Its just for fun and learning.

Step 1: Materials Required

  1. Arduino Nano
  2. Coil
  3. 10 nF Capacitor
  4. Pizo Buzzer
  5. 1k Resistor
  6. 330 Ohm Resistor
  7. LED
  8. 1N4148 Diode
  9. Breadboard
  10. Jumper Wires
  11. 9V Battery

Step 2: Circuit Diagram

We have used an Arduino Nano for controlling whole this Metal Detector Project. A LED and Buzzer are used as metal detection indicator. A Coil and capacitor is used for detection of metals. A signal diode is also used for reduce the voltage. And a resistor for limiting the current to the Arduino pin.

When any metal comes near to the coil then coil changes its inductance. This change in inductance depends upon the metal type. It's decreases for non-magnetic metal and increases for ferromagnetic materials like iron.
Depending on the core of the coil, inductance value changes drastically. In the figure below you can see the air-cored inductors, in these inductors, there will be no solid core. They are basically coils left in the air. The medium of flow of magnetic field generated by the inductor is nothing or air. These inductors have inductances of very less value.

These inductors are used when the need for values of few microHenry. For values greater than few milliHenry these are not a suitable one. In below figure you can see an inductor with ferrite core. These Ferrite Core inductor has very large inductance value.

Remember the coil wound here is a air cored one, so when a metal piece is brought near the coil, the metal piece acts as a core for the air cored inductor. By this metal acting as a core, the inductance of the coil changes or increases considerably. With this sudden increase in inductance of coil the overall reactance or impedance of the LC circuit changes by a considerable amount when compared without the metal piece.

Step 3: How It Works ?

Working of this Arduino Metal Detector is bit tricky. Here we provide the block wave or pulse, generated by Arduino, to the LR high pass filter. Due to this, short spikes will be generated by the coil in every transition. The pulse length of the generated spikes is proportional to the inductance of the coil. So with the help of these Spike pulses we can measure the inductance of Coil. But here it is difficult to measure inductance precisely with that spikes because that spikes are of very short duration (approx. 0.5 microseconds) and that is very difficult to be measured by Arduino.

So instead of this, we used a capacitor which is charged by the rising pulse or spike. And it required few pulses to charge the capacitor to the point where its voltage can be read by Arduino analog pin A5. Then Arduino read the voltage of this capacitor by using ADC. After reading voltage, capacitor quickly discharged by making capPin pin as output and setting it to low. This whole process takes around 200 microseconds to complete. For better result, we repeat measurement and took an average of the results. That’s how we can measure the approximate inductance of Coil. After getting the result we transfer the results to the LED and buzzer to detect the presence of metal. Check the Complete code given at the end of this Article to understand the working.


Complete Arduino code is given at the end of this Article. In programming part of this project, we have used two Arduino pins, one for generating block waves to be fed in Coil and second analog pin to read capacitor voltage. Other than these two pins, we have used two more Arduino pins for connecting LED and buzzer. You can check the complete code and Demonstration Video of Arduino Metal Detector below. You can see that whenever it detects some metal the LED and Buzzer starts to blink very fastly.

Step 4: Coding Time

Originally Published on Circuit DigestBy Saddam

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Audio Contest 2018

      Audio Contest 2018

    Discussions