B200-B205mini FM Receiver
B200B/B205mini FM Receiver
This tutorial describes how to receive broadcast commercial radio stations transmitting Frequency Modulated (FM) signals using the Ettus Research B200/B205 mini receiver. The following hardware is needed for this tutorial:
- B200/B205mini Receiver
- VHF Antenna
It is likely (but not guaranteed) that the Ettus Research B210/B200 will also work for this tutorial with no other modifications.
Please connect the antenna to the B200/B205mini, and plug the B200/B205 mini into the USB port on your computer.
Configure the USRP
Start by dragging in the UHD: USRP Source block into the flowgraph. UHD is a library for communicating with the family of USRP radio receivers and the USRP Source simplifies and abstracts communication with all of the USRP radio receivers using a single block.
First change the samp_rate to 2 MHz, which will be the sampling rate for the USRP.
This tutorial uses the frequency allocations within the United State of America, therefore you will need to modify them according to the allocation for your country. Within the USA, the smallest frequency of a radio station is 87.9 MHz and the largest frequency is 107.9 MHz [1], and each channel is separated by 200 kHz. A QT GUI Range block will be used to define different radio station frequencies for the USRP. Drag in a QT GUI Range block, open the properties and give it the name freq and the start frequency of 87.9 MHz, the stop frequency of 107.9 MHz and a step of 200 kHz:
Open the UHD: USRP Source block properties. Navigate to RF Options and then enter freq as the Center Frequency. Enable AGC.
The flowgraph should now look like the following. Note that the USRP block displays an updated sampling rate of 2 MHz, a center frequency of 87.9 MHz ,and an enabled AGC:
Add Time & Frequency Plots
Drag and drop a QT GUI Time Sink and QT GUI Frequency Sink block into the flowgraph. Open the properties of the QT GUI Time Sink and enable autoscaling:
Open the properties of the QT GUI Freq Sink and enter freq as the Center Frequency:
The flowgraph should now look like the following:
Run the flowgraph. A display window will show the time domain and frequency domain plots. The spectrum can be scanned by sliding the bar at the top of the screen or by entering a frequency manually.
FM Demodulator
Drag in an Audio Sink block. Open the properties. Note there are only a couple of options to select for the audio sampling rate. Select 48 kHz.
The flowgraph should now look like the following:
The question is how to get from the output of the USRP which is complex IQ sampled at 2 MHz to the input of the Audio Sink block which requires real samples at a sampling rate of 48 kHz? The rest of this tutorial will work backwards from the Audio Sink and establishing blocks and connections towards the output of the USRP.
The next block that is needed is the an FM demodulator. Drag in the WBFM Receive block, which takes complex IQ as an input, demodulates the FM thereby producing real output samples and also performs a decimation.
Recall from earlier in the tutorial that FM broadcast channels allocated 200 kHz, therefore we want to process as much of that bandwidth as possible with the FM demodulator. The WBFM Receive block can perform a decimation from a larger input sampling rate to the required Audio Sink input of 48 kHz. The decimation factor must be an integer, and 4*48 kHz = 192 kHz which is close to the total bandwidth of the frequency allocation.
Open the WBFM Receive properties and enter in the quadrature rate of 192 kHz and an audio decimation of 4. Note that the quadrature rate must be evenly divisible by the audio decimation factor, and that the audio decimation must be an integer.
The flowgraph should now look like the following:
A sample rate change is needed to convert from the USRP output of 2 MHz to the WBFM input of 192 kHz. The required sampling rate change can be simplified as 192000/2000000 = 192/2000 = 12/125, a rational ratio. Therefore the Rational Resampler block can be used to implement the sample rate change.
Drag in the Rational Resampler block and open the properties. Enter 12 for the interpolation and 125 for the decimation:
The flowgraph is now complete and should look like the following.
Run the flowgraph. The same GUI window that was displayed previously will appear but now audio should be playing through your computer. You can drag the bar at the top of the screen to tune to different channels.
Diagnosing Overrun Problems
When you run your flowgraph if you get a string of “OOOOOOOO” or messages about overflows then you have probably entered a sample rate wrong somewhere along the way. Double check all of the sample rate values and interpolation and decimation rate changes.