Electronics > Projects, Designs, and Technical Stuff
ad8933 function generator
(1/2) > >>
Boschi:
i bought an ad9833 and i want to turn it into a decent function generator.

i want to get 0-2Mhz (or more, maybe up to 3Mhz if the waweform doesnt look too bad, but im not sure about how to filter the waveform)
+- 12 volt  offset
12Vpp of voltage swing (if its a bit less when the dc offset its at its maximum its not a problem)
AC/DC coupling
0 - 20dB attenuation at the output (not pictured in the schematics yet)
a pushbutton to switch on/off the output (the switching its effettuated by a relay)


 my main concern is, this would be my first signal generator, are the specs wide enough to make it usefull? in software im thinking about adding logaritmic mode in order to test filters (at least in audio frequency).

thanks,
Boschi
brabus:
I would say: it all depends on what you need to do.
For example, I definitely would need a square wave with precisely tunable duty-cycle (1...99%); you can easily obtain it from the triangle wave using a comparator.
And a sync output for the oscilloscope, of course.

If we are talking about audio frequencies, I would not bother too much with frequencies and amplitudes (100 kHz, 2 Vpp is usually enough for a line signal), and concentrate the effort on distortion.
If you want to characterize a control loop frequency response, frequency becomes relevant, but most of all you need to galvalically insulate the output.

At the end of the day, it really comes down to the output amplifier spec. Have you already idenfitied a suitable part number?

I would start with the specs you drafted and refine them later, once you already have the device on your desk. Once you designed the first version, you can easily work out the improvement you need and build a second one.
Boschi:

--- Quote from: brabus on September 11, 2019, 11:28:19 am ---I would say: it all depends on what you need to do.
...
At the end of the day, it really comes down to the output amplifier spec. Have you already idenfitied a suitable part number?

--- End quote ---

well... kinda. as now i already designed a circuit to get the job done, and as the output stage it has a AD811, but its a bit exotic.
another possible alternative could be LM7171 (3.5€ in single quantity), which is also pin compatible with the AD811.
(the AD8051 is going to be a different op amp, ill search RS later)

about the pwm i really didnt consider it. i agree that its very handy. ill just use a comparator and the triangular wave, and then square it with the help of a not gate (to also met the 50 ohm output impedance)

the sync its not really useful for me, i have a 4 channel scope and no dedicated sync input, the same goes for the isolated output as the instrument will be battery powered.

anyway, attached there is what i came up with. not drawn there is the switch for the -20 gain, i also want to digitally control the offset with a dac and a differential amplifier.

the idea is to have in the first stage a variable gain of 0.5-5, in the second stage a fixed 4 gain and last a 0.1 gain selectable on the output. this way i can have a output swing that vary from 0.2*0.6V =120mVpp to a 20*0.6V = 12Vpp

any thoughts?
MasterT:
I did some check up of my ad9833 from ali., and get -65dBc THD all over from 2-nd to 20-th + something. So, talking about low distortion with this DDS does not make much sense, and consequently highly priced AD & TI OPA are out of scope.

Dual LM4562 for $2 is more than adequate, or even NE5534 up to 100-200 kHz. If 1-2 MHz 12 Vp-p is really required, than TSH82 from STM for $1+.  My test shows -95dBc at 100 kHz , the best price /THD value I've seen.
MarkF:
I used an AD9834 and a 48MHz master clock in my design with a programmed frequency of 1Hz to 10MHz.

A few comments:

* The diode for the relay should be across the coil and not the transistor.  Not sure what a physical relay is going to do to your signal at high frequencies.
* I didn't think the AD9834 needed much of a filter on its output.  However, I did a small filter at the output with an online LC Filter Design program.  You could add more poles if you wish.
* You can also do a frequency sweep with a high speed interrupt in the Arduino and updating the AD9833 fast.  My update rate is 500Hz to change the frequency while sweeping up or down.
* I used a PIC18F2550 for my MCU and switched one of its PWM outputs into the signal path.  Either AD9833 output or PWM.  Not both.


Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod