DEV Community

Reishi Mitani
Reishi Mitani

Posted on

Transmitting a sine wave from Matlab to Pluto

I recently had to configure my Matlab code to send a sine wave to Adalm Pluto. I set the gain to -1 and the frequency to 2.4 GHz. I am pausing the code so that I can check the pulse on my spectrum analyzer.

Below is the code that I used.

deviceNameSDR = 'Pluto'; % Set SDR Device
radio = sdrdev(deviceNameSDR);           % Create SDR device object

txGain = -1;

% sdrTransmitter = sdrtx(deviceNameSDR); % Transmitter properties
% sdrTransmitter.RadioID = 'usb:0';

tx = sdrtx(deviceNameSDR);
tx.RadioID = 'usb:0';
tx.CenterFrequency = 2.415e9;
tx.BasebandSampleRate = fs;
tx.Gain = 0;

fs = 2e6;
sw = dsp.SineWave;
sw.Amplitude = 100;
sw.Frequency = 2.432e9;
sw.ComplexOutput = true;
sw.SampleRate = fs;
sw.SamplesPerFrame = 20000; 
txWaveform = sw();

transmitRepeat(tx,txWaveform);

pause(60)

release(tx);
Enter fullscreen mode Exit fullscreen mode

The pulse looks like below.

Image description

I connected Pluto to my PC and my spectrum analyzer.

Image description

Top comments (0)