GNU Radio Drives Oscilloscope

These days we are spoiled with a lot of cheap test equipment. However, you can do a lot of measurements with nothing more than an oscilloscope. Add something like a signal generator and you can do even more. One classic technique for frequency measurement, for example, is using a scope to display a Lissajous pattern. [Franz Schaefer] has a video showing how to generate these useful curves with GNU Radio.

As we pointed out earlier, GNU Radio doesn’t have to be about radio–it is really just a Python-based signal processing laboratory. [Franz] uses GNU Radio Companion to create blocks which in turn create the patterns on an old analog scope.

So why do you care about Lissajous patterns (other than they make your scope look like a prop in a 1950s science fiction movie)? The pattern is the result of driving the X axis of the scope with one frequency and the Y axis with another (usually, the X axis is time). By plotting the two frequencies against each other, you can tell a lot about the two signals.

If the two signals have exactly the same frequency and phase, you will get a nice 45 degree sloping line on the display. If the phase is different, the line will form an ellipse or a circle or a line with a different slope depending on the relative phase (see figure left).

The pattern gets more interesting if the frequencies differ. The resulting pattern almost looks like something generated with a Spirograph toy. By counting the loops, you can determine the relationship between the two signals. For example, a 2:1 frequency ratio makes a little bow tie on the scope (two loops). As you can see in the image above, higher frequency ratios make more loops. You can see more examples in the video below or–even better–load up GNU Radio and try it on your own scope. For the very lazy, you can just use your Web browser.

I was looking for an excuse to play with the Web Audio API, so inspired by the article I made this Online 2-channel Function Generator and Oscilloscope with XY- and FFT- modes. The L and R Audio channels each have one oscillator.