SDR Utilities

I’ve been experimenting with an SDR dongle to see how it can be used as a 1.5GHz scalar network analyser, as a time domain reflectometer, and to estimate digital signal edge speeds. While doing that I’ve developed several general-purpose command-line utilities which capture and post-process power spectrums. These utilities are distributed with a MIT licence, and the code is at the bottom of this note.

  • rtlscan: scans, measures and displays a raw scalar power spectrum, and saves the power spectrum in a CSV file
  • rtlplot: displays one or more raw power spectrums
  • rtldiff: displays one or more calibrated power spectrums, i.e. the difference between multiple raw spectrums and a single reference or calibration spectrum
  • rtltdr: displays the impulse response implicit in a calibrated power spectrum

The graphs can have linear or logarithmic frequency axis, can be zoomed, panned and printed, and have text annotations added. The interaction with the SDR dongle is via Kyle Keen’s rtl_power program, so its capabilities and limitations are reflected in these utilities.

As is traditional, these are an unfinished work; I already know of the next change I would make, but I have not verified that it would be an improvement. Nonetheless, the utilities are usable.

Continue reading


Measuring Digital Signal Edge Speeds Without An Oscilloscope

This note shows that measuring a digital signal’s risetimes and falltimes does not require multi-GHz oscilloscopes; with imagination, very cheap test equipment is sufficient. Measurements show that even common-or-garden 74LVC gates can have 10%-90% transition times of around 625ps.

Continue reading

Measuring RF Filters with a Homebrew 1.5GHz Scalar Network Analyser Costing £32/$48

I already have useful low/medium frequency signal sources, spectrum analysers and oscilloscopes. Now I want to inexpensively measure RF filters and transmission line imperfections. This is possible for only £32/$48, as illustrated by the measured response of 300MHz and 460MHz high-pass filters and an open-stub transmission line filter:

Continue reading

Poor Man’s Homebrew TDR With 4cm Resolution – Part 1

The standard equipment for measuring impedance variations is a Time Domain Reflectometer, TDR. TDRs are very effective but resolving small elements requires a wide bandwidth, which implies the TDR will be very expensive. This note explores a £35/$55 alternative based on SDR dongles and noise sources, to see what can and cannot be achieved.

Although there are limitations, initial results are surprisingly good and useful. For example, Figure 1 shows reflections in two different transmission lines with an open-circuit stub 3.1m from the TDR.  The first stub is 19cm long, and the second is 29cm long.


Figure 1: 19cm & 29cm Stubs

The stubs’ differing lengths are clearly distinguishable.

Why do such impedance variations matter? Because with RF circuits and medium/high speed digital circuits, connections must be uniform-impedance correctly terminated transmission lines. Impedance discontinuities in RF circuits causes peaks and troughs in the frequency response, leading to poor performance and/or link failure. Impedance discontinuities in digital circuits cause signal integrity problems, leading to marginal operation and/or pattern-sensitive errors.

Continue reading

RTL SDR Dongles: Anomalous Frequency Domain Response

I have been experimenting with a cheap-and-cheerful SDR receiver containing an R802T2 front end and RTL2832U demodulator. My ultimate aim is to make a low-cost network and spectrum analyser, but before that it is necessary to understand the receiver’s strengths and limitations.

In an ideal world the receiver’s power-vs-frequency response would be flat, but inevitably that won’t be the case with such a low-cost device: it will need calibration. That calibration has revealed some strange quirks in the R802T2 RF front end frequency response, discussed below. While the anomalies don’t kill the idea of using the SDR dongle as a spectrum/network analyser, I would feel happier if their cause (and preferably cure) was understood.

Continue reading