Go Down

Topic: Arduino metal detector? (Read 27 times) previous topic - next topic


Anyone tried using an Arduino board to build a metal detector? Thinking about a pulse-induction type detector.

Would be nice as an open source project, with the code to be downloaded and modified to your needs. Maybe even with a custom arduino shield.


I am interested in doing this as well. I was considering building a large loop pulse induction metal detector. I have found several diagrams and kits for use, I have not had time yet to put the components together. I live near several historic neighborhoods which are being redeveloped and would love to be able to scan the grounds for artifacts before they end up with condos on top of them. If I come up with something I will definitely post it.


Thanks for the reply!

I have been looking into several existing designs. Some of them are using either a pic or avr processor for timing. Timing is used for adjusting the pulse length and frequency which is send to the search coil, controlling the switches and adjusting the waiting time after a pulse is finished. I guess the arduino's analog input could be used for measuring the detected signal.

Here is a block basic diagram which I took from the geotech site. It certainly looks feasible.  :)


   I don't know what info you are looking for but, looking at the block diagram I see a few things of note.

1.) TR4 it the power transistor that charges the coil
2.) The clock frequency device that feeds TR4 could be replaced by your Arduino clocked output.
3.) The received or "bounced" signal that would come back from the coil will be AC therefor part of the circuit amplifies it and then biases it to a DC signal to facilitate measuring.

I am just  a hobbyist so, I could be in error on somethings,


   I should also say that the Diagram is a little vague as to what kind of chips they are using to do the filtering. So with a quick Google search I found some more diagrams that tell you exactly what is needed to make a metal detector circuit.

The only problem is that there are many to chose from.



Okay, let me clarify my choice for a pulse induction type of detector.

There are basically 3 types of metal detectors:

  • The BFO detector. Advantage: simple design, works by detuning an oscillator when a metal object is nearing the coil. Major drawback: bad recovery depth because of the high frequency used (around 100 kHz).

  • The VLF or induction balance detector. Advantage: deep recovery (up to 30 cm) with a small coil. Typically uses a frequency between 5 and 15 kHz. Can discriminate between different kinds of metal. Disadvantage: complex electronics, designing and constructing the search coil is hard.

  • The pulse induction detector. Advantage: simple search coil, easy integration of a microprocessor and deep recovery. Major disadvantage: hard to discriminate between different kind of metals, this is where the challenge lies.

The pulse induction detector sends out a short pulses into the ground, thereby magnetizing any metals. The induced current inside the metal is measured by the same coil which sends out the pulse.

@Mark: your explanation of the diagram sounds right to me.


I came to know that PI technology uses -
1 a pulse to coil to form the magnetism in coil and the the object to be checked.
2 an opposite pulse to make the magnetism in the coil to die
3 then measuring of the amplitude of magnetism in the object by the same coil.

if so and i am not mistaken,
an analog write in some positive value,then an analog write in same value in negetive.now an analog read will give the system working.

i am a newbie,so pls help me.
:) :)


Nov 16, 2011, 08:15 pm Last Edit: Nov 16, 2011, 08:16 pm by joop Reason: 1
Hello myfaithnka,

I think it can be much simpler than this. You can use a digital output to create a pulse. The pulse will drive a high power transistor or fet which is connected to the coil. This transistor is powered from some external power source because we need a strong pulse. After the pulse is switched off, we wait a while and amplify the resulting signal with an opamp. This signal is digitized and connected to a digital input.

I came across the chance metal detector, it is a russian design and uses an ATMEGA8. Circuit diagram attached.


I have made a couple of metal detector circuits controlled by the Arduino

The simplest one is a self oscillating circuit that I adapted from a BFO circuit

The outputs are run to pins 2 and 3 and the pulses counted

Code: [Select]

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
//LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//  LiquidCrystal lcd(2, 3, 6, 7, 8, 9);
  LiquidCrystal lcd(10, 4, 6, 7, 8, 9);

volatile unsigned int ref_coil_count;
volatile unsigned int sensor_coil_count;

void setup() {

  attachInterrupt( 0, ref_coil, RISING );
  attachInterrupt( 1, sensor_coil, RISING );

  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
  // Print a splash screen to the LCD.
  lcd.print("detector Test");
  lcd.setCursor(0, 1);
  lcd.print("      v1.0      ");

void loop() {
  int offset;
  long ref_count;
  long sensor_count;
  ref_coil_count = 0;
  sensor_coil_count = 0;
  ref_count = ref_coil_count;
  sensor_count = sensor_coil_count;
  offset = analogRead(A0)-512;

  lcd.setCursor(0, 0);
  lcd.print("R ");
  lcd.print(" S ");

  lcd.print("V ");
  lcd.print((sensor_count - ref_count)-offset );


void ref_coil()

void sensor_coil()

I was using a 10k pot to adjust the balance between the coils via the analog in.


The next one that I have built (but not with the intent of using is as a metal detector) is this one


It's an LC meter but by it's nature is actually a pulse induction detector.

Because the presence of metal objects in the coils area of influence the coils inductance changes and this shows up as a change in the pulse width detected by the Arduino.


Thanks for sharing, I have also built the LC meter. It works very well.

On the howstuffworks website there is a good explanation of pulse induction detectors. We need to look at the decay of the coils pulse. This will indicate what kind of metal is buried.


Nov 22, 2011, 10:46 pm Last Edit: Nov 22, 2011, 10:48 pm by ellisgl Reason: 1
I'm going over the schematic and thinking you could free up your ADCs and PWMs if you used an i2c connection for the LCD. Of course I didn't see any C code to help figure out what he's doing though.


I'm going over the schematic and thinking you could free up your ADCs and PWMs if you used an i2c connection for the LCD. Of course I didn't see any C code to help figure out what he's doing though.

Which one are you talking about?



Go Up