Tagged: labview

A Tutorial on Using RTL-SDR with LabView: Creating a Simple FM Demodulator

LabView is a popular visual programming environment often used in industry and by engineers for test, automation and control applications. It is somewhat similar to GNU Radio in that programming is done by connecting a series of various blocks together, each of which performs some function. The RTL-SDR is compatible with LabView via a simple RTL-SDR interface.

Recently Albert Lederer wrote in to us and wanted to share his beginners guide to creating an broadcast FM demodulator with an RTL-SDR in LabView. The tutorial focuses only on demodulating the mono part of the broadcast FM signal structure and provides a fully functional LabeView project file. Albert describes the signal chain implemented below:

1. The signal is received from the rtl-sdr device as IQ data. This is converted to a complex signal and the phase is extraced.

2. The phase correction removes phase discontinuities.

3. The key demodulation component in the chain is the phase derivative. The phase derivative takes the phase of the signal and creates a second signal that is composed only of the changes in frequency. This is then the demodulated signal.

4. The low pass filter is used to filter out frequencies above 15kHz, which do not contain the desired information.

5. The rational resample takes the signal, which is still at the sampled rate (in the examples case 286650Hz) and resamples it to something the sound card can handle. In this case, we are using a decimation factor of 13, which results in a 22050Hz audio stream. Actually, I worked this out the other way around. I wanted a 22050Hz audio stream and checked which sample rate would give me an integer decimation while keeping the RF sampling rate as low as possible.

The LabView Broadcast FM Demodulator
The LabView Broadcast FM Demodulator

Working towards an FPGA DSP Implementation with LabVIEW for the RTL-SDR

Back in August we posted how Albert Lederer had created a RTL-SDR interface for the LabVIEW visual programming language which could be run on a host PC. LabVIEW is a visual programming language which is used commonly by engineers and scientists to quickly build applications for things like product testing, system monitoring, instrument control etc.

In his latest post/tutorial uploaded a few days ago he shows how to run the RTL-SDR RF acquisition on a myRIO, which is a development processing board that can run Linux and has an on board FPGA. LabVIEW can then be used to control the RTL-SDR from the host PC.

The whole point of running the RTL-SDR on the myRIO is to eventually make use of the on board FPGA. In future posts he hopes to show us how to use the on board FPGA to offload digital signal processing (DSP) tasks,  which would significantly speed up applications.

Data flow for offloading RTL-SDR DSP tasks onto the FPGA
Data flow for offloading RTL-SDR DSP tasks onto the FPGA

A New LabVIEW interface for RTL-SDR Dongles

Today LabVIEW and RTL-SDR user Albert Lederer wrote in to let us know that he’s created a new LabVIEW interface for the RTL-SDR. LabVIEW is a visual programming language which is used commonly by engineers and scientists to quickly build applications for things like product testing, system monitoring, instrument control etc.

Currently there is already a LabVIEW interface for the RTL-SDR available called sdrLab. However sdrLab uses rtl_tcp for communication which can cause poor responsiveness and issues with corporate firewalls. Albert’s solution is instead a wrapper for rtlsdr.dll which allows LabVIEW to gain direct access to the RTL-SDR.

On his post Albert has created a write up that explains how his driver works, and how it can be used with LabVIEW. Keep an eye on Alberts future posts, as he writes that he intends to post a part two, where he will show how to attach an RTL-SDR to an NI myRIO.

An FFT in LabVIEW
An FFT in LabVIEW

SDRLab: An RTL-SDR Interface to LabVIEW for Educational Purposes

If you’re familiar with the LabVIEW software, there is now an RTL-SDR interface called SDRLab by Beküldte Andris. The software is able to capture the I/Q data from the RTL-SDR, and with that you can do educational experiments in LabVIEW, which is great for students. The author has also implemented a FM demodulator.

ha5kfu_sdrlab_release