metal detector problem

Thread Starter

salem1

Joined Apr 2, 2012
3
I have built a metal detector with depending on frequency different.
Where I've finished fixed and variable oscillator.
In building the mixer(to get the difference) I've many problems.I decide to put the two signals in a diode to give multifunction and to get my signal I take it through LP filter but it doesn't work.
Then, I use op amp (Miller integrator) instead of LP filter. but also it doesn't work. where I think in that case the diode will not work because the voltage at op amp side is larger than it at oscillators side.
can you give me a solution for it? or alternative for mixing the two signals
 

Thread Starter

salem1

Joined Apr 2, 2012
3
I have built a metal detector with depending on frequency different.
Where I've finished fixed and variable oscillator.
In building the mixer(to get the difference) I've many problems.I decide to put the two signals in a diode to give multifunction and to get my signal I take it through LP filter but it doesn't work.
Then, I use op amp (Miller integrator) instead of LP filter. but also it doesn't work. where I think in that case the diode will not work because the voltage at op amp side is larger than it at oscillators side.
can you give me a solution for it? or alternative for mixing the two signals
for R and C of op amp we have tested several values that achieve 5 kHz
even it give more than 30 kHzUntitled.png
 

wayneh

Joined Sep 9, 2010
17,498
This looks like the standard audio mixing application, for which I believe the usual solution is a 10K resistor on each input leg (2, in your case), all drawn together at the op-amp. No diode.

Are you trying to use a low pass filter to remove the two oscillators' main frequencies, leaving only the lower-frequency interference? You should be able to find a variety of op-amp circuits to accomplish that.
 

Ron H

Joined Apr 14, 2005
7,063
This looks like the standard audio mixing application, for which I believe the usual solution is a 10K resistor on each input leg (2, in your case), all drawn together at the op-amp. No diode.

Are you trying to use a low pass filter to remove the two oscillators' main frequencies, leaving only the lower-frequency interference? You should be able to find a variety of op-amp circuits to accomplish that.
A linear mixer will not produce sum and difference frequencies.

Salem1, you need to add a 10k resistor from the anode of the diode to ground. Otherwise, the caps charge up and reverse bias the diode.
Also, add 100pF from the cathode to ground, and change the feedback cap to 1nF.
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
? It won't produce them, but should pass them unaltered. Do you mean you can't both mix and filter with the same op-amp? Just trying to get your point.
He is trying (or should be) to heterodyne (nonlinear mixing) two high frequency signals, and get sum and difference frequencies. After the sum and fundamentals are filtered out, the result should be a low frequency, probably always within the audible range.
A linear mixer, such as for audio, ideally creates no other frequencies.
Many years ago, I built a metal detector that did exactly that.
 

wayneh

Joined Sep 9, 2010
17,498
A linear mixer, such as for audio, ideally creates no other frequencies.
I'm still hung up on this. Maybe we're talking semantics. Let's talk a few numbers.

I imagine two tones, say 11kHz and 12kHz, mixed together in a simple linear mixer. I'm old enough I can't hear either one but I should be able to hear the 1kHz interference pattern. Even if I could hear the higher tones, a low-pass filter would eliminate them, leaving just the 1kHz. I think the OP's design uses a variable oscillator to interact with detected metal and, when beat against the fixed frequency, gives a changing audible frequency. Shouldn't that work?
 

Ron H

Joined Apr 14, 2005
7,063
I'm still hung up on this. Maybe we're talking semantics. Let's talk a few numbers.

I imagine two tones, say 11kHz and 12kHz, mixed together in a simple linear mixer. I'm old enough I can't hear either one but I should be able to hear the 1kHz interference pattern. Even if I could hear the higher tones, a low-pass filter would eliminate them, leaving just the 1kHz. I think the OP's design uses a variable oscillator to interact with detected metal and, when beat against the fixed frequency, gives a changing audible frequency. Shouldn't that work?
How do you think the 1kHz is going to be created? There are two kinds of mixers: Linear and nonlinear.
A true linear mixer uses summing. The arithmetic sum of two frequencies will not create any new frequencies. You will find these in professional audio equipment.
A nonlinear mixer uses a nonlinear device such as a multiplier or diode to create the product of the input frequencies. When two frequencies are multiplied, sum and difference frequencies are created. You will find these in radios and other high frequency equipment. For example, in a superheterodyne receiver, the IF (intermediate frequency) is created by nonlinearly mixing the incoming RF signal with a local oscillator.
 

Ron H

Joined Apr 14, 2005
7,063
Huh? Of course it will, just as in the example I gave. Just add two sine waves together and the third frequency appears at F2 - F1. Simple physics.
It's not physics, it's simple mathematics. Are you comfortable with frequency domain plots? Here are the FFT results of a simulation that has a linear mixer (a resistive summer) and a nonlinear mixer (a multiplier). Note that in the summer, the 1kHz and 21kHz signals are down in the mud (<-100dB), and the original 10kHz and 11kHz signals are present. All the baseline hash is the result of quantization and truncation errors.
Note that in the prod(uct) output, 1kHz and 21kHz appear, but the 10kHz and 11kHz input signals are missing. This is the result of a perfect balanced modulator. A real nonlinear mixer may have varying amounts of the original signals remaining, depending on the device.
 

Attachments

wayneh

Joined Sep 9, 2010
17,498
It's not physics, it's simple mathematics.
Sorry, can't let that stand. Most math majors couldn't add two waves together to save their lives. ;) Wave interference is a Physics 101 basic. See here or here or here for instance.
Are you comfortable with frequency domain plots? Here are the FFT results of a simulation...
I see the demonstration of your point, but I don't quite understand why this happens. What's different about the resistor arrangement compared to our own ears? Anyone that has ever tuned an instrument knows how the beating appears when two similar-frequency tones are played together. Your simulation suggests this can't happen with the resistive summer. To me, that means this widely used technique is introducing a significant destruction in the signals. You'd hear beating from the original signals, but not once they've passed thru the simple mixer. That's a big difference. I suppose this type of simple circuit isn't really used in professional equipment?
 

Ron H

Joined Apr 14, 2005
7,063
Sorry, can't let that stand. Most math majors couldn't add two waves together to save their lives. ;) Wave interference is a Physics 101 basic. See here or here or here for instance.

I see the demonstration of your point, but I don't quite understand why this happens. What's different about the resistor arrangement compared to our own ears? Anyone that has ever tuned an instrument knows how the beating appears when two similar-frequency tones are played together. Your simulation suggests this can't happen with the resistive summer. To me, that means this widely used technique is introducing a significant destruction in the signals. You'd hear beating from the original signals, but not once they've passed thru the simple mixer. That's a big difference. I suppose this type of simple circuit isn't really used in professional equipment?
I think I see the crux of our disagreement. The beat you are talking about is really an amplitude modulation of the original frequencies. The volume changes as the interference goes from constructive to destructive and back. I was thinking of new sum and difference frequencies being created, as I mentioned. The resistive mixer does have the interference, and I played with some LTspice simulations (at frequencies I can hear), recorded the output as a .WAV file, and played it back through my sound card and speakers. You can hear the amplitude modulation, and you can see it on the waveform viewer. However, if you were to put the output through a lowpass filter, with the cutoff above the beat frequency and below the input frequencies, the beat would not be audible, because there is no energy in the mixer output at that frequency.
So - if you played 11kHz and 12kHz, I don't think you would hear the 1kHz beat frequency if you can't hear 11kHz (I can't either). In fact, I tried mixing 10k and 10.1k and listening to the result, and I didn't hear a danged thing.
 

wayneh

Joined Sep 9, 2010
17,498
Oh crud, neither can I. This sent me to my computer to play with my tone generator. Beating together two high frequency tones, using my own ears as the low pass pass filter, I couldn't hear the beating. I could only hear beating if I could hear the two tones individually, and the beating is heard as modulation of the carrier volume, not a distinct tone of it's own.

I did notice that near the borderline frequency of my hearing, putting for instance 11,000 and 11,010 Hz together made it easier to detect something than just one of those tones alone. But that's just because it's doubling the volume ten times a second, and sure enough, if I doubled the volume of just one frequency, it was roughly as easy to detect as the beating.

Bringing this back on topic, I conclude that the OP needs another approach to create the third frequency from the two "carriers". I think if you were to detect and hold a peak of the combined carriers, from one peak to the next, you'd get a sort of digitized, stair-step sine wave at the interference frequency.
 

yourownfree

Joined Jul 16, 2008
99
Salem1
I think I see what you are trying to do. You can use a linear device but you need a product detector in front of it. I have included the diagram. Simply run each oscillator to the diode network. Piece of cake. The 10k resistor can be whatever size you want to match your oscillator load. so a little experimentation is ok. In your case 10k to 47k should be fine. I have seen this used with a 50 Ohm resistor as it was used in a direct conversion receiver where one input was indeed 50 Ohms. So see what works. maybe you can do without the resistor. In either case you need a product detector and there are many ways to make one.
 

Attachments

wayneh

Joined Sep 9, 2010
17,498
BTW, thanks Ron for staying patient with me while I was trying to grasp this. I would have remained ignorant forever. :eek:
 

Ron H

Joined Apr 14, 2005
7,063
BTW, thanks Ron for staying patient with me while I was trying to grasp this. I would have remained ignorant forever. :eek:
I was beginning to question what I thought was fact when you mentioned constructive and destructive interference, as I realized that if it happened in air and with light (which I knew), then it would happen in a linear mixer. I briefly posted a back-down statement, then edited it when I realized what was really going on. I learned something too.:)
 

Audioguru

Joined Dec 20, 2007
11,248
If you feed 11kHz and 12kHz to a lousy amplifier that has high distortion (because it is non-linear) then you will also hear 1kHz at its output. It is not harmonic distortion (that produces 22kHz, 24kHz plus more harmonics), it is called inter-modulation distortion.
 
Top