Project Question - A simple sensitive metal detector (project from hub).

UPDATE: changed the schematic as I realised I had the power supply wrong; the whole thing is powered directly from the 7-12V supply. Which brings up another issue: the MAX951 as recommended by the project's author is rated 7V for normal operation, absolute maximum 9V. Powering it at 12V will destroy that part.

There's more to it than meets the eye. The instructable is (as so often) a bit misleading. First of all I tried to trace the FritzIng to create a proper schematic of the thing:

Doing so, my eye was caught by the unusual OpAmp circuit. Why is the output only used to drive the inverting input, not an Arduino input? This in turn led me to look closer at the OpAmp, which is not your regular OpAmp. It has a comparator for output stage, so it either outputs 0V or Vcc. No in between. Replacing it by a regular OpAmp is probably not going to work.

So how this works - I only really understand it in part.

L1/R9/Q1 is the detector. Q1 is switched on and off creating an AC current through L1, the switching off causes a positive voltage spike which is dampened by R9, R13, D4 and D5. The presence of some metal object should increase the magnetic field and increase this spike. C2 couples this spike to the inverting input of the OpAmp. The OpAmp's comparator output turns high, charging the C2 through R10 until the voltage is so high that the negative input goes above the positive input and the OpAmp output will turn low again. The time the OpAmp remains high on the output I believe is related to the height of the spike of L1.

The code apparently measures the spike by taking three subsequent analogRead() calls, and checking the value of the three. If the spike lasts for three reads (i.e. about 330µs) it's read as a hit.

Now to me it looks like this OpAmp can NOT be replaced by a regular OpAmp (the output may swing rail to rail it won't be fast enough); it MAY however be possible to replace it with a regular comparator like the LM339N. It is open collector, so only driven low, but a 10k pull-up to Vcc wouldn't make much of a difference considering that 2M feedback resistor.

Some resistor values are a bit different than in the Fritzing. This as those match the parts that i have in my parts box... and a 22Ω gate resistor is a bit low.

Mmm... There appears to be more wrong with that Fritzing and the page itself.

The OpAmp as shown in the Fritzing uses the standard pinout of a single OpAmp, as indeed the LM741 is. The MAX951 as linked to in the parts list however is a dual OpAmp (and a highly unusual one at that, as it comes with a comparator output and built-in voltage reference).

Does this project really need this expensive MAX951? Or will a regular OpAmp work just the same?

I also still wonder what the purpose of C1 is. It's a huge capacitor as all it appears to do is provide voltage stability on the non-inverting input.

Tomorrow my buddy Alex is swinging by with an addition or modification to the circuit. He is a trained electronics engineer so I hope he will solve it. He said the same thing about the op-amp not working because it was being used as a comparator and not an amp at least not only an amp.

I did run across this

which is supposedly the basis of this Arduino build. I actually have everything in this link needed to build it without Arduino which will be my next step if Alex's efforts tomorrow are in vain.

With that said, My son and I are learning how to properly use a scope, and how metal detectors work. So it is at the very least not a wash...there is something to take away even if no luck yet.

new layout...much cleaner

So, I built the circuit with Uno and mosfet irf818 and 741 op amp,
I have spikes on the coil,
And buzzer is on,
The op amp seems to be off..no output.

Replaced the Uno with a Nano
No buzzer ,!!
also have spikes on the coil
But still not working as a described .
I built several detectors up to now
But this one doesn’t seems to work.
Any ideas?
Thanks.

Looking at the data sheet of the linked op Amp - I also noticed that the Max95x pin 8 is not connected to the vdd,(how can it work?)
But Pin 7 is connected to the power ..
It Should be CompOut,

  • I guess something is wrong with the circuit.
    Any ideas?
    Thanks.

The pinout as used in the Fritzing is correct for a standard single OpAmp, like the 741 you mentioned before. The MAX951 in contrast is a dual OpAmp, and has the standard dual OpAmp pinout.

It is anybody's guess which OpAmp the author really used; and if he did use the MAX951, did they use the OpAmp with the comparator output, or the regular one?

I followed this :

It has the schematics and links to the components needed,
There it’s MAX951..
And same mistake on Vcc pin.

I assumed that this is a follow up here,
But now I understand that no one makes it work..

So either the OpAmp number in the schematic is wrong, or the schematic itself is wrong. Which is it? We don't know - until the author of that post comes in to clarify it's anybody's guess on what it should be.

So after I gave up on this project, I followed this one:

Really seems to work and has a good sensitivity,
I was wondering if anyone can help to improve it for better performance .
I used a 20 cm coil of 60 turns with a 0.4 mm copper wire.
The project was built on an Arduino Uno - all the electric stuff is the same as described.
Can anyone advise?

Hey. Sorry folks. I have been busy this week with my day job. Have not had much spare time to invest in figuring this out. I will fill you in. My friend Alex brought us a scope to borrow and tested the circuit. We have the same problem you are having with it Goose0. We can trace all the paths but we do see a spike, and a pulse...but the spike is not enough to trigger the response from the Arduino, so we are pretty sure that his schematic is wrong. There is no telling how he messed with his final product after creation or what he has tweaked or changed...or if it is a transposition error from his paperwork to fritzing. Any number of possibilities. It may be as simple as our version of the Arduino. I am reading about bootloaders and chipsets and find it absurdly hard to keep up. In fact, with my current nano v3 I have to run "old bootloader" to get any code to load.

BUT, my friend Alex has taken the circuit I created with him, and is working on figuring it out. He is very good at that stuff, but takes him a little time. He may completely remake the circuit or give up who knows. I will know in a couple days.

If it works I will be sure to let everyone know every detail of what he did...to the best of my ability...because no one likes when things aren't.

Anyway. I did find the schematics for the "pirate" a russian made PI metal detector...and supposedly what this project was based on roughly...though the similarity stops once you look at the schematic. I am thinking of going down that road if the results of the current circuit no worky. It looks fairly simple, and does not require any programming...or arduino for that matter.

Best wishes.

Hi
I am taking a last shoot at this:
Could it be that he used an active Buzzer for the project?
Since he is just turning the output to High- and not sending any pulse or pwm signal?
Is this why we failed?

I have not been able to put much energy into this since my work picked back up and has been keeping me busy. My buddy has been periodically giving me updates on what he has discovered and as of last update he said it is working now, but with some considerable circuit changes. He burnt up 2 or 3 nanos before getting it right, because the pulse is unpredictable. So, I am not sure if his final product will be very sensitive or not. I am awaiting his response currently, and hope to have it back in my hands so I can start making a proto board from the bread board.

In hindsight I did discover that there were none nano involved versions of the "pirate" PI(pulse induction) detectors. I will attach a pic of the schematic I am referencing.

Essentially this is the schematic I believe that the OP of the project used...and he utilizes the Nano as part of that schematic...and makes the necessary adjustments...and I think that may be where our problem is. He made adjustments but never explained them and gives us a finished product with little substitutions and I had a hard time matching exact parts...

So in conclusion, I will attempt this without a nano because I actually need a metal detector that works, but also because I want to have something to show for the weeks of research and stumbling.

Lol.

Keep us updated on what you discover.

TomGeorge:
Hi,
Schematic;

What are you using as your power supply?

Thanks.. Tom.. :slight_smile:

I trying to make this project to. But something wrong with Schematic and Also he changed resistors values on his project not same like his Schematic

That's a piece of wall art, not a schematic.

Ask the original creator of those images directly on why, and which resistors that are.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.