Introduction: Metal Detector

Picture of Metal Detector

Why not uncover the lost of treasures of bygone civilizations, (or perhaps forgotten goods from a beachside party) with your very own metal detector? In this Instructable, I'll show you how to build a metal detector that not only sounds when you've discovered something, but lights up as well! Using a handful of basic components and the Intel Edison, we'll build a basic detector capable of sensing metals of many sorts. You never know what valuables might be beneath your own feet...

Step 1: Parts and Materials

Picture of Parts and Materials

Intel Edison with Mini Breakout

Dotstar strip

5V 3A UBEC

logic converter

protoboard

mini toggle switch

panel-mount LED holder

(3x) 2N3904 (NPN)

(1x) 2N3906 (PNP)

(3x) 1K resistor

(2x) 10K resistor

56K resistor

220K resistor

1K8 resistor

330 ohm resistor

270K resistor

380 ohm resistor

1k potentiometer

1N4148 diode

100uF capacitor

(2x) 0.1uF capacitor

0.01uf capacitor

0.047uF capacitor

5V6 zener diode

5mm LED

6x AA battery holder (9V)

(6x) AA battery

30 AWG magnet wire

(Optional)

18 ohm resistor

8 ohm speaker

Step 2: Electrical Design

Picture of Electrical Design

Power

The entire system is powered from a 9V source provided by six AA batteries. Power for the whole unit is switched on via a mini toggle switch and indicated with a single green LED that is powered via a 1K current limiting resistor. An additional 5V rail is created by a Universal Battery Eliminator Circuit (AKA a switching regulator), which provides power for the DotStar LEDs and the Edison board (via USB). The 1V8 source is from the Edison's mini breakout pin.

Main Circuit (Blue)

The actual metal detecting circuit is a slightly modified version of this circuit. I've swapped out the transistors and tweaked a few of the resistor values. If you'd like to just build a non-illuminated detector, you can ignore the yellow elements of the schematic, but be sure to add back in the speaker and its resistor (highlighted in red).

Secondary Circuit (Yellow)

Normally, the metal detecting circuit would modulate the base of the transistor to drive a small speaker. In lieu of the audio output, I decided to add visual feedback by sensing when the transistor is pulled low. The output of the main circuit is detected by one of the Edison's digital pins as a falling interrupt (all Edison pins are interrupt capable). So, whenever the circuit is reacting to the presence of a conductive object below the coils, then Edison can properly interpret those signals. For visual feedback, I chose to use a strip of DotStar RGB LEDs, which can be quickly configured and controlled via two pins in an SPI-like fashion. The DotStars need 5V logic on the clock and data pins, so I used a simply logic level converter between the Edison (using 1V8 logic) and the LEDs.

Step 3: Electrical Assembly: Main Circuit

Picture of Electrical Assembly: Main Circuit

The bulk of the circuitry can fit onto a single "half-size" protoboard. I prefer using Adafruit's protoboards as they are reasonably priced and resemble breadboards. I began by soldering female headers for the logic converter as it is the single largest individual component and I needed to ensure I had enough space for other components. I put female header blocks on both power rails, as well as a mini screw terminal block for both the 9V rail and 5V rail. I used male headers as jumpers for later addition of the coils, potentiometer, and the Edison's digital pin. I soldered the UBEC last as it is the only large, loose component.

Step 4: Electrical Assembly: Coils

Picture of Electrical Assembly: Coils

Included in the .SVG files are paths for cutting out disks for winding the coils. The disks are aligned with matching wooden pegs that fit into slots in the center. The coils themselves are wound from 30 gauge enamel wire and are 70mm in diameter. One coils is 50 turns and the other is 70. After winding the coils, I soldered female header wires that I extended by a couple feet for attaching to the headers on the protoboard. The coils are then taped on top of one another.

Step 5: Mechanical Design

Picture of Mechanical Design

Main Body

The main body consists of interlocking pieces of 3/4" plywood with an armrest, handgrip, mount for a control box, and a frame for the coil. Although I used plywood, you could easily build a body out of PVC as well. Just be sure that the coil frame doesn't contain any conductive material!

Control Box

I designed the control to be laser-cut out of 1/4" plywood. The control box houses the battery pack, Edison, protoboard circuit. It also serves as a sturdy mounting point for the power switch, potentiometer, and LED. I've attached the vector paths as a .SVG above. A simple plastic "project box" would also make for a great control box enclosure!

Step 6: Frame Assembly: Base

Picture of Frame Assembly: Base

The base can either be nailed or glued together. The top plate has a small hole for the coil wires. The DotStar LEDs have four wires that need to be soldered: VCC, DIN, CLK, and GND. I extended these connections with wires by a couple feet and added male header for VCC and GND and used female headers for DIN and CLK. The LEDs attached to the top plate with double stick tape.

Step 7: Frame Assembly: Control Box

Picture of Frame Assembly: Control Box

The control box houses the electronics and provides a solid mounting plate for the external controls.

Baseplate - attaches via four 4-40 screws to the rear

Midplate- provides a mounting point for the Edison, battery pack, and protoboard. The Edison attaches via four 1" standoffs and is fastened with eight 4-40 screws. The battery pack attaches to the underside of the midplate and is held in place with two 4-40 screws and matching nuts. The protoboard mounts two 4-40 screws and four matching nuts (two on the underside and two below the midplate).

Faceplate- provides mounting holes for the potentiometer, LED, and powerswitch; these components pop into place and are secured with their matching nuts. The wires for the coils and DotStar strip must be fed through the hole in the faceplate prior to assembly.

Step 8: Software

Picture of Software

The software is an Arduino-style sketch running on the Edison. The program itself is fairly simple and consists of counting the interrupt state changes on the digital pin connected to the circuit. This count is mapped to the length of the strip every 30 milliseconds and the LEDs are "redrawn.

For compatibility with the Edison, I removed line 111 of Adafruit_DotStar.cpp:

"SPI.setClockDivider((F_CPU + 4000000L) / 8000000L); // 8-ish MHz on Due"

Step 9: Operation

Picture of Operation

Operating the detector is fairly simple. After turning on the power switch and verifying that it is powered on, you can begin detecting! Adjust the sensitivity with the knob as you sweep along the ground. The lights should bounce as you encounter hidden conductive objects. Happy hunting!

Comments

Vijay4567 (author)2017-10-10

Those serious for DIY of variety of MDs may revert to site "geotech1"
forum .. though not for faint hearted ... but good/easier for those
having electronics background and having basic tools like LCR meter,
oscilloscope. Many projects are complete an tested. It basically boils
down to finding some difficult to get components and for
micro-controller oriented projects the signal flow and conditioning know
how.

uzro (author)2016-08-29

很好很强大...

百澤徐 (author)2016-05-25

Why one coils is 50 turns and the other is 70 ? Why don't use the same number?

Samiraawong (author)2016-04-01

The great....

Huezzer (author)2016-01-21

Is it possible to do this with an Arduino instead? Will it be more powerful than detectors you buy?

Aleator777 (author)Huezzer2016-01-22

Yes. A regular Arduino would be better. I think any detector you'd buy would probably be better too.

T0BY (author)2015-12-08

Gadzooks! I am impressed!

Rileyowen (author)2015-11-26

The Best...

mati ur rehman (author)2015-11-07

i want to make a metal detector using tda0161, when the detector detects the metal from a specific distance the buzzer sounds but as the metal comes near and near the buzzer sound increases!!

so anyone guide me for this

i want to use this with arduino

laith mohamed (author)2015-11-01

Awesome ... i wana to make it .....go on .

L3indy1969 (author)2015-10-06

Love it.

Jonathanrjpereira (author)2015-10-05

Which circuit design software do you use in your Instructables?

Also which 3D design software do you use?

bravoechonovember1 (author)2015-07-13

found anything?

Not yet... Our local sidewalk is too full of metal to be of use. I guess I'll just HAVE to go to the beach now!

did you eventually find anything? I found a really old and really really rusty hinge in my yard a while back

jamaycob (author)2015-08-11

Isn't the Edison a bit overkill for a metal detector?

Murpheus! (author)2015-08-10

the circuit don't work..!! i checked it 3 times...
i made only the
metal detecting part and not the intel as i am gonna put LM3917 to
control the led instead of microcontroller..!!
i have the same tone...in all cases....
what is the resistance of the coils....???

have any solution...???

Aleator777 (author)Murpheus!2015-08-10

A few things to test:

first, vary the distance between the two coils

second, flip which is "on top" and try varying distance again

third, swap the coils in the circuit and repeat the previous steps.

Hope this helps! Send me a private message for more questions!

Murpheus! (author)Aleator7772015-08-11

Thank you very much for the quick respond my friend...!!
I will send you pm when i test it..!!!

Kinnishian (author)2015-07-14

Now mount it on a quadcopter and have it running laps on the beach :P

Yonatan24 (author)Kinnishian2015-08-07

You would probably need a metal detector that uses couple thousand watts to do that...

Kinnishian (author)Yonatan242015-08-07

The basic handheld generators use thousands of watts? I assume not.

Or do you mean simply because you have to be probably still 2-3 inches higher than people wave those? I assumed that regular metal detectors go at least 8 inches deep so worst case if you were 8 inches higher above the metal detector you would only require a pulse 4 times stronger (admittedly maybe that would be a lot.)

The quadcopter would benefit from close-to-ground flying anyway, it's slightly less power hungry due to ground effect.

That said if you were to point out that a ground based vehicle would be able to track the distance closer to the ground and better, while consuming less energy..you're definitively right. It was folly for me to joke about using a quadcopter, from that technical perspective..

Yonatan24 (author)Kinnishian2015-08-07

I thought you meant a quadcopter or a drone that flies like 50 meter (about 50 yards) above the sand...

acoleman3 (author)Kinnishian2015-07-14

that's actually a brilliant idea. mount it on a quadcopter and add a wireless transmitter linked to a sensor embeded in the remote.

starslayer (author)acoleman32015-07-18

Metal detectors have to be kept a very consistant distance from the ground in order to be effective. However a beach is generally quite flat, so a metal detector+RC car+servo+water soluable paint would be able to comb the beach for you and all you need to do is dig the occasional hole (though having a spot metal detector would make your holes much smaller).

WeirdAlWalker (author)2015-07-17

"You never know what valuables might be beneath your own feet..."

... or in them... I want to make this metal detector to find out if the strange object seen in a recent XRay of my foot is actually a needle, possibly inserted 40 years ago when I broke my foot at the age of 5... O.O

pfred2 (author)2015-07-13

Is this detector discriminating in any way? Can you tell the difference between metals with it? A whole computer for a metal detector seems somewhat excessive to me. What presicely does the computer do in this project?

Aleator777 (author)pfred22015-07-14

This is a basic detection circuit. You'll want into VFD type detector circuits to learn about detectors that can discriminate between metals. It's quite complex and why I opted for a simpler circuit

pfred2 (author)Aleator7772015-07-15

Living by the beach I am quite interested in making my own metal detector someday. I think I want to make one a bit less high tech than this one is though. That Intel SBC seems underutilized on this project. I think it could be made to do more.

Captain_Nemo (author)pfred22015-07-14

It runs the LED strip, that's it.

pppcoins (author)2015-07-14

This is all insurmountable to me! Don't understand any of it other than its a metal detector & I want one! So that being said my son in law can build it, I can pay for it! So I ask is it a good MD or would I be better off buying a new one @ a sporting goods,wal mart,ect. I need one that works well. I own a 20 acker Placer mine & I need one that will find coins,gold,silver,copper & platinum. However I know so little about MD.I also need one that will go @ least 1' in the ground.Would this MD do it, if not do you know of a a good one?

nickg_uk (author)pppcoins2015-07-15

Donot build this if you just want to own a metal detector. This article is for educational purposes. It's a very basic, insensitive detector and the price of components is very high for what you end up with; using a powerful Intel computer to turn on some LEDs is massive overkill and the article should make it clearer that the Edison is certainly not the ideal solution. The editor likely used it only because it already had it to hand

If you just want to get in to metal detecting, you should buy a commercial product (even a used one from eBay). Even a cheap $30 detector from Amazon is more sensitive than the one in this design but you'll have to spend quite a bit more if you want to discriminate between different metals and attempt to exclude ground-minerals.

pfred2 (author)nickg_uk2015-07-15

I had a sneaking suspicion much of what you said in your comment was the case. Thank you for verifying some of my suspicians.

glorybe (author)pppcoins2015-07-14

Minelab and White's both have a good reputation for land, nugget detectors. Unlike many other types of products you are better off spending too much on an advanced unit than saving a few hundred dollars. Kellyco is a huge seller of various brands of detectors. I have never hunted for platinum and can't make intelligent remarks about that function. I would suspect that platinum is usually found mixed with other metals. I like the Fischer 1265 with a ten inch coil for finding gold and silver jewelry. I think that unit runs about $700 and you will also need a good set of headphones to go with it. White's for gold nuggets might be best and those Minelab units seem to be winning over many users. Garret's units can also be very good in the right place.

pppcoins (author)glorybe2015-07-15

Thank You for the info! This is very helpful to me,Its also just what info I needed. Brands, models. Thank You again for the most helpful info!

pppcoins (author)2015-07-14

Also I see you say to much old tin& steel on your city lot. Well u never know till u check. In 2012 a guy found a $480,000.00 piece of gold. It was on a placer mine, however he said I almost passed on it because it sounded like junk on his MD. IT was only 2 to 3in deep. I don't think you will have that kind of luck, but you may find some silver coins or rings!

PatrickO9 (author)pppcoins2015-07-14

Even this home made unit would have been able to find that big nugget. My best advice would be to research machines and buy one based on the type of detecting you plan to do. Detectors are generally specific to different types of use such as beach hunting, nugget shooting, and coin/relics due to their operating frequencies, discrimination capability, or the ability to overcome mineral interference in soils or saltwater. I am a Garrett AT Pro user and for overall conditions it works well for me but being an all terrain machine it also has it's limitations for specific types of hunting. For mainly gold nugget hunting there are many better detectors out there...hope that helped.

pppcoins (author)PatrickO92015-07-15

Thank you for the info! Just what I needed!

rafununu (author)2015-07-15

Cool, a good start for detecting metals, but definitely too expensive for the result ! There's no need for the computer, it has nothing important to do. Take care that pin D6 could be at 9V when last transistor doesn't conduct, on a long term this could destroy the input, simply add a resistor in serie.

zmahimi (author)2015-07-15

What all dp we have to modify to be able to detect metal upto 6 feet below the ground , just curious.

Captain_Nemo (author)2015-07-14

This is a terrible Instructable. It's incomplete, parts are mission from the part list, and there's no code for the edison (which is massive overkill for running a LED strip). The $75 edison and $75 LED strip could be replaced by a $5 Arduino from eBay and hand soldered LED's (ebay, radio shack, whatever) for a grand total of no more than $10. Really disappointed in whoever puts together the Instructables newsletter.

Aleator777 (author)Captain_Nemo2015-07-14

The code is and has been on the software step. What parts do you believe are missing from the parts list?

Captain_Nemo (author)Aleator7772015-07-14

Ah, so that's where it is, hard to tell it was Edison code with the arduino logo where it is. The 2N3904 and 2N3906 transistors are missing from your parts list.

Aleator777 (author)Captain_Nemo2015-07-14

Good catch!

apapai (author)2015-07-14

How deep can it sense metals?

Aleator777 (author)apapai2015-07-14

About and inch

jimcluvs (author)2015-07-14

I'm not planning on making this. very much interested till I checked the cost of the 1st 2 items and that's over $150 bucks, So I'll just purchase a new one . But thanks for the idea..

Jim Cooper

About This Instructable

72,142views

676favorites

License:

Bio: My name is DJ and I previously made electronic whatsits, 3D-printed thingamabobs, and laser-cut kajiggers for the Instructables Design Studio; now I build and repair ... More »
More by Aleator777:MiniSub ROVBasics of Thermal ImagingMiniature Autonomous Blimp
Add instructable to: