Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Metal Detector using Arduino

By Ajish Alfred

 

Metal detector is a device used to detect the presence of a metal in its proximity without touching it. This project explains the concept of detecting the presence of a metal using the method of inductive sensing. The basic concept used is that the presence of a metal can vary the inductance value of an inductor. The prototype discussed here is a modified version of an inductance meter which has the ability of sensing the change in inductance and triggers an output.

The inductance meter is a device that can be used to measure the unknown inductance of an inductor or a simple coil. The project makes use of a tank circuit, in which there will be a capacitor and an inductor connected in parallel. The natural resonating frequency of the tank circuit varies with the presence of a metal in its proximity.The prototype has been developed using an easy prototyping platform, Arduino board. The prototype is built on a breadboard in which there is an inductor placed and any metal brought near to that inductor will trigger an alarm through a loudspeaker. For this project reader should have knowledge about how to start with arduino .

Prototype of Arduino based Metal Detector

Fig. 1: Prototype of Arduino based Metal Detector

DESCRIPTION:

The Arduino based metal detector explained in this project is basically a frequency meter which measures the resonating frequency or time period of a tank circuit. The resonating frequency of a tank circuit is fixed however the presence of metals can vary it slightly. The tank circuit is a general term representing an inductor and a capacitor connected in parallel. This circuit is also called parallel LC circuit, in which the ‘L’ denotes the inductance and the ‘C’ denotes the capacitor.This tank circuit is made to oscillate at its resonating frequency by suddenly discharging it after a period of constant charging. Once started discharging the tank circuit will produce a type of oscillation is called ‘Damped oscillation’

Overview of Arduino based Metal Detector

Fig. 2: Overview of Arduino based Metal Detector

The above image is the representation of a damped oscillation happening at the output of a LC tank circuit. The frequency of the oscillation is related to the value of the inductor ‘L’ and the capacitor ‘C’ in the circuit and is given by the following equation.

Image showing Formula of Frequency for LC Circuit

Fig. 3: Image showing Formula of Frequency for LC Circuit

The Damped oscillation can also be observed on a CRO when a square wave of high frequency is applied to a tank circuit as shown in the following image.

Image showing waveforms of damped oscillations on CRO

Fig. 4: Image showing waveforms of damped oscillations on CRO

Damped oscillation is a kind of oscillation in which the frequency remains same, but the amplitude keeps on decreasing with each oscillation. However for a tank circuit made of inductor and a capacitor in parallel, the change in the inductance value due to the presence of a metal can change the frequency of its damped oscillation. The Arduino board in this project charges a tank circuit, in which the value of inductance need to be found out is connected in parallel with a capacitor. The Arduino board suddenly discharges it at a point of time and let is resonate. The frequency at which the circuit resonates will be measures and from that the inductance is measured.

The oscillation from a LC tank circuit will always be in the form of a sine wave, and this project uses a Zero crossing detector to convert the sine wave to square wave of half the frequency, so that the Arduino board can measure its time period. The Arduino board measures the time period of the first square wave only after the tank circuit are discharged. 

Image showing ouutput waveforms of LC Circuit and LM339

Fig. 5: Image showing ouutput waveforms of LC Circuit and LM339

The time period of the square wave that appears in normal condition from the circuit is already noted and a value slightly greater than that value is set as the threshold value of detection. Whenever a metal appears near the inductor in the circuit, the value of the time period of the square wave changes and once the time period measured found to be greater than the threshold value, the output will trigger.

The built-in function ‘pulseIn()’ of the Arduino IDE helps to measure the time period of a pulse. The function returns the time period of a pulse which appears at the specified pin, as an example the statement,pulse = pulseIn(11,HIGH,5000);

returns the value of the time period in which a pulse remained high at the pin 11. The third parameter is optional for this function which sets a time out till a pulse appears on the specified pin.

The sound alarm is generated in the loudspeaker using another inbuilt function of the Arduino board ‘tone()’. It will generate a square wave with specified frequency at the required pin, as an example the following statement,

tone(8, 1000, 3000);

will generate a square wave of frequency 1KHz at pin number 8, and the wave will persist for a duration of 3 seconds.

 

 

Project Source Code

###



double pulse;
void setup()
{
pinMode(11,INPUT);
pinMode(13,OUTPUT);
pinMode(8,OUTPUT);  
}
void loop()
{
digitalWrite(13,HIGH);
delayMicroseconds(5000);
digitalWrite(13,LOW); 
delayMicroseconds(100);
pulse = pulseIn(11,HIGH,5000);
if(pulse > 920)
{
tone(8, 1);
delay(3000);
noTone(8);
}
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Metal-Detector

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, metal detector
 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What is a loop calibrator? 
  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Measure AC current accurateley (100mA to 10A)
  • 74HC595 creating Fake output
  • What was before microcontrollers ?
  • NEED HELP FOR OP-AMP IN BGR
  • Check undesired substrate mode...

RSS Electro-Tech-Online.com Discussions

  • Sla ir li ion
  • Need a ducted soldering fan for solder smoke extraction
  • Question about ultrasonic mist maker
  • Best way to reduce voltage in higher wattage system?
  • Two 300nH inductor in series, can get higher current?
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering