SDR Pluto Frequency Update

In this post we will discuss the issue of changing the frequency or gain of the Adalm-Pluto SDR in real time in a GNU Radio application. Indeed, the Pluto is disturbed for a small second at each change of one of its parameters. In the waterfall below, we update the frequency of the local oscillator every 5s. This results in the output of Pluto by beautiful horizontal bars.

This is a phenomenon that we observe with the Pluto but not with an RTL-SDR or a HackRF One.

Receiver channel

The PlutoSDR Source block at each change of frequency would, according to my research, reset all the parameters which results in a disturbance of the processing in progress very annoying.

The solution lies in the use of the ‘IIO Attribute Sink’ and ‘IIO Attribute Updater’ blocks which allow only the selected parameter to be touched without disturbing the processing in progress.

Programming is tricky because you have to find:

  • the device: ad9361-phy
  • the direction: input or output
  • the channel: alvoltage0 or voltage0
  • the attribute: frequency or harwaregain
    in a very small online documentation.

By connecting to the pluto it is possible to extract information.
In terminal mode enter: iio_info -u ip:192.168.2.1

iio:device1: ad9361-phy
                9 channels found:
                        altvoltage0: RX_LO (output)
                        8 channel-specific attributes found:
                                attr  0: external value: 0
                                attr  1: fastlock_load value: 0
                                ......
                                attr  5: frequency value: 144999998
                                attr  6: frequency_available value: [70000000 1 6000000000]
                                attr  7: powerdown value: 0
                        altvoltage1: TX_LO (output)
                        8 channel-specific attributes found:
                                attr  0: external value: 0
                                ......
                                attr  5: frequency value: 144941178
                                attr  6: frequency_available value: [46875001 1 6000000000]
                               .....
                        voltage0:  (output)
                        10 channel-specific attributes found:
                                attr  0: filter_fir_en value: 1
                                attr  1: hardwaregain value: 0.000000 dB
                                attr  2: hardwaregain_available value: [-89.750000 0.250000 0.000000]
                                .....
                        voltage0:  (input)
                        15 channel-specific attributes found:
                                attr  0: bb_dc_offset_tracking_en value: 1
                                ......
                                attr  4: hardwaregain value: 36.000000 dB
                                attr  5: hardwaregain_available value: [-1 1 73]

To facilitate programming, I have grouped these blocks together in a small GNU Radio Companion application, which uses sliders to modify the reception frequency and the gain of Adalm-Pluto.
pluto_freq_gain.zip

Be careful with the gain, the values are between 0 and 72. Beyond that, the system crashes.

Transmitter channel

We find the same difficulties on the transmitter channel. Note that when changing a parameter in the transmission chain, if you act directly on the PlutoSDR Sink block, the reception chain is disturbed.

Frequency and attenuation update

In the example proposed to solve this difficulty, the sampling frequency is at 1.2 MHz. It is necessary in practice to use the same one as in the chain of reception if it works. We modify for the ad9361-phi device:

  • the frequency
    • channel: altvoltage1
    • output
    • attribut: frequency
  • the attenuation
    • channel: voltage 0
    • output
    • harwaregain

Attention for the attenuation / harwaregain the values are negative between 0 and -89 in steps of 0.25. Unlike the PlutoSDR sink block where we speak of attenuation by putting positive values.

Another delicate point is that the IIO Attribute Update refresh interval should not be less than 1000 ms.

Likewise for the transmission chain, I have grouped these blocks in a small GNU Radio Companion application which uses sliders to modify the transmission frequency and the attenuation of Adalm-Pluto.
pluto_TX_freq_gain_update.zip

Conclusion

The proposed modification responds to the problem on the sole condition of being well centred in frequency. There is no longer any visual impact on a waterfall as seen with Remote SDR. However, on the NBFM audio channel each time the SDR frequency value is refreshed, every second, a small click is heard if you are more than 100Hz next to the carrier. As Pluto is not precise on its working frequency, it is necessary to compensate for the error in frequency, with the manual correction in Remote SDR. Once properly centred, the click disappears.

Posts on Adalm-Pluto SDR

F1ATB André

Ham Radio - Home automation - Photovoltaic

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *