Como projetar um detector de metais RLC baseado em Arduino usando um sensor RC-A-354

How to design an Arduino based RLC metal detector using an RC-A-354 sensor

Metal detectors offer several useful applications. Some examples include:

  • Security checks
  • Positioning detection for production equipment
  • Elevator floor control
  • Mineral prospecting
  • Unearthing relics and artifacts
  • Collecting traffic statistics
  • Metal waste detection
  • Game entertainment

Each detection circuit employs different electronic components and designs. A simple metal detector can be built using an RLC circuit.

In this project, we will design a metal detector using an RC-A-354 metal sensor – which also uses an RLC circuit for metal detection.

How metal detectors work
Although there are different designs, a metal detector essentially consists of two coils of wire (where one is a transmitter and the other is a receiver). When current flows through a coil, a magnetic field is generated around it.

In a metal detector, current spikes pass through the transmitter coil. As the detector moves over the ground or objects, the magnetic field also moves with it.

When the transmitting coil is close to a metallic object, an eddy current is induced in the metallic object due to the magnetic field of the transmitting coil. This current produces another magnetic field around the metallic object, which is detected by the receiving coil.

When a magnetic field is induced in the receiving coil, a voltage is generated across it and a current flows through it. The receiving coil is connected to a circuit that measures any change in the magnetic field, which indicates the presence of current in the receiving coil – triggering a buzzer or speaker.

Metal detectors are used to locate metallic objects or identify specific metals. The detector consists of a portable unit with a sensing probe. Typically, the sensor probe houses the transmitter and receiver coils. The other part of the unit houses the magnetic field measurement circuit and an indicator, which can be an LED light, a buzzer or speakers.

The RC-A-354 sensor
The RC-A-354 sensor is a popular metal detector that uses an RLC circuit. It can search for metals up to a distance of 3 cm. In this range, it is useful for security checks or metal waste collection.

This sensor has a copper coil about one meter long that serves as an inductor. He has:

  • Two capacitors: 100 and 47uF
  • An IC NE555
  • A 5K potentiometer
  • Two IN4148 diodes
  • LED indicators
  • A bell

The RC-A-354 operates via a 5V~9V DC power supply, which means it can be powered by a battery or a microcontroller such as Arduino.

The IC NE555 works as a square wave generator, which produces pulses. The sensor circuit is responsible for metal detection and is an RLC network formed by the inductor coil, a resistor and a capacitor. The sensor module includes a 5K potentiometer that is used to adjust the range (up to 3cm).

When the RC-A-354 sensor is connected by the DC source, a green LED lights up and the NE555 generates current peaks in the transmitter coil. These alternating pulses create a magnetic field in the transmitter coil. When the sensor is close to a metallic object, this magnetic field induces an eddy current.

The metallic object produces another magnetic field – when close to the coil, but not directly in the center of it (or detection will not occur). This secondary magnetic field is detected by the receiving coil, which triggers the buzzer.

The sensor module has an additional transistor circuit that drives the LED indicator. The indicator turns RED when metal is detected. Otherwise, it remains off.

The module also has an output header, which connects to a microcontroller or application-based circuit. The output is active HIGH. (When the sensor detects metal, the output is set to HIGH. Otherwise, it remains LOW.

Logical output can be useful in several situations. For example, if you are designing a robot to collect metal waste from a garden, the output can be used to stop the robot and activate a crane.

For this project, we will flash an LED light for a similar situation.

Required components

1. Arduino UNO x1
2. RC-A-354 metal sensor x1
3. 9V battery x1
4. LEDx1
5. Resistance 330Ω x1
6. Test board x1
7. Connecting wires or jumper

Circuit Connections
To begin, connect a 9V battery to the DC power of the RC-A-354 sensor. On the sensor output terminal, connect the output to Arduino pin 2 and GND to any of the Arduino ground pins.

Then, connect an LED to pin 3 of the Arduino with a 330Ω current limiting resistor in series. Remember to adjust the potentiometer on the sensor module according to the required range.

Arduino Sketch

const int metalSensor = 2;
const intLED = 3;

empty Flash_LED {
for(int i = 0; i<10; i++)
{
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
}
empty configuration {
pinMode(metalSensor, INPUT_PULLUP);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
Serial.begin(9600);
}

empty loop {
if(digitalRead(2) == HIGH)
{
Blink_LED ;
Serial.println(“Metal detected!!”)
}
other
{
digitalWrite(LED, LOW);
}

How it works
When the search probe moves close to a metallic object, the RC-A-354 sensor emits a “beep” via the integrated buzzer and a green LED starts flashing. The buzzer is already connected inside the sensor module, so there is no need to connect it to the Arduino to receive this indication.

The sensor has a logic output, which is active HIGH. This output is used to blink the LED whenever the sensor detects a metallic object. The LED on the breadboard is wired so that it lights up when it draws current from the Arduino pin via HIGH logic. It turns off when the Arduino pin has a LOW logic output.

The code
The sketch begins by assigning a pin to the LED output. This pin is also connected to the RC-A-354 sensor output.

The Blink_LED function is defined to “blink” the LED. In the setup function, the sensor pin is configured as input and the LED pin is configured as output. The LED is turned off by writing a logic LOW on the LED pin.

The baud rate for serial messages is set to 9600 bps. In the loop function, the logical output of the metal detector sensor is monitored in an “if” clause. If the Arduino detects a HIGH on the sensor, the Blink_LED function will be called and a message “Metal Detected!!” is serially printed. Otherwise, the flashing LED remains off.

Result is

(tagsToTranslate)Arduino

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.