User:Duggabe: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(first draft of section 1)
Line 1: Line 1:
= Tutorials 2.0 =
The first section of this tutorial explains how an Amplitude Modulated (AM) signal can be created. Rather than using any real hardware for transmission, the signal is sent via a socket to the second section of the tutorial which explains how to demodulate the received signal. The only actual hardware involved is the computer's microphone input and speaker output. In the case of a Raspberry Pi computer, which has no microphone input, an alternative is presented.


<!--
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.
01/28/2020 23:02 UTC<br>
Work In Progress<br>
add notes about unused items<br>
-->


== Content we need to create or extract from existing work ==
== Prerequisites ==


*   '''Writing flowgraphs in C++''' (new to 3.8)
* [[Guided_Tutorial_GRC|'''Intro to GR usage: GRC and flowgraphs''']]
* [[Sample_Rate_Tutorial|'''Understanding sample rate''']]


== "Recycle Bin", content we no longer link to that we may eventually just delete ==
== AM transmitter ==


* [[Guided_Tutorial_GNU_Radio_in_Python|Programming GNU Radio in Python]]
Using gnuradio-companion (GRC), build this flowgraph of the transmitter section:
* [[TutorialsRemoteGUI|Remote GRC Operations]] - needs updating!
 
* [[UsingVim|Using VIM plugins for GNU Radio development]]
[[File:AM_transmit_fg.png|800px]]
* [[TutorialsQTGUI|QTGUI Tutorial]] - A tutorial on how to develop Python GNU Radio applications.
 
* [http://www.trondeau.com/gr-tutorial/ Tom Rondeau's gr-tutorial] - Some tutorials from the boss himself.
=== Block descriptions ===
* [[Guided_Tutorial_Extras_Sample_Rates#E2.3._A_Note_on_Resampling]] - covered by Understanding sample rate
 
* [[TutorialsCoreConcepts|Core concepts of GNU Radio applications]] - content used in other pages
* The Options block identifies the filename for the flowgraph, a title, author, etc.
* [[TutorialsWritePythonApplications|WritePythonApplications]] - content used in other pages
* The microphone input is defined by an Audio Source block. The parameters are:
* [[OutOfTreeModulesConfig|Tutorial on how to configure OOT packages to find and link against GNU Radio]] - for 3.7; also, most of the content is covered in Writing blocks in C++
** Sample rate - set to 48khz
* [[TutorialPythonFunctions|Writing a Python Function for GRC]] - for 3.7; content used in other pages; it doesn't work as written!
** Device name - for most microphone jacks built into the computer, the Device name can be left blank; for other cases, see [[Audio_Source#Device_Name]]
* [[TutorialsDebugging|How to debug your applications]] - not well written; would need major rework and update
* For the remainder of the flowgraph, a sample_rate of 768khz is used. This value is set in the Variable block. This value was chosen to give the 48khz carrier frequency 16 samples per cycle (48000 x 16 = 768000).
* [http://www.brainshark.com/SPS/vu?pi=zH8zQcV8dzAXPbz0 VOLK Introduction] - bad link
* To boost the 48khz sample rate of the audio input to the 768khz sample rate, a Repeat block with a value of 16 is used.
* The QT GUI Range block defines an Audio gain (volume) control with a range of 0 to 10. The default (starting) value is 1.
* The value of the volume control is used as a multiplier in the Multiply Const block.
* To create an AM signal, the carrier signal is multiplied by the audio signal plus one. The constant 1 creates the carrier when no audio is present.
* The carrier signal (in this example is 48khz) is generated by the Signal Source block.
* For a real radio transmitter, the output of the Multiply block would be fed to band-pass filters and then to Radio Frequency (RF) hardware. For this tutorial, we are sending the transmit signal to a data socket connected to the receiver section.
 
=== Note for Raspberry Pi ===
 
Since a Raspberry Pi has no audio input jack, there are two alternatives:
 
# use a USB audio dongle as is shown in the flowgraph.
# replace the Audio Source block with a Signal Source block and a Throttle block.
 
=== Test transmitter section ===
 
== AM receiver ==
 
=== Block descriptions ===
 
=== Testing ===

Revision as of 13:13, 10 April 2020

The first section of this tutorial explains how an Amplitude Modulated (AM) signal can be created. Rather than using any real hardware for transmission, the signal is sent via a socket to the second section of the tutorial which explains how to demodulate the received signal. The only actual hardware involved is the computer's microphone input and speaker output. In the case of a Raspberry Pi computer, which has no microphone input, an alternative is presented.

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

AM transmitter

Using gnuradio-companion (GRC), build this flowgraph of the transmitter section:

AM transmit fg.png

Block descriptions

  • The Options block identifies the filename for the flowgraph, a title, author, etc.
  • The microphone input is defined by an Audio Source block. The parameters are:
    • Sample rate - set to 48khz
    • Device name - for most microphone jacks built into the computer, the Device name can be left blank; for other cases, see Audio_Source#Device_Name
  • For the remainder of the flowgraph, a sample_rate of 768khz is used. This value is set in the Variable block. This value was chosen to give the 48khz carrier frequency 16 samples per cycle (48000 x 16 = 768000).
  • To boost the 48khz sample rate of the audio input to the 768khz sample rate, a Repeat block with a value of 16 is used.
  • The QT GUI Range block defines an Audio gain (volume) control with a range of 0 to 10. The default (starting) value is 1.
  • The value of the volume control is used as a multiplier in the Multiply Const block.
  • To create an AM signal, the carrier signal is multiplied by the audio signal plus one. The constant 1 creates the carrier when no audio is present.
  • The carrier signal (in this example is 48khz) is generated by the Signal Source block.
  • For a real radio transmitter, the output of the Multiply block would be fed to band-pass filters and then to Radio Frequency (RF) hardware. For this tutorial, we are sending the transmit signal to a data socket connected to the receiver section.

Note for Raspberry Pi

Since a Raspberry Pi has no audio input jack, there are two alternatives:

  1. use a USB audio dongle as is shown in the flowgraph.
  2. replace the Audio Source block with a Signal Source block and a Throttle block.

Test transmitter section

AM receiver

Block descriptions

Testing