DEV Community

Reishi Mitani
Reishi Mitani

Posted on

4 1

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

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay