Arduino metal detector?

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. :slight_smile:

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,
Mark

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.

http://www.google.com/search?hl=en&q=metal%20detector%20circuit%20schematic&gs_sm=c&gs_upl=1805l8242l0l21l21l2l0l0l0l252l3012l1.15.3l19&bav=on.2,or.r_gc.r_pw.&biw=1024&bih=638&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi

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.
:slight_smile: :slight_smile:

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

#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      ");
  delay(2000);
}

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

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



  lcd.setCursor(0,1);
  lcd.print("V ");
  lcd.print((sensor_count - ref_count)-offset );
  delay(50);

}

void ref_coil()
{
  ref_coil_count++;
}

void sensor_coil()
{
  sensor_coil_count++;
}

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.

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.

ellisgl:
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?

The Chance schematic. I'm looking over some Stuart 1 and 2 schematics right now.
http://sjeffroy.free.fr/DetectPI/detectpi.html

http://www.geotech1.com/forums/showthread.php?t=8152&page=2

Oh Ok :slight_smile:

The stuart detectors won't discriminate between different metals. I have built the first version a while back. The Chance detector uses a ATMega8 to investigate the decaying coil voltage. From this we can deduct what type of metal is under the coil. You don't want to dig for iron!

joop:
The stuart detectors won't discriminate between different metals. I have built the first version a while back. The Chance detector uses a ATMega8 to investigate the decaying coil voltage. From this we can deduct what type of metal is under the coil. You don't want to dig for iron!

Are you sure about that? Digging up a nice old cannon would be worth it. =)

yeah, but digging for rusted nails isn't fun when you want to find a nice old coin.

Yeah that would suck.


This russian project on PIC12F629 controller. Maybe use Arduino ?