Radio Frequency Spectrum Analysis With PC Sound Cards
Radio Frequency Spectrum Analysis With PC Sound Cards
![Jochen Bauer](https://www.radiomuseum.org/image.cfm?image=d_jochen_bauer_2012.jpg&width=120&height=140)
Good quality radio frequency (RF) spectrum analyzers are quite expensive pieces of hardware. However, for the purposes of the hobbyist, a much simpler (and cheaper) setup using a frequency converter from radio frequency to audio frequency (AF) combined with PC sound card based AF spectrum analyzer software might suffice. I would like to present a simple setup that I'm using along with a discussion of it's problems and shortcomings (compared to a hardware RF spectrum analyzer) along with workarounds.
Let's start with the frequency converter (mixer). There's numerous options for building frequency converters. The range basically goes from heptode or octode vacuum tube based mixers to integrated circuit mixers. The circuit presented here uses a BF961 dual-gate MOSFET. The BF961 was originally intended for RF to intermediate frequency (IF) converters but it'll do very nicely in a RF to AF setup as well. The main problem is the drain load of the circuit. In a RF to IF application this will be a tuned IF circuit. Here, however we need a load suitable for the AF range from 0 to 22kHz that can be processed by the PC's sound card. Usually, one would use an (ohmic) resistor that forms a low pass filter with the input capacitance of the PC's sound card.
A quick look at the BF961's datasheet shows that this is not quite an option because with a typical quiescent drain current of 10mA and a positive supply voltage of 9-12 Volts the drain resistor could only be around 600 Ohms. Since the impedance of the sound card line input is normally 10kOhms or more we could easily use a much bigger drain resistor resulting in a higher voltage gain. What we need is an "AC-only resistor" that has no DC resistance, hence the drain could be kept at the positive supply voltage potential (bear in mind that this is the typical setup for RF to IF converters).
Luckily, such an AC-only resistor is quite easy to build using an AF output transformer for tube based audio output stages. An (ohmic) resistor R2 connected to the secondary side will show up across the terminals of the primary side as a resistor with R1=R2*sqrt(N1/N2) where N1 and N2 are the number of turns of the primary, resp. secondary coil. The big difference to a "real" resistor is that since a transformer is involved, it'll only work for AC currents. We can now easily create an AC-only resistor of around 10kOhms in the drain circuit. The AF output transformer will also serve as a low-pass filter for the output signal since it's large primary coil usually has a considerable parasitic parallel capacitance.
So here's the frequency conversion stage:
Gate #1 of the BF961 is provided with the RF input signal via a coupling capacitor while it's DC potential is set to 0V (ground) over a 1MOhms resistor. The local oscillator (LO) signal is fed into gate #2. Manual gain control of the mixing stage can be accomplished by setting the positive DC potential of gate #2 using a potentiometer. Refer to the BF961's data sheet for details on it's operating parameters. The AF output is connected to the line input of the PC's sound card.
The local oscillator voltage of 1Vpp is provided by a sine wave generator. This provides a more stable and accurate frequency reference than a simple home-made oscillator. After all, a sine wave generator will in most cases already be present in the hobbyist's lab since it's a relatively inexpensive piece of equipment (compared to an RF spectrum analyzer).
At this point, we need to talk about three major problems of this simple setup.
- There's no image frequency rejection. A frequency faf in the audio spectrum could be from a radio frequency that is faf above OR below the local oscillator frequency.
- AF signals such as mains hum and it's harmonics or other AF electric noise can intrude from the RF input or other parts of the setup picking up AF electric noise. These "phantom" (not down-mixed) AF signals will show up in the spectrum along with the down-mixed RF signals.
- There's no way to measure the absolute amplitude of RF signals.
There are, however, workarounds for these problems. Let's start in reverse order.
The absolute signal levels displayed by the AF spectrum analyzer software are of course determined by the absolute signal levels fed into the RF input of the mixing stage. However, there are too many unknown parameters in this simple setup to derive the absolute input signal levels from the indicated signal levels. Fortunately, in most cases only the relative signal levels (e.g. signal to noise ratio) are of interest.
Telling intruding AF signals (phantoms) from down-mixed RF signals is quite easy. If the oscillator is turned of, only the phantoms remain. Therefore, identifying phantoms is simply a matter of comparing displayed AF spectrums with the oscillator on and off. Since most PC sound card based spectrum analyzer software have a waterfall display mode where the signal levels are indicated as colors on a
down-moving spectrum (horizontal axis is frequency, vertical axis is time), making this oscillator on/off comparison quite simple. The following picture shows a waterfall output generated by the "Spectrum Lab" software written by DL4YHF with the oscillator first off (lower portion of the waterfall) and then on at 6105kHz (upper portion of the waterfall).
What can be seen here is some strong phantoms below 500Hz and some weaker phantoms in the rest of the spectrum ranging from 500Hz to 21kHz). With the oscillator on, only the phantoms below 500Hz are visible above the RF noise floor. We are also obviously receiving an RF signal that looks like an amplitude modulated broadcast station with the carrier frequency clearly visible and a modulation bandwidth of roughly 10kHz.
This immediately brings us to problem #2: There is no image frequency rejection in this simple setup. So how do we get the frequency of an RF signal from the AF spectrum and the oscillator frequency? Again, there is a simple workaround for this problem. From the AF spectrum we can tell the frequency difference (beat frequency) between the RF signal and the oscillator but not whether the RF signal is above or below the oscillator frequency. However, if we increase the oscillator frequency a little (e.g. by 1kHz) the frequency shift in the AF spectrum will tell us what we want to know: If the RF signal frequency is above the oscillator frequency, the two frequencies will move closer together, the beat frequency will decrease and the signal will move downwards (towards lower frequencies) in the AF spectrum. Likewise, if the RF signal frequency is below the oscillator frequency, the two frequencies
will move further apart, the beat frequency will increase and the signal will move upwards (towards higher frequencies) in the AF spectrum.
Like with the phantom identification the waterfall display mode of the spectrum analyzer software comes in handy again. The picture below shows the oscillator frequency being increased by 1kHz while receiving the RF signal already shown in the previous picture.
At the point where the oscillator frequency is increased from 6105kHz to 6106kHz the signal shifts 1kHz upwards in the AF spectrum. Hence, the RF signal frequency must be below the oscillator frequency. With the carrier signal at 10kHz in the AF spectrum at an oscillator frequency of 6105 kHz the RF carrier signal must be in the 49m shortwave broadcast band at 6095kHz.
One must, however, be careful when doing signal to noise ratio measurements. Since the noise floor from below and above the oscillator frequency is mapped onto the same AF spectrum, the indicated noise floor is twice as much as the real noise floor.
Let me conclude this article by showing a nice picture of a CW (Morse code) transmission in the Ham Radio band from 7000kHz to 7100kHz.
Again, in the middle of the waterfall display the oscillator frequency has been shifted to determine the correct frequency of the transmission. Now that we have the CW transmission available as audio input to our PC we could even use Morse code decoding software to decipher it.
In summary, RF to AF down-mixing and PC sound card based spectrum analysis is a cost-efficient way to do basic RF spectrum measurements. Applications include general exploration, signal to noise ratio measurements and analysis of specific RF interference sources like switched mode power supply units and powerline modems.
To thank the Author because you find the post helpful or well done.