Simple APT decoder prototype

I have wanted to implement a simple APT decoder for the NOAA weather satellites in GNU Radio for quite some time now, in particular since the USRP equipped with a TVRX or WBX daughterboard and a GNU Radio FM receiver can be an extremely good receiver for this purpose. Today I have spent some time looking at the details of decoding APT and actually ended up with a working prototype implemented using the GNU Radio Companion.

Continue reading “Simple APT decoder prototype”

GNU Radio 3.3.0 on Mac OS X – USRP

I have now tried the USRP on Mac OS X using the MacPorts installation and I am happy to report that it works very well. Indeed, the USRP is really plug and play on OS X and there is no need to configure udev or anything like it is the case on e.g. Ubuntu Linux. The video below shows the FM receiver listening on the local APRS frequency.

Continue reading “GNU Radio 3.3.0 on Mac OS X – USRP”

A different look at random noise

I was reading about the probability density function when I suddenly realised what the histogram sink in GNU Radio can be used for. I knew very well what a histogram is and how it used in e.g. physics, I just didn’t quite know what to use it for in a software radio.

Continue reading “A different look at random noise”

Simple SSB transmitter using complex bandpass filter

There are several ways to generate a single side band signal in a software radio and I am slowly exploring each and every one of them. For this first attempt I have decided to try using a basic amplitude modulation followed by a bandpass filter with complex taps that can select either the upper or the lower side bands.

Continue reading “Simple SSB transmitter using complex bandpass filter”

Playback of the Recorded IQ Data

Yesterday I described how to record the IQ data from the USRP focusing on generating unique file names every time the GNU Radio / GRC script is executed. Playing the recorded IQ data is really simple: We take the corresponding receiver application and replace the USRP source with a file source and a throttle block. Continue reading “Playback of the Recorded IQ Data”

Dynamic File Names in GNU Radio Companion

IQ data recorderI needed a quick USRP IQ data recorder today to record the APT downlink from NOAA satellites. This is really trivial to implement using the GNU Radio Companion, but I had to figure out how to use dynamic filenames to avoid overwriting previously recorded data. Of course, I could just rename each file when recording has finished but I am too lazy to do things like that. Using the current date and time in the file name seemed to be a good solution.

This quick how-to explains how to use the Python datetime module to generate a unique filename in GRC.

Continue reading “Dynamic File Names in GNU Radio Companion”

GRC Examples

Below you will find a few software defined radio examples implemented in the GNU Radio Companion. They are very simple yet functional examples I created while I was learning GNU Radio and SDR – I hope they can be useful to others too, who are learning GNU Radio and/or software defined radios.

These GRC scripts are not compatible with current GNU Radio. If you have GNU Radio 3.7 or later, use the grc_to_37.sh script to convert my GRC files to be compatible.

At the time of creation the only viable hardware option was the USRP series from Ettus Research. Therefore, the examples use UHD sources and sinks, but there is nothing wrong with changing these to e.g. gr-osmosdr blocks. You will, however, need to also update the sample rates throughout the flow graphs according to the device you are using.

You will find that in many of the examples tuning is done using a frequency translating FIR filter rather than changing the USRP frequency. This is because on some daughterboards (e.g. WBX) tuning is not fast enough for the user moving a GUI slider. If you are only using a daughterboard that is fast enough you can conveniently change the flow graph to tune the USRP directly and remove the frequency translating filter.

If you are looking for theoretical material for learning digital signal processing and software defined radios see Suggested Reading on the GNU Radio website. If you are an absolute newbie to SDR (like I was when I started) and haven’t even got a clue of what quadrature signals are, I suggest you start with Quadrature Signals: Complex, But Not Complicated and the excellent tutorials at Complex2Real.com.

Most recently (2014), Michael Ossmann has started his educational series called Software Defined Radio with HackRF which can be used for learning DSP and SDR.

The examples are hosted on Github, see csete/gnuradio-grc-examples or create a local clone using

  git clone https://github.com/csete/gnuradio-grc-examples.git

Table of Contents

  1. Narrow Band FM receiver
  2. AM Receiver
  3. SSB/CW Receiver
  4. All-in-one AM/FM/SSB/CW Receiver
  5. SSB Transmitter
  6. Recording IQ data using dynamic file names
  7. NOAA APT decoder


Narrow Band FM Receiver

This is a simple narrow band FM receiver with two NBFM demodulators to allow switching between 5kHz and 2.5kHz deviation:

  • Enter USRP frequency in a text field
  • Tune within the passband using frequency translating filter (fast tuning)
  • Variable filter width and shape
  • Squelch
  • Supports 5kHz and 2.5kHz deviation
  • Download the GRC file

The video below shows the narrow band FM receiver in action receiving the AO-51 amateur radio satellite using the USRP, WBX and an Arrow antenna.

FM receiver flow graph


AM Receiver

This is a simple AM receiver featuring a variable low pass filter and automatic gain control with fixed rate and levels:

  • Enter USRP frequency in a text field
  • Tune within the passband using frequency translating filter (fast tuning)
  • Variable filter width and shape
  • Automatic gain control
  • Download the GRC file

AM receiver flowgraph


SSB/CW Receiver

This is a simple SSB/CW receiver featuring a tunable band pass filter and automatic gain control with fast/medium/slow rate:

  • Enter USRP frequency in a text field
  • Tune within the passband using frequency translating filter (fast tuning)
  • Variable filter width, offset and shape
  • Sideband is selected using the filter
  • Automatic gain control (fast/medium/slow)
  • Download the GRC file

SSB/CW receiver implemented in GNU Radio Companion


All-in-one AM/FM/SSB/CW Receiver

Pending

SSB Transmitter

Bandpass filtering

This SSB transmitter is based on the simple principle of AM modulation, where the carrier is modulated by the audio signal. Of course, carrier does not have the same meaning in a software radio so we just modulate a complex sine wave wave with frequency 0Hz.

The output from the modulator is an AM signal and we select the desired side band using a complex band pass filter.

  • Enter USRP frequency in a text field
  • Tune within +/- 25kHz of the USRP frequency
  • Variable filter width
  • Level controls for audio, carrier, signal and USRP gain
  • Download the GRC file for LSB and USB.
Simple USB transmitter implemented in the GNU Radio Companion using a complex band pass filter.


Recording IQ data using dynamic file names

Recording IQ data in GNU Radio companion is very easy, we simply add a filesink to the flow graph and connect it to the data we want to record. To prevent previously recorded files to be deleted when we restart the flow graph we can use the current date and time to generate a unique filename every time the GNU Radio flow graphs is started. The usage of the Python datetime module for this purpose is explained in Dynamic File Names in GNU Radio Companion.

The flow graph shown below implements a simple WFM receiver for NOAA APT downlink and a simple IQ data recorder using this datetime trick.

WFM receiver with IQ data recorder

To play back the recorded IQ data we simply replace the USRP source in the receiver with a file source and a throttle block, see more in Playback of the Recorded IQ Data.

Flowgraph for playing back the recorded IQ data.

Example GRC files for recording and playback are also included in the GIT repository – they are called xyz_rec.grc and xyz_play.grc.

NOAA APT decoder

A simple prototype for decoding Automatic Picture Transmission (APT) from the NOAA polar orbiting weather satellites is presented in this post. Instead of WAV file input you can connect it directly to the output of a WFM receiver like the one presented in the previous section. Be sure to use the correct sample rates in the band pass filter and the first resampler! The sample rate for the decoder must be 9.6 ksps which should be clear if you read the description of how the decoder works.

Simple APT decoder

Sorry there is no GRC file, but it should be very easy to reproduce from the screenshot.

GNU Radio SSB/CW/AM/FM Receiver v0.6

New update of the simple receiver – version 0.6 – with the following changes:

  • Added frequency entry widget to change USRP frequency
  • Also created AM and narrow FM versions

Continue reading “GNU Radio SSB/CW/AM/FM Receiver v0.6”

Binaural CW Receiver with GNU Radio and USRP

Today I felt like doing an experiment that is not quite on my TODO list – a binaural CW receiver. A binaural CW receiver is a receiver that gives a spatial feeling while you are tuning. As I understand it, you have to use stereo where the signals move from one side to the other as you tune and are in the middle when you are tuned to the frequency.

Continue reading “Binaural CW Receiver with GNU Radio and USRP”

Improved AGC for the simple SSB receiver

Few days ago I wrote about how I upgraded the simple double side band receiver implemented in the GNU Radio Companion to a simple single side band receiver. This initial implementation used some default values for the AGC attack and decay rates. These values were acceptable; however, I wanted to spend some time trying to find better values that would correspond to Fast, Medium and Slow AGC – just as we are used to in commercial radios.

Continue reading “Improved AGC for the simple SSB receiver”