Some interesting links on digital signal processing and software defined radio:
The implementation of the SDR receiver is quite straightforward:
- An antenna is connected to one of the high-impedance analog inputs.
- The on-board ADC (125 MS/s sampling frequency, 14-bit resolution) digitizes the RF signal from the antenna.
- The data coming from the ADC is processed by a in-phase/quadrature (I/Q) digital down-converter (DDC) running on the Red Pitaya’s FPGA.
- The I/Q data is transmitted via TCP to the SDR programs such as SDR# and HDSDR.
The tunable frequency range covers from 0 Hz to 50 MHz.
The I/Q data rate is configurable and four settings are available: 50, 100, 250 and 500 kSPS.
The basic blocks of the digital down-converter (DDC) are shown on the following diagram:
The in-phase/quadrature (I/Q) demodulator is implemented using the CORDIC algorithm. CIC filter is used to decrease the data rate by a configurable factor within the range from 125 to 1250. FIR filter compensates for the drop in the CIC frequency response, filters out high frequencies and reduces the data rate by a factor of two.
FIR filter coefficients are calculated with the following code in R:
To get an idea of the combined (CIC and FIR) filter response, the following figure shows a 256k FFT display from the SDR# program when Red Pitaya inputs are not connected to anything:
The projects/sdr_receiver/server directory contains the source code of the TCP server (sdr-receiver.c) that transmits the I/Q data stream (up to 2 x 32 bit x 500 kSPS = 30.5 Mbit/s) to the SDR programs and receives commands to configure the decimation rate and the frequency of the sine and cosine waves used for the I/Q demodulation.
The SDR programs are communicating with the SDR radio hardware through an External Input Output Dynamic Link Library (ExtIO-DLL). The detailed specifications of this interface and the source code examples can be found at the following links:
The ExtIO plug-in can be built from the source code with Microsoft Visual C++ 2008 Express Edition.
A pre-built ExtIO plug-in for the Red Pitaya SDR receiver can be downloaded from this link.
For both SDR# and HDSDR, the
ExtIO_RedPitaya.dll file should be copied to the directory where the program is installed and the program will recognize it automatically at start-up.
Inspired by the “Wideband active loop antenna” article appeared in the January, 2000 issue of Elektor Electronics, I’ve built my antenna using 4 wire telephone cable (9 m, 4 x 0.2 mm2). A schematic and picture of the antenna connected to Red Pitaya is shown in the following figure:
With this antenna I can receive some MW and SW broadcast stations.
Screen shot and audio sample
Signal from a 300 kW broadcast MW transmitter, 25 km from the transmitter:
- Computer running MS Windows.
- Wired or wireless Ethernet connection between the computer and the Red Pitaya board.
- Connect an antenna to the IN2 connector on the Red Pitaya board.
- Download customized SD card image zip file.
- Copy the contents of the SD card image zip file to an SD card.
- Insert the SD card in Red Pitaya and connect the power.
- Download and install SDR# or HDSDR.
- Download and install Microsoft Visual C++ 2008 Redistributable.
- Download pre-built ExtIO plug-in for SDR# and HDSDR.
ExtIO_RedPitaya.dllinto the SDR# or HDSDR installation directory.
- Start SDR# or HDSDR.
- Select Red Pitaya SDR from the Source list in SDR# or from the Options [F7] → Select Input menu in HDSDR.
- Press Configure icon in SDR# or press ExtIO button in HDSDR, then type in the IP address of the Red Pitaya board and close the configuration window.
- Press Play icon in SDR# or press Start [F2] button in HDSDR.
Building from source
The installation of the development machine is described at this link.
The structure of the source code and of the development chain is described at this link.
Setting up the Vitis and Vivado environment:
Cloning the source code repository:
Building SD card image zip file: