FM Receiver - The Hello World of HackRF and GNURadio

HackRF Tutorials

FM Receiver - The Hello World of HackRF and GNURadio

Postby admin » Sat Aug 24, 2013 1:43 am

This tutorial is for beginners, the FM Receiver is very much the hello world of SDR, For this tutorial I will assume you have booted your machine from the fantastic HackRF ready live linux iso avaliable here Log in or register to see all links

We will start by opening up gnuradio companion to do this open a terminal and enter the following command:

gnuradio-companion


You should see something like below:

Start.png
Start.png (121.71 KiB) Viewed 4956 times


Now we need to populate our flow graph with the blocks needed for the radio, each block performs a different function on the incoming signal these will become more apparent as we go along. To find a block click on anything in the list on the right hand side and start typing the name of the block, once you have found it just drag it in to the center screen like so:

Search.png
Search.png (152.17 KiB) Viewed 4956 times


I am not going to detail each block to be placed on the flow graph, Simply copy the image below and put all the blocks in the same positions and connect them in the same way. To connect blocks just click on the output of one block and then the input of the block you want to connected it to, dont worry about any settings at this point we will get to it later:

FM-Rec.png
FM-Rec.png (114.52 KiB) Viewed 4956 times


Now to the configurations, the first is simple double click on the samp_rate and set Value to 5e6. For the rest of the configurations simple copy the following screencaps and copy them exactly:

First if the WX Gui Slider

freq.png
freq.png (33.99 KiB) Viewed 4956 times


Now Osmocom Source

osmo.png
osmo.png (51.85 KiB) Viewed 4956 times


And the Frequency Xlating FIR Filter

Xlating.png
Xlating.png (30.7 KiB) Viewed 4956 times


The last few are easy, double click WBFM Receive set the quadratur rate to 264600 and the Audio Decimation to 6. For the Waterfall Sink before WBFM Receive set the Sample Rate to 264600 and for the FFT Sink after WBFM Receive set the Sample Rate to 44100. Last thing set the Audio Sink Sample Rate to 44100. Now save the flow graph and your done. To start your fm reciever go to the top menu and click build then execute.

final.png
final.png (297.36 KiB) Viewed 4956 times


You should now see the screen above, assuming you have it right using the slider bar along the top you can tune in to any local fm station. Congrats on your first reciever and welcome the the exciting world of sofware defined radio !!!

** PS
When you are connecting blocks you may have an issue with the connection turning red, This mean they are incompatible data types to fix you will need to go in to one block and modify the Type and make sure both blocks are Float or Complex etc
admin
Site Admin
 
Posts: 28
Joined: Mon Nov 19, 2012 11:54 pm

Re: FM Receiver - The Hello World of HackRF and GNURadio

Postby etotman » Sun Aug 25, 2013 11:11 pm

This tutorial worked great thanks! I noticed that the tuning frequency is off by exactly 1 Mhz. I changed the center frequency in the Frequency Xlation FIR Filter reducing it to 100 Khz and now the tuning frequency is off by 100 Khz. When I try an offset of 0 the audio is garbled.
etotman
 
Posts: 1
Joined: Sun Aug 25, 2013 11:06 pm

Re: FM Receiver - The Hello World of HackRF and GNURadio

Postby admin » Mon Aug 26, 2013 1:07 am

The tuning is offset by 1Mhz simply to avoid the big DC spike at the 0hz point this is a common problem in SDR and the reason it does not sound right when you tune it with 0 offset. if you want the waterfall to display the correct frequency you only need to set its baseband to "freq + 1000000".
admin
Site Admin
 
Posts: 28
Joined: Mon Nov 19, 2012 11:54 pm

Re: FM Receiver - The Hello World of HackRF and GNURadio

Postby daniel » Mon Sep 02, 2013 6:45 am

thanks for the tutorial.
it was easy to follow.
daniel
 
Posts: 7
Joined: Sun Jul 28, 2013 4:46 am


Return to Tutorial

Who is online

Users browsing this forum: No registered users and 1 guest

cron