I'm working on making a function generator using the AD9833 DDS chip, but it doesn't have programmable amplitude control.

I want to use external hardware to achieve this. My amplitude has to be 1 V to 10 V peak-to-peak. This is what I have so far:

What am I doing wrong?

• the title of your post does not match the body of the post Commented Feb 25 at 17:17
• why do you say that something is wrong? ... it is up to you to tell us what problem you see Commented Feb 25 at 17:31
• Your circuit just adds a variable DC offset to DSS_OUT, the analog signal does not pass an amplifier. You need a completely different circiut.
– Jens
Commented Feb 25 at 18:13
• At what frequency? Until 12.5 MHz ... Commented Feb 25 at 18:48
• (For those interested in this question, the OP has now asked a new follow-up question about a different design.) Commented Mar 24 at 23:25

What am I doing wrong?

You're adding a variable DC offset to the output, instead of changing the gain.

My amplitude has to be 1 V to 10 V peak-to-peak.

The resolution of this amplitude control makes quite a bit of difference in how simple or complex the gain adjustment circuit will be.

For example, if you need only 10 amplitude steps - 1V, 2V, ..., 10V, and the accuracy of the amplitude can be around 1%, then a fixed-gain amplifier, followed by a resistive divider (an attenuator with taps), a multiplexer to select the divider tap, and a voltage follower is all you'd need.

For similarly low number of steps but higher accuracy of the gain you could use a 10-bit digital potentiometer as the adjustable attenuator. The potentiometer settings of 100, 200, ..., 1000 would be used for amplitudes of 1, 2, ..., 10V. You could of course get more amplitude steps that way - up to a 1000.

For even higher gain accuracy and resolution, you'd use a multiplying DAC as a variable attenuator.

Is this amplitude to be controlled by the CPU, or by a user control like a potentiometer, without CPU involvement? If the latter, then the potentiometer can function as the adjustable attenuator.

It is important not to use a variable-gain stage, but fixed gains, and a variable attenuator. When a gain of an op-amp is varied, its bandwidth changes as well, and that is not desirable when you only want to change the signal amplitude and not its frequency content.

A perhaps simpler approach would be to use a better DDS chip that provides amplitude control - it's not as if you married AD9833, right?