Digital Mixers - Page 1
Forum section: electronics / rf-microwave

author: German_EE
author_rank: Super Contributor
timestamp: December 15, 2019, 10:34:50 am
content: Suppose I have two signals at TTL level, one at 2 MHz and one at 5 MHz. Is there a circuit that will mix these two signals up to 7 MHz in the digital domain rather than using an analog mixer with diodes and transformers?I tried AND, OR and XOR gates last night and whilst the results were interesting the output was neither a 3 MHz or a 7 MHz signal.

author: David Hess
author_rank: Super Contributor
timestamp: December 15, 2019, 12:18:04 pm
content: A d-type flip-flop can operate as a digital mixer. Check the service manual for the Tektronix TG501 time mark generator for an example of how this is done.

author: radiolistener
author_rank: Super Contributor
timestamp: December 15, 2019, 01:25:41 pm
content: Quote from: German_EE on December 15, 2019, 10:34:50 amin digital domain you can do it with high speed digital signal processing on FPGA. You're needs to implement upsampling, digital multiplier for both input. And digital filter to cut-off unwanted frequencies and get the frequency of interest.It will be much easier to mix it in analog domain, because in digital domain it needs a lot of high speed FPGA resources. It worth to do if you're implementing direct down conversion for a weak signal. But you will needs to use sine LO, otherwise you will get a lot of images from LO harmonics. So you will needs to implement NCO with pure sine output in digital domain.In short it works exactly the same as analog one. You will needs to use digital multiplier with two binary inputs instead of analog mixer. You're put two signals in digitized form into multiplier inputs and get mixed output in digital form.There is much more easy way to get higher frequency, you can use PLL for thatQuote from: German_EE on December 15, 2019, 10:34:50 amyou're needs to understand that TTL level signal has a square wave with fundamental frequency and it's harmonics. It has odd harmonics for perfect 50% duty cycle. For non symmetric square wave there also present even harmonics.For example:- 2 MHz square wave consists of the following frequencies: 2 MHz, 6 MHz, 10 MHz, 14 MHz, 18 MHz, etc- 5 MHz square wave consists of the following frequencies: 5 MHz, 15 MHz, 25 MHz, 35 MHz, 45 MHz, etcSo, if you mix two square waves with 2 MHz and 5 MHz, you will get on the output the mix of all these frequencies:2 MHz, 3 MHz, 5 MHz, 6 MHz, 7 MHz, 9 MHz, 10 MHz, etcin order to get just 7 MHz you will needs to use band pass filter with very narrow bandwidth.

author: Kalvin
author_rank: Super Contributor
timestamp: December 15, 2019, 02:07:55 pm
content: Quote from: David Hess on December 15, 2019, 12:18:04 pmHere is one mixer using a D flip-flop:http://www.seekic.com/circuit_diagram/Basic_Circuit/TTL_DIGITAL_MIXER.html

author: Kalvin
author_rank: Super Contributor
timestamp: December 15, 2019, 02:48:08 pm
content: XOR-gate should perform as a digital mixer. If you are interested in either sum or difference, you need to have a low-pass / high-pass or band-pass filter after the XOR-gate. Here is a digital low-pass filter (Circuit 20) and band-pass filter (Circuit 21) from RCA Integrated Circuits Manual. I have not simulated the circuit, but I guess they should be worth some effort.Edit: The low-pass and the band-pass filters presented may not behave as frequency selective low-pass/band-pass filters what are used in RF-domain. They seem to be more like frequency discriminators instead. So, you may still need to have an analog low-pass/band-pass filter after XOR-gate feeding a schmitt-trigger buffer.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 15, 2019, 03:03:18 pm
content: Quote from: German_EE on December 15, 2019, 10:34:50 amA one bit logic gate is also a one bit mathematical operator, meaning, for example, an AND gate is the same as a one bit multiplier. If we look at the truth table for an AND or for a multiplier (for one bit only) the truth tables are identical.Also, from the analog domain, a multiplier is what we call a "mixer" in radio, so an AND gate is certainly a 1 bit mixer and will produce (between many other frequencies), the expected 5+2=7 MHz and the 5-2=3 MHz.In conclusion, the expected frequencies are there, but you need to look in the frequency domain, with a FFT or Spectrum Analyzer to clearly see them.Works in a similar manner for the XOR gate. A 2 input OR gate is the equivalent of a 1 bit adder.In the time domain is hard to recognize the mixing products 7 and 3 MHz because of the many other resulting frequencies:- a symmetrical square wave of 2 MHz will also have plenty of odd order harmonics at 3*2=6, 5*2=10, 7*2=14 MHz and so on, up to infinity, but lower and lower in amplitude- same for the square 3 MHz, it will also have plenty of 3*3=9, 5*3=15, 7*3=21 MHz and so on- all the above harmonics will end up mixed, too, which will produce a very rich spectrum- a filter for any of the resulting frequency can extract the frequency of interestAre you trying to produce a 7MHz signal, or just studying digital mixing using logic gates?If all you want is to get a clean and constant 7MHz square wave, probably the easiest way to get that would be to use a filter tuned on 14 MHz. The filter will be fed only with the 2 MHz square wave (3 MHz square is not used here). This will produce a 14 MHz sinusoidal frequency of lower amplitude. Amplified the 14 MHz sinus to get a 14 MHz square wave. The 14 MHz will be divided with 2 by a flip-flop, thus getting a 7 MHz square wave as a result.

author: radiolistener
author_rank: Super Contributor
timestamp: December 15, 2019, 03:37:36 pm
content: Quote from: RoGeorge on December 15, 2019, 03:03:18 pmyes, that way also possible. 2 MHz square wave consists of 14 MHz, because this is 7-th harmonic of the fundamental (2 * 7 = 14). So, there is needs to cut-off fundamental and lower harmonics with high-pass filter. Then amplify result and put it into divider by 2. And get 7 MHz square wave on the output (14 MHz / 2 = 7 MHz).The high-pass filter needs to remove at least 10 MHz harmonic. So, HPF with cut-off 12-13 MHz should works good.

author: German_EE
author_rank: Super Contributor
timestamp: December 15, 2019, 04:29:44 pm
content: My eventual aim is as follows:1, Take a 10 MHz TTL signal and split it into three paths. Path one feeds a /2, path two feeds a /5 and path three contains the original signal.2. Mix the 2 MHz and the 5 MHz to generate 7 MHz.3. Mix the 7 MHz signal with the original 10 MHz to generate the 17 MHz outputI can't use a conventional divider in a PLL as 17 MHz is 1.7 times the reference, not an integer. I also can't use a DDS chip as the divider in a PLL as 17 MHz is less than twice the output so Nyqist becomes a problem. Mixers using a D FF do work, but only when mixing down, not up.I may have to bite the bullet here and use a pair of NE602 chips.

author: Kalvin
author_rank: Super Contributor
timestamp: December 15, 2019, 04:49:16 pm
content: So, you want to multiply your reference by 17 and divide by 10 - probably some PLL from Silicon Labs or some other manufacturer could do the trick? At least you could use integer values for the frequency multiplication and division.

author: unitedatoms
author_rank: Frequent Contributor
timestamp: January 03, 2020, 04:25:21 pm
content: The mixer works as intended (on paper).Consider the multiplication formula (similar to sinwave with positive and negative polarities involved):Case 1: HI * HI = HI, mixer conductsCase 2: HI * LO = LO, mixer invertsCase 3: LO * HI = LO, mixer invertsCase 4: LO * LO = HI, mixer conducts because it is double inversion (like two negative hafwaves of Sin(x) result in positive halfwave)http://tma.main.jp/logic/logic.php?lang=en&type=eq&eq=%28AB%29%2B%28%7EA%7EB%29The 2MHz mixed with 5MHz has 7MHz component visible on fourier at -12.5dBEdit: And also there is exactly 7 full phase rotations per each microsecond (with varying pulse widths, but more or less countable if you squeeze your eyes).

author: Yansi
author_rank: Super Contributor
timestamp: January 03, 2020, 06:17:08 pm
content: Quote from: German_EE on December 15, 2019, 04:29:44 pmmaking 17MHz out of 10Mhz is so freaking easy. I do not see where you have the problem.Divide the ref by 10, multiply by 17, done. Even the stupidest integer-PLL can do this. (PFD will run at 1 MHz).