I fixed my radio transmitter

(This was originally posted on Google+.)

Well, I finally looked carefully at the signal coming out of my antenna and, yes, it turned out that most of the energy was being spent outside of the frequency I wanted to transmit on. However, it wasn't because of images and spurious transmissions that took most of the energy... It was because I was actually transmitting on the wrong frequency!

Keep reading because it wasn't just a case of "herp, derp, turned the knob to the wrong position."

In Software Defined Radio we work with quite basic transceivers whose mission is to receive a radio signal and transform it into a form a computer can process, and vice versa. To do that, a lot of mathematics are used in the computer, using something we call "complex numbers". Those complex numbers have two components: a real part and an imaginary part (the name "imaginary" was given to it when mathematicians didn't understand complex numbers yet, so they thought those numbers were less "real" than the numbers they had been using up to that point, but I digress).

So an SDR radio receiver takes a radio signal, does some electronic manipulations, and generates two signals that are converted into complex numbers by the computer. One of those signals, called I, will become those numbers' real parts, and the other signal, called Q, will become the imaginary parts.

When it's time to transmit, the computer takes the complex numbers' real parts and generates an I signal, and also generates a corresponding Q signal from the same numbers' imaginary parts. Those two signals go to the SDR transmitter, undergo some electronic transformations, and become a radio signal.

The problem with my setup was that the wires for the I and Q signals were crossed in the transmit path.

The effect of this is that the signal went out on the wrong frequency. Generally I had my "center frequency" set to 14.080 MHz and my transmit frequency set to 14.097 MHz. However, as I and Q were crossed, the transmitter took the real part as imaginary and the imaginary part as real, which mirrored the transmitted signal around the center frequency, and my transmission went out on 14.063 MHz. Oops!

Fortunately for me, I was transmitting with a small magnetic loop antenna, which has limited bandwidth (I explained this yesterday), so it is likely that only a very small fraction of this out-of-frequency signal actually went on the air, and the rest was converted to heat in the antenna.

Now, I don't know if I've mentioned this, but my signals had actually been received three or four times in the past two weeks. Also, when I used a shortwave radio to listen to my transmissions, I could hear my signal clearly on the right frequency. It's natural that you'd ask how this would be possible, if the signal was going out on the wrong frequency.

The answer is simple: before the complex numbers coming out of my computer get into the transmitter, they first go through a sound card, where they get turned into the I and Q electrical signals, and then they travel to the transmitter through audio cables. Stereo audio cables, to be precise, that have three wires: a ground wire, a wire for the left speaker, and a wire for the right speaker. In this setup, one of the speaker wires carries the I signal, and the other carries the Q signal. When you have two wires running in parallel carrying alternating currents, they induce small currents on each other, which causes a little bit of crosstalk.

So, with this crosstalk, by the time the signals arrive at the radio transmitter, the wire for the I signal will also carry a little bit of Q signal mixed in and vice versa, and when it's finally transmitted, there will be a tiny signal in the originally intended frequency. I could hear it on my radio because it was very close to the antenna, and it was sometimes heard farther away because I was using WSPR (pronounced "whisper"), a digital mode intended for low-power signals, so the people who received those signals were already listening for very faint transmissions.

After fixing this issue I sent another transmission through WSPR. This time, four stations heard me at once; the farthest of those stations was in Alaska. My second signal was heard in New Zealand. Both were transmitted with 1 watt of power. I think it is safe to say that both my transmitter and my homemade antenna work correctly now :)

And now I have a 50-watt amplifier to fix.