B200-B205mini FM Receiver: Difference between revisions
(adding commas) |
|||
(36 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div style="float:right"> | |||
{{Template:BeginnerTutorials}} | |||
</div> | |||
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: | This tutorial describes how to receive broadcast commercial radio stations transmitting Frequency Modulated (FM) signals using the Ettus Research B200/B205 mini receiver. | ||
The previous tutorial, [[RTL-SDR_FM_Receiver|RTL-SDR FM Receiver]], describes how to build a broadcast FM receiver using an RTL-SDR receiver. | |||
The following hardware is needed for this tutorial: | |||
* B200/B205mini Receiver | * B200/B205mini Receiver | ||
* VHF Antenna | * VHF Antenna | ||
Line 11: | Line 17: | ||
==Configure the USRP== | ==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. | 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. | ||
[[File:B200mini_FM_Receiver_add_usrp_block.png]] | [[File:B200mini_FM_Receiver_add_usrp_block.png]] | ||
First change the samp_rate to 2 MHz, which will be the sampling rate for the USRP. | |||
First change the ''samp_rate'' to 2 MHz, which will be the sampling rate for the USRP. | |||
[[File:B200mini_FM_Receiver_change_samp_rate.png]] | [[File:B200mini_FM_Receiver_change_samp_rate.png]] | ||
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 [https://en.wikipedia.org/wiki/FM_broadcasting_in_the_United_States], 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: | |||
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 [https://en.wikipedia.org/wiki/FM_broadcasting_in_the_United_States], 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: | |||
[[File:B200mini_FM_Receiver_qt_gui_range_freq.png]] | [[File:B200mini_FM_Receiver_qt_gui_range_freq.png]] | ||
Open the UHD: USRP Source block properties. Navigate to RF Options and then enter freq as the Center Frequency. Enable AGC. | |||
Open the '''UHD: USRP Source''' block properties. Navigate to ''RF Options'' and then enter ''freq'' as the Center Frequency. Enable AGC. | |||
[[File:B200mini_FM_Receiver_usrp_freq.png]] | [[File:B200mini_FM_Receiver_usrp_freq.png]] | ||
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: | 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: | ||
[[File:B200mini_FM_Receiver_updated_freq_samp_rate.png]] | [[File:B200mini_FM_Receiver_updated_freq_samp_rate.png]] | ||
==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: | |||
[[File:B200mini_FM_Receiver_time_sink_autoscale.png]] | |||
Open the properties of the '''QT GUI Freq Sink''' and enter ''freq'' as the Center Frequency: | |||
[[File:B200mini_FM_Receiver_freq_sink_freq.png]] | |||
The flowgraph should now look like the following: | |||
[[File:B200mini_FM_Receiver_basic_scanner_flowgraph.png]] | |||
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. | |||
[[File:B200mini_FM_Receiver_basic_scanner_output.png|500px]] | |||
==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. | |||
[[File:B200mini_FM_Receiver_audio_sink_samp_rate.png]] | |||
The flowgraph should now look like the following: | |||
[[File:B200mini_FM_Receiver_flowgraph_audio_sink.png]] | |||
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. | |||
[[File:B200mini_FM_Receiver_flowgraph_wbfm_receive.png]] | |||
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. | |||
[[File:B200mini_FM_Receiver_wbfm_receive_properties.png]] | |||
The flowgraph should now look like the following: | |||
[[File:B200mini_FM_Receiver_flowgraph_wbfm_set_properties.png]] | |||
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: | |||
[[File:B200mini_FM_Receiver_rational_resampler_properties.png]] | |||
The flowgraph is now complete and should look like the following. | |||
[[File:B200mini_FM_Receiver_flowgraph_rational_resampler.png]] | |||
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. | |||
[[File:B200mini_FM_Receiver_final_output.png|500px]] | |||
==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. | |||
[[File:B200mini_FM_Receiver_sample_rate_overflows.png]] | |||
The previous tutorial, [[RTL-SDR_FM_Receiver|RTL-SDR FM Receiver]], describes how to build a broadcast FM receiver using an RTL-SDR receiver. |
Latest revision as of 22:36, 12 June 2024
Beginner Tutorials
Introducing GNU Radio Flowgraph Fundamentals
Creating and Modifying Python Blocks DSP Blocks
SDR Hardware |
This tutorial describes how to receive broadcast commercial radio stations transmitting Frequency Modulated (FM) signals using the Ettus Research B200/B205 mini receiver.
The previous tutorial, RTL-SDR FM Receiver, describes how to build a broadcast FM receiver using an RTL-SDR 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.
The previous tutorial, RTL-SDR FM Receiver, describes how to build a broadcast FM receiver using an RTL-SDR receiver.