• 0
Ahmed Alfadhel

Visualizing 5 kHz sine wave by Pmod DA3

Question

Hi ,

I am using DDS IP core to visualize a 5 kHz sine wave signal. 

At first I simulated the IP core using Vivado simulator . I used 25 MHz clock signal. I got a sine wave signal as shown in the first attached picture. 

When I changed the Radix from "signed data type" to "unsigned data type" the sine wave will be like in the second attached picture.

And when I implemented my design on my ARTY 7 , and connected the output of Pmod DA3 to the oscilloscope , I got a signal similar to that in the second attached picture ! As shown in the third attached picture . 

I changed all the intended data types in my program from u16 to s16 but the no thing is changed ! 

Pls , I am looking forward your help. How to visualize a DDS sine wave properly using Pmod DA3 ?

Thanks.

s1.JPG

s2.JPG

photo_2019-04-18_00-59-57.jpg

Edited by Ahmed Alfadhel

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 1

@Ahmed Alfadhel

To understand what's going on, check out table 8 of the datasheet on page 15.  Basically, the DAC provides outputs between 0 and max, where 0 is mapped to zero and all ones is mapped to the max.  In other words, you should be plotting your data as unsigned.

To convert from your current twos complement representation to an unsigned representation where zero or idle is in the middle of the range, rather than on the far end, just toggle the MSB.

Dan

Share this post


Link to post
Share on other sites
  • 0

Hi @[email protected]

Thank you for your perfect analyzing and solution to my issue .

I just toggled the MSB in each written Byte and I got the sinewave finally.

However, I wondered , since in the data sheets (AD5541A , AD7303) is mentioned I have to use operation amplifier in order to get a bipolar signal ! 

Thanks again. 

  

 

 

 

 

5kHz.jpg

5kHz_smoother.jpg

DA1_Bipolar.JPG

DA3_bipolar.JPG

Edited by Ahmed Alfadhel

Share this post


Link to post
Share on other sites
  • 0

well, by default your signal is between 0 V and Vref. The opamp circuit has a gain of 2 (range 0.. 2 VRef) but subtracts a constant VRef (range now -VRef..Vref).

It'll just shift the waveform on the scope, and double its AC magnitude.

 

Share this post


Link to post
Share on other sites
  • 0

@Ahmed Alfadhel,

One other thing to note is your scope was AC coupled in your pictures so you were "seeing" a bipolar waveform of -1.28v to +1.28v.

If you had DC coupled, the waveform on the scope would have shifted up and you would have observed the 0v to 2.5v the DA was outputting.

To get an actual bipolar output, you need the opamp level shifter/scaler.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now