Technology | Arduino Precise Metal Detector | Phase 1

Posted by:

|

On:

|

Credit to TechKiwiGadgets Eco Friendly Metal Detector – Arduino : 8 Steps (with Pictures) – Instructables for the idea.

The design includes multiple channels (four in this case) and components such as inductors, transistors, diodes, and operational amplifiers. Here’s a detailed explanation of how the circuit works:

Overview

The circuit uses an Arduino to control and process signals from multiple metal detection channels. Each channel can detect the presence of metal through changes in inductance. The system includes an audio output for feedback.

Components

  1. Inductor (L) and Capacitor (C): These form a tank circuit that resonates at a specific frequency. When a metal object comes close, it changes the inductance, altering the resonant frequency.
  2. Transistor (BC548): Used to amplify the signal from the tank circuit.
  3. Diode (1N4148): Ensures that the amplified signal is rectified.
  4. Operational Amplifier (LM339): Configured as a comparator to detect changes in the signal from the tank circuit.
  5. Piezo Buzzer: Provides audio feedback when metal is detected.
  6. Arduino: Reads the output from each channel and processes it to control the buzzer and other outputs.

How It Works

Channel Description

Each channel (Channel 1 to Channel 4) operates similarly:

  1. Tank Circuit: The inductor (40 turns of copper wire) and capacitor (0.047µF) form a tank circuit connected to the transistor (BC548).
  2. Amplification: The transistor amplifies the oscillating signal from the tank circuit.
  3. Rectification: The diode (1N4148) rectifies the amplified signal.
  4. Comparison: The operational amplifier (LM339) compares the rectified signal with a reference voltage set by a voltage divider (10k and 1M resistors).
  5. Output to Arduino: The comparator’s output goes to an Arduino digital pin (D8 for Channel 1, D10 for Channel 2, etc.). The Arduino processes these signals to determine if metal is detected.

Signal Processing

  • Arduino: The Arduino reads the digital signals from the comparators. When metal is detected, the change in inductance alters the resonant frequency, which is detected by the comparator and sent to the Arduino.
  • Audio Feedback: The Arduino controls a piezo buzzer connected to pin D9, providing audio feedback when metal is detected. It can also control other outputs like an LED or a display if programmed.

Power Supply

  • Power Source: The circuit is powered by a rechargeable USB power bank (5V, 4400mAh).
  • Voltage Regulation: The Arduino regulates the voltage to ensure stable operation of the components.

Schematic Details

  • Channels 1 to 4: Each channel is connected to different digital pins on the Arduino (D8, D10, D12, D14).
  • Audio Output: The output signal from the Arduino (pin D9) goes through a capacitor (0.1µF) to a piezo buzzer, producing sound when metal is detected.
  • Common Power and Ground: All channels share the same power supply (+5V and ground).

Assembly

  • Breadboard or PCB: The circuit can be assembled on a breadboard for prototyping or a PCB for a more permanent solution.
  • Arduino Code: The Arduino needs to be programmed to read the digital signals, process them, and control the buzzer accordingly.

Now, on to modifying it a little bit for our needs. The basic idea (needs to be confirmed) to customize the schematic to send the signal via WiFi when metal is detected, I can integrate a WiFi module, such as the ESP8266 or ESP32, with the Arduino. Here’s an overview of the modifications:

Components Needed

  1. WiFi Module (ESP8266 or ESP32)
  2. Logic Level Converter (if needed, for voltage compatibility)
  3. Power Supply adjustments

Steps to Integrate WiFi Module

  1. Connect the WiFi Module to Arduino:
    • ESP8266: Connect the RX and TX pins of the ESP8266 to the appropriate digital pins on the Arduino (e.g., D2 and D3), ensuring correct voltage levels (ESP8266 operates at 3.3V).
    • ESP32: Directly connect the RX and TX pins to the Arduino, if using a 3.3V Arduino board; otherwise, use a logic level converter.
  2. Modify the Arduino Code:
    • Include libraries for WiFi and HTTP communication.
    • Write code to send HTTP requests or data packets to a server or IoT platform when metal is detected.
  3. Power Supply:
    • Ensure the power supply can handle the additional current requirements of the WiFi module.
      • I believe 0.5A would be fine, but shooting for 1A
    • Use a 3.3V regulator for the ESP8266, if necessary.

Circuit Diagram

Here’s a textual description of the updated schematic:

  1. Channels: Same as before, each channel detects metal presence and sends a signal to the Arduino digital pins (D8, D10, D12, D14).
  2. WiFi Module:
    • ESP8266:
      • Connect TX of ESP8266 to a logic level converter (LLC) to step down from 5V to 3.3V.
      • Connect RX of ESP8266 to Arduino pin D2 through LLC.
      • Connect TX of Arduino to RX of ESP8266 through LLC.
      • Connect the 3.3V and GND pins of ESP8266 to 3.3V power supply and ground.
  3. Power Supply:
    • Adjust power supply to provide both 5V for the Arduino and 3.3V for the ESP8266 using a regulator.
ComponentArduino PinDescription
Inductor (Channel 1)D8Connects to inductor and tank circuit for Channel 1
Inductor (Channel 2)D10Connects to inductor and tank circuit for Channel 2
Inductor (Channel 3)D12Connects to inductor and tank circuit for Channel 3
Inductor (Channel 4)D14Connects to inductor and tank circuit for Channel 4
Comparator Output (Channel 1)D8Receives signal from comparator for Channel 1
Comparator Output (Channel 2)D10Receives signal from comparator for Channel 2
Comparator Output (Channel 3)D12Receives signal from comparator for Channel 3
Comparator Output (Channel 4)D14Receives signal from comparator for Channel 4
Piezo BuzzerD9Provides audio feedback when metal is detected
WiFi Module RXD3Receives data from WiFi module
WiFi Module TXD2Sends data to WiFi module
Power Supply (5V)5VMain power supply for Arduino and components
Power Supply (3.3V)3.3VPower supply for WiFi module

Discover more from BunchFin

Subscribe to get the latest posts sent to your email.

Posted by

in