RTL-SDR upconversion with diode ring mixer
This post describes my first experiments with using a homebrew upconverter to receive HF on an RTL-SDR dongle.
Problems with direct sampling
A previous post described my experiments with RTL-SDR direct sampling, where a short connector wire is connected directly to the RTL2832 chip, bypassing the internal device’s tuner. The connector wire is routed outside the plastic case of the RTL-SDR dongle, and a wire antenna is then connected to this short connector wire.
I encountered two major problems with this approach:
- Because this approach bypasses, in hardware, the internal tuner of the RTL-SDR device, the signal is no longer routed through the device’s software-controllable low-noise amplifier (LNA) stage. Therefore, it is no longer possible to control the signal gain via software. This is disadvantageous because with a broadband front-end, it is essential to control signal levels to minimize IMD.
- Even with no wire antenna connected, with only the short connector wire in place, severe breakthrough of broadcast FM stations was audible in shortwave frequency bands. Therefore, avoiding FM breakthrough with the direct sampling approach would require more careful wire routing, use of shielded conductors, adding extra shielding inside on the existing and small PCB, etc. This greatly complicates the design process.
Onward, and upward
I decided to try an upconversion approach instead, where the entire HF band from 0-30 MHz is converted upwards by about 50 MHz, to lie between 50 and 80 MHz, which is then directly receivable by the device.
I chose 50 MHz (approximately) because I happened to have a 49.8 MHz crystal available in my parts bin, purchased some time ago because I vaguely thought it might turn out to be useful someday. And indeed, it did turn out to be useful.
Constructing the oscillator
I built a simple 49.8-MHz Pierce oscillator roughly following the guidelines in http://www.rakon.com/component/docman/doc_download/234-single-transistor-crystal-oscillator-circuits. I used a 2N3904 transistor, which is barely suitable in this application. The transition frequency (ft) of the 2N3904 is about 250 MHz, and generally ft should be 10x greater than the desired oscillation frequency of 50 MHz, so ideally we should use a transistor with an ft of 500 MHz.
Power for the oscillator comes from a USB port of a USB hub, which supplies 5 volts, though the document above shows oscillators designed for a 3-volt supply.
Due to the unknown crystal parameters, my use of a 5-volt instead of a 3-volt supply, and slight deviations in my design from the recommended component values, I have no idea exactly how much power this oscillator is capable of delivering. As the oscillator is intended to drive a diode-ring mixer, the oscillator should provide a 7 dBm signal into the mixer’s LO port.
I strongly suspected that this single-transistor oscillator would not provide enough LO drive to properly drive the mixer. Nevertheless, I proceeded to construct the rest of the upconverter circuit, assuming the circuit would work well enough for me to hear something.
Constructing the mixer
Next I constructed the mixer. From my bag of about 100 1N4148 diodes, I selected a handful and picked 4 diodes that had roughly the same forward-voltage drop, as measured by a multimeter.
The 4 diodes were then twisted into a ring and soldered together.
Two trifilar-wound baluns were also constructed, each wound on a FT50-43 core. A YouTube video by W2AEW clearly illustrates the process: https://www.youtube.com/watch?v=a8ViWS61hsU.
Putting it all together
The diode ring was connected to the baluns. The LO was then connected to the LO input winding of the appropriate balun, and the IF output centre tap (on the other balun) was connected to a coaxial cable, that then connected to the RTL-SDR dongle’s antenna input. The RTL-SDR dongle was plugged into a small USB hub, that then connected to a laptop computer running Linux. Another USB cable connected to the hub provided power for the LO.
The entire constructed circuit looks as follows.
Here is a close-up image of the completed diode ring mixer.
Here is a close-up image of the oscillator portion of the converter. This construction practice is rather poor for 50 MHz, with long component leads acting as antennas that both radiate the oscillator signal and pick up stray signals from the environment. However, because the oscillator circuit is probably not yet in its final form, I did not attempt to miniaturise it yet.
I started the gqrx program on Linux and listened around 49.8 MHz to find the LO signal. Having found the LO signal, I determined its exact frequency on the software’s waterfall display, and entered the LO frequency into the appropriate field in the gqrx software, so that all displayed frequencies would have the LO frequency subtracted, to display the actual HF reception frequency (e.g. 7 MHz) instead of the converted frequency (e.g. 57 MHz).
I then connected a random wire antenna (about 2.5 meters length) to the mixer’s RF input port and attempted reception using the gqrx program on Linux.
Encouragingly, the noise level did increase when the antenna was connected, implying that the mixer/oscillator were at least working in some basic fashion. However, even with the LNA gain set to maximum, only one shortwave station was weakly audible around 6.9 MHz.
I then connected my broadband, active loop antenna (design by M0AYF, shown here: www.qsl.net/m0ayf/active-loop-receiving-antenna.html) to the RF input port. Then, with LNA gain set to about 50%, several shortwave stations were audible across the entire tuning range from 0-30 MHz. Setting the LNA gain too high caused many spurious signals to appear, which was immediately visible on the waterfall display as a sudden emergence of several spurious signals across the entire receiver bandwidth. Setting the LNA gain too low allowed no signal reception. In practice, setting the LNA gain was very easy — starting at 0, the gain is slowly increased until signal peaks and the noise floor from the active antenna become visible. After a certain gain setting, further increase in gain cause both the noise floor and the signals to increase. Gain should be backed off just before this point.
With the LNA gain set appropriately, it was possible to clearly listen to several shortwave broadcasts, and some amateur and maritime CW broadcasts.
However, it was not working perfectly:
- There was still some FM breakthrough at various parts of the shortwave spectrum, though nowhere nearly as bad as I experienced with direct sampling. A low-pass filter should fix this.
- Signal-to-noise ratio seemed lower than I expected and overall reception was noisy, compared with other videos I have seen of upconverted RTL-SDR reception. Also, CW stations sounded raspy. I can think of three possible reasons for the “noisiness”: (1) insufficient LO drive leading to excessive conversion loss in the mixer; (2) noise on the USB power supply line causing an unclean LO signal; and (3) noise in the switching power supply used to power the active antenna.
- Even in bands where I knew no signal to be present (e.g. from 20 MHz to 30 MHz in the evening, when these bands are closed), I could strongly receive shortwave broadcasts. These are spurious signals. A clean LO signal, and additional RF filtering and IF filtering, could alleviate this problem.
More RF and IF filtering is needed. Adding more filtering necessarily reduces the input bandwidth (into the mixer) and the output bandwidth (from the mixer), and this limited bandwidth unfortunately reduces some of the appeal of the RTL-SDR devices, namely the ability to instantly tune anywhere within the shortwave spectrum, and the ability to record 2.5-MHz-wide ranges of the HF spectrum for later playback. Perhaps a compromise would be to create a 2.5-MHz-wide, sharp-cutoff RF bandpass filter (e.g. 5.5 MHz to 8 MHz) and IF bandpass filter (e.g. 55.5 MHz to 58 MHz). That would cut off many sources of interference/IMD, while still allowing instant tuning within the 2.5-MHz range, and also still allowing recording of the entire 2.5-MHz-wide slice of spectrum.
LO signal radiation (due to long leads) and/or LO signal leakage into the IF port (due to imperfect mixer balance) may be desensitizing the receiver. Again, IF filtering should help here.
Finally, no particular attention was paid to proper termination of the mixer ports, but for best performance (minimum spurious signals) proper (pure resistive) termination of all mixer ports is important.