Metal Detector using Arduino DIY

Building Metal Detector with Arduino and  Colpitts Oscillator

Let’s try something innovative for a change, build a DIY metal detector using arduino and with the help of Colpitts oscillator. For those who love mechanical things doing at home, this informative article is a must read for all of you.

1. The working of DIY Metal Detector using Arduino:

A tank circuit is formed with the series of capacitor and inductor in the circuit shown below.

Tank Circuit (Metal Detector using Arduino)
Figure 1: A Tank Circuit

The feature of a tank circuit is that the capacitor and inductor transfer energy repeatedly in a tank circuit that results in oscillation. Current released from the capacitor moves through the inductor, when the capacitor is totally released, the inductor’s diminishing magnetic field keeps up the present stream. The capacitor will then accuse of the inverse extremity, and when the magnetic field has totally fell, the capacitor will release, bringing about current stream toward the path inverse to that of the first present. This cycle will continue to proceed.

Inductor in Tank Circuit:

The inductor of the above mentioned tank circuit actually makes the detector part of the metal detector (an expansive curl of wire). At the point when metallic material meets the focal point of the inductor (the inductor curl), it enters the magnetic field made by the inductor. These progressions continue the magnetic penetrability of the inductor’s core, making the inductance to change. The variation in inductance, thus, changes the oscillating frequency of the tank circuit.

Colpitts Oscillator (Metal Detector using Arduino)
Figure: Colpitts Oscillator

If the parts were perfect, the tank circuit would oscillate inconclusively without an outer power source. But, in reality, the parts are non-perfect. The undesirable resistance of the parts will present loss of energy, making the oscillating current decrease to a stop. To counter this, an exclusive single stage Bi-polar Junction (BJT) inverting amplifier is utilized to consistently include gain factor into the tank circuit.

Colpitts Oscillator:

The oscillation of each node before and after the inductor is almost 180 degrees out of phase, the transistor base will receive oscillation from one node, the collector will amplify the signal and invert it and it will return in phase to the other node of the tank circuit. This circuit is known as Colpitts Oscillator.

Colpitts Oscillator Working:

The Colpitts oscillator has the ability of providing a smooth oscillation in the range of 100 kHz frequency. Metals from home appliances change the penetrability of the inductor core will oscillate this frequency around 10kHz. Since this frequency range cannot be heard by the humans as it’s outside of their hearing range (i.e., 20Hz to 20 kHz), we should make an interpretation of the oscillation into a perceptible tone.

Conventional beat-frequency oscillator (commonly known as BFO) metal detectors defeat this issue by consolidating another tank circuit with a settled frequency equivalent to the frequency of the tank circuit without the impact of any metals. At that point, taking the difference between the two frequencies will separate the fluctuating frequencies of the indicator circuit and take it down to a level capable of being in the hearing range.

For this project, we utilized an Arduino platform instead of another tank circuit to process the oscillation signal. The Arduino stores the settled frequency in its memory and consistently relating the approaching detector frequency with the stationary frequency.

2. Materials:

For the following project, to house all the products, a toy weed whacker was selected. It has all the below mentioned features.

  • An on/off button, it will trigger the speaker once repurposed.
  • A side button, for setting the frequency.
  • A compartment that will have the batteries with ON/OFF Switches
  • A speaker to play the tone.
  • A motor to activate the LEDs to notify once the frequency difference exceeds the set frequency threshold.
  • A circular head to fit the coil.
Weed Whacker as Metal detector using Arduino
Figure: Weed Whacker as Metal detector

A potentiometer to adjust the sensitivity of tone changes

The inductor curl is produced by using approximately 50 wraps of 26 AWG wire around a 5.5 inches diameter spool.

Inside the circuit board, we replaced the first circuit board with our own circuitry and joined all of the outer parts to the main circuitry with stick headers.

3. Circuit:

We utilized an Arduino UNO to program a DIP ATMega328. We expelled the ATMega328 from the circuit board and implanted it into a perfboard alongside the remaining parts of the circuit.

Metal Detector Schematic using Arduino
Figure: Metal Detector Schematic using Arduino

The Colpitts oscillator, placed on the base left on the graph, encourages the oscillation into counter 1 (pin T1) of the chip (set apart as digital pin 5 on the Arduino UNO), where it continually checks the oscillation frequency.

On the top level of the above schematic diagram, a power supply of 4.5V (3 batteries, along with bypass capacitors) is utilized to energize the ATmega328, oscillator, speaker, and an electric motor (with LEDs).

To keep the microcontroller’s pins electric current draw at a protected level (40 mA for each pin for the ATmega328), and a N-channel MOSFET (SUB45N03) to drive the electric motor, a NPN transistor (C2878) is utilized to drive the speaker.

Both the reset and the trigger buttons are wired to digital pins utilizing inside design configuration. Little capacitors are included in parallel fashion to denounce the switches.

The potentiometer is set up just like a voltage divider, and the division is observed using a simple pin.

4. Conclusion:

Since it has a low sensitivity and a high sensitivity detector chip, it can perform on both end and detect foils and metal like cans, cell phone and iron rods just within the range of its coil in its lowest sensitivity setting and in high sensitivity setting, little things like rings, screws and coins can be detected within its proximity. You can look at several videos available on YouTube for a little more closure.

If you want to extend its range, you can do so by increasing the magnetic field of the inductor. All you have to do is to increase the flow of the current through the inductor, just increase the number of wire wraps in the inductor and it’ll be increased automatically.

Using Arduino detector helps to perform lots of interesting tasks that cannot be done using other conventional detectors.

Feel free to contact us or comment below for help and don’t forgot to share with friends. Stay tuned for more projects and DIYs. Like our facebook page for more updates.

There are more interesting projects using microcontrollers and Arduino.

3 thoughts on “Metal Detector using Arduino DIY”

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.