A few questions about a function generator based in the AD9850 module - Page 1
Forum section: electronics / projects

author: Buendía
author_rank: Newbie
timestamp: November 06, 2013, 12:15:41 am
content: I am designing a function generator with an arduino and two AD9850 modules from ebay. At the moment I have tested the software side: an arduino nano with a 4x4 keypad, an lcd and a single AD9850. I've tested both the square and the sine wave outputs with the oscilloscope and it seems to be working fine. Unfortunately I've found the sine wave is just over 1 volt peak-to-peak, with 0.5v dc offset, and I've been researching a way to process that signal.I have a degree in computer engineering, but my career has centered around just software engineering. This means I have a good general grasp of digital electronics, a little knowledge of the analog side, and that I can operate an oscilloscope, but it all is rusty. I've been playing with arduinos for a few months, and now I've bought an oscilloscope and I have resumed my interest in electronics as a hobbyist. At the moment, however, I'd rather deal with simple stuff, and circuits with as few parts as possible and ready-made modules, and I am more interested in the final product than in learning about electronics in detail (not that I do not want to do it). I have considered buying a function generator like the Siglent SDG1020 but I want to have programmatic control over the machine. I want to be able to set the frequency from a program in the PC (not using the software of the vendor but my own programs).This is just a general introduction (my first post here) for the questions that follow. Back to the topic.[EDIT: just to be clear, I am a newbie with some theoretical knowledge...]I have found a circuit in other thread from this forum:https://www.eevblog.com/forum/beginners/upgrading-dave%27s-ad9835-sinesquare-wave-generator-design-for-ad9850/msg249434/#msg249434I have simulated the circuit to test it, and I have checked other more common values for resistors (47ohm instead of 50, 10k instead of 12k and 11.5k), and another opamp that I've found in dip package in ebay (AD827JNZ), that seems suitable at least up to 10mhz, which is good enough for me. I plan to build a dc offset and gain for both sine and square outputs of each AD9850, following that circuit. The sine wave with a gain of 20 in the opamp, and the square wave with a gain of 4 since it is 5Vpp. The [rail?] voltages are going to be +-12V. Is it looking good so far, like it should work?[EDIT: I have run the simulation with an ideal opamp. I just guess the AD827JNZ may be ok because of the datasheet, and it is cheap enough to try]I plan to mount it in three strip boards, one for the arduino nano + sockets for lcd and the control signals for the two DDSs, and one board for each DDS. During tests in a breadboard I've found it easy to pick the 50 hz hum of the AC mains with the oscilloscope probes. To counter that, I have tried to keep the signal path as short as possible in the strip board circuit, but I am concerned with the wires that go from sockets in the board to the offset and gain pots, that are panel-mounted. Should I use shielded wire for that, for example pieces of usb wire? Are the strip boards good enough for 10mhz signals? Finally, should I shield the box to avoid external EM interference? is it a good shield to use aluminium foil glued to the box on the inside, and connected to ground? It is going to have some openings for the pots, the bnc connectors, the lcd, etc, so it is not a proper faraday cage AFAIK.When this one is finished the next project would probably be to build a current amplifier for the output of this function generator, to be able to drive things, and I guess this is going to be more challenging, from the research I've been doing.Thanks in advance (and sorry for my english)

author: dannyf
author_rank: Super Contributor
timestamp: November 06, 2013, 11:27:03 am
content: QuoteNot sure what modules you have but the typical output is 20ma drive on a 50 ohm load (=100mv Vpp).Going to 10Vp @ 10Mhz requires a pretty fast amp.

author: Buendía
author_rank: Newbie
timestamp: November 06, 2013, 01:06:31 pm
content: Quote from: dannyf on November 06, 2013, 11:27:03 amI've tested the output pin directly with the oscilloscope without any other load.I've run a simulation of the circuit shown in the first post, and it seems to be working, giving around 23Vpp with max gain and an ideal opamp, IIRC. Do you mean that the output of the AD9850 module is not an ideal source like the ac source in the simulated circuit and that it is going to give at best 100mVpp to the opamp (or less) because of the 33Ohm resistor?Regarding the BW, if the opamp I've picked can just go to say 1MHz or so with 10Vpp, I'd be happy with that for now.

author: poorchava
author_rank: Super Contributor
timestamp: November 07, 2013, 08:27:18 am
content: LM7171 is a good pick. I've used it in my function gen based on ISL5314 DDS chip. It has GBP of 200MHz.

author: Buendía
author_rank: Newbie
timestamp: November 07, 2013, 09:54:35 am
content: Quote from: poorchava on November 07, 2013, 08:27:18 amThank you, it seems a much better choice than the AD827, and it is available in a PDIP package. Since I've already ordered the AD827's I'll check them, but I think I might try this one for the sine wave outputs.

author: Stonent
author_rank: Super Contributor
timestamp: November 07, 2013, 11:05:56 am
content: I'm guessing one of these?http://www.ebay.com/itm/New-AD9850-module-modest-capacity-AD9851-DDS-Function-Generator-up-to-40MHZ-/271275948400?pt=LH_DefaultDomain_0&hash=item3f294e7970

author: Buendía
author_rank: Newbie
timestamp: November 07, 2013, 01:45:29 pm
content: Quote from: Stonent on November 07, 2013, 11:05:56 amYes, a couple of those (I want to have two channels), but from a different ebay seller.

author: mian2zi3
author_rank: Contributor
timestamp: November 08, 2013, 04:29:48 pm
content: AD9850 goes for $15 on Mouser/Digikey in volume. How can these eBay sellers manage to sell modules for $4.50? Are the chips fake? Sorry if this is off topic. The electronics component market still mystifies me.

author: sync
author_rank: Frequent Contributor
timestamp: November 08, 2013, 04:37:19 pm
content: Old and maybe salvaged chips. I have two Ebay modules. The AD9850 have a 2004 date code. They have the hidden x4 clock multiplier and work at 200MHz. If they are fakes they are good ones.

author: Buendía
author_rank: Newbie
timestamp: November 08, 2013, 06:51:13 pm
content: Quote from: mian2zi3 on November 08, 2013, 04:29:48 pmI've always assumed they get the parts directly from the chinese factories that have the production offshored, and not from the western companies through the channels available to us. Perhaps there is an agreement with the chinese government to sell parts to local companies at budget prices to promote development, or maybe it is the government itself that subsidises these companies.It is a good thing for hobbyists IMHO, it lets people try things that otherwise would only be available to companies.The chip in the module I have (I am still waiting for the other one) is marked #1226.I've seen modules with large crystals and others with smaller ones. I have one with a small crystal and it runs hot after a while. I've read about some being 3.3v parts, and I use 5v. Do people place heatsinks on them? I've googled the code in the crystal but I have not been able to find anything useful.

author: bingo600
author_rank: Super Contributor
timestamp: November 08, 2013, 06:54:42 pm
content: Quote from: sync on November 08, 2013, 04:37:19 pmCould you tell a little more about the multiplier ?I also have some ebay modules with the old chips onTIA/Bingo

author: dannyf
author_rank: Super Contributor
timestamp: November 08, 2013, 07:32:40 pm
content: QuoteThat would be an issue if those eBay sellers buy brand new AD9850 at single quantities.I am reasonably sure that they don't.QuoteI run mine off 3.3v. 5v is a little bit too hot for the chip.Quotecode in the crystal?

author: AG6QR
author_rank: Frequent Contributor
timestamp: November 08, 2013, 07:55:33 pm
content: Quote from: dannyf on November 08, 2013, 07:32:40 pmI think it should read "codeonthe crystal". The part number or other info printed on the outside of the case.Spanish has one word for both English words "in" and "on", and the distinction between the two easy for native speakers of Spanish to miss. My wife's native language is Spanish, so I'm all too familiar with this particular issue. In this case, context makes it very clear.

author: free_electron
author_rank: Super Contributor
timestamp: November 08, 2013, 08:27:22 pm
content: Quote from: AG6QR on November 08, 2013, 07:55:33 pmcrystal codes are engraved. so technically they are in the crystal housing ...

author: Skimask
author_rank: Super Contributor
timestamp: November 08, 2013, 08:52:42 pm
content: Quote from: sync on November 08, 2013, 04:37:19 pmSame here.I took a chance awhile back and bought 4 of these modules.All 4 work great and give me about as clean a sine wave output as I'll ever need to see on a Tek2246A 100Mhz 'scope.

author: sync
author_rank: Frequent Contributor
timestamp: November 08, 2013, 09:00:49 pm
content: Quote from: bingo600 on November 08, 2013, 06:54:42 pmIt's like the x6 multiplier in the AD9851 (look at it's datasheet). Except that it's x4 on the AD9850.One type of the Ebay modules has the problem that they use the output filter for an AD9851 clocked at 180MHz. If I remember correctly it has a cutoff frequency of 70MHz. Not good for a 125MHz AD9850. I changed the crystal oscillator to 50MHZ and use the x4 multiplier to get 200MHz.

author: dannyf
author_rank: Super Contributor
timestamp: November 08, 2013, 10:45:10 pm
content: QuoteI question how much "not good" there is from using a 70Mhz filter.

author: mian2zi3
author_rank: Contributor
timestamp: November 08, 2013, 11:35:12 pm
content: Quote from: dannyf on November 08, 2013, 07:32:40 pmThey're $25+ at single quantities. $15 is the price each for a reel.

author: mian2zi3
author_rank: Contributor
timestamp: November 08, 2013, 11:38:28 pm
content: Quote from: sync on November 08, 2013, 04:37:19 pmInteresting! I hadn't considered salvaged chips. Buendía's idea that they're getting them directly from a local factory also seems plausible.Anyway, thanks for the feedback. I just ordered a couple of boards off eBay.

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 09, 2013, 08:21:07 am
content: Quote from: Buendía on November 06, 2013, 12:15:41 amQuote from: kripton2035 on June 20, 2013, 10:49:17 amthe "net" he's talking about is eevblog itself, the original source is here...https://www.eevblog.com/forum/projects/ad9850-module-and-dds3x25-dds-based-fg-compared/if the "net" he meant is outside eevblog, then there must be "copyright infringment" going onthe why cheap module also is discussed and linked there. some of the candidates in my list such as THS3091 (cfa), THS4631, LM7121, LM7171, LM6171 all vfaQuote from: Buendía on November 06, 2013, 12:15:41 amas you and i have figured it out, poking around pots in the high impedance signal path is not a brilliant idea (try to switch on SMPS nearby, change the pot with hand and probe the fg output). some sort of electronics way of adjusting V offset and amplitude controlled by mcu in between rotary encoders as UI should be the next upgrade (but i wont bother for the time being as i'm doing it for personal not business)

author: Buendía
author_rank: Newbie
timestamp: November 09, 2013, 06:15:41 pm
content: Quote from: Mechatrommer on November 09, 2013, 08:21:07 amThank you for the help. I'll check that thread.

author: miceuz
author_rank: Frequent Contributor
timestamp: November 09, 2013, 06:51:07 pm
content: Quote from: mian2zi3 on November 08, 2013, 04:29:48 pmI would vote for production rejects.The one I got is somewhat borked - it produces sinewave ok, but the frequency does not increase in monotonic way while increasing control word value - there are sudden jumps in frequency.

author: dannyf
author_rank: Super Contributor
timestamp: November 09, 2013, 07:42:13 pm
content: QuoteWithout seeing your code, it is hard to pin point the blame on the chip.I have a few of those modules and they all worked flawlessly.