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 and we can make it using Arduino, CS209A chip, LEDs, buzzer and some other parts.

Furthermore, LED and buzzer will show when metal is close, also this project use CS209A chip with Arduino, as this CS209A is good chip for finding metal and nearby things.

Arduino Code:

// 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.
}

Circuit Working:

Metal Detector Circuit Diagram using Arduino

Parts List:

ComponentsValuesQuantity
Resistors10k 1/4 watt1
1k 1/4 watt2
Preset 10k1
CapacitorsElectrolytic 10µF 25V1
Ceramic 2.2nF2
SemiconductorsArduino 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 and it makes square wave signal to power the coil; coil makes electromagnetic field and it changes when metal is close.

The coil has an inductance of 100 μH and uses 0.4 mm copper wire with 50 turns and a 40 mm width.

When metal comes coils inductance changes and this changes the square wave signal.

Also, capacitors remove noise and make signal clean and then resistors control current so parts do not break.

Sensitivity can change using presets and also we can adjust signal strength or detection level.

Op-amp makes signal stronger and cleaner and CS209A chip sets voltage level to check signal.

Finally, the green LED turns ON when no metal is detected and the red LED turns ON when metal is nearby.

The buzzer also sounds when metal is detected.

How to Build:

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

Conclusion:

Overall, this Metal Detector Circuit using Arduino is easy and accurate project, as it uses coil, CS209A chip and Arduino to find metal.

Furthermore, green light shows no metal and red light and buzzer show metal found, therefore, this circuit is good for learning electronics and sensor projects.

Exit mobile version