Close

Moar Range!

A project log for Serial Port SDR

Transmit radio signals using just a serial port? You bet!

ted-yapoTed Yapo 12/05/2018 at 02:512 Comments

I added a filter, a cascade of two amplifiers and a half-decent antenna, and achieved around a 10-foot range controlling the 27MHz toy truck with a FT232RL serial port as a transmitter.  The experiment also proves that it's the 43rd harmonic (and perhaps a few neighbors) that's controlling the truck, and not the fundamental overloading the receiver.

The antenna is on the right.  It's really a lousy dual-band 2m/70cm amateur band antenna, but the toy truck doesn't know this. It's probably better than the random length of wire I had been using, and it had the right connector already :-)

You recall from last time that I'm using the 43rd harmonic of a 631kHz signal, because out of the limited range of baud rates the FT232RL can manage, this comes the closest to the 27.145MHz RC frequency.  The harmonics are pretty strong, but even a perfect square wave will have the 43rd harmonic down 33dB from the fundamental (20log10(1/43)).  In this case, it's more like -37dB.  (Note that there's a 10dB attenuator in the signal path for this measurement; the absolute numbers are 10dB higher.)

I wanted to knock down the strong lower frequencies and leave just those near 27MHz.  For a filter, I combined a low-pass design with a coupled resonator bandpass, shown here constructed ugly-style on a scrap of copper clad.

The schematic is shown with the nominal component values, although the actual circuit contains a lot of parasitics, and the inductors are probably off a bit from the estimated values.  I added a 3-10pF trimmer in series with the 3.3pF coupling cap, and tuned to get a narrow, flat passband.  I assumed the FT232RL had around 11-ohms of output impedance, so added a 39-ohm resistor to make the source impedance 50 ohms.

The inductors are all 9 turns of 22 or 24 Ga wire on T37-2 toroids.  They calculate out to 324nH, but I suspect from the performance of the circuit that they're closer to 400nH including the parasitics from the long leads and my winding style.  The filter response measures out nicely on the spectrum analyzer after tweaking the trimmer and compressing the coil turns a bit:

As you can see, the response is 10dB down at a bandwidth of around 2 MHz.  That picks out just a few harmonics around 27MHz, although they are pretty weak at this point:

To boost these few frequencies to usable levels, I added a cascade of two amplifiers, first a PGA-103 followed by a Mini-circuits ZFL-500.  I used these two because they were the first I found in the box that gave enough gain together.  The PGA-103 isn't spec'd down to 27 MHz (datasheet says 50), but it seems to work fine.  I did the right thing and used the lower-noise amp first, even though it has a higher P1dB in this case :-) 

Together, they give a nice 37dB boost to the 27MHz signal:

But, this gain does resurrect some of the fundamental and low harmonics, as seen here in a wider span:

The fundamental is still down 10dB from the 27MHz line, so I'm fairly confident that's not controlling the truck.  After the whole chain, the 27MHz signal is at around -5dBm, or approximately 140uW.  It's a flea's burp, but it does control the truck out to about 10 feet.

Overall, this seems like a lot of work, but I really wanted to see if it was that 43rd harmonic at work or not.  I'm confident that this isn't just a case of receiver overload, and that the serial-port SDR is indeed transmitting a usable signal on 27MHz.

Up Next

You know you want to use your serial port as another audio output.

I'm stalling on the receive side, hoping for some serious inspiration :-)

Discussions

zoobab wrote 12/07/2018 at 08:02 point

Have you tried ch340g chip?

  Are you sure? yes | no

Ted Yapo wrote 12/07/2018 at 13:56 point

Yes, and the ch340g is a strange beast.  On transmit, it seems to always use two stop bits at high baud rates, regardless of how you set it.  For instance, set to 19200 8N1 it uses a single stop bit, so the output is a 9600 Hz square wave.  Set to 2000000 8N1, you can clearly see it using two stop bits on an oscilloscope.  The output is identical (2 stop bits) when set to 1, 1.5 or 2.

Using extra stop bits doesn't even get noticed by a UART receiver, it just slows down the communication speed (11 bits slots per byte instead of 10), but it degrades the audio transmission using my method badly.  You can see a proof-of-concept with the CH340G, but it has nowhere near the quality of an FT232RL for instance.  There may be other reasons the CH40G doesn't work well in this "hack" either, but I haven't investigated very thoroughly.

  Are you sure? yes | no