2
$\begingroup$

Suppose I have a 3.3 or 5V GPIO digital signal (from an Arduino or Raspberry Pi, etc.), periodically toggling at some HF or VHF frequency. Since it has such a "dirty" spectrum, I don't want to hook it up to an antenna. But I do want to examine the signal's frequency spectrum (including harmonics/spatter,etc.) and signal levels (S-meter readings, etc.), and modulation (AM, FM, if any) with one or more of my wide-band receivers (such as an analog shortwave radio, HF transceiver, VHF HT, RTL-SDR, Funcube dongle, and etc.)

How should I connect a CMOS digital output to a 50 ohm coax antenna input on a SW/HF/VHF radio receiver? e.g. what circuitry and construction is required for safe signal levels, DC isolation, shielding, ESD protection if needed, impedance match if needed, etc.?

$\endgroup$
1
  • $\begingroup$ Examining for harmonics is full of pitfalls - in the presence of a strong fundamental signal, how can you be sure they are generated by the transmitter, not the receiver? The traditional method is to use a high pass or notch filter to eliminate the fundamental, before any active devices. You can also just measure with several different attenuators and check that the harmonics and fundamental power have the same ratio in each test. As Phil says, there's a difficult balance. $\endgroup$
    – tomnexus
    Commented Mar 26, 2017 at 1:19

2 Answers 2

3
$\begingroup$

Looks like a 5V peak-to-peak sine wave into a 50 ohm load results in about 18 dBm of power (using my own Voltage to power converter and dBm ↔︎ watts converter tools so you might double-check the math). An unmodulated square wave would be 3 dB more than this; an AM or FM signal is probably somewhere in between.

This is probably a damaging amount of power to most receivers, where -50 dBm is a quite "loud" signal normally. Since it is oscillating only between 0 and 3.3/5V, there will be a DC offset so keep that in mind too.

Option 1: Attenuate (and isolate?)

I'm not sure how to find the limits for an HF transceiver but the RF test equipment I have ranges between -5 dBm (HackRF) to perhaps 10 dBm (RTL-SDR you don't mind replacing…). So at minimum you should have a 25 dB attenuator between a 5V sine wave and an SDR. To account for math errors or other surprises — such as accidentally enabling any pre-amps within your receiver! — start with much more attenuation and remove it until your signal is in the desired range.

You shouldn't need to worry too much about power ratings on the attenuator(s) since your signal is only a sixteenth of a watt — that may be a lot for the semiconducting junctions of a receiver but not the resistors in an attenuator!

If your receiver can't already handle a few volts of DC offset you'll need a DC isolator (basically a capacitor) in series too; the attenuator circuits I've seen do not provide this. For both DC isolation and RF attenuation, they are fairly simple circuits to DIY and commercial versions tend to be relatively inexpensive.

Option 2: Sample into a dummy load

Another option would be to drive the signal you're testing into dummy load and use an RF sampler to steal a small bit of the full signal for analysis. A sampler typically uses a suitable capacitance or mutual inductance to couple an analyzer into the test circuit. With this option, you shouldn't need additional DC isolation. Commercial variable RF sampler units tend to be somewhat expensive, but you can easily make a servicable fixed sampler yourself by modified coax tee and barrel.

Caveats

In both cases (attenuating and sampling) the goal is to dissipate most of the power through a resistance. I've been assuming a 50 ohm load, but the GPIO pins may be better served by something else. You could try figure out what the WSPR-Pi designer assumed for 20m or attempt to gain an general answer for this 2m question — but I'm not sure how much it really matters?

Note that I've also deliberately avoided the other issues (ESD protection, impedance matching) since I simply don't know enough about the risks or practical mitigations there.

$\endgroup$
2
$\begingroup$

what circuitry and construction is required for safe signal levels

The simple solution is to transmit into a dummy load (read, a 50 ohm resistor from the parts drawer) set near the receiver.

If that doesn't provide enough coupling, you can build an attenuator of any value you need with some resistors. Search for "T pad attenuator".

Find the safe input power for the receiver from the datasheet. If you don't have a datasheet, then you can also look at typical transmitter powers and path loss for your application and determine a "typical" value that way.

Keep in mind more is not better. With increasing power, receiver distortion increases, which is not good if you are trying to measure distortion. Too little power and you are below the noise floor. Somewhere in the middle is ideal.

DC isolation

If your transmitter is battery powered, or powered by a DC isolated power supply, then you are already set. It's possible your receiver is already DC isolated.

If you don't want to chance it, then a 1:1 transformer is simple enough, though its specific construction will depend a lot on the frequency of interest.

A series capacitor is also an option, making a high-pass filter with the load impedance. Just make the capacitor large enough that the cutoff of this high-pass filter is well below your transmitter frequency.

shielding

Use coax if you want shielding.

ESD protection if needed

Probably not needed. Any receiver designed to be connected to an antenna will be sufficiently robust already.

impedance match if needed

Since you will have a lot of attenuation, the impedance of the attenuator will dominate the impedance seen by either side.

It may be the case that your transmitter needs to see a higher impedance than the conventional 50 ohms to remain within its current output specifications. The simplest solution is to use an attenuator of whatever impedance the transmitter needs to see. This means the receiver won't see a 50 ohm source, but all that means is you're getting less than the maximum possible power out of the source. Since you're building an attenuator that's not a problem. There is such a thing as a resistive T match which can present a difference impedance to each side, though in this application it would be of little practical benefit.

Though keep in mind the load impedance can affect the transmitter's output. Unless your antenna is also a matched load across all frequencies, you may not get a realistic measurement this way. This is especially true if you are spewing noise from a GPIO pin into a random wire with zero filtering whatsoever.

$\endgroup$
2
  • 2
    $\begingroup$ It might have to be more than a 50 Ohm load, since many micro-controllers are spec'd to provide less than 20 mA per GPIO pin. $\endgroup$
    – hotpaw2
    Commented Mar 21, 2017 at 17:41
  • $\begingroup$ Good point. Edited. $\endgroup$ Commented Mar 22, 2017 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .