User:Duggabe: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(first draft)
No edit summary
Line 5: Line 5:


One of the great strengths of GNU Radio is how easy it is to move from simulation to real-world operation. In this tutorial, we will build on what you have learned so far and create a complete FM radio receiver which you can use to listen to your local FM radio stations. Also we will discuss considerations that come into play when working with real-world radio hardware.
One of the great strengths of GNU Radio is how easy it is to move from simulation to real-world operation. In this tutorial, we will build on what you have learned so far and create a complete FM radio receiver which you can use to listen to your local FM radio stations. Also we will discuss considerations that come into play when working with real-world radio hardware.
This tutorial is divided into two sections: "Signal Processing" and "Hardware". Various popular hardware devices are shown so that you can build with your available device.
This tutorial can be performed with either GNU Radio (GR) version 3.7 or 3.8 (and later). The Graphical User Interface gnuradio-companion (GRC) is used to create a flowgraph for each section.


== Prerequisites ==
== Prerequisites ==
Line 20: Line 16:
== What Will I Need? ==
== What Will I Need? ==


Even if you don't have an actual radio to work with, this tutorial is still useful. You can simply use a recording from an actual radio, with nothing done to the data. We have provided a recording, which you can find [https://github.com/gnuradio/gr-tutorial/blob/master/examples/tutorial6/fm_101.8MHz_1Msps.cfile in the gr-tutorials repository]. You can use this in your flowgraph to simulate hardware passing you samples.
Even if you don't have an actual radio to work with, this tutorial is still useful. Perform the following steps:
 
* Go to https://github.com/gnuradio/gr-tutorial/blob/master/examples/tutorial6/fm_101.8MHz_1Msps.cfile in your browser and click Download.
** If not the default, select your Downloads directory.


This tutorial will be most useful, however, if you have a piece of radio hardware that you can use with GNU Radio. There are a large number of vendors who provide hardware with GNU Radio drivers. They span from very cheap $20 receivers to very high-performance tens-of-thousands-of-dollars systems. See [[Hardware]] for additional information.
This tutorial will be most useful, however, if you have a piece of radio hardware that you can use with GNU Radio. There are a large number of vendors who provide hardware with GNU Radio drivers. They span from very cheap $20 receivers to very high-performance tens-of-thousands-of-dollars systems. See [[Hardware]] for additional information.
This tutorial is possible if you have a radio that can receive the broadcast FM band. Most countries allocate between ~87 MHz and ~108 MHz to FM broadcast radio, with some slight variations in that range.


== Building an FM Radio Receiver ==
== Building an FM Radio Receiver ==


This tutorial is divided into two sections: "Signal Processing" and "Hardware". Various popular hardware devices are shown so that you can build with your available device.


=== GNU Radio Signal Processing ===
=== GNU Radio Signal Processing ===
Using gnuradio-companion (GRC) and the following Block descriptions, build this flowgraph:<br>
[[File:FM_receiver_fg.png|800px]]
==== Block descriptions ====
* The Options block identifies the filename for the flowgraph, a title, author, etc.
** id: FM_receive
** Title: Broadcast FM receiver
** click Apply
** click OK
** click on File -> Save As&nbsp;&nbsp;Use the file name 'FM_receive'. the extension '.grc' is added automatically
* Variable block
** id: samp_rate
** value: 384000
* Variable block
** id: rf_decim
** value: 1000
* Variable block
** id: interp
** value: 384
* Variable block
** id: deviation
** value: 75000
* Variable block
** id: audio_decim
** value: 8
* The QT GUI Range block defines an Audio gain (volume) control
** id: volume
** default value: 0.3
** start: 0.0
** stop: 1.0
** step: 0.1
** Widget: slider (or you can choose whichever you like)
* File Source
** File: /home/barry/Downloads/fm_101.8MHz_1Msps.cfile    (use your file path)
** Output Type: Complex
** Repeat: Yes
* Rational Resampler
** Type: Complex -> Complex (Complex Taps)
** Interpolation: interp
** Decimation: rf_decim
* FM Demod
** Channel Rate: samp_rate
** Audio Decimation: audio_decim
** Deviation: deviation
** Audio Pass: 16000
** Audio Stop: 20000
* The value of the volume control is used as a multiplier in the Multiply Const block.
** Constant: volume
* The speaker output is created by an Audio Sink block. The parameters are:
** Sample rate: set to 48khz (use the pull-down)
** Device name: for most speakers (or headphone jacks) built into the computer, the Device name can be left blank; for other cases, see [[Audio_Sink#Device_Name]]
==== Testing ====
Using GRC, click the Run icon or click Run -> Execute from the menu. After a few seconds, a GUI window will open with the Volume control and you should hear the radio station.
To terminate the process cleanly, click on the 'X' in the upper corner of the GUI rather than using Control-C.


=== Hardware Front End ===
=== Hardware Front End ===

Revision as of 20:49, 2 May 2020

DRAFT REVISION Guided_Tutorial_Hardware_Considerations

Introduction

One of the great strengths of GNU Radio is how easy it is to move from simulation to real-world operation. In this tutorial, we will build on what you have learned so far and create a complete FM radio receiver which you can use to listen to your local FM radio stations. Also we will discuss considerations that come into play when working with real-world radio hardware.

Prerequisites

What Will I Need?

Even if you don't have an actual radio to work with, this tutorial is still useful. Perform the following steps:

This tutorial will be most useful, however, if you have a piece of radio hardware that you can use with GNU Radio. There are a large number of vendors who provide hardware with GNU Radio drivers. They span from very cheap $20 receivers to very high-performance tens-of-thousands-of-dollars systems. See Hardware for additional information.

Building an FM Radio Receiver

This tutorial is divided into two sections: "Signal Processing" and "Hardware". Various popular hardware devices are shown so that you can build with your available device.

GNU Radio Signal Processing

Using gnuradio-companion (GRC) and the following Block descriptions, build this flowgraph:

FM receiver fg.png

Block descriptions

  • The Options block identifies the filename for the flowgraph, a title, author, etc.
    • id: FM_receive
    • Title: Broadcast FM receiver
    • click Apply
    • click OK
    • click on File -> Save As  Use the file name 'FM_receive'. the extension '.grc' is added automatically
  • Variable block
    • id: samp_rate
    • value: 384000
  • Variable block
    • id: rf_decim
    • value: 1000
  • Variable block
    • id: interp
    • value: 384
  • Variable block
    • id: deviation
    • value: 75000
  • Variable block
    • id: audio_decim
    • value: 8
  • The QT GUI Range block defines an Audio gain (volume) control
    • id: volume
    • default value: 0.3
    • start: 0.0
    • stop: 1.0
    • step: 0.1
    • Widget: slider (or you can choose whichever you like)
  • File Source
    • File: /home/barry/Downloads/fm_101.8MHz_1Msps.cfile (use your file path)
    • Output Type: Complex
    • Repeat: Yes
  • Rational Resampler
    • Type: Complex -> Complex (Complex Taps)
    • Interpolation: interp
    • Decimation: rf_decim
  • FM Demod
    • Channel Rate: samp_rate
    • Audio Decimation: audio_decim
    • Deviation: deviation
    • Audio Pass: 16000
    • Audio Stop: 20000
  • The value of the volume control is used as a multiplier in the Multiply Const block.
    • Constant: volume
  • The speaker output is created by an Audio Sink block. The parameters are:
    • Sample rate: set to 48khz (use the pull-down)
    • Device name: for most speakers (or headphone jacks) built into the computer, the Device name can be left blank; for other cases, see Audio_Sink#Device_Name

Testing

Using GRC, click the Run icon or click Run -> Execute from the menu. After a few seconds, a GUI window will open with the Volume control and you should hear the radio station.

To terminate the process cleanly, click on the 'X' in the upper corner of the GUI rather than using Control-C.

Hardware Front End

UHD / USRP

ADALM-PLUTO

RTL-SDR dongle

FunCube Pro+