1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-27 02:09:14 -05:00
sdrangel/plugins/samplesource/limesdrinput
2018-12-14 17:49:06 +01:00
..
CMakeLists.txt Fixes for Arch. Manual merge of pull request #183. DATV demod: fixed some of ffmpeg deprecation warnings 2018-06-13 00:20:51 +02:00
limesdrinput.cpp LimeSDR: detect Lime hardware type. Interface with GPIO only for SPI and USB type 2018-11-29 23:37:34 +01:00
limesdrinput.h BladerRF2 input support (1) 2018-09-22 10:39:09 +02:00
limesdrinput.pro Wndows builds: removed reference to now obsolete MinGW64 toolchain 2018-12-14 17:49:06 +01:00
limesdrinputgui.cpp LimeSDR: detect Lime hardware type. Interface with GPIO only for SPI and USB type 2018-11-29 23:37:34 +01:00
limesdrinputgui.h LimeSDR output: implemented transverter shift 2018-04-17 00:55:56 +02:00
limesdrinputgui.ui LimeSDR: report GPIO pins values in the GUI 2018-11-29 13:57:04 +01:00
limesdrinputplugin.cpp LimeSDR REST API: support GPIO 2018-11-29 01:21:44 +01:00
limesdrinputplugin.h Removed direct reference to the DeviceSourceAPI in the source GUIs 2017-10-30 00:45:23 +01:00
limesdrinputsettings.cpp LimeSDR REST API: support GPIO 2018-11-29 01:21:44 +01:00
limesdrinputsettings.h LimeSDR REST API: support GPIO 2018-11-29 01:21:44 +01:00
limesdrinputthread.cpp PVS-Studio static analysis corrections (3) issue #137 2018-02-24 10:29:27 +01:00
limesdrinputthread.h Windows: MSVC2017: fixed more attribute unused cases (2) 2018-11-13 08:51:14 +01:00
readme.md Fix spelling errors in documentation 2018-04-21 18:45:09 -07:00

LimeSDR input plugin

Introduction

This input sample source plugin gets its samples from a LimeSDR device.

⚠ Version 18.04.1 of LimeSuite is used in the builds and corresponding gateware loaded in the LimeSDR should be is used (2.16 for LimeSDR-USB and 1.24 for LimeSDR-Mini). If you compile from source version 18.04.1 of LimeSuite must be used.

⚠ LimeSDR-Mini seems to have problems with Zadig driver therefore it is supported in Linux only.

LimeSDR is a 2x2 MIMO device so it has two receiving channels that can run concurrently. To activate the second channel when the first is already active just open a new source tab in the main window (Devices -> Add source device) and select the same LimeSDR device.

Build

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

  • sudo apt-get install libsqlite3-dev
  • git clone https://github.com/myriadrf/LimeSuite.git
  • cd LimeSuite
  • mkdir builddir
  • cd builddir
  • cmake -DCMAKE_INSTALL_PREFIX=/opt/install/LimeSuite
  • make -j8
  • make install

Then add the following defines on cmake command line:

-DLIMESUITE_INCLUDE_DIR=/opt/install/LimeSuite/include -DLIMESUITE_LIBRARY=/opt/install/LimeSuite/lib/libLimeSuite.so

Installation from binary packages

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

Interface

LimeSDR input plugin GUI

1: Common stream parameters

SDR Daemon source input stream GUI

1.1: Frequency

This is the center frequency of reception in kHz.

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 occurred. 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 (8). Thus this is the device to host sample rate (5) multiplied by the hardware decimation factor (3).

☞ Note that changing the hardware decimation factor (3) or the device to host sample rate (5) may change the DAC clock sample rate and therefore the Tx side hardware interpolation factor and/or host to device sample rate.

1.5: Stream sample rate

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

1.6: Channel number

LimeSDR is a 2x2 MIMO device so it has two receiving channels. This shows the corresponding Rx channel index (0 or 1).

2: NCO, DC/IQ correction and external clock controls

SDR Daemon source input stream GUI

2.1: NCO toggle

The button is lit when NCO is active and dark when inactive.

Use this button to activate/deactivate the TSP NCO. The LMS7002M chip has an independent NCO in each Rx channel that can span the bandwidth received by the ADC. This effectively allows non zero digital IF.

2.2: NCO frequency shift

This is the frequency shift applied when the NCO is engaged thus the actual LO frequency is the center frequency of reception minus this value. Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.

☞ In the LMS7002M TSP block the NCO sits before the decimator (see Fig.14 of the datasheet p.7) so it runs at the actual ADC rate. Hence the NCO limits are calculated as +/- half the device to host sample rate multiplied by the hardware decimation factor. For example with a 4 MS/s device to host sample rate (5) and a hardware decimation of 16 (3) you have +/- 32 MHz span around the LO for the NCO. In this example you can tune all HF frequencies with the center frequency set at its lowest (30 MHz).

2.3: DC component auto correction

Enables or disables the auto remove DC component

2.4: I/Q balance auto correction

Enables or disables the auto I/Q balance correction. The DC correction must be enabled for this to be effective.

2.5: Transverter mode open dialog

This button opens a dialog to set the transverter mode frequency translation options:

SDR Daemon source input stream transverter dialog

Note that if you mouse over the button a tooltip appears that displays the translating frequency and if translation is enabled or disabled. When the frequency translation is enabled the button is lit.

2.5.1: Translating frequency

You can set the translating frequency in Hz with this dial. Use the wheels to adjust the sample rate. 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. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

The frequency set in the device is the frequency on the main dial (1) minus this frequency. Thus it is positive for down converters and negative for up converters.

For example a mixer at 120 MHz for HF operation you would set the value to -120,000,000 Hz so that if the main dial frequency is set at 7,130 kHz the PlutoSDR will be set to 127.130 MHz.

If you use a down converter to receive the 6 cm band narrowband center frequency of 5670 MHz at 432 MHz you would set the translating frequency to 5760 - 432 = 5328 MHz thus dial +5,328,000,000 Hz.

For bands even higher in the frequency spectrum the GHz digits are not really significant so you can have them set at 1 GHz. Thus to receive the 10368 MHz frequency at 432 MHz you would set the translating frequency to 1368 - 432 = 936 MHz. Note that in this case the frequency of the LO used in the mixer of the transverter is set at 9936 MHz.

The Hz precision allows a fine tuning of the transverter LO offset

2.5.2: Translating frequency enable/disable

Use this toggle button to activate or deactivate the frequency translation

2.5.3: Confirmation buttons

Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.

2.6: External clock control

Use this button to open a dialog that lets you choose the external clock frequency and enable or disable it. When disabled the internal 30.72 MHz VCTCXO is used.

LimeSDR input plugin gain GUI

2.6.1: External clock frequency

Can be varied from 5 to 300 MHz

Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.

2.6.2: Enable/disable external clock input

Use this checkbox to enable or disable the external clock input

2.6.3: Confirm changes

Use the "OK" button to confirm your changes

2.6.4: Dismiss changes

Use the "Cancel" button to dismiss your changes

3: LMS7002M hardware decimation factor

The TSP block in the LMS7002M hardware has a decimation chain that acts on both Rx channels. It is composed of 5 halfband decimation stages and therefore can achieve decimation between 1 (no decimation) and 32 in increasing powers of 2: 1, 2, 4, 8, 16, 32.

Thus the actual sample rate of the ADC is the stream sample rate (5) multiplied by this factor.

4: Software decimation factor

The I/Q stream from the LimeSDR is downsampled 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.

5: Device to host stream sample rate

This is the LMS7002M 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 simultaneously 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 LMS7002M uses the same clock for both the ADCs and DACs therefore this sample rate affects all of the 2x2 MIMO channels.

6: Rx hardware filter bandwidth

This is the Rx hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically but generally are from 1.4 to 130 MHz in 1 kHz steps. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

7: TSP FIR filter toggle

The TSP in the LMS7002M chip has a FIR filter chain per channel. Use this button to activate or deactivate the TSP FIR filter.

8: TSP FIR filter bandwidth

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

9: Gain settings

LimeSDR input plugin gain GUI

9.1: Gain mode

Use this combo to select either the automatic gain (Aut) or the manual (Man) gain setting. Automatic gain sets the global gain using a predefined table for LNA, TIA and PGA gain blocks. This global gain is set with button 9.2. When manual gain is engaged the LNA, TIA and PGA gains can be set independently with the 9.3, 9.4 and 9.5 buttons respectively.

Please refer to LMS7002M documentation for a precise description of LNA, TIA and PGA and their location in the Rx chain. To summarize these blocks are placed in this order from antenna to ADC.

9.2: Global automatic gain

Use this button to adjust the global gain of the LNA, TIA and PGA. LimeSuite software automatically set optimal values of the amplifiers to achieve this global gain. This gain can be set between 0 and 70 dB in 1 dB steps. The value in dB appears at the right of the button.

9.3: LNA manual gain

Use this button to adjust the gain of tha LNA when manual gain mode is set (9.1). Gain can be set between 1 and 30 dB in 1 dB steps. However the hardware has 3 dB steps for the lower gain values so increasing or decreasing by one step does not always produce a change. The value in dB appears at the right of the button.

9.4: TIA manual gain

Use this combo to select the TIA gain in dB when manual gain mode is set (9.1). Possible values are 1,2 and 3 dB.

9.5: PGA manual gain

Use this button to adjust the gain of tha PGA when manual gain mode is set (9.1). Gain can be set between 0 and 32 dB in 1 dB steps. The value in dB appears at the right of the button.

10: Antenna select

Use this combo box to select the antenna input:

  • No: None
  • Lo: Selects the low frequency input (700 to 900 MHz nominally)
  • Hi: Selects the high frequency input (2 to 2.6 GHz)
  • Wo: Selects the wideband input
  • T1: Selects loopback from TX #1 (experimental)
  • T1: Selects loopback from TX #2 (experimental)

11: Stream status indicator

This label turns green when status can be obtained from the current stream. Usually this means that the stream is up and running but not necessarily streaming data. The various status elements appear next on the same line (12)

12: Stream warning indicators

  • U: turns red if stream experiences underruns
  • O: turns red if stream experiences overruns
  • P: turns red if stream experiences packet drop outs

13: Stream global (all Rx) throughput in MB/s

This is the stream throughput in MB/s and is usually about 3 times the sample rate for a single stream and 6 times for a dual Rx stream. This is due to the fact that 12 bits samples are used and although they are represented as 16 bit values only 12 bits travel on the USB link.

15: FIFO status

This is the fill percentage of the Rx FIFO in the LimeSuite interface. It should be zero most of the time.

16: Board temperature

This is the board temperature in degrees Celsius updated every ~5s. Before the first probe the display marks "00C" this is normal.