Site icon Circuit Ideas for You

Metal Detector Circuit using Arduino

Metal detector uses electric field to find metal near it.

Making Metal Detector Circuit using Arduino is fun for electronics lovers.

We can make it using Arduino, CS209A chip, LEDs, buzzer and some other parts.

LED and buzzer will show when metal is close.

This project use CS209A chip with Arduino.

CS209A is good chip for finding metal and nearby things.

Coding:

// Declare Arduino Pins
const int vinHi = 2; 
const int vinLo = 3;
const int ledG = 4;
const int ledR = 5;
const int Buz = 6;

// Variable to detect state change
int metalState = 0;

// Declare Arduino Pin Mode
void setup() {
  pinMode(vinHi, INPUT);
  pinMode(vinLo, INPUT);
  pinMode(ledG, OUTPUT);
  pinMode(ledR, OUTPUT);
  pinMode(Buz, OUTPUT);
}

void loop() {
  metalState = digitalRead(vinHi); // Read the proximity detector signal

  if (metalState == HIGH) { // No Metal detected
    digitalWrite(ledG, HIGH);
    digitalWrite(ledR, LOW);
    digitalWrite(Buz, LOW); 
  } else { // Metal detected
    digitalWrite(ledG, LOW);
    digitalWrite(ledR, HIGH);
    digitalWrite(Buz, HIGH);
  }

  delay(3000); // Wait for 3 Sec.
}

Code Explanation:

Circuit Working:

Parts List:

ComponentSpecificationQuantity
Resistors
10k 1/4 watt1
1k 1/4 watt2
Preset 10k1
Capacitors
Electrolytic 10µF 25V1
Ceramic 2.2nF2
Semiconductors
Arduino UNO1
IC CS209A Metal Detection 1
5V Buzzer1
LED Red 5mm 20mA1
LED Green 5mm 20mA1
Coil Detector 100µH, 40mm diameter, 50 turns by 0.4 mm insulated copper wire1
9V Battery1

Arduino metal detector runs on 9V battery.

Arduino makes square wave signal to power the coil.

Coil makes electromagnetic field and it changes when metal is close.

Coil is 100μH and is made from 0.4 mm copper wire with 50 turns and 40 mm wide.

When metal comes coils inductance changes.

This changes the square wave signal.

Capacitors remove noise and make signal clean.

Resistors control current so parts do not break.

Sensitivity can change using presets.

We can adjust signal strength or detection level.

Op-amp makes signal stronger and cleaner.

CS209A chip sets voltage level to check signal.

If no metal then green LED is ON.

If metal is close by then red LED is ON and buzzer makes sound.

How to Build:

To build a Metal Detector Circuit using Arduino follow the below mentioned steps:

Conclusion:

This Metal Detector Circuit using Arduino is easy and accurate project.

It uses coil, CS209A chip and Arduino to find metal.

Green light shows no metal and red light and buzzer show metal found.

This circuit is good for learning electronics and sensor projects.

References:

Metal detector with arduino

Exit mobile version