Page 1 of 1

Max Frequency of Square Wave

Posted: Wed Jul 29, 2020 2:57 pm
by uncShaun
Hello,

I would like to generate square waves of 0.5 Vpp with a frequency up to 20 MHz using the fast analog outs.

Is this possible?

Looking at the output waveform on an oscilloscope the square wave starts looking bad somewhere around 4-5 MHz.

Is the DAC slew rate too slow, or is there a filter on the outputs?

Thanks.

Re: Max Frequency of Square Wave

Posted: Thu Jul 30, 2020 4:02 pm
by alex123go
Hello,

I'm not 100% sure I have the right approach, but I think it's normal (depending of what you mean by looking bad).

Here are some reasons it looks normal.

1. The bandwidth of the Red Pitaya output is 50 MHz (https://redpitaya.readthedocs.io/en/lat ... astIO.html). A square wave consists of odd multiple of the fundamental frequency (20 MHz in your case) : a*sin(2*pi*1f*t) + b*sin(2*pi*3f*t) + c*sin(2*pi*5f*t) + ... (https://mathworld.wolfram.com/FourierSe ... eWave.html)
The more multiples are generated, the more perfect the square wave looks. With your 20 MHz square wave, it contains the frequencies 20 MHz, 60 MHz, 100 MHz, etc. The 20 MHz is ok, the 60 MHz is attenuated a lot (approx -6 dB on the graph), but the 100 MHz is surely not present on your output signal. Therefore, the 20 MHz square will look a lot like a sine wave.

2. It's worth to make sure your oscilloscope has a high enough sampling rate and enough bandwidth for your signal. Most oscilloscopes are ok, but it's better to be sure.

3. Also , you can't have 20 MHz exactly. the closest you can get is 20.833 MHz, which corresponds to 6 points positive voltage and 6 points negative voltage.

Hope this helps,
Alex

Re: Max Frequency of Square Wave

Posted: Thu Oct 22, 2020 8:01 pm
by bma
Hi,

I confirm @alex123go, above 1MHz with DAC, you see a lot of ripple.
Here a example:
Image

Do you consider to use the GPIO of thePL ?
I didn't tried, but you will be mainly impacted by the residual capacitance, not by the harmonic cutoff.

Re: Max Frequency of Square Wave

Posted: Thu Nov 19, 2020 1:29 pm
by redpitaya
This distortion is not present when using good quality cables of higher bandwidth. Please try with the scope probes that came with your Red Pitaya.

Re: Max Frequency of Square Wave

Posted: Thu Nov 19, 2020 1:29 pm
by redpitaya
Black Friday 2020 is here!