AD9833 Signal Generator

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
Hi Guys,

I have built a signal generator based on an AD9833 (schematic attached). The circuit is on a PCB. This is a second version of a circuit that already works. in the previous version I had a mechanical potentiometer to change the DC offset while now I'm using one of the available digital potentiometers. I can program all the chips and the AD9833 generates the waveform that I want. Something weir happens at the quad op amp...I have attached the waveforms I got probing different sections of the circuit. Anyone has any idea what's going on?

Thanks a lot for the help
 

Attachments

TeeKay6

Joined Apr 20, 2019
439
Hi Guys,

I have built a signal generator based on an AD9833 (schematic attached). The circuit is on a PCB. This is a second version of a circuit that already works. in the previous version I had a mechanical potentiometer to change the DC offset while now I'm using one of the available digital potentiometers. I can program all the chips and the AD9833 generates the waveform that I want. Something weir happens at the quad op amp...I have attached the waveforms I got probing different sections of the circuit. Anyone has any idea what's going on?

Thanks a lot for the help
@Vinnie90
You neglect to show an important signal, DC_Off. Also helpful would be +3V and -3V waveforms. At what point is your scope ground connected? Are bypass capacitors connected to circuit ground right at the op-amp?
 

DickCappels

Joined Aug 21, 2008
5,930
Either your circuit is oscillating or noise is getting in, possibly through your digital pots.

Are these waveforms from a real physical circuit or from the simulator?

There does not appear to be any power supply decoupling capacitors -the should be one for each power supply mounted near the op amp chip. It might be necessary to shorten the traces to the digital pots as the capacitance to ground and other things may be the problem.
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
@Vinnie90
You neglect to show an important signal, DC_Off. Also helpful would be +3V and -3V waveforms. At what point is your scope ground connected? Are bypass capacitors connected to circuit ground right at the op-amp?
Right....I've taken DC_Off and the supplies (attached). I have the decoupling capacitors right underneath the IC (on the bottom layer). I put two 100n between the supplies and ground.
 

Attachments

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
Either your circuit is oscillating or noise is getting in, possibly through your digital pots.

Are these waveforms from a real physical circuit or from the simulator?

There does not appear to be any power supply decoupling capacitors -the should be one for each power supply mounted near the op amp chip. It might be necessary to shorten the traces to the digital pots as the capacitance to ground and other things may be the problem.
Yes that's what I was thinking but I think I properly decoupled all the ICs also the dig pots (sorry for the confusion...in the schematics the decoupling are at the bottom left of the sheet). I have 100nF between the supplies and ground for all the analog part and another 100nF from 3V3 to ground for the digital lines.
 

TeeKay6

Joined Apr 20, 2019
439
Hi Guys,

I have built a signal generator based on an AD9833 (schematic attached). The circuit is on a PCB. This is a second version of a circuit that already works. in the previous version I had a mechanical potentiometer to change the DC offset while now I'm using one of the available digital potentiometers. I can program all the chips and the AD9833 generates the waveform that I want. Something weir happens at the quad op amp...I have attached the waveforms I got probing different sections of the circuit. Anyone has any idea what's going on?

Thanks a lot for the help
You are saying that the images in post#4 are (in order, left to right): DC_off, +3V, -3V ? Although I don't cannot view the scope scaling, the +3V, -3V signals look horrible. Is there something wrong with your power supply? (I assume the scope was set for DC coupling???) Can you comment on the vertical scales in the images?
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
You are saying that the images in post#4 are (in order, left to right): DC_off, +3V, -3V ? Although I don't cannot view the scope scaling, the +3V, -3V signals look horrible. Is there something wrong with your power supply? (I assume the scope was set for DC coupling???) Can you comment on the vertical scales in the images?
That's correct, it's DC_Off, +3V and -3V. I just noticed the scale is not visible but for the +3V is between 2.9 and 2.98V and for the -3V the scale is between -3.1 and -3.2
 

TeeKay6

Joined Apr 20, 2019
439
That's correct, it's DC_Off, +3V and -3V. I just noticed the scale is not visible but for the +3V is between 2.9 and 2.98V and for the -3V the scale is between -3.1 and -3.2
So these are AC-coupled traces. The top-bottom shown in the +3V trace is 0.08V; top-bottom shown for -3V trace is 0.1V. If you set W1 at B1, does that change the waveforms greatly? If you place a cap from W2 to ground, with W2 set to about 0V, (I am assuming that it is--for testing--not necessary for DC_Off to vary rapidly), does that change the waveforms?
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
So these are AC-coupled traces. The top-bottom shown in the +3V trace is 0.08V; top-bottom shown for -3V trace is 0.1V. If you set W1 at B1, does that change the waveforms greatly? If you place a cap from W2 to ground, with W2 set to about 0V, (I am assuming that it is--for testing--not necessary for DC_Off to vary rapidly), does that change the waveforms?
With W1 set to B1, the voltage divider gives me almost zero. I tried soldering a 47n cap between W2 and ground but the signal didn't notably change
 

TeeKay6

Joined Apr 20, 2019
439
With W1 set to B1, the voltage divider gives me almost zero. I tried soldering a 47n cap between W2 and ground but the signal didn't notably change
I am attempting a divide-and-conquer approach to troubleshooting; that is, break a complex system into simpler parts, trying to eliminate components that are not suspect. Setting W1 at B1 indeed ought to give no output from U4B, but more importantly it did not alter the waveforms; thus U4B is unlikely to be involved in creating the problem. Likewise, if bypassing W2 (same as U4D:12) does not alter the waveforms, then the DC_Off signal is not likely involved in creating the problem. We have already seen that the problem is not visible at U4C:8, where only the desired sine wave appears. Some more ideas to try... Turn off circuit power; are the signals then free of the high frequency component (of course there will be no low freq sine wave)? Place a small cap from U4D:14 to U4D:13, perhaps 1nF. After powering up the circuit again, is the high frequency signal still present in the waveforms? (If the cap is too large, the sine wave may also be greatly reduced but that doesn't matter for testing.) Are the signals on U2A:7,8,9 idle (i.e. steady at either +3V or -3V) during your observations? Are you grounding components via a copper ground plane or via discrete traces? What is the frequency of the desired sine wave, about 10KHz?
 

DickCappels

Joined Aug 21, 2008
5,930
100 nf is not much decoupling for an op amp like this. You might find that you need several microfarads.

What are are the values of the resistors feeding the inverting input of U4D? Since it appears that U4D is where the oscillation is taking place, I would be very concerned about the routing of the feedback path and might even try a decoupling capacitor on the non-inverting input near the amplifier. It is possible that a ground loop is the source of the feedback that is causing the oscillation. Or ay of dozens of things for that matter : -)
 

TeeKay6

Joined Apr 20, 2019
439
100 nf is not much decoupling for an op amp like this. You might find that you need several microfarads.

What are are the values of the resistors feeding the inverting input of U4D? Since it appears that U4D is where the oscillation is taking place, I would be very concerned about the routing of the feedback path and might even try a decoupling capacitor on the non-inverting input near the amplifier. It is possible that a ground loop is the source of the feedback that is causing the oscillation. Or ay of dozens of things for that matter : -)
@DickCappels
TS schematic shows resistors are 56K (2 R's in 1 package). As reported above, the TS has tried a bypass from U4D "+" input to ground without effect. Otherwise, there are still a number of possibilities as you note.
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
Hi Guys,

I've spent some time trying to debug the circuit following your advice.

- I added some more decoupling at the supply of the op amp (4.7uF at the supply pin)...nothing
- I desoldered the dig pot U2 and connected the pin 12 of U4D to ground and soldered together pin 14 to pin 5 of U5....still no luck
- I checked the PCB layout to find potential ground loops but looked fine to me

As I was running out of ideas I thought that maybe the op amp was demaged and tried with another op amp...I tried first with another LM6144 and nothing changed and then I used an LM324 and....booom it works. I had a look to the datasheets of both and the LM6144 seems a better amp than LM324....so now the question is what happened there?

thanks again for the help @TeeKay6 and @DickCappels :D
 

TeeKay6

Joined Apr 20, 2019
439
Hi Guys,

I've spent some time trying to debug the circuit following your advice.

- I added some more decoupling at the supply of the op amp (4.7uF at the supply pin)...nothing
- I desoldered the dig pot U2 and connected the pin 12 of U4D to ground and soldered together pin 14 to pin 5 of U5....still no luck
- I checked the PCB layout to find potential ground loops but looked fine to me

As I was running out of ideas I thought that maybe the op amp was demaged and tried with another op amp...I tried first with another LM6144 and nothing changed and then I used an LM324 and....booom it works. I had a look to the datasheets of both and the LM6144 seems a better amp than LM324....so now the question is what happened there?

thanks again for the help @TeeKay6 and @DickCappels :D
The LM6144 is a much faster (greater bandwidth, greater slew rate) op-amp than the slow LM324. Among other things, that means the LM6144 can generate signals that couple more easily into other parts of the circuitry and the LM6144 can respond to fast signals, essentially interfering signals, that the LM324 simply ignores. You have several choices to proceed. One, there is in fact something deficient in your physical circuitry (e.g. component placement, PCB trace paths, grounding, etc) that is causing/allowing the LM6144 to oscillate; fix it; obviously you have not had much luck doing so thus far. Two, if you have no need for the faster speed, then use a slower op-amp; the LM324 is low-cost and widely available, but there are plenty of other options. Three, if you cannot tolerate the lower speed op-amp, try other medium speed op-amps than the LM6144; again, there are many options. You said an earlier version of your board did work; did it use the LM6144 op-amp?
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
The LM6144 is a much faster (greater bandwidth, greater slew rate) op-amp than the slow LM324. Among other things, that means the LM6144 can generate signals that couple more easily into other parts of the circuitry and the LM6144 can respond to fast signals, essentially interfering signals, that the LM324 simply ignores. You have several choices to proceed. One, there is in fact something deficient in your physical circuitry (e.g. component placement, PCB trace paths, grounding, etc) that is causing/allowing the LM6144 to oscillate; fix it; obviously you have not had much luck doing so thus far. Two, if you have no need for the faster speed, then use a slower op-amp; the LM324 is low-cost and widely available, but there are plenty of other options. Three, if you cannot tolerate the lower speed op-amp, try other medium speed op-amps than the LM6144; again, there are many options. You said an earlier version of your board did work; did it use the LM6144 op-amp?
I see. I still see some oscillations with the LM324 but they are way smaller in amplitude. I did a previous version of the board with the LM6144 but the PCB was wit only two layer while this new one has four.
Now, say I try to fix the cause of the oscillations...how can I test my hypothesis about the problem? Should I do several pcb versions and that would be very costly. Do you have any suggestion?

Maybe I'll attach the layout...maybe there's something very obvious that I don't see (I'm not very familiar with looking for ground loops)
 

Attachments

TeeKay6

Joined Apr 20, 2019
439
I see. I still see some oscillations with the LM324 but they are way smaller in amplitude. I did a previous version of the board with the LM6144 but the PCB was wit only two layer while this new one has four.
Now, say I try to fix the cause of the oscillations...how can I test my hypothesis about the problem? Should I do several pcb versions and that would be very costly. Do you have any suggestion?

Maybe I'll attach the layout...maybe there's something very obvious that I don't see (I'm not very familiar with looking for ground loops)
@Vinnie90
Do the oscillations using the LM324 seem to be about the same frequency as when using the LM6144? If yes, that is surprising. Perhaps the op-amp itself is not oscillating, but something else is producing the signal we have been calling an oscillation. Another possibility remaining is that there is a high-Q resonance on the PCB that causes both the LM6144 and LM358 to oscillate at the same frequency. I have not yet looked at your PCB layout files.

Can you estimate the frequency of what we have been calling an oscillation?

I suggest that it would be unwise to make more PCBs unless something definitely suspicious is found with the present layout.

If you have not done so already, try connecting U4D pins 13 & 14. That should cut the amplitude of your desired waveform in half...but the question is what does it do to the presumed oscillation signals?
 
Last edited:

MrAl

Joined Jun 17, 2014
6,603
Hi Guys,

I have built a signal generator based on an AD9833 (schematic attached). The circuit is on a PCB. This is a second version of a circuit that already works. in the previous version I had a mechanical potentiometer to change the DC offset while now I'm using one of the available digital potentiometers. I can program all the chips and the AD9833 generates the waveform that I want. Something weir happens at the quad op amp...I have attached the waveforms I got probing different sections of the circuit. Anyone has any idea what's going on?

Thanks a lot for the help
You could try lowering the resistor values. 56k to 5.6k for example.
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
@Vinnie90
Do the oscillations using the LM324 seem to be about the same frequency as when using the LM6144? If yes, that is surprising. Perhaps the op-amp itself is not oscillating, but something else is producing the signal we have been calling an oscillation. Another possibility remaining is that there is a high-Q resonance on the PCB that causes both the LM6144 and LM358 to oscillate at the same frequency. I have not yet looked at your PCB layout files.

Can you estimate the frequency of what we have been calling an oscillation?

I suggest that it would be unwise to make more PCBs unless something definitely suspicious is found with the present layout.

If you have not done so already, try connecting U4D pins 13 & 14. That should cut the amplitude of your desired waveform in half...but the question is what does it do to the presumed oscillation signals?
So I checked the oscillation frequency with the FFT in the oscilloscope. With the LM324 the oscillations are very small and are @ 1MHz (the oscillations at the crystal). For the LM6144 the oscillations have a much wider spectrum centered around 600kHz....but also other harmonics everywhere. I tried to have a look at the layout and I couldn't find anything major that could lead to ground looping....also because the superimposed oscillations are very large in amplitude.
 
Top