Pulse generation problems

Just about everything about Red Pitaya
Post Reply
Posts: 2
Joined: Wed Aug 16, 2017 3:50 pm

Pulse generation problems

Post by Jackk » Wed Aug 16, 2017 4:19 pm


I'm attempting to use my RP to measure oscillation in ultrasound transducers. What I want is for my RP to send a single pulse and measure the ringing it generates.

I'm using Python to remote control the RP. What I want initially is simply, a single 4MHz pulse every 1ms. Here's the code:


import redpitaya_scpi as scpi
import time

rp_s = scpi.scpi()

#Define burst waveform
wave_form = 'sine'
freq = 4020000
ampl = 1
burstPerSecond = 1000

rp_s.tx_txt('SOUR1:FUNC ' + str(wave_form).upper())
rp_s.tx_txt('SOUR1:FREQ:FIX ' + str(freq))
rp_s.tx_txt('SOUR1:VOLT ' + str(ampl))
rp_s.tx_txt('SOUR1:BURS:NCYC 1')
rp_s.tx_txt('OUTPUT1:STATE ON')
rp_s.tx_txt('SOUR1:BURS:STAT ON')
rp_s.tx_txt('SOUR1:TRIG:SOUR INT')


Rather than sending 1 pulse every 1 ms, it sends 1 pulse then continues to send 4 close pulses (see attached image) every 0.2ms and 1.5ms.
If I include the setup code in the while loop, i get a single pulse every 1.08ms with a burst of around 300 pulses in between each single pulse
I also get a 200mv DC offset after each pulse when doing a single pulse. This does not happen if i do >3 pulses.

Any suggestions on how to resolve these issues is greatly appreciated.
You do not have the required permissions to view the files attached to this post.

Posts: 2
Joined: Wed Aug 16, 2017 3:50 pm

Re: Pulse generation problems

Post by Jackk » Mon Aug 21, 2017 3:48 pm

I've been having another look today and the problem only seems to occur when sending pulses over approximately 350KHz. Anything below that and the system works perfectly.

As I go above 350KHz, I get a second, consecutive pulse. Then when I go even higher, I get a third consecutive pulse.

Posts: 28
Joined: Fri Apr 28, 2017 12:43 am

Re: Pulse generation problems

Post by JohnnyMalaria » Tue Aug 22, 2017 2:57 am

I've never had much joy trying to generate bursts of sine or square waves but I have had better luck using the arbitrary waveform generator for some reason. You could try loading a single cycle of a sine wave into the generator buffer and use the arbitrary option instead.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 4 guests