Arbitrary amplitude from a function generator -- how is it done? - Page 1
Forum section: electronics / projects

author: mdszy
author_rank: Unknown
timestamp: July 03, 2017, 05:13:47 am
content: I'm looking into the potential of making a small hobby-grade function generator based off the AD9833 DDS IC. (I just happen to have a dev board for it, so I thought I might as well).One thing I'm struggling to find information on is how function generators achieve adjustable amplitude controlled by a digital circuit.Is there something that's done with digital control and op-amps, using a lowpass-filtered square wave to generate a voltage from it and using that to adjust the gain of an op-amp somehow? From what I've researched, it's harder to voltage-control op-amps than I'd immediately think, though...Are there voltage-controlled amplifiers that are used instead? Some kind of discrete-transistor circuits?Any pointers would be helpful, this is something I've been curious about yet all my internet searches have been fruitless. Maybe I'm just not searching for the right things.

author: Someone
author_rank: Super Contributor
timestamp: July 03, 2017, 05:29:26 am
content: There's a chip for that:http://www.analog.com/en/products/amplifiers/variable-gain-amplifiers.html

author: mdszy
author_rank: Unknown
timestamp: July 03, 2017, 05:36:57 am
content: Quote from: Someone on July 03, 2017, 05:29:26 amGotcha! Thanks a bunch for the tip. Upon further research, I'm also finding that digital potentiometers are a potential option. I'll look into both VGA's and digital pots to see which would be more cost effective, since it seems like those VGA chips get expensive quick.

author: Someone
author_rank: Super Contributor
timestamp: July 03, 2017, 05:44:24 am
content: Quote from: mdszy on July 03, 2017, 05:36:57 amIts expensive but they have the bandwidth, internally even some of the analog controlled VGAs are a high quality digital pot coupled to a good amplifier. Its sometimes easier to build your own DDS if you don't need the small package of an integrated solution, then you can consider other ways to control the DAC amplitude.

author: mdszy
author_rank: Unknown
timestamp: July 03, 2017, 05:46:35 am
content: Quote from: Someone on July 03, 2017, 05:44:24 amRight. Gotcha! So something like a micro + DAC and some kind of lookup table for the values of sine, etc. just like a DDS works internally? For doing a DDS from scratch, that is.

author: testian
author_rank: Regular Contributor
timestamp: July 03, 2017, 08:30:35 am
content: Have a look at this article about a DDS Generator with variable attenuator (http://www.nutsvolts.com/uploads/magazine_downloads/200611-Stand-Alone_DDS_Unit.pdf) as an idea. Or a digital potentiometer to create a variable gain amplifier (http://www.analog.com/media/en/technical-documentation/application-notes/AN-579.pdf).

author: jpb
author_rank: Super Contributor
timestamp: July 03, 2017, 08:53:12 am
content: Commercial instruments combine switched attenuation with varying the amplitude digitally.It seems it is easier to have a fixed gain amp preceded by attenuators.To allow extension to higher frequencies at the cost of lower maximum amplitude, I think that in some instruments the gain of the final amp may also be switched (lower gain = greater bw)

author: MosherIV
author_rank: Super Contributor
timestamp: July 03, 2017, 12:05:54 pm
content: QuoteThat was what I was thinking BUT.....be careful with digital potentiometers, most will only work between supply voltage and ground. The only one which I have seen that work with arbitrary voltage are from Analogue Devices. Not sure how easy they are to obtain though.

author: tszaboo
author_rank: Super Contributor
timestamp: July 03, 2017, 12:38:31 pm
content: Some DDS have the Vref pin exposed, where you can basically modulate the output signal. So you use a DAC t oset the output signal level. For example AD9832 or 9834. You can attenuate the output signal.

author: rstofer
author_rank: Super Contributor
timestamp: July 03, 2017, 01:45:48 pm
content: Maybe study the documentation for the Digilent Analog Discovery.https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual

author: Kleinstein
author_rank: Super Contributor
timestamp: July 03, 2017, 03:18:03 pm
content: There are mainly three options:1) have a DDS chip or DACs with variable ref. voltage and use switchable attenuators to do the coarse adjustment.2) use a continuous variable gain amplifier or an analog multiplier. For large range maybe add an attenuator.3) have a set of fine step switchable attenuators. The fine steps can be with something like CMOS switches. Resolution might be limited, but still high enough.The normal digital pots can be OK for low frequency (e.g. < 1 MHz), but often the BW is rather limited.VGA chips are relatively expensive, but still the cheap DDS generators (e.g. Feeltech 5500)use them, together with a makeshift R2R type DAC (and thus no variable reference)..

author: mdszy
author_rank: Unknown
timestamp: July 03, 2017, 03:24:25 pm
content: Thanks everyone for the great responses! It'll be a huge help and definitely some awesome steps in the right direction. Thanks again!