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 .
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’
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.
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.
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.
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
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.