1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00
sdrangel/plugins/samplesource/plutosdrinput
2017-09-11 01:30:27 +02:00
..
CMakeLists.txt PlutoSDR input: added thread class 2017-09-06 06:15:38 +02:00
plutosdrinput.cpp PlutoSDR input: restore FIR and Sample Rate values after the limits have been updated 2017-09-10 19:55:13 +02:00
plutosdrinput.h PlutoSDR input: set FIR bandwidth limits and sample rate limits dynamically 2017-09-10 19:37:23 +02:00
plutosdrinputgui.cpp PlutoSDR input: fixed frequency setting from preset deserialization 2017-09-10 23:38:50 +02:00
plutosdrinputgui.h PlutoSDR input: set FIR bandwidth limits and sample rate limits dynamically 2017-09-10 19:37:23 +02:00
plutosdrinputgui.ui PlutoSDR input: GUI tuning 2017-09-10 23:53:23 +02:00
plutosdrinputplugin.cpp PlutoSDR input: restored version 3.7.0 2017-09-10 18:45:41 +02:00
plutosdrinputplugin.h GUI segregation: renamed methods and attributes 2017-09-03 20:24:17 +02:00
plutosdrinputsettings.cpp PlutoSDR input: debug (2) 2017-09-09 10:44:42 +02:00
plutosdrinputsettings.h PlutoSDR input: debug (2) 2017-09-09 10:44:42 +02:00
plutosdrinputthread.cpp PlutoSDR input: cosmetic changes 2017-09-10 17:44:34 +02:00
plutosdrinputthread.h PlutoSDR input: corrected I/Q loop processing as interleaved and not I/Q sample block 2017-09-10 16:58:48 +02:00
readme.md PlutoSDR input: added documentation 2017-09-11 01:30:27 +02:00

PlutoSDR input plugin

Introduction

This input sample source plugin gets its samples from a PlutoSDR device. This is also known as the ADALM-Pluto. ADALM stands for Analog Devices Active Learning Module and is targetting students in electrical engineering and digital signal processing. Of course it can be used as a radio device like any other SDR.

As you can see from the Wiki this is becoming a fairly popular SDR hardware platform. It does have interesting features but the library documentation and examples are poor when not misleading. Therefore while this implementation does work it should still be considered experimental.

This is a Linux only plugin. There is no Windows support since the supporting libiio library does not compile in a Qt/MinGW toolchain.

☞ PlutoSDR is physically implemented as a 1x1 SISO device although the AD9363 chip does have a second Rx and a second Tx channel. Revision C of the board claims to have pads to allow hackers connecting the second ports externally however for now only the first Rx channel is supported by this plugin.

Build

The plugin will be built only if libiio is installed in your system. To build and install libiio from source do:

  • git clone https://github.com/analogdevicesinc/libiio.git
  • cd libiio
  • git checkout v0.10 # or latest stable release
  • mkdir build
  • cd build
  • cmake -DCMAKE_INSTALL_PREFIX=/opt/install/libiio -DINSTALL_UDEV_RULE=OFF ..
  • make -j8
  • make install

Then add the following defines on cmake command line when compiling SDRangel:

-DLIBIIO_INCLUDE_DIR=/opt/install/libiio/include -DLIBIIO_LIBRARY=/opt/install/libiio/lib/libiio.so

Installation from binary packages

☞ libiio is built in the binary packages so there is no external dependency

Interface

PlutoSDR input plugin GUI

1: Common stream parameters

PlutoSDR input stream GUI

1.1: Frequency

This is the center frequency of reception in kHz. The limits are set as those of the AD9364: from 70 to 6000 MHz. PlutoSDR can be fooled to think it has a AD9364 chip with a very simple software hack described here.

AD9363 extended frequency range is not guaranteed but would work normally particularly in the lower range.

1.2: Start/Stop

Device start / stop button.

  • Blue triangle icon: device is ready and can be started
  • Green square icon: device is running and can be stopped
  • Magenta (or pink) square icon: an error occured. In the case the device was accidentally disconnected you may click on the icon to stop, plug back in, check the source on the sampling devices control panel and start again.

1.3: Record

Record baseband I/Q stream toggle button

1.4: ADC sample rate

This is the sample rate at which the ADC runs in kS/s (k) or MS/s (M) before hardware decimation. Hardware decimation is only partially controlled by the user using the FIR decimation factor (12). The value here is the value returned by the device interface therefore it is always exact.

1.5: Stream sample rate

Baseband I/Q sample rate in kS/s. This is the device to host sample rate (8) divided by the software decimation factor (5).

2: LO ppm correction

Use this slider to adjust LO correction in ppm. It can be varied from -20.0 to 20.0 in 0.1 steps and is applied in hardware.

3-4: Auto correction options

These buttons control the software DSP auto correction options:

  • DC: (6) auto remove DC component
  • IQ: (7) auto make I/Q balance

☞ AD9363 has a good hardware DC and I/Q compensation so there should not be a use for this software auto-correction.

5: Software decimation factor

The I/Q stream from the LimeSDR is doensampled by a power of two by software inside the plugin before being sent to the passband. Possible values are increasing powers of two: 1 (no decimation), 2, 4, 8, 16, 32, 64.

6: Decimated bandpass center frequency placement

  • Inf: Infradyne: the decimation takes place in the lower sideband
  • Sup: Supradyne: the decimation takes place in the lower sideband
  • Cen: Centered: the decimation takes place around the center

7: Antenna (input) connection

The AD9363 has many port options however as only the A balanced input is connected you should leave it as the default. This is a provision for people who want to hack the board. The different values may be found in the AD9363 documentation.

8: Device to host stream sample rate

This is the AD9363 device to/from host stream sample rate in S/s. It is the same for the Rx and Tx systems.

Use the wheels to adjust the sample rate. Pressing shift simultanoeusly moves digit by 5 and pressing control moves it by 2. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows.

The minimum sample rate depends on the hardware FIR decimation factor (12) and is the following:

  • no decimation: 25/12 MS/s thus 2083336 S/s (next multiple of 4)
  • decimation by 2: 25/24 MS/s thus 1041668 S/s
  • decimation by 4: 25/48 MS/s thus 520834 S/s

The maximum sample rate is fixed and set to 20 MS/s

9: Rx analog filter bandwidth

This is the Rx analog filter bandwidth in kHz in the AD9363 device. It can be varied from 625 kHz to 16 MHz in 1 kHz steps. Use the wheels to adjust the value. Pressing shift simultanoeusly moves digit by 5 and pressing control moves it by 2.

10: Hardware FIR filter toggle

The AD9363 chip has an optional FIR filter in the Rx decimation chain as the last decimation block. Use this button to activate or deactivate the filter.

The FIR filter settings are the same on Rx and Tx side therefore any change here is automatically forwarded to the Tx GUI.

11: Hardware FIR filter bandwidth

Use the wheels to adjust the bandwidth of the hardware FIR filter. Pressing shift simultanoeusly moves digit by 5 and pressing control moves it by 2.

The filter is calculated as a windowed FIR filter with a Blackman-Harris window. This has a high out of band rejection value at the expense of a slightly smoother roll off compared to other filters. The bandwidth value sets the -6 dB point approxomately.

The limits are calculated as 0.1 and 0.9 times the FIR filter input frequency for the lower and higher limit respectively. The FIR filter input frequency is the baseband sample rate (8) multiplied by the FIR decimation factor (12)

12: Hardware FIR decimation factor

The FIR filter block can provide a decimation by 1 (no decimation), 2 or 4. This controls the minimum possible baseband sample rate as already discussed in (8).

13: Hardware FIR gain

The FIR filter can introduce a gain that can be set to -6 or 0 dB.

14: Gain mode

Use this combo to select between gain options:

  • Man: manual: the overall gain in dB can be set with the gain button (15)
  • Slow: slow AGC: gain button (15) is disabled
  • Fast: fast AGC: gain button (15) is disabled
  • Hybr: hybrid AGC: gain button (15) is disabled

See AD9363 documentation for details on AGC options.

15: Global manual gain

Use this button to adjust the global gain manually in manual gain mode. This button is disabled when AGC modes are selected with combo (14).

16: Indicative RSSI

This is the indicative RSSI of the receiver.

17: Board temperature

This is the board temperature in degrees Celsius updated every ~5s.