Stufin
Home Quick Cart Profile

Metal Detector Sensor Module

Buy Now on Stufin

Operating Voltage

5V DC

Operating Current

20mA

Detection Range

Up to 5 cm (2 inches)

Sensitivity Adjustability

Onboard potentiometer

Digital Output

TTL level (0-5V)

Output Pulse Width

50-100ms

Response Time

<50ms

Operating Temperature

-20C to 70C (-4F to 158F)

Storage Temperature

-40C to 85C (-40F to 185F)

Dimension

30mm x 20mm x 10mm (1.18in x 0.79in x 0.39in)

Applications

  • Robotics: Metal detection in robotic arms and grippers.
  • Security Systems: Detection of metal objects in security screening applications.
  • Industrial Automation: Detection of metal parts in manufacturing and quality control processes.
  • Hobbyist Projects: Treasure hunting, metal detection robots, and other creative projects.

Conclusion

The Metal Detector Sensor Module is a versatile and reliable component for detecting metal objects in various applications. Its high sensitivity, adjustability, and compact design make it an ideal choice for developers and engineers seeking to integrate metal detection capabilities into their projects.

Pin Configuration

  • Metal Detector Sensor Module Documentation
  • Pinout Explanation
  • The Metal Detector Sensor Module has 5 pins, which are used to connect the module to a microcontroller or other devices. Here's a detailed explanation of each pin:
  • Pin 1: VCC
  • Function: Power Supply Pin
  • Description: This pin supplies the operating voltage to the metal detector sensor module.
  • Recommended Voltage: 5V DC
  • Note: Make sure to provide a stable 5V DC power supply to the module for proper operation.
  • Pin 2: GND
  • Function: Ground Pin
  • Description: This pin is connected to the ground of the power supply or the circuit.
  • Note: This pin provides a return path for the current and helps to complete the circuit.
  • Pin 3: OUT
  • Function: Output Pin
  • Description: This pin provides a digital output signal indicating the presence or absence of metal.
  • Output Logic:
  • + High (H) when metal is detected
  • + Low (L) when metal is not detected
  • Note: The output signal is typically active high, meaning it will go high when metal is detected.
  • Pin 4: SEN
  • Function: Sensitivity Adjustment Pin
  • Description: This pin is used to adjust the sensitivity of the metal detector sensor.
  • Connection: Connect a potentiometer or a variable resistor between VCC and SEN pins to adjust the sensitivity.
  • Note: Adjusting the sensitivity allows the user to fine-tune the detection range and accuracy of the metal detector.
  • Pin 5: NC
  • Function: Not Connected
  • Description: This pin is not connected internally and should be left unconnected.
  • Connection Structure
  • Here's a step-by-step guide to connecting the Metal Detector Sensor Module:
  • 1. Power Supply Connection
  • Connect the VCC pin to a 5V DC power supply.
  • Connect the GND pin to the ground of the power supply or the circuit.
  • 2. Output Connection
  • Connect the OUT pin to a digital input pin of a microcontroller or other devices.
  • 3. Sensitivity Adjustment Connection
  • Connect one end of a potentiometer or variable resistor to the VCC pin.
  • Connect the other end of the potentiometer or variable resistor to the SEN pin.
  • 4. Leave NC Pin Unconnected
  • Do not connect the NC pin to any other pin or component.
  • Important Notes
  • Make sure to handle the module with care to avoid damage or electrostatic discharge.
  • Use a stable power supply to ensure accurate and reliable operation of the metal detector sensor module.
  • Adjust the sensitivity of the module according to the specific application and requirements.
  • Consult the datasheet and user manual for more information on the metal detector sensor module and its applications.

Code Examples

Metal Detector Sensor Module Documentation
Overview
The Metal Detector Sensor Module is a highly sensitive and accurate sensor module designed to detect the presence of metals and other ferrous materials. It is widely used in various applications such as security screening, treasure hunting, and industrial automation. This module is based on the principle of electromagnetic induction, where a coil is used to generate a magnetic field that interacts with nearby metals.
Technical Specifications
Operating Voltage: 5V
 Operating Current: 20mA
 Detection Range: Up to 5cm
 Sensitivity: Adjustable
 Output: Digital (TTL)
 Interface: 3-pin (VCC, GND, OUT)
Code Examples
### Example 1: Basic Metal Detection using Arduino
In this example, we will use the Metal Detector Sensor Module with an Arduino board to detect the presence of a metal object.
Components:
Metal Detector Sensor Module
 Arduino Board (e.g. Arduino Uno)
 Breadboard
 Jumper Wires
Code:
```c
const int metalDetectorPin = 2;  // Connect the OUT pin of the sensor module to digital pin 2 of the Arduino
void setup() {
  pinMode(metalDetectorPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int metalDetected = digitalRead(metalDetectorPin);
  if (metalDetected == HIGH) {
    Serial.println("Metal detected!");
  } else {
    Serial.println("No metal detected.");
  }
  delay(500);
}
```
Explanation:
In this example, we connect the OUT pin of the Metal Detector Sensor Module to digital pin 2 of the Arduino. We then use the `digitalRead()` function to read the output of the sensor module. If the output is HIGH, it indicates the presence of a metal object, and we print "Metal detected!" to the serial console. Otherwise, we print "No metal detected."
### Example 2: Metal Detection with LED Indication using Raspberry Pi
In this example, we will use the Metal Detector Sensor Module with a Raspberry Pi to detect the presence of a metal object and indicate the result using an LED.
Components:
Metal Detector Sensor Module
 Raspberry Pi (e.g. Raspberry Pi 3)
 Breadboard
 Jumper Wires
 LED
 Resistor (1k)
Code:
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
metalDetectorPin = 17  # Connect the OUT pin of the sensor module to GPIO 17 of the Raspberry Pi
LEDPin = 23  # Connect the LED to GPIO 23 of the Raspberry Pi
GPIO.setup(metalDetectorPin, GPIO.IN)
GPIO.setup(LEDPin, GPIO.OUT)
while True:
    metalDetected = GPIO.input(metalDetectorPin)
    if metalDetected:
        GPIO.output(LEDPin, GPIO.HIGH)
        print("Metal detected!")
    else:
        GPIO.output(LEDPin, GPIO.LOW)
        print("No metal detected.")
    time.sleep(0.5)
```
Explanation:
In this example, we connect the OUT pin of the Metal Detector Sensor Module to GPIO 17 of the Raspberry Pi, and the LED to GPIO 23. We use the `GPIO.input()` function to read the output of the sensor module, and the `GPIO.output()` function to control the LED. If the output is HIGH, we turn on the LED and print "Metal detected!" to the console. Otherwise, we turn off the LED and print "No metal detected."