2
\$\begingroup\$

I have built a function generator using an AD9833 board, using the schematics found here. The circuit seems to work well, but the square waveform that it outputs isn't great and there is some overshoot in the rise and fall of each transition. I was wondering if anyone can suggest what the problem might be? I know it's difficult to say but any suggestions on how to fix this would be welcome. Below are a bunch of pics from my scope and a photo of the build.

Here is the sine output, which seems good: enter image description here

Here is the noise in the negative transition of the square wave at 1kHz: enter image description here

Here is the noise in the positive transition: enter image description here

Here are two pictures of the square wave at 500kHz, the first with the gain turned up, the second with it set lower: enter image description here enter image description here

Photo of the build: enter image description here

EDIT:

As requested, here are the waveforms as measured at the output of the op-amp. Interestingly the p-p voltage doesn't seem to vary with the output frequency. Here is the waveform at 1kHz:

enter image description here

And at 200kHz:

enter image description here

Here is a picture of the power board:

enter image description here

\$\endgroup\$
13
  • 3
    \$\begingroup\$ Did you check your 10x scope probe compensation? Or are you driving directly the BNC connector with the inductive loop wiring instead of coaxial cable? What you show in the scope photos looks pretty normal for the type of loose wiring construction I see in the picture. Fast edges (as in the square wave) will rapidly degrade if put through a bandwidth-limited system like the one in the photo, causing those ringing effects. \$\endgroup\$
    – MarkU
    Feb 28, 2022 at 23:12
  • 2
    \$\begingroup\$ you could at least not have the pair of red and black paralleled the whole run (capacitively coupled). \$\endgroup\$
    – dandavis
    Mar 1, 2022 at 8:17
  • 1
    \$\begingroup\$ Did not forget that many HF devices have a 50 Ohm Load? \$\endgroup\$
    – Antonio51
    Mar 1, 2022 at 14:42
  • 1
    \$\begingroup\$ @Jaska Sorry. It is not 50 Ohm load, but AD9833 has a 200 Ohm load on "board" (verified on the datasheet). What is the wave directly on the output pin? \$\endgroup\$
    – Antonio51
    Mar 1, 2022 at 19:47
  • 1
    \$\begingroup\$ For the overshoot, perhaps a little capacitor between pin 2 and pin 6 of LM318 (1 to 10 pF). Will try to simulate... \$\endgroup\$
    – Antonio51
    Mar 2, 2022 at 6:55

1 Answer 1

3
\$\begingroup\$

The problem seems really the "gain" set by pot2 between pin 2-6 of the opamp.
For variable gain, rather use an attenuator, and amplifier at fix gain.
However, use coax when needed, short wires ... and also PCB, not breadboard at high frequencies.

Simulated this with LM6164, but gain set by input resistor (1k-10k).

enter image description here

enter image description here

Added pictures for non-inverting circuitry. Note the overshoot if gain=1.

enter image description here

enter image description here

\$\endgroup\$
13
  • 1
    \$\begingroup\$ No worries. Keep me informed. Thanks. \$\endgroup\$
    – Antonio51
    Mar 7, 2022 at 14:18
  • 1
    \$\begingroup\$ Seems ok. Little overshoot as LM6164 in simulation. \$\endgroup\$
    – Antonio51
    Mar 11, 2022 at 8:06
  • 1
    \$\begingroup\$ Yes. Ok. I used the inverting circuitry. Using the non-inverting circuitry is ok also. Just keep the same "fix" resistors on the - feedback way. I will add simulation for the non-inverting. \$\endgroup\$
    – Antonio51
    Mar 17, 2022 at 20:42
  • 1
    \$\begingroup\$ Sorry. I did not answer at your question about "X2" ... it is "only" the "label" of the opamp... :-) \$\endgroup\$
    – Antonio51
    Mar 17, 2022 at 21:31
  • 1
    \$\begingroup\$ I add in answer. R3 control gain, always >1 ... Pot is not the better thing to use in these designs :-) microcap v12 here spectrum-soft.com/download/mc12cd.zip \$\endgroup\$
    – Antonio51
    Mar 17, 2022 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.