Idea for a tiny function generator - Page 1
Forum section: electronics / projects

author: mdszy
author_rank: Unknown
timestamp: June 24, 2019, 11:02:14 pm
content: I've had this idea for a little while, and I'm not sure if there are any huge pitfalls I'm missing that would make doing this a bad idea.I've wanted a tiny little function generator, and some of the Analog Devices DDS chips seem like a perfect solution.For instance, I've looked into theAD9834and it seems like a pretty cool little chip that could do sine, square and triangle waves. It could be controlled with a simple microcontroller setup which would have a display and some buttons or an encoder with a button for control.The downsides I can forsee are:It's kinda expensive, $13/chip in low quantities.75MHz maximum frequency, I think it'd be perfectly usable, but it could be a little lowDigital amplitude control could be difficult - any suggestions for this?Other than these downsides, I feel like it would be a fun idea to attempt, and could be really fun to try out small-scale manufacturing and selling it on Tindie if I'm able to make it work well enough.Thoughts?

author: ChristofferB
author_rank: Frequent Contributor
timestamp: June 24, 2019, 11:19:52 pm
content: it's a bit wasteful, but maybe out a digital attenuator on it? I'm pretty sure I've seen small cheap digital attenuator chips flying around somewhere.maybe you could split the output and have one going to a frequency doubler. 150 MHz would be very decent.--Chris

author: mdszy
author_rank: Unknown
timestamp: June 24, 2019, 11:22:20 pm
content: Quote from: ChristofferB on June 24, 2019, 11:19:52 pmso the digital attenuator would provide variable amplitudes? That would be nice, I'd have to see what kind of battery life I could get out of the thing, I have some small lipos lying around that I want to try using for it.I'll look into frequency doublers too, thanks for that suggestion!

author: Mr. Scram
author_rank: Super Contributor
timestamp: June 24, 2019, 11:44:47 pm
content: 75 MHz doesn't sound low to me. Many generators do only 10 or 20 MHz and even then the square waves aren't that impressive. If you manage to do even 30 MHz with good fidelity, you've got a winning product on your hands.

author: mdszy
author_rank: Unknown
timestamp: June 25, 2019, 12:09:43 am
content: Quote from: Mr. Scram on June 24, 2019, 11:44:47 pmI see, thank you! Wasn't quite sure what expectations were for a hobby-grade sort of function generator.

author: Mr. Scram
author_rank: Super Contributor
timestamp: June 25, 2019, 12:14:19 am
content: Quote from: mdszy on June 25, 2019, 12:09:43 amPlease don't take my comments as sage advice. They obviously are, but you should definitely be sure to inform yourself.What works for me may not work for the rest of the world.

author: james_s
author_rank: Super Contributor
timestamp: June 25, 2019, 12:33:11 am
content: My rather ancient function generator only goes up to 2MHz, for the most part that has been adequate for my needs. If I want more I've got TTL oscillators in various frequencies or I can use one of my FPGA dev boards to get clocks up into hundreds of MHz. Depends on your needs.

author: rs20
author_rank: Super Contributor
timestamp: June 25, 2019, 12:39:36 am
content: Spend $25 on aAD9102and you get 180 MSPS, arbitrary waveform capability, and offset+gain ("digitial attenuation") are built-in to the chip. I know it seems like an expensive chip, but it would provide a pretty killer combo of smallness, performance and simplicity of design, and removes the need for external digital attenuators + offset.

author: mdszy
author_rank: Unknown
timestamp: June 25, 2019, 01:01:20 am
content: Quote from: rs20 on June 25, 2019, 12:39:36 amYeah really that isn't a terrible price for all that it does.Certainly saves a bunch of external circuitry that would probably get close to the $25 price tag anyway.

author: MarkF
author_rank: Super Contributor
timestamp: June 25, 2019, 10:57:38 am
content: Here is my Function Generator using an AD9834:1 to 10MHz4VP-Poutput+/-2V DC OffsetWaveforms: sine, triangle, square, sine sweep, triangle sweep, PWMAnalog and digital outputsRotary Encoder controlOLED Color displayPrototype:

author: MarkF
author_rank: Super Contributor
timestamp: June 25, 2019, 11:07:12 am
content: Quote from: mdszy on June 25, 2019, 12:09:43 am75 MHz is the maximum clock rate.The maximum output frequency is half that (37.5 MHz).But that is the nyquist frequency. I would not expect to realize that.

author: MarkF
author_rank: Super Contributor
timestamp: June 25, 2019, 11:25:05 am
content: Also, see this related discussion of the AD9834 and the AD9102https://www.eevblog.com/forum/projects/dds-project-76783/

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: June 25, 2019, 12:31:03 pm
content: I've always been happy with a 5 MHz function generator. Any time I need higher frequency, I don't need functions, just a squarish or sine wave. At higher frequencies I use a dedicated RF generator that covers maybe 450 kHz to 500 MHz or more. A doubler is easy to do, so that gets me to 1 GHz, though I've never needed it. My fastest scope is 350 MHz, so I couldn't see it anyway! The only specialty signal I use is a composite FM generator for tuner alignment. 100 MHz, but with various different modulations. What I don't have is an arbitrary generator, so that would be of interest in any digital design I considered.

author: mdszy
author_rank: Unknown
timestamp: June 25, 2019, 12:44:50 pm
content: This is awesome input, thank you all for the suggestions!