Site icon Circuit Ideas for You

Metal Detector Circuit using Arduino

Metal detectors are devices that use electromagnetic fields to find metal items in the surroundings.

Making a metal detector can be fun for people who like electronics.

We can build a metal detector using an Arduino, a special chip called CS209A, LEDs, a buzzer, and other parts.

This detector will use LEDs and sounds to show us if there is metal nearby.

The proximity detector IC CS209A is used in the Arduino metal detector circuit in this article.

CS209A is a chip that is good for finding things that are close and detecting metal.

Coding with Explanation:

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

Explanation:

Circuit Working:

Parts List:

ComponentSpecificationQuantity
Arduino UNO1
IC CS209AMetal Detection IC1
5V Buzzer1
LED Red 5mm 20mA1
LED Green 5mm 20mA1
Coil Detector100µH, 40mm diameter, 50 turns by 0.4 mm insulated copper wire1
Preset 10k1
Resistor 10k 1/4 watt1
Resistor 1k 1/4 watt2
Capacitor 10µF1
Capacitor 2.2nF2
9V Battery1

The Metal Detector Circuit using Arduino is powered by the 9V battery.

The coil detector is powered by a square wave signal produced by the Arduino microcontroller.

An electromagnetic field produced by the coil detector interacts with metal items.

The sensor coil 100μH is composed of 0.4 mm insulated copper wire with 50 turns and a 40 mm diameter.

The coils inductance varies in response to the detection of a metal item, which modifies the square wave signals amplitude.

In order to provide a cleaner and more dependable detection, capacitors are employed to filter out undesired noise and interference from the incoming signal.

Resistors are used to restrict the amount of current that passes through parts, guarding against damage and guaranteeing correct operation.

The metal detectors sensitivity may be adjusted with presets.

You may modify the threshold for detection or the oscillating signals amplitude by changing the resistance value.

The op-amp circuit is used to filter and amplify the signal.

The IC CS209A reference sets a threshold voltage that the amplified signal is compared to.

The Arduino activates if there is no metal near sensor coil the LED green will glow, if you bring metal near to coil the LED red will glow and buzzer will make noise.

How to Build:

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

Conclusion:

Detecting metallic items is made easy and accurate with this metal detector circuit that uses an Arduino board and the CS209A integrated circuit.

The detection is dependable since it makes use of a coil, signal conditioning elements, and the CS209A IC.

The circuits usefulness is improved by the Arduinos processing of the signal and provision of both visual and auditory feedback.

This project offers a basis for future research into metal detection and sensor-based applications in addition to being a useful example of electronics and programming in action.

References:

Metal detector with arduino

Exit mobile version