Using LimeSDR as a signal generator

#1

Hello,

I would like to use LimeSDR-USB as a signal generator. My first attempt was to use GNU Radio like this:

.grc file: https://afiskon.ru/s/8d/7c412f628a_sine-wave.grc.txt

It kind of works (the signal could use a little filtering) and I see a signal on TX1L with my oscilloscope.

Unfortunately, the script stops after about a second after running it. I tried to change USB ports, change sample rate and use external power source, but it didn’t help. I didn’t manage to find a way to make the script work until I explicitly stop it.

Here is a GNU Radio output: https://afiskon.ru/s/d6/4d2b8263c8_out.txt

I also tried to follow item 4.3 from this article https://wiki.myriadrf.org/LimeSDR-USB_Quick_Test to generate a signal using LimeSuiteGUI. It also kind of works but resulting signal is heavily distorted:

Lastly I tried GNU Radio + Osmocom Sink and osmocom_siggen scirpt. Unfortunately I didn’t manage to make it work, I get a “Tx Calibration: MCU error 3 (SXR tune failed)” error. A few people complained about it on this forum, but apparently no solution has been found.

Device info:

device info

Packages versions (I’m using Arch Linux x64):

gr-osmosdr-git 0.1.4.127.g4d83c60-1
libosmosdr-git r162.ba4fd96-1
gnuradio 3.7.13.4-2
gr-limesdr-git r19.3234d26-1
soapysdr-git 3:0.6.1.r103.g5f5a4d8-1
limesuite-git r1739.d6b0371-1

A little peace of advice on how to prevent premature GNU Radio termination or fix the distortion problem in case of LimeSuiteGUI would be much appreciated.

1 Like
#2

Hi, @afiskon

Try changing “Options” block parameter “Generate Options” to “QT GUI”, for example. This should prevent your flow graph from stopping. Not sure why it happens but it seems that there is a difference from when you are using “Signal Source” and “Constant Source”. “Constant Source” seems to tell “GNU Radio” that it has finished working and flow graph may be terminated when “NO GUI” is used. That’s at least what I have found after trying different ways of generating constant waveform.

#3

Hello @Osvald,

I’ve just tried signal_generator.grc from myriadrf/gr-limesdr repository. It’s QT based and also terminates after 1 second of execution.

#4

Strange. I’m on GNU Radio 3.7.12.0 and signal_generator.grc does not terminate until I stop it myself.

What version of GNU Radio do you use?
Have tried other GNU Radio versions?
Have you tried to change “Options” block options?
Do you always get the same output?

#5

Hello @Osvald,

OK, I figured it out. I increased the gain to 60 dB and now signal generation doesn’t terminate. In fact it worked all this time as expected, I just used a wrong scale on the oscilloscope :frowning:

However after playing with GNU Radio for a while I didn’t find a way to get a relatively clean sinusoidal signal. It always looks something like this:

Why the signal is distorted? Is it an expected behavior for LimeSDR? Can I somehow smooth the signal?

1 Like
#6

I played a little with sample rates, sine wave frequency and FFT plots and eventually figured it out. You can find some details in this discussion What exactly LimeSuite Sink (TX) does with IQ data? Apparently LimeSDR doesn’t work as a signal generator particularly well on frequencies < 90 MHz. Especially it doesn’t like frequencies that don’t divide by 30 MHz, I guess it has something to do with internal clock: Rakon RPT7050A @30.72MHz.

TL;DR it’s a bit tricky, but you actually can use LimeSDR as a signal generator (I got sine waves up to 500Mhz, my oscilloscope can’t show larger frequencies) if you keep in mind stuff like how aliasing depends on sample rate and are willing to tune the gain manually (it changes with frequency and is much higher if frequency % 30Mhz == 0).

101+ things to do with a LimeSDR
LimeSDR signal generation distortion