Author Topic: 30 MHZ ad9850 DDS Signal Generator in 12$  (Read 56362 times)

0 Members and 1 Guest are viewing this topic.

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14267
  • Country: de
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #25 on: May 24, 2015, 09:22:44 pm »
With a correct filter the AD9850 is well capably to produce a decent 30 MHz signal. The datasheet even quotes performance at 40 MHz.

Its also possible to get a low distortion square wave from the sine, not the other way around.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #26 on: May 24, 2015, 09:49:31 pm »
With a correct filter the AD9850 is well capably to produce a decent 30 MHz signal. The datasheet even quotes performance at 40 MHz.
And only at 30Mhz (or 40Mhz), and practically nowhere else.  Kinda defeats the purpose of having an adjustable frequency.
Decent...usable...maybe.  Distortion free...no.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline niekvs

  • Contributor
  • Posts: 48
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #27 on: May 24, 2015, 10:01:25 pm »
Quote
Say you want a 62.5Mhz sine wave output.  Well, it ain't gonna happen.  125Mhz / 62.5Mhz = 2 steps, high and low.  1 bit sine wave = square wave.  Filter that...
Want a 31.25 sine wave output?  Ain't gonna happen again. 125Mhz / 31.25Mhz = 4 steps, high, 1/2 high, 1/2 low, and low.  2 bit sine wave?  No...

Maybe you should go over your DSP/filtering basics. "Filter that", well that's why I was referring you to page 9 (and 8 ) of the datasheet: it will show you how to do it.

And this whole thing about 4 bits of DAC resolution still makes no sense. The part has a 10 bits DAC. It's not "2 steps, high and low", but 2^10 (1024) possible values. They will vary in phase, and so vary in amplitude, as the frequency won't be an exact multiple.

It's well possible that this particular module (not the AD9850) didn't do the filtering right - I heard somewhere that it has a 90MHz filter instead of the 42MHz one shown in the datasheet. This could explain why at 30MHz there may be some distortion from the 1st image, which would sit at 125MHz - 30MHz = 95MHz (assuming the filter doesn't have a very steep roll off).

Another issue with your bad experience with your modules may be the way you measured them. Other than the amplitude issue (which may be related to unintended filtering), the sine actually looks quite good even at 30MHz on the images given earlier.
« Last Edit: May 24, 2015, 10:03:42 pm by niekvs »
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #28 on: May 24, 2015, 10:05:01 pm »
With a correct filter the AD9850 is well capably to produce a decent 30 MHz signal. The datasheet even quotes performance at 40 MHz.
And only at 30Mhz (or 40Mhz), and practically nowhere else.  Kinda defeats the purpose of having an adjustable frequency.
Decent...usable...maybe.  Distortion free...no.

 Is "distortion free" a requirement for a $12 project? Again why must projects of this scope have to go through elite approval? Or maybe many of these comments are about ego and not helping people.



 
« Last Edit: May 24, 2015, 10:07:09 pm by retrolefty »
 
The following users thanked this post: ziplock9000

Offline niekvs

  • Contributor
  • Posts: 48
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #29 on: May 24, 2015, 10:13:27 pm »
Considering he went from "it really looks like shit", "garbage" and "spaghetti thrown on the wall" to "Decent...usable...maybe", I guess we can assume he realized he was a bit quick to judge this project   :phew:
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #30 on: May 24, 2015, 10:45:23 pm »
Nope...
"really looks like shit" doesn't mean it's not usable.  Put it thru a comparator and get a square wave out of it.  Usable.  Or just use the square wave output.

Ain't no damn elite approval going on here.  FOK!  I'm as dumb as the next dipshit down the line.
People read the chinabay header that says 30Mhz signal generator.  They buy it and wonder why it puts out shit at 30Mhz.  Then go out in the wild and bitch about shitty equipment when the problem in the first place is shitty equipment sold as good stuff.

DSP/filtering basics/10bit DAC - I've got plenty of those laying around in my head.  No need to go back to basics.
Yes, the part has a 10-bit DAC.  No, you will not and cannot possibly use all 10 bits in each 360 degrees of an output sine wave once you get above certain frequencies.
Again, if you have an MCLK of 125Mhz, which most of these modules do, and you want to output a sine wave at 62.5Mhz, you will get an output that is a square wave, effectively a 1-bit DAC.  Plain and simple.  Don't believe me?  Try it and see what happens.
If you want an output of 31.25Mhz, you will get an output that is a stepped-square wave with only 4 points, effectively a 2-bit DAC.
If you want an output sine wave of X frequency that does not divide into 125Mhz perfectly, then you will get a stepped output that varies from cycle-to-cycle.  Depending on the frequency desired, will you be able to see those steps?  Maybe, maybe not.  Depends how high the frequency is.
I might even humor this thread with a video eventually.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #31 on: May 24, 2015, 10:52:03 pm »
They buy it and wonder why it puts out shit at 30Mhz.

Probably not. I think vast majority of buyers will not use it for 30mhz and the few who do will never suspect anything at all wrong. Even with minimal filter any odd harmonics will be way down and even if not most applications will ignore.

Regarding egos I love those. Pop in the toaster and 1 minute later... yummmmmmmm.
 

Offline niekvs

  • Contributor
  • Posts: 48
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #32 on: May 24, 2015, 11:07:09 pm »
Quote
If you want an output of 31.25Mhz, you will get an output that is a stepped-square wave with only 4 points, effectively a 2-bit DAC.
If you want an output sine wave of X frequency that does not divide into 125Mhz perfectly, then you will get a stepped output that varies from cycle-to-cycle.  Depending on the frequency desired, will you be able to see those steps?

Not "effectively a 2-bit DAC" - these 4 points will be the exact points out of 1024 that they mathematically should be. If it would be a 2-bit DAC, they would be quantized to one of 4 values, not one of 1024. But disregarding this, there's only one bandlimited signal that will pass through these 4 points, and that's the 31.25MHz sine. Not some "triangle" wave, but a sine. If it's not a sine, it's not filtered right.

"I might even humor this thread with a video eventually."

Please do, I'm curious about your test setup: just make sure to use a proper filter :) (and a scope with high enough bandwidth)
 

Tac Eht Xilef

  • Guest
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #33 on: May 25, 2015, 12:35:44 am »
Without particularly wanting to buy into this argument (I'm pretty familar with both the AD9850 & these modules as well as other AD DDS chips at HF frequencies, and largely agree with Skimask), you guys are aware that AD have a web-based DDS simulator aren't you?

All arguments about simulators aside, in my experience it's remarkably accurate - I've used it to check both the raw DDS output & planned filter designs, and what it shows is pretty much exactly what I've seen on the scope & SA in the real world. Dial up an AD9850 with 125MHz clock and play with it for yourselves.

Note that unchecking the filter response checkbox doesnt turn the filter off; you have to click 'configure' and choose a filter topology of 'off'...

A few other observations:
  • Every one of those modules I've seen with a 125MHz clock has a 3.3v oscillator. Conversely, the AD9850 is only specced to (I think) 100MHz clock @ 3.3v. Depending what voltage you run it at, one or the other is being abused...
  • The OP's project is nothing new - it's pretty much a "My First Arduino and DDS" project, and there must be 1000's of them out there by now. That's not to take away from it, but it's not amazingly unique by any means.
  • About 1/2 of the AD9850 modules I've seen are reluctant to go into serial data mode under serial control - they should really be hard-configured into serial mode by pulling the appropriate // data pins hi & low as per the datasheet.
  • As sync said upthread, what's missing from almost all of them is AGC & a buffer / driver amp. That, and a simple attenuator stage, would make it a pretty decent project. (I've had that on my backburner for a couple of years now, and I still haven't gotten around to it...)
 

Offline Sparc

  • Contributor
  • Posts: 16
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #34 on: May 25, 2015, 01:04:22 am »
Nope...
"really looks like shit" doesn't mean it's not usable.  Put it thru a comparator and get a square wave out of it.  Usable.  Or just use the square wave output.

Ain't no damn elite approval going on here.  FOK!  I'm as dumb as the next dipshit down the line.
People read the chinabay header that says 30Mhz signal generator.  They buy it and wonder why it puts out shit at 30Mhz.  Then go out in the wild and bitch about shitty equipment when the problem in the first place is shitty equipment sold as good stuff.

DSP/filtering basics/10bit DAC - I've got plenty of those laying around in my head.  No need to go back to basics.
Yes, the part has a 10-bit DAC.  No, you will not and cannot possibly use all 10 bits in each 360 degrees of an output sine wave once you get above certain frequencies.
Again, if you have an MCLK of 125Mhz, which most of these modules do, and you want to output a sine wave at 62.5Mhz, you will get an output that is a square wave, effectively a 1-bit DAC.  Plain and simple.  Don't believe me?  Try it and see what happens.
If you want an output of 31.25Mhz, you will get an output that is a stepped-square wave with only 4 points, effectively a 2-bit DAC.
If you want an output sine wave of X frequency that does not divide into 125Mhz perfectly, then you will get a stepped output that varies from cycle-to-cycle.  Depending on the frequency desired, will you be able to see those steps?  Maybe, maybe not.  Depends how high the frequency is.
I might even humor this thread with a video eventually.

This explanation sounds wrong.  There is a confusion between DAC bit depth and sample rate.   I think this confusion might come from the audio-phile community.  People who say you need super high sample rates to get quality audio from your digital audio gear.  They think we need 192 khz audio systems.   By your explanation, a CD player could only give 16 bit quality at 44100/65536= 0.67 hz.    Whether you use all 2^N possible steps in a cycle is irrelevant, you actually get all bits up to nyquest frequency. 

There are other reasons to criticize the cheap AD9850 modules from Ebay.   The filter cutoff is at the wrong frequency, the 125mhz oscillator most likely isn't rated for 5V operation, maybe the AD9850 chips are factory rejects.   This has been pointed out in this thread and others. 

If you want a nice video demonstration of sampling and the so-called "stair step" problem, check out this video demonstration.   Its with audio frequencies, but the principles are the same.

article:
http://wiki.xiph.org/Digital_Show_and_Tell/Episode_02

video:
http://www.xiph.org/video/vid2.shtml

 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19617
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #35 on: May 25, 2015, 01:06:32 am »
Nope...
"really looks like shit" doesn't mean it's not usable.  Put it thru a comparator and get a square wave out of it.  Usable.  Or just use the square wave output.

Ain't no damn elite approval going on here.  FOK!  I'm as dumb as the next dipshit down the line.
People read the chinabay header that says 30Mhz signal generator.  They buy it and wonder why it puts out shit at 30Mhz.  Then go out in the wild and bitch about shitty equipment when the problem in the first place is shitty equipment sold as good stuff.

DSP/filtering basics/10bit DAC - I've got plenty of those laying around in my head.  No need to go back to basics.
Yes, the part has a 10-bit DAC.  No, you will not and cannot possibly use all 10 bits in each 360 degrees of an output sine wave once you get above certain frequencies.
Again, if you have an MCLK of 125Mhz, which most of these modules do, and you want to output a sine wave at 62.5Mhz, you will get an output that is a square wave, effectively a 1-bit DAC.  Plain and simple.  Don't believe me?  Try it and see what happens.
If you want an output of 31.25Mhz, you will get an output that is a stepped-square wave with only 4 points, effectively a 2-bit DAC.
If you want an output sine wave of X frequency that does not divide into 125Mhz perfectly, then you will get a stepped output that varies from cycle-to-cycle.  Depending on the frequency desired, will you be able to see those steps?  Maybe, maybe not.  Depends how high the frequency is.
I might even humor this thread with a video eventually.

You have bothered to read the AD9850 data sheet haven't you?

Figure 17 shows a 42MHz 7th order elliptic LPF which will do a pretty good job of eliminating harmonics of a 125MHz clock. Now it won't be "zero distortion", of course, but then nothing is zero distortion!

In my experience a more significant point is that if the comparator is connected to the LPF output (in order to get a 50% duty cycle square wave), then the comparator will introduce glitches onto the sine wave output.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Kedar264Topic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: in
  • Listen to Your Voice
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #36 on: May 25, 2015, 01:20:53 am »
And when you get it up to around 30Mhz, look at the actual output on an o'scope and see how much it really looks like shit.

See the scop shot
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #37 on: May 25, 2015, 01:22:34 am »
And when you get it up to around 30Mhz, look at the actual output on an o'scope and see how much it really looks like shit.

See the scop shot

First, that looks terrible, it looks like a triangle wave. Second, it looks like you're running out of bandwidth, what's that scope do? You need a lot of bandwidth overhead to measure the purity of a sine wave.

Edit: wait... does the circled (20) at the bottom mean you've got the 20 MHz bandwidth limit switched on? ???
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Kedar264Topic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: in
  • Listen to Your Voice
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #38 on: May 25, 2015, 01:23:30 am »
The waveform looks OK, but the amplitude is going down quite a lot. So it looks like the filter is setting in to low. The way the output is connected may influence the filter as well. How are the data measured ?

What possible filters should i use?

Without an appropriate output filter, the signal may look rather strange, possibly like a more or less random up and down close to the upper frequency limit, as one has a mixture of the frequency one wants and something like the sampling frequency +- the set frequency.

There are two thing missing to make a useful function generator: A slightly more powerful output amplifier, so you can get something like a few volts into 50 Ohm would be very useful. Also a defined attenuator to set the amplitude to lower levels if needed is commonly expected.
 

Offline Kedar264Topic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: in
  • Listen to Your Voice
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #39 on: May 25, 2015, 01:52:35 am »
Actually at 30 mhz i made mistake  (my scope's 20 mhz bw limit is on ) here is proper scope shot with bw limit turned off.
« Last Edit: May 25, 2015, 01:56:23 am by Kedar264 »
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6927
  • Country: ca
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #40 on: May 25, 2015, 01:56:29 am »
ADI says they use lookup table to drive the DDS DAC, so no, it is not like 1-bit DAC when frequency approaches Fclk/2, regardless of frequency it always outputs levels with whatever DAC resolution is (the lookup table is driven by phase information and is the same for any frequency). Less steps - yes, and that is the job of the anti-aliasing filter to filter out aliases. Therefore any of the DDS signal gen design that does not have some sort of a output filter is deficient.

EDIT: deficient if the goal is to generate sinewave. For some special applications filtering may not be required and even undesired.

@Kedar264
your screenshot is incorrect on several counts. Just the amplitude alone will not drop that much at 30MHz. Either your scope has a bandwidth filter switched on as the other poster said, or the scope itself has small bandwidth.

EDIT: I was typing when you posted your last screenshot but it still does not look right. Amplitude should not drop by 10dB at just 25% of F clock. What scope model do you use?
« Last Edit: May 25, 2015, 02:05:18 am by Bud »
Facebook-free life and Rigol-free shack.
 

Offline Kedar264Topic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: in
  • Listen to Your Voice
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #41 on: May 25, 2015, 02:00:28 am »
My scope is Hantek DSO 5072P it has  70 MHZ Bandwidth   :-BROKE
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #42 on: May 25, 2015, 02:04:35 am »
70 MHz isn't enough for a 30 MHz sine wave, that only gets you up to the 2nd harmonic. I'd probably want to shoot for bandwidth up to the tenth harmonic, or 300 MHz. (However, for what it's worth that does look much better with the limit switched off.)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Kedar264Topic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: in
  • Listen to Your Voice
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #43 on: May 25, 2015, 02:07:04 am »
I think amplitude is dropped becouse i haven't used any external filters and high speed amplifiers , i want to design an output filtering stage what do you recommend me ,can iuse zero crossing detector at output to get square wave output ? And which op amp should i have to use for at least 40 mhz bw?
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6927
  • Country: ca
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #44 on: May 25, 2015, 02:11:02 am »
Yes looks the scope performed the function of anti-aliasing filter. For F clck=125MHz and 30MHz output you need at least  150 MHz scope bandwidth to see effect of aliases (Fclk - Fout, Fclk + Fout)
Facebook-free life and Rigol-free shack.
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6927
  • Country: ca
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #45 on: May 25, 2015, 02:14:27 am »
I think amplitude is dropped becouse i haven't used any external filters and high speed amplifiers

No, I recommend you go to ADI web site and play with their DDS tool as the other reader suggested, to understand amplitude and spectrum of a DDS. This may become an exciting jorney for you to learn this stuff.
Facebook-free life and Rigol-free shack.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #46 on: May 25, 2015, 02:20:43 am »
...and that is the job of the anti-aliasing filter to filter out aliases. Therefore any of the DDS signal gen design that does not have some sort of a output filter is deficient.

What do you mean by "deficient"? If you mean "lacking" then yes, any DDS signal gen that does not have an output filter is lacking an output filter.

And what are these anti-aliasing filters for DACs you talk of? On the output there is no way to generate aliases, as aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled.

Would you be talking of the reconstruction filter (http://en.wikipedia.org/wiki/Reconstruction_filter) that removes any high frequency noise in the reconstructed signal, and compensates for the inherent limitations of conversion process?
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #47 on: May 25, 2015, 02:27:58 am »
Oh, and as an illustration,  here is what the output of a DAC looks like without a reconstruction filter.



And here is what it looks like, once filtered



However, in this case I didn't use an output filter on the DAC, I used the bandwidth filter on my scope. Everything that makes it look "un-sine-like" and "steppy" is just high frequency noise... it isn't aliases. You can't filter out  aliases without also reducing the desired signal too.

Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6927
  • Country: ca
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #48 on: May 25, 2015, 02:59:18 am »
What do you mean by "deficient"? If you mean "lacking" then yes,

You got it. Sorry for using a fancy word. Lets see what Webster dictionary says:

"Deficiency: a lack of something that is needed : the state of not having enough of something necessary"

Quote
And what are these anti-aliasing filters for DACs you talk of? On the output there is no way to generate aliases, as aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled.

I know what you mean but in DDS literature Aliases mean frequency components Fclock plus minus Fout. They can be filtered out and they even can be filtered in (so to speak) or selected to become the DDS signal gen output. This is described in practically any Analog Devices DDS datasheet. Try opening AD9850 datasheet for example and search for all instances of "alias", see what you can learn.
Facebook-free life and Rigol-free shack.
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 6927
  • Country: ca
Re: 30 MHZ ad9850 DDS Signal Generator in 12$
« Reply #49 on: May 25, 2015, 03:06:46 am »
Everything that makes it look "un-sine-like" and "steppy" is just high frequency noise... it isn't aliases. You can't filter out  aliases without also reducing the desired signal too.

As I pointed out yes you can filter aliases out or select a particular aliased component. You can check ADI DDS datasheets for explanation.

Your first screenshot is good and shows enough bandwidth and since aliases are part of an unfiltered DDS spectrum, that waveform includes aliases too. Noise would manifest itself as a random component, but the steps on the waveform are not random.
Facebook-free life and Rigol-free shack.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf