How does a metal detector work?
Dave teardown and reverse engineers the circuit in a $17 Harbour Freight wand type metal detector, and also explains how to do basic reverse engineering of a PCB.
Forum: http://www.eevblog.com/forum/blog/eevblog-714-metal-detector-reverse-engineering/'>http://www.eevblog.com/forum/blog/eevblog-714-metal-detector-reverse-engineering/
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
EEVblog Amazon Store (Dave gets a cut):
http://astore.amazon.com/eevblogstore-20
Donations:
http://www.eevblog.com/donations/
Projects:
http://www.eevblog.com/projects/
Electronics Info Wiki:
http://www.eevblog.com/wiki/

Hi. This is a bit of a catch-up video. It's an old mailbag item from a forum user called Ex Runner, so thank you very much Ex Runner! I Know it's been a long, long time. It's probably been like a year and a half or something since he sent this in for to the mailbag for a teardown.

What is it? One of these handheld metal detectors? One of these cheap-ass Harbor Freight Things it's like 17 dollars on Harbor Freight it's the Sentech Model 97, 2, 4, 5 and well, yeah, all 17 dollars worth and x-ray and I wanted to see if we can take it apart and explain how it works. So I thought that to make a reasonably interesting video will hopefully reverse engineer this and have a quick look and how one of these crusty metal detectors works. Let's go and there's really nothing to it. Just runs off a 9-volt battery here.

by the way. I Love this look where ANSI approves safety goggles when replacing the 9-volt battery. You've gotta be kidding me. Keep out of reach of children.

Well I shouldn't be allowed to use it, then read the manual before use and keep it dry even though one this is supposed to be like a waterproof art wand on the end of it. I Don't hear any way you get. Well, you get $70 retail worth? Really? Anyway, you just turn it on like that and then it's got a sensitivity adjustment of course so you have no presence of no metal. If you want it as sensitive as you can, just turn it off like that and then we can whack it over something so you know it gets within sort of like an inch or so of that screwdriver and the pliers over here.

This thing. It's got to get really, really close to that little nut there, and this time, you screw. ah, it's practically got to be touching, so it's going to depend on the size of the metal object. if we go for my stainless steel drink bottle.

yeah, it's a good two or three inches out from that. No worries. So because that's a massive lump of metal there, and of course, this thing's pretty much going to detect any type of metal. It's not gonna be a real discriminatory type IIE It's not going to be able to detect the difference between gold and aluminium or something like that, perhaps.

But the whole idea is that. yeah, it can detect ferrous and non-ferrous materials. Ferrous ones, for example, you've got iron and the stainless steel that we've got here, for example. and the non ferrous stuff you're gonna have like copper and tin and gold and lead and all that sort of jazz.

and it'll probably do various alloys as well. and brass and stuff like that. So yeah, I Don't expect this thing to be very discriminatory. If we turn the sensitivity all the way down, it still gets within an inch or so.

Yeah, look at that. It's not bad. It's not bad range actually for a seventeen dollar job. All right, let's crack this thing open and see.

I Think we can just do those screws on top and the basis I Think one of the simplest ways to do a metal detector is with: you're going to have a transmitting coil and you're going to have a detecting coil on the thing and then to use amplitude to actually detect the amplitude of the things so that when you bring it close to metal like that, like the two coils, there's going to be two coils in here I would be guessing and then normally they're going to be coupled and then you set the sensitivity of a threshold to take two, ie. an amplitude threshold detector so that your circuit remains so that your buzzer doesn't go off, and when you bring the metal in close proximity to it, of course, you're coupling some of the energy from that into here and it's generating eddy currents in there and it's sucking away some of the energy so that you're going to have less energy in your detection coil and hence your amplitude is going to drop. What didn't I Do note that one doesn't need to be done I Don't think and and then it's going to be a simple basically amplitude detector in there that detects whether or not you are. It drops, so the attitude on the coil will drop when you bring something into it.
Aha, look at that discrete transistor buddy. Looks of it. We've got one job here which is a it's at a low six two by the looks of it and that is all she wrote. So it looks like we've got a bit of discrete transistor action happening here.

that'll be our oscillator. Got a bit of hot snot around here, that's a bit, how are you doing and I'm yeah that what that wiring is a bit how you're doing as well, but yeah it looks yeah. Look, we've got a couple of coils there. Looks like we've got our two coils.

so I want to be the transmit coil one. I'll be to the detect call nothing on the other side there and I think it will operate how I just explained with amplitude level detection. So yeah, I think we can reverse engineer that and get the schematic for it and we'll You certainly get exactly what you're paid for. You're seventeen dollars retail at Harbor Freight So yeah, mmm.

a couple of transistors and an Op-amp and a buzzer and a switch and a bit of hot snot in a pot. And Bob's your uncle. Now as far as this detection wand here goes, we got both of our coils going into there around the outside. it looks to be hollow down in there.

although I haven't put a torch in I suspect there's nothing else in there like it's just like an air core and there potentially just you know, helical II wrapped around there or something like that. All right. So let's start reverse engineering this thing. I've checked that these three transistors here.

they're an MP Sa-18 off the top of my head I Didn't know what that was, so I went and got the datasheet for that. Sure enough, um, one of them is a genuine Fairchild by the looks of it. The others are just like a generic brand. Whatever, it's going to be identical.

Now you've got to be careful. Transistor pinouts are a real trap for young players. Make sure you get the exact transistor, don't rely on memory, don't rely on our I think it's the same as something else because there's a lot of variation in transistors, so this one's great. We've got the pin out for that so we can work with that and it's just an NPN general-purpose transistor, so you know you can replace it with much anything.
As pretty Joe Bloggs, it's only a 45 volt transistor with a hundred milliamps collector current maximum. So yeah, not that terrific. And this part here is no surprises for guessing because it's around the battery input here. our switch just goes in there to just turn the battery on and off.

Basically, it's no surprises. a 78 lo5 voltage regulator so you don't even need the pin outs for that. You know that even if you didn't know the pin outs, you know? Look, there's the pot. There's the 5 volt output go into pin 8 of the Op amp there and going over here as well.

so yet to easy, you wouldn't even bother drawing that in. And our fourth transistor down here. It's actually a 2n7000 which is an N-channel mosfet, so that's just driving the buzzer. So once again, don't even need to know the pin out for that because you know it's just a low side buzzer driver.

That's it. Pretty basic. and I checked our detection wand here. look down there with the torch.

and yes, sure enough, you can tell by the weight as well. There's a ferrite rod in there, so both coils are wrapped around a ferrite rod. I Did actually measure those coils. and of course, that's exactly what.

I I Thought there's going to be one drive coil and one detection coil. So you know, as a basic thing, we'll just draw in a couple of coils like that. There we go, effectively got ourselves a transformer and our metal. Of course, when we put that near, it will affect that and draw some energy away from that.

So whatever we're driving it with here, the amplitude on the detection coil here should actually drop. So I think that's probably what's happening here is an amplitude detection type thing. First of all, I can see that one of the coils they're going over to the 5 volt output there, so that would be the drive coil most likely. And then no surprises for finding this capacitor here, which is 10 in 10 nano and that's directly across the coil.

Bingo! We've got ourselves an LC tank circuit and that's what you need to resonate. Now there's a couple of ways to what reverse engineer these are. This one's pretty simple, so you don't need any ADEs Really, you can just sort of go by memory and follow things through and know which ones you've done and which ones you haven't but if it's a more complex board some people actually are, put them in a photocopier and photocopy both sides and then trace it that way. trace it on paper so that then you can mark off on the paper which ones you've actually which once you've actually traced out, or if you don't care about the board which in this case I don't I give a toss about.
you can get yourself a marker. This is a whiteboard marker, but you can get a permanent marker and then you can just draw in. Yep. I've done that trace there and turn it over and I've done.

Yep, this one's a bit fat. it's really annoying, but yeah, I've done those and those and then you just go through trace by trace looking both sides. It's not tricky here because, but there might be the odd trace you know running under an icy package or something like that, but in this case it's pretty darn easy to buzz those out if you have to So that's how we're going to reverse engineer that. I won't bore you with the details I'll give you the final circuit in a minute.

You gotta be careful you don't get trapped into topologies here. I Thought I was getting something that looked like a some sort of diff pair or something with a common resistor going down to here. Turns out it wasn't That was a complete 30. Following the traces further.

I found out that what these are actually grounded right here. So and then this is a cross here like this. which then that and that did go up to the +5 volt rail there I believe. And then, so that's our midpoint voltage divider there.

It's just. you know, my mind was going off somewhere else and it didn't turn out to be once you traced it further. Yeah, it happens. And here's an example of where a trace goes under the chip: Pin three of the Op-amp here, which is the non-inverting input I Can't see any trace on the bottom I Can't see any trace on the top that it actually emerges from the chip.

sorry I can't I'm gonna bother to show you our place anyway. Hopefully you can follow what I'm saying. So therefore, by deduction, it must go to one of the other pins of the Op-amp over here. So you just get your meter out.

Buzz it out and enough. Pin three goes over to pin six there, no worries. and I think I've got it. but it's a little bit messy so I've redrawn it a little bit better.

Let's take a look at it now. I think this is correct, but please excuse me if it's not 100% correct. I haven't simulated it or anything like that. It's a basically a two transistor arrangement here, with as I said, a ferrite core coupled effectively our transformer.

So this is the drive coil and this is the sense coil here. I've measured those I had to do I take them out of circuit to measure them, measure them at around about 10 kilohertz. I should have put that in there 1.7 million Riis for the drive coil and 18 micro Henries for these sense coils. Now, of course, this thing has to start up in some way, so it's got to get base current to do that.

and it does that via our three up here 15k and the Sense coil. you see it can go down there and start that transistor Ere, we can get some oscillation happening here and then we've got this convoluted arrangement and down here, basically all it looks convoluted, but all it is is basically they've got a series resistor R four here and they're smoothing out any oscillation there. Okay, so we're basically getting DC at that point and then they've got Q three connected as a transistor here and that's a quite a common thing. You connect the base and the collector together.
Bingo. And then we've got a curiously, an NTC thermistor in here across a 200 ohm resistor. So they're trying to temperature compensate this thing in some way, and maybe that's why they're using the transistor in there to try and temperature compensate between the other two, because you notice that these two transistors here we've got. We're going to have our base emitter drop here, but we're also going to have the same base emitter drop here, so it's gonna be borderline in terms of actually driving these transistors anyway.

Then that goes down to V R1, which is a 10 turn trim pot on the board which adjusts the bias level so effectively. This is like a DC bias level for the two bases joined here. And then we've got the sense trim part that's the one on the front panel that adjusts our sensitivity. so we're adjusting a tiny amount of boy as you can see because this one's in series and then in parallel with this and then in series with this and AH.

It's quite really just tweaking this thing by like half Abby's dick to get the bias correct, which then our sense coil down here. Once this thing is oscillating, of course, our sense coil, we're gonna have a gun. Gonna have the oscillator waveform here, but then that's filtered out at this point which goes into this comparator over here. And I was right in that this thing does actually just measure the amplitude and sensit based on a half rail.

So we've got a five volt regulator up here. We're just tapping off 2.5 volts. Smoothing that out a bit. I Don't know why they bother with the buffer amp here, but you could have got away with a single Op-amp there because it's going into high impedance here and it'll be going into high impedance here.

so you could have just connected that directly to there anyway. I Don't know. Maybe they had had dual Op Amps in stock? You know coming out there was who. They decided to use a joule instead of a single.

Anyway, that sets the bias level. So this is going to be precisely biased via these components to that half rail. So it's going to be very, very close to the two and a half volts that they've set here. hence why they need a voltage regular regulator in there.

The seventy-eight lo5 which I haven't shown here. they need a stable for a temperature stable value in there. Anyway, then this Op-amp works as a comparator, of course, because there's no feedback on there at all. There's no hysteresis either, and that just drives the MOSFET which drives the buzzer.

So it's not like this thing is working. A lot of metal detectors will work as a beat frequency oscillator. so they'll have two separate oscillators and they'll beat against each other at two high frequency like RF type oscillators Then they'll beat against each other depending on the presence of the metal and then that will give you an audio tone which then gets mixed down and gives you an audio tone out so we're not. Actually, we're not doing that here.
Doing is doing some crude biasing of this oscillator to get a DC level and comparing the DC level. So I don't know, it's a bit I don't know whether it's dodgy or clever I'm not sure. Okay, so I've got my four channel scope hooked up and I'm probing these points here. I'm going to be probing the two resistors down in here, the emitter resistors and I'm also going to be probing the common base between those two and I'm also going to be probing the output here which goes into the comparator.

So they're my four points there. So let's turn this sucker on. I've got know what? There we go? Let me let me turn that off. Okay, what we've got here.

but the yellow and white blue waveforms here. These are the two emitter resistors there and there. Of course they're not going to be exactly the same value because this one is going to have a much greater oops. sorry.

Oh, it went near the scope there. It's gonna have a much greater load on it because there's no resistor up here. Whereas this one's got R3, this transistor Q2 is going to have a higher value. Even though the base currents should be basically the same.

And then we've got our main oscillate away from on the bases here. So these the two common basis. This is coming from the sense coil here. So this is this dark blue waveform.

You can see it's oscillating about thirty seven, point, six, kilohertz, or thereabouts, that's you know. typical what you'd expect out of this thing I didn't expect. you know, megahertz or anything like that. So that's going to be.

that value is going to be dependent on our LC tank circuit here. Now here's the interesting bit. This purple waveform here is the output of that smooth DC output going into our comparator there across C2 there. And if we change the threshold, you can only see it changes only a tiny amount.

and that's a two and a half volts. by the way. five. They're all 500 millivolts per division.

They're all at the same DC voltage level sorry I Should have mentioned that if it's not obvious on the screen. so one, two and two and a half volts there. So it's just around the threshold voltage of there of course, which is what you'd expect. So that's been trimmed with our VR 1 and VR to our sensitivity trim part which I'm adjusting now so there's not much.

Not much play in that at all. And if we bring in some metal here, there we go. You can see it, see it change. but there's not a huge amount in that it doesn't change like it doesn't change by much before it calls up the buzzer.
So and by the way, this buzzer is not solid. So I think our it's sort of a bit intermittent between when it. so it must be oscillating here because there's no hysteresis on here. It just goes a bit funny.

so it tends to come and go a bit. but let's put some more metal towards that. So a big chunk of metal like these pliers and look at that, we can get our oscillator to stop completely. We can just swamp it that were not.

It doesn't like that there's not enough feedback in our sense coil and we're just killing that sucker. But of course it's still going to buzz in that case because of the way that they've got the polarity on the threshold comparator there. By the way, sorry I said that. they're all 500 millivolts per division.

No, the emitter resistors here are 200 millivolts per division. sorry about that. That should have been obvious of course because it's going to be like naught point six, the base emitter drop there. So what I've got now is I'm now probing the main tank circuit here, the collector of Q1 and of course were because it's not clamped in any way we're going to get do to the tank circuit.

We're going to get a voltage amplification here. so this is 2 volts per division. so we're in two, four, six, eight, ten volts. our peak to peak there roughly.

So there you go. That's a very interesting and I'm gonna say probably a bit crude circuit here. so I think it might be interesting to try and simulate this sucker and try and get it going. but yeah I don't know it's I think it's a bit dodgy but it hey it works and it sells for 17 dollars retail at Harbor Freight So there you go.

This is more complex you can get. as I said, like a beat. Frequency oscillator is a normal thing where you get the tone, but this one doesn't have what the audio tone as you actually get closer to the things so it's just designed to be. you know, is there metal there or not? Yay or nay.

Hence Lee Hence the buzzer down here, which of course is not tone. It can't change the tone unless this thing oscillates here, which it's not generally supposed to do. It just basically turns the buzzer off. Iran and the buzzer just generates its own frequency unless you do something silly here because there's no hysteresis.

And as I said, this is very crude and non-discriminatory You've seen it in action. It does basically ferrous stuff. like a steel stainless steel. It does a non ferrous like silver.

For example, there we go gold. and of course that alloys like grass and things like that. So yeah, it's a completely non-discriminatory but hey, it's as advertised. it's a metal detector.

These metal detectors, though, needn't be this complex. In quote marks, they can be as simple as a single transistor. Colpitts oscillator basically. So yeah, you know they're incredibly simple.
Like if you go, buy one of those, you know, professional $5,000 discriminatory ones for finding gold I'm sure they're much more complex than this and then this crude thing. So anyway, um, it might be interesting to try and simulate this thing and have a play around with it. I'll leave that up to what your experimentation. hopefully.

I've got the circuit right because they always the risk when you reverse engineer one of these is that you do something. and yeah, Murphy you'll get you every time. but oh oh, that's going to be close anyway. So I hope you enjoyed it.

Thanks to 1x Runner for sending this one in a long, long time ago. in a galaxy far far away. And if you want to discuss a Eevblog forum link is down below. or leave Youtube comments or leave evey book.com blog comments and all that sort of stuff.

And remember, if you liked it, please give it a big thumbs up. Catch you next time you.

Avatar photo

By YTB

22 thoughts on “Eevblog #714 – metal detector reverse engineering”
  1. Avataaar/Circle Created with python_avatars nita 2500 says:

    Its pin pointer?

  2. Avataaar/Circle Created with python_avatars WistrelChianti says:

    Thanks! I think I mostly got it. Still a little unsure about how the oscillation works starts/works or why it stops with metal but that's a different topic. I think I followed the rest just about

  3. Avataaar/Circle Created with python_avatars Ramin says:

    $

  4. Avataaar/Circle Created with python_avatars brian bloom says:

    Hey I love this pin pointer, I added a vibrator function, When pin pointing something in a hole It lets me know right away, Plus the noise but it will pick up anything, I have used real good ones and this one, There is no difference. Works great sad they don't sell them anymore.

  5. Avataaar/Circle Created with python_avatars James Begley says:

    I beleive this is a pinpointer that metal detecter users use to probe dirtmounds its not suppose to discriminate.

  6. Avataaar/Circle Created with python_avatars Zu Mi says:

    Hi. How deep can this device go underground?

  7. Avataaar/Circle Created with python_avatars Arceuzeus says:

    "tweaking by half a bee's dick" absolutely sent me, I love it and am adding it to my repertoire!

  8. Avataaar/Circle Created with python_avatars steve weiser says:

    I like your videos because you explain the electronics involved in everything you do unlike these video exploding stiff haphazardly…just for views;;ITdetects changes in phase not amplitude on most mds

  9. Avataaar/Circle Created with python_avatars steve weiser says:

    I wonder if it cam be used as a pin pointer in metal detecting

  10. Avataaar/Circle Created with python_avatars robert574 says:

    Another mystery unraveled… I have one and need to add a pot or something to quiet it down at times to stealth mode. Whenever I try to use it in the yard, to find a screw or something I dropped, the neighbor's dog starts howling. Or, connect the circuit directly to the dog and do away with the beeper. Arrooo… there it is.

  11. Avataaar/Circle Created with python_avatars Fortnite Coach says:

    I have a question! Can I use wire that's insulated to make coils? Or does bare copper work better? For instance my 100 foot extension cord plug broke so I tore it apart to use for electronics. (I have more) and plan to recycle the casing into parts for my build…

  12. Avataaar/Circle Created with python_avatars Joseph Shaff says:

    And if ya don't mind a question do you need TVS on a H-Bridge circuit for stepper motors. Fried a small breadboard for 97 Electronics Now Feb, "Build The PC Drill", James J. Barbarello. He didn't have any TVS Diodes in the circuit. Went throught it 2x w/ highlighters. It locked up strong but when I shut it off it smoked. LOL!

  13. Avataaar/Circle Created with python_avatars Joseph Shaff says:

    Thanks. Going to buy the Orange GP then. Going to try looking for gold during the summer here in WA. Hard to do classes during summer. Nice reverse Engineering. I thought it was something like that. Have you seen the Electric Cabin Scooters on Ali Baba for $1500 – $3000 ? I heard some are headed for Europe in the North. Was wondering about batteries and charging plug Standards differences.

  14. Avataaar/Circle Created with python_avatars Ken Mack says:

    Half a bees dick. Rofl

  15. Avataaar/Circle Created with python_avatars Steve Greenfield says:

    I built one from plans a long time ago that used one transistor and a pocket AM radio. It was a BFO, I think it relied on beating with the LO (local oscillator) in the AM radio, as both the tuning capacitor in the circuit and in the AM radio changed frequency. It counted on poor shielding in the radio, which of course 7 transistor pocket radios weren't exactly well-shielded.

    I've seen other designs that use a 455kHz IF transformer as part of the beat oscillator, and couple both signals into an AM radio, using the IF section.

  16. Avataaar/Circle Created with python_avatars Ziferten says:

    I'm 5 years late, but I'm here to tell you that I'm disappointed that you didn't notice the strengths of the MPSA18. Minimum beta of 500 for collector currents above 100 uA, with typical figures around 1000. ft of at least 100 MHz, so plenty of speed for low frequency AM.

  17. Avataaar/Circle Created with python_avatars pengeboran sumur says:

    have you ever dismantled the water detector locator, if not yet I want you to disassemble the water detection

  18. Avataaar/Circle Created with python_avatars Phasor Systems says:

    Create some circuits! Browse for androidcircuitsolver on google

  19. Avataaar/Circle Created with python_avatars JAMES T. says:

    That thing is about useless! Maybe use it for concealed weapons, it's going to be hard to find anything below ground!

  20. Avataaar/Circle Created with python_avatars Robin Sattahip says:

    $17 metal detector? Good enough if you're flying on a Boeing.

  21. Avataaar/Circle Created with python_avatars Bible Astronomy Time & Prophecy says:

    'tweaking this by half a bee's dick' that's very electronic. Awesome description.

  22. Avataaar/Circle Created with python_avatars wood Phoenix says:

    Hi man
    Can you help me? ?????
    To strengthen the circuit??????

Leave a Reply

Your email address will not be published. Required fields are marked *