0
\$\begingroup\$

I would like to subtract one frequency, varying from maybe 40kHz to 41kHz, from a 40kHz signal, to end up with a signal from 0 to 1kHz. Right now the 40kHz fixed signal is square and the variable signal is sinusoidal, but I can filter and make either signal square or sinusoidal. I would like to use a mixer like the SA612. The circuits that I've seen online are way more complicated than I need... Isn't there just a way to hook one signal to the input and the other signal to the oscillator?

I tried wiring the variable signal to "input A" of the the mixer, grounding "input B" (to get a nice 5v pk-pk signal on the inputs), and similarly hooked up the 40kHz signal to "oscillator A", and the other side to ground. It looks like both the input and oscillator pins are getting good signals, but the output is garbage in the 40kHz range (with noise), with no strong component anywhere in the 0 to 1kHz range like I was expecting. Any advice? THANKS!!!

EDIT: The two signals are on separate lines. I'm trying to build a Doppler Effect speed measurement device. The 40kHz signal is being fed to an ultrasonic transmitter. The received signal slightly faster than 40kHz depending on how fast the object is moving towards the receiver. I want it to be a standalone device operated by a microcontroller so I don't want it to involve a PC and audio codecs. I suppose it doesn't have to be analog... I could make both signals square. I just don't know what type of IC makes this task somewhat less exhausting.

EDIT #2: For testing purposes, I am now putting a 37kHz square wave through the SA612 input, and a 40kHz square wave on the oscillator, expecting to get a noisy waveform with a strong 3kHz component on the output. I'm now using resistor dividers to get the input signal to about 60mV pk-pk, centered around 2.5VDC (DC bias). The oscillator is now 250mV pk-pk, centered around 2.5VDC (DC bias). So Pin 1 is connected to 37kHz signal, Pin 2 is connected to 2.5VDC (so that peak-to-peak is measured at 60mV), Pin 6 is connected to 40kHz signal, and Pin 7 is connected to 2.5VDC (so that peak-to-peak is measured at 250mV). I didn't know if I needed to center those signals at half the rail voltage but at least now I'm getting something on the output. Unfortunately, the output signal looks just like an amplified version of the input signal (and both outputs are the same). The help so far has been great. Any other advice would be much appreciated.

I may end up going with an XOR gate or something but that would require additional thought to integrate the resulting signal (phase difference) to a meaningful value.

By the way, driving the ultrasonic transmitter with a square wave doesn't seem to be a problem. The received signal is still sinusoidal.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ It is not clear what you are asking. Is it that you have mixed two signals onto a single line and want to separate them, or is it that you are modulating the frequency of the carrier 40KHz. If it's the first, a sufficiently active frequency filters should allow you to separate them. If it is the latter you would need an FM demodulator. \$\endgroup\$
    – Trevor_G
    Oct 31, 2017 at 15:09
  • \$\begingroup\$ Does the SA612 work at 40 kHz? You could use an analog multiplier.. they go to DC. \$\endgroup\$ Oct 31, 2017 at 15:28
  • \$\begingroup\$ Does it have to be analog? Nowadays, most people would handle this kind of signal processing with an audio codec (there are plenty of them that will sample at 96 kHz or more) and a DSP chip. What exactly are you trying to accomplish? \$\endgroup\$
    – Dave Tweed
    Oct 31, 2017 at 15:40
  • \$\begingroup\$ @DaveTweed Quite so - a DSP chip isn't even necessary. A $2 PIC can do the down-conversion (including the low-pass filter that isn't mentioned). \$\endgroup\$
    – glen_geek
    Oct 31, 2017 at 16:09
  • \$\begingroup\$ You're feeding a block wave to a ultrasonic transmitter? You really aren't making this easy for yourself. Also, I am still missing where the sinusoidal signal is coming from, given that you're now describing a Doppler effect. \$\endgroup\$
    – MSalters
    Oct 31, 2017 at 21:37

2 Answers 2

1
\$\begingroup\$

I suspect you don't understand how signals add up. If you add a 1 kHz sinusoid to a 40 kHz block wave, the result is not a 40 to 41 kHz signal. In fact, a 40 kHz blockwave already has overtones at 80,120,160, ... kHz. But reconstructing the ~1Khz signal is trivial: just use a low-pass filter. You've got so much margin that you can any convenient cut-off frequency between 2 and 20 kHz. This eliminates not the base 40 khz signal but also overtones.

\$\endgroup\$
1
  • \$\begingroup\$ He's feeding them into a mixer, so the frequencies do add up \$\endgroup\$
    – tomnexus
    Oct 31, 2017 at 18:50
1
\$\begingroup\$

You may be over-driving the local oscillator (pin 6) input to SA612. Data sheet says:

External LO should be 200 mV (peak-to-peak) minimum up to 300 mV (peak-to-peak) maximum.

A square wave local oscillator coupled into pin 6 via a 1nF capacitor should be acceptable.

You are certainly over-driving mixer inputs (pin 1 & 2). With input power above -20 dBm, distortion becomes significant. Output amplitude can only swing plus-or-minus 0.6V. Input voltage should certainly be less than 60 mV. The unused input (pin 2?) should be grounded through a capacitor (0.1uF or thereabouts).

Expect to see lots of high-frequency "stuff" at mixer outputs. To properly see the desired 0 - 1kHz signal, a low-pass filter with cut-off frequency of about 1 kHz is required.


You ask for a simpler approach: A XOR logic gate can function as a mixer (like SA612), or you can view it as a phase comparator.
One input connects to a 40 kHz fixed-frequency oscillator, while the other input connects to an amplified 40 kHz receiver. Both inputs should be logic-level square waves. Followed by an analog low-pass filter, you should see voltage wobble as the phase of your receiver's input transducer varies.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.