Building Your First Waterfall & Frequency Plot

The purpose of this tutorial is to confirm your host setup, and use your Per Vices Crimson TNG as a signal source and receiver to pass data to a waterfall & frequency plot.

In this tutorial, we will cover:

You can also find the completed waterfall & frequency plot GNU Radio script here.

Part 1: Set Up and Configuring the Unit

In Part 1, we will be ensuring your Crimson TNG unit is properly connected.

1.1. How to physically setup your SDR

Note

Information on how to physically set up your unit can be found here.

Note

Information on how to configure your network can be found here.

1.2. Connect Rx to Tx using external SMA Loop Back for Waterfall plot

Caution

You MUST use an SMA connector with a 30dB attenuator to ensure safe operation of the Crimson TNG device.

Setting up Crimson TNG for the waterfall & frequency plot first involves looping Tx-A and Rx-A SMA jacks together on the front of the unit using an SMA connector with a 30dB attenuator. See Figure 3 below.

Figure 3: implementing external SMA loop back from Rx-A to Tx-A using an SMA connector with 30dB attenuator

Part 2: Testing Successful Setup and Operation

Note

Testing the successful setup and operation of your unit can be found here.

Part 3: Building Your First Waterfall & Frequency plot using GNU Radio

3.1. Launching GNU Radio

Next we will launch GNU Radio and begin the waterfall & frequency plot project. GNU Radio is a toolkit which allows us to prototype a software defined radio system using an easy to use graphical user interface (GUI). This allows us to connect signal processing function blocks in a flow chart, creating a program which communicates with our external Crimson TNG hardware.

When you open up a new project in GNU Radio, you will have two blocks: an Options and a Variable block. Double-click on the Options block, and do the following:

Similarly, double-click on the Variable block and change the following:

Figure 4: Default Blocks

3.2 Finding and Placing Blocks

We will now start constructing blocks that are wired together; forming the basis of our waterfall & frequency plot. The easiest way to place blocks is to grab and drag from the list of blocks on the right-hand side of GNU Radio’s interface Figure 5. The two main types of blocks are a source block (samples incoming waves/acts as a receiver) and sink block (convey output of our processing/acts as a transmitter). We are able to wire these blocks together by clicking on the output of a block, where a virtual cable appears, which we are then able to route to the input of another block. Also note that you can use the CTRL-F shortcut and a search bar will appear that allows you to easily find blocks for your GNU Radio project.

Figure 5: GNU Radio List of Blocks/Search Function

3.3. Placing and Wiring Blocks for our Waterfall & Frequency Plot

In our case, the waterfall & frequency plot will require the following two flow block diagrams: a signal generator sink and a waterfall & frequency sink.

First, we need to construct our signal generator sink block diagram, Figure 6, using the following blocks: Signal Source block, connected to the input of a Complex To Ishort block which is inputted into a UHD: USRP Sink block. We will need to change a few parameters by double-clicking on these blocks:

Figure 6: Signal Generator Sink

Second, we will construct the waterfall & frequency sink using blocks connected in following order: UHD: USRP Source, inputted to a Ishort to Complex block, which is then inputted to a QT GUI Frequency Sink and QT GUI Waterfall Sink. Again, we will need to change a few parameters on these blocks:

The figure below shows how the waterfall and frequency plot sink block diagram should look on your screen.

Figure 7: Waterfall and Frequency Sink

We also want to control the frequency and amplitude values of the waterfall & frequency plot, which can be accomplished using two QT GUI Range blocks.

The figure below shows how these two range blocks should look:

Figure 8: Frequency and Amplitude Range Blocks

3.4 Running Your First GNU Radio Script

In order to run the code, save your work and then press the play button on the top of the interface screen. The program will run, and a new window should appear which shows your frequency slider, amplitude slider, waterfall sink plot, and frequency sink plot, as shown in Figure 9.

Figure 9: Window of your waterfall and frequency plot

Note

By default, GNU Radio will automatically save a block prior to running it. You may want to make back-ups or use version control.

Part 4: Extending GNU Radio Script

You may also want to use your Crimson TNG on different channels or on multiple channels. Below we will go through how to perform a waterfall & frequency plot on a different channel and on multiple channels.

4.1. Modify Waterfall & Frequency Project Script to Different Channel

To make your waterfall & frequency plot work on a different channel, you simply need to move the SMA connector with 30dB attenuator external loop over to channels Tx-B and Rx-B, shown in FIgure 10 and change the stream channels parameter in the UHD: USRP Source and UHD: USRP Sink block to [1], as shown below in Figure 11.

Figure 10: Changing Crimson External SMA connector to Tx-B and Rx-B

Figure 11: Using a Different Stream Channel in GNU Radio

You should now be able to run this the same as we did in 3.4. and see a simlar new window appear.

4.2 Using Multiple Channels

Now we are going to make our GNU Radio script waterfall & frequency plot sink work using two channels; the Tx-A & Rx-A and Tx-C & Rx-C. We need to use two SMA connectors now to make an external loop for each channel, shown in Figure 11 below.

Figure 12: Multi-channel (Tx-A/Rx-A and Tx-C/Rx-C) external SMA Loops

Next, we will need to duplicate the signal generator sink block diagram shown in Figure 6. We can easily select multiple blocks by holding CTRL and clicking the relevant blocks, followed by copying and pasting. You will now have two block diagrams composed of a Signal Source to Complex to Ishort to UHD:USRP Sink: one block diagram which we will allocate to Tx-A/Rx-A and the other to Tx-C/Rx-C. We will need to make the following parameter changes to use multiple channels:

The entire block diagram should be similar to what is shown in the Figure 13 below.

Figure 13: Multi-channel Waterfall and Frequency Block Diagram

Finally, you can run the GNU Radio script and your output should produce two frequency and water plots, one for each channel, similar to what we had in 3.4.

Note

You can also double-click on the QT GUI Waterfall Sink, go into the “Config tab” and change the Line One Color parameter to get different color schemes for your plots.

You should now have something similar to Figure 14 shown below.

Figure 14: Multi-channel Waterfall and Frequency Plot