Pages: 1 2 [3] 4   Go Down
Author Topic: Arduino metal detector?  (Read 23181 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Hamradio callsign: PG4I
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for sharing! What kind of distances can you detect in air? Is there a possibility to discriminate aluminum foil?

I am working on a pulse-induction type detector with arduino, but it's far from ready.

Regards,
Joop
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for sharing! What kind of distances can you detect in air? Is there a possibility to discriminate aluminum foil?

When I have the coils well-balanced, I can detect a 22mm copper olive at 200mm. You didn't say what you want to discriminate aluminium foil from, however I find that the phase shift is around -45 degrees for thin aluminium (a foil tray that a mince pie came in last Christmas), compared to around -90 degrees for the copper olive or thick aluminium.

I am working on a pulse-induction type detector with arduino, but it's far from ready.

I tried using pulse induction too, however I didn't manage to get anything like the same sensitivity. First I tried measuring the decay time to a fixed level using the analog comparator and input capture; then I tried integrating the decay signal and measuring the result using an analog input. The first didn't work well because the analog comparator is too slow and the timing resolution of a 16MHz Arduino is only 62.5ns. The second was more promising, but needs some improvements. It needed a wideband op amp for the integrator to work well with such a short pulse. The gating used to gate the signal to the op amp was critical, because capacitance in the gate was feeding part of the gate signal through to the integrator, adding to the decay signal that I was trying to integrate. Maybe I can get it working better by improving the gating.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When watching "Time Team" series it seems all the treasures are laying up to 200mm down in the UK's soil..
« Last Edit: August 13, 2013, 06:52:21 am by pito » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I read somewhere that the depth at which you can detect small objects is typically about the same as the search coil diameter. So if I used a bigger coil, then presumably I would be able to detect objects at greater depths. Is this correct?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So with 6300km coil diameter you can detect the Earth's iron core then? smiley
Logged

Lacey, Washington, USA
Offline Offline
Edison Member
*
Karma: 154
Posts: 2231
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A small piece of magnetized steel suspended on a string suffices to detect the Earth's iron core. ;')

I'm thinking of making the construction of an Arduino based metal detector a project for the local maker club. VLF, probably.
Logged

Steve Greenfield AE7HD
CET Consumer Electronics and Computer
Please don't read your attitudes into my messages

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So with 6300km coil diameter you can detect the Earth's iron core then? smiley

Yes, but you might have some trouble finding enough power to drive the coil. smiley-mr-green
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm thinking of making the construction of an Arduino based metal detector a project for the local maker club. VLF, probably.

What do you think is the best user interface? I've never used a modern commercial metal detector. I'm thinking that it needs some sort of sound in a headset or earpiece, and that sound should convey both how strong the signal is and what its phase is. Also some sort of non-annoying sound the rest of the time to let you know that it is working, such as a short blip once a second.

For the controls, I was thinking of either:

1. Just a potentiometer to set the detection threshold, a push-button to recalibrate to zero, an on/off switch, and use a fixed phase discrimination threshold.

2. A rotary encoder with in-built push-button. The push button would be used for calibration (short press), menu selection (medium press) allowing the phase and amplitude thresholds to be adjusted, and on/off (long press for off). The rotary part would be used for amplitude and phase sensitivity adjustment. A 128x64 gLCD would be used both to show the current parameters and a history of what the signal has been for the last few seconds.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally started getting good results with pulse induction too. It turned out that I hadn't been putting enough current through the coil. I increased the current from 0.5A to 2A and it has become more sensitive. It took me a while to realize that doubling the current does not double the time taken for the back emf to decay sufficiently to allow the induced field from the target to be measured, but does double the induced field in the target. Since the induced field in the target decays more slowly than the field due to the coil, increasing the current improves sensitivity.

I wanted to keep everything working from a single supply, so currently I'm using a 250V P-channel mosfet to drive the coil. The mosfet is driven from a mosfet gate driver IC. The coil has a 680 ohm damping resistor. A 2K2 resistor feeds the coil voltage to a pair of Schottky clamping diodes to ground, and then to a 100 ohm resistor feeding the op amp inverting input. The op amp is configured as an integrator, with a 2N7000 mosfet connected in parallel with the integration capacitor.

The Arduino uses timer 1 to control everything. I use pin 9 (OC1A) to generate the pulse for the mosfet, and pin 10 (OC1B) to generate the gate signal for the 2N7000, so that the 2N7000 is turned on during the pulse and for a few microseconds afterwards. Then the 2N7000 turns off, allowing the op amp to integrate the signal from the coil. A few microseconds later I use the Arduino ADC to read the integrated voltage.

I had to add an offset nulling circuit, otherwise the input offset voltage of the op amp meant that the integrator output was not stable. I also has to compensate for the capacitive coupling between the 2N7000 gate and the integrator input, by coupling a little of the gate signal into the non-inverting input of the op amp too.

Remaining issues that I want to address are:

- I could do with even more coil current, maybe 4-5A peak. So I'll probably swap the 250V P-channel mosfet for a 600V N-channel one. This will require using dual supplies, I think, which is unfortunate. Need to choose a mosfet with low output capacitance.

- Although the op amp I am using (MCP6283) has a gain-bandwidth product of 10MHz, it still isn't fast enough. I have some OPA2320 op amps that I will try next - they have 20MHz GBW and much lower maximum input offset voltage.

- A coil with lower capacitance would allow a larger damping resistor to be used, resulting in a faster decay time and greater sensitivity. My current coil is wound using 20 turns of ordinary PVC-insulated hookup wire. I might try a spiral-wound coil made from the inner conductor and insulation from coax cable.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Central Indiana, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 203
So many projects, so little time...and money!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been reading your posts about the metal detector.  Very interesting.  I've been thinking about building one as a curiosity, but as my kids lose things in our lawn, I thought it may get them interested in building electronics.  Have you made any progress since your last post?  I'm interested to see your results.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi flyboy, I've not had time to work on this for a while. My latest induction balance metal detector is described in reply #29.

I'm still trying to work out what user interface is best. I'm thinking of a headset, with short blips to say everything is working and longer blips when metal is detected, higher pitch for non-ferrous, lower pitch for ferrous. Probably also an LCD to provide more detailed info when it detects something.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dc42 - its a great project that you put together !

I have been experimenting with Metal Detector design some - with mixed success.
And, I am practiced with Arduino.

I am currently trying out  your project - Arduino Induction Balance Metal Detector.

You also decribed success with a Pulse Induction Version.
But, I do not see any Schematic for this - just a description.
Can you post a schematic for this PI version ?
I don't want to get frustrated trying to reconstruct it by guessing.

I will be glad to post any data and results that I find - on the forum here.

Thanks !
« Last Edit: November 16, 2013, 02:34:27 pm by jlsilicon » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi flyboy, I've not had time to work on this for a while. My latest induction balance metal detector is described in reply #29.

I'm still trying to work out what user interface is best. I'm thinking of a headset, with short blips to say everything is working and longer blips when metal is detected, higher pitch for non-ferrous, lower pitch for ferrous. Probably also an LCD to provide more detailed info when it detects something.
Well, for one thing you want a numerical readout of a few stats and those stats being the metal type, the frequency being used (I take it we can change this else can forget this), the perceived depth of the object, the size of the object is nice if it can be had with your circuit, and battery life left.  As far as your head phone you are on to something with what you said as that is about how the commercial ones work.

The one thing the big boys are now starting to use is a PLL system and I have no idea how to implement that but it is being used on VLF and PI detectors.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You also decribed success with a Pulse Induction Version.
But, I do not see any Schematic for this - just a description.
Can you post a schematic for this PI version ?

I didn't have such good resuslt with the PI version, but I think that was partly because the op amp I was using to integrate the signal had insufficient gain-bandwidth product (5MHz). I now have some 24MHz op amps, so I'll try again when I have time. I don't have a schematic that's in a fot state for posting at present, but I'll draw one soon.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, for one thing you want a numerical readout of a few stats and those stats being the metal type, the frequency being used (I take it we can change this else can forget this), the perceived depth of the object, the size of the object is nice if it can be had with your circuit, and battery life left.  As far as your head phone you are on to something with what you said as that is about how the commercial ones work.

The frequency is fixed - this is necessary in order to tune the coils, to achieve high sensitivity and low power consumption. I guess it would be possible to switch in different capacitors to tune the coils to a lower frequency, but I'm not sure this would gain much. The maximum frequency is limited to about 8kHz anyway, because I am sampling 8 times per cycle, and 64kHz is about as high a rate at which the ADC can sample without exceeding the recommended 1MHz clock frequency. I guess I could reduce to sampling to 4 times per cycle, but then I wouldn't be able to eliminate the 3rd harmonic.

As for depth/size/metal type, the only info available from the detector is the strength of the received signal, and the phase of the received signal relative to the transmitted signal. Metal type (i.e. ferrous/non-ferrous) can be inferred from the phase, and amplitude gives an idea of a combination of size and depth, but doesn't give either directly.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: 1 2 [3] 4   Go Up
Jump to: