AD9833 Signal Generator

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
Haven't been very clear in my explanation, so let me summarize what we know so far:

Friday:
(1) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2 -> Oscillations
(2) U2 removed. U4B pin 5 grounded. pin 12 U4D grounded. pin 7 U4B grounded with a 10k (let's call it Rout). -> No Oscillations

Today:
(3) U2 removed. U4B pin 5 grounded. pin 12 U4D grounded. pin 7 U4B left open (no 10k Rout) -> Oscillations.
(4) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2. pin 7 U4B grounded with Rout -> No Oscillations
(5) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2. Bypass capacitor at pin 12 (soldered at the IC pin and ground via). I tried different values of C (e.g. 10nF, 470nF, 1u) -> Oscillations

UPDATE:
(6) U2 removed. U4B pin 5 grounded. trace coming out pin7 U4B cut as close as possible to the pin. race coming out pin12 U4D cut as close as possible to the pin. Connection between pin 7 and 12 with a short wire directly on the IC's pins -> Oscillations
(7) U2 removed. U4B pin 5 grounded. trace coming out pin7 U4B cut as close as possible to the pin. race coming out pin12 U4D cut as close as possible to the pin. pin12 of U4D to ground. pin7 of U4B with no load -> Oscillations
(8) U2 removed. U4B pin 5 grounded. trace coming out pin7 U4B cut as close as possible to the pin. race coming out pin12 U4D cut as close as possible to the pin. pin12 of U4D to ground. pin7 of U4B with Rout -> No Oscillations

Aaaaaa I feel we are getting close, but not just yet :p
 
Last edited:

TeeKay6

Joined Apr 20, 2019
572
Haven't been very clear in my explanation, so let me summarize what we know so far:

Friday:
(1) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2 -> Oscillations
(2) U2 removed. U4B pin 5 grounded. pin 12 U4D grounded. pin 7 U4B grounded with a 10k (let's call it Rout). -> No Oscillations

Today:
(3) U2 removed. U4B pin 5 grounded. pin 12 U4D grounded. pin 7 U4B left open (no 10k Rout) -> Oscillations.
(4) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2. pin 7 U4B grounded with Rout -> No Oscillations
(5) U2 removed. U4B pin 5 grounded. U4B pin 7 and U4D pin 12 connected by soldering together pin 2 and 3 of U2. Bypass capacitor at pin 12 (soldered at the IC pin and ground via). I tried different values of C (e.g. 10nF, 470nF, 1u) -> Oscillations

TODO:
(6) U2 removed. U4B pin 5 grounded. trace coming out pin7 U4B cut as close as possible to the pin. race coming out pin12 U4D cut as close as possible to the pin. Connection between pin 7 and 12 with a short wire directly on the IC's pins -> we'll see :p
@Vinnie90
Thanks for the clarifications!
In your item(3), what was status of U2A:2,3,4 pins?
Your item(4) is definitely contrary to my understanding. I thought that when U2A:2 & 3 were connected, you did see oscillations. (I'll review our previous posts for clarification.)
Your item(5), what was status of 10K--in place or removed?
Your item(6): If you have not yet done all that...please do it in steps! First, cut trace from pin7, with U4D:12 grounded at pin12 ; test. We need a clear answer to "must U4D be operational for oscillations to appear?"
A new question: Do oscillations ever appear when 1K signal is not being generated?
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
In your item(3), what was status of U2A:2,3,4 pins?
U2A:2 floating
U2A:3 and U2A:4 soldered together (I mean only the pads soldered since the IC is not present).


Your item(4) is definitely contrary to my understanding. I thought that when U2A:2 & 3 were connected, you did see oscillations. (I'll review our previous posts for clarification.)
I see oscillations if I don't add a 10k resistor between pin 7 and ground.

Your item(5), what was status of 10K--in place or removed?
10k removed

Your item(6): If you have not yet done all that...please do it in steps! First, cut trace from pin7, with U4D:12 grounded at pin12 ; test. We need a clear answer to "must U4D be operational for oscillations to appear?"
Yes I did that in steps. But I think the answer to the question must U4D be operational for oscillations to appear is no since if I connect U4B:7 with U4D:12 and add a 10k resistor from U4B:7 to ground I see no oscillations (point 5 of the previous list).
 

TeeKay6

Joined Apr 20, 2019
572
U2A:2 floating
U2A:3 and U2A:4 soldered together (I mean only the pads soldered since the IC is not present).



I see oscillations if I don't add a 10k resistor between pin 7 and ground.



10k removed



Yes I did that in steps. But I think the answer to the question must U4D be operational for oscillations to appear is no since if I connect U4B:7 with U4D:12 and add a 10k resistor from U4B:7 to ground I see no oscillations (point 5 of the previous list).
@Vinnie90
Thanks for the update. Yes, I agree with you that it seems that U4D is not part of the problem. Thus we are left with only U4B being necessary...plus whatever U4B's traces are adding.

When you cut the trace near U4B:7, what was the result? With and without added 10K?
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
@Vinnie90
Thanks for the update. Yes, I agree with you that it seems that U4D is not part of the problem. Thus we are left with only U4B being necessary...plus whatever U4B's traces are adding.

When you cut the trace near U4B:7, what was the result? With and without added 10K?
I tried first to connect U4B:7 with U4D:12 with a short wire pin to pin. The oscillations are still there. Now if I connect again U4D:12 to gnd and leave U4B: without the 10k I still see oscillations. With the 10k to ground no oscillations. So there must be some coupling around U4B that does not depend on the traces connecting U4B:7 and U4D:12.
 

TeeKay6

Joined Apr 20, 2019
572
I tried first to connect U4B:7 with U4D:12 with a short wire pin to pin. The oscillations are still there. Now if I connect again U4D:12 to gnd and leave U4B: without the 10k I still see oscillations. With the 10k to ground no oscillations. So there must be some coupling around U4B that does not depend on the traces connecting U4B:7 and U4D:12.
@Vinnie90
The purpose in cutting the trace from U4B:7 was to determine if that trace (and anything that trace connected to) was necessary for oscillation. You found that the oscillation persisted despite the cut trace, but that you could kill the oscillation simply by adding a 10K resistor from U4B:7 to ground. Correct?

Paragraph2
Thus the U4B stage oscillates with only RA1 (and ground at U4B:5) connected, and connecting/disconnecting a 10K resistor from pin7 can change the status between oscillating and not oscillating. One experiment to try: Use a 100K (anything much, much greater than 10K) connected in exactly (i.e. physical connections & routing of leads) the same manner as the 10K. Result? Another experiment: Use 10K as is, but connect only the pin7 end, not ground--again, exactly same physical routing. Result? I am trying to determine whether it is the resistive load or the leads of the resistor that make the difference.

There is a large loop at the input of U4B. Start at U4B:6, go via RA1 to U4C:8, then from U4C:10 to U1:10, then via U1 to U1:9,4, then via traces & ground plane to the ground end of C15, then via C15 to U4B:5. That is a loop that runs from the inv input of U4B to the non-inv input of U4B. That is a large loop, subject to both capacitive and inductive coupling from other circuitry, as well as coupling via ground currents (the run from U1:4,9 to C15 ground). Specifically, it is possible that U4B:7 is, via that loop, coupling a signal into U4B:5; that would be positive feedback. (Of course, as I just noted, with a large loop there are many opportunities for interference.) Another experiment: Route a heavy wire (e.g. AWG 20-22) from U4:5 to U1:9, following a route as close as possible to the route from U4B:6 to U1:10. Although that's a long path, it is the actual ground signal path for the input of U4B. Look for change in the oscillation, either amplitude or freq or non-oscillation.

Why did you use U4C? Is U1:10 unable to drive RA1 directly? (The signal path could be shorter if U4C were not used.) Ideally, U4B:5 would route directly (and shortly) to U1:9, following closely the path from U4B:6 to U1:10...to minimize the loop length and area. Conceptually, imagine a twisted pair of wires running from U4B:5 and RA1:2--to--U11:9,10; that would be the least loop we could get. Since it is not easily possible to use that twisted pair...what I am trying to do is to reduce the inductance from U4B:5 to the ground plane, and from U1:9 to the ground plane. C15 must connect to U4B:5 at pin 5.

The only other suspects that I know of are the bypass caps for U4. It might be worth putting some large value (10-100uF), short leaded caps, directly in parallel with the 0.1 bypass caps of U4...to see if that affects the oscillation.

The effect of loading U4B:7 killing the oscillation remains puzzling, more so with the trace to U2 cut. I await your results of the tests described in Paragraph2 above to, hopefully, shed some light.

I am trying to see how the signal at U4B:7 is coupling into U4B:5--the most likely path for positive feedback.

@Vinnie90 Before I sign off this evening, looking at the LM6144 data sheet I do see that the phase gets weird as the frequency moves higher than 100KHz. That may well indicate that there will be difficulty in stabilizing the U4B stage as there is still significant open loop gain to much, much high frequencies. Other than cut-and-try, I plead diminished capacity on such a task; it's been too many years since I had to do such. If we cannot otherwise solve the problem, there are undoubtedly others viewing AAC who have the necessary talent.

Bye, bye until tomorrow.
 
Last edited:

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
@Vinnie90
The purpose in cutting the trace from U4B:7 was to determine if that trace (and anything that trace connected to) was necessary for oscillation. You found that the oscillation persisted despite the cut trace, but that you could kill the oscillation simply by adding a 10K resistor from U4B:7 to ground. Correct?
100% Correct

One experiment to try: Use a 100K (anything much, much greater than 10K) connected in exactly (i.e. physical connections & routing of leads) the same manner as the 10K. Result?
I tried a 6.8M resistor in the same position of the 10k resistor. Oscillations are there

Another experiment: Use 10K as is, but connect only the pin7 end, not ground--again, exactly same physical routing. Result? I am trying to determine whether it is the resistive load or the leads of the resistor that make the difference.
Yes, the output still oscillates

Why did you use U4C? Is U1:10 unable to drive RA1 directly?
I buffered the output of U1 with U4C because the output resistance of U1 is somewhat high and would load the following stage. Since I had a free op amp I decided to use it to prevent issues.

The only other suspects that I know of are the bypass caps for U4. It might be worth putting some large value (10-100uF), short leaded caps, directly in parallel with the 0.1 bypass caps of U4...to see if that affects the oscillation
Yeah in the new version of the PCB I also have a 10uF XR7 in parallel with the 100nF at the two supplies.

The effect of loading U4B:7 killing the oscillation remains puzzling, more so with the trace to U2 cut. I await your results of the tests described in Paragraph2 above to, hopefully, shed some light.
Same here....I thought the problem was there, but as you always state we need data to support our theories and in this casa data is killing us :p

@Vinnie90 Before I sign off this evening, looking at the LM6144 data sheet I do see that the phase gets weird as the frequency moves higher than 100KHz. That may well indicate that there will be difficulty in stabilizing the U4B stage as there is still significant open loop gain to much, much high frequencies. Other than cut-and-try, I plead diminished capacity on such a task; it's been too many years since I had to do such. If we cannot otherwise solve the problem, there are undoubtedly others viewing AAC who have the necessary talent.
I agree the LM6144 is way too fast and has a weird compensation. A very easy way to solve all my issues would be to use a slower opamp like the LM358. But I would really like to understand what is going on.

There is a large loop at the input of U4B. Start at U4B:6, go via RA1 to U4C:8, then from U4C:10 to U1:10, then via U1 to U1:9,4, then via traces & ground plane to the ground end of C15, then via C15 to U4B:5. That is a loop that runs from the inv input of U4B to the non-inv input of U4B. That is a large loop, subject to both capacitive and inductive coupling from other circuitry, as well as coupling via ground currents (the run from U1:4,9 to C15 ground). Specifically, it is possible that U4B:7 is, via that loop, coupling a signal into U4B:5; that would be positive feedback. (Of course, as I just noted, with a large loop there are many opportunities for interference.) Another experiment: Route a heavy wire (e.g. AWG 20-22) from U4:5 to U1:9, following a route as close as possible to the route from U4B:6 to U1:10. Although that's a long path, it is the actual ground signal path for the input of U4B. Look for change in the oscillation, either amplitude or freq or non-oscillation.
this is not very clear for me. How do you identify loops?

On a separate note I realized that the oscillations look weird. At U4C:8 I have a nice sine at 1kHz. Then when I induce oscillations (I remove the 10k output resistor) and I look what's going on at pin U4B:6 I see the circuit oscillating at around 640 kHz, no trace of the initial 1kHz signal. Then if I look at U4B:7 I see the oscillations superimposed to the 1kHz signal. How can it be since the signal path is mainly resistive to cancel out one component at pin6 that then reappears at pin 7? (see pics)
 

Attachments

TeeKay6

Joined Apr 20, 2019
572
100% Correct



I tried a 6.8M resistor in the same position of the 10k resistor. Oscillations are there



Yes, the output still oscillates



I buffered the output of U1 with U4C because the output resistance of U1 is somewhat high and would load the following stage. Since I had a free op amp I decided to use it to prevent issues.



Yeah in the new version of the PCB I also have a 10uF XR7 in parallel with the 100nF at the two supplies.



Same here....I thought the problem was there, but as you always state we need data to support our theories and in this casa data is killing us :p



I agree the LM6144 is way too fast and has a weird compensation. A very easy way to solve all my issues would be to use a slower opamp like the LM358. But I would really like to understand what is going on.



this is not very clear for me. How do you identify loops?

On a separate note I realized that the oscillations look weird. At U4C:8 I have a nice sine at 1kHz. Then when I induce oscillations (I remove the 10k output resistor) and I look what's going on at pin U4B:6 I see the circuit oscillating at around 640 kHz, no trace of the initial 1kHz signal. Then if I look at U4B:7 I see the oscillations superimposed to the 1kHz signal. How can it be since the signal path is mainly resistive to cancel out one component at pin6 that then reappears at pin 7? (see pics)
@Vinnie90
1. So U4B oscillates despite having a resistor lead hanging from its pin7 and it still oscillates if the load is very light (6.8Meg vs 10K). That seems to indicate that true loading by the 10K does have a significant effect. I don't know yet what to make of that info. I'll review the LM6144 datasheet again to see if I can find anything.

2. This may be one way to view the puzzling U4B operation: A 1KHz sine wave input is applied to RA1:2. U4B:5=0V (grounded). Negative feedback from U4B:7 via RA1:1 to the inverting input holds U4B:6 equal to U4B:5, i.e. 0V. U4B:7 shows the normally amplified 1KHz signal. This is all normal opamp operation with a 1KHz signal (U4B:6 is a "null junction"). Now, simultaneously, U4B is oscillating internally (we have no idea why), but since the oscillation is internal to U4B and not an input signal via RA1, the oscillation is not nulled by negative feedback at U4B:6 and thus appears at U4B:7. While the spurious oscillation signal is large, it is not so large as to completely disrupt normal U4B amplifier and negative feedback and (via an internal process we will never know) internally the U4B adds the normal 1KHz signal and the spurious high freq signal.

3. That leaves us pretty much where we were: Why does the U4B oscillate internally? Why does a light load (10K) kill that oscillation? However, thanks to your experimentation we do know one (very viable) solution: add a load to the output of U4B, even if we don't understand why that works. Experiment: Show that adding a 10K resistor from U4B:7 to ground kills the oscillation. (Done!) Now connect the 10K from U4B:7 to the positive +3V (and/or +3.3V) power rail. Does the resistor still kill the oscillation? Next experiment: Repeat but connect to -3V (and/or -3.3V). Result? The experiments won't lead directly to an answer, but more info helps.

4. If we fail to find a better solution, another experiment: Change the value of RA1 to be low enough that it kills the oscillation? (e.g. <10K)
 
Last edited:

TeeKay6

Joined Apr 20, 2019
572
@Vinnie90
1. So U4B oscillates despite having a resistor lead hanging from its pin7 and it still oscillates if the load is very light (6.8Meg vs 10K). That seems to indicate that true loading by the 10K does have a significant effect. I don't know yet what to make of that info. I'll review the LM6144 datasheet again to see if I can find anything.

2. This may be one way to view the puzzling U4B operation: A 1KHz sine wave input is applied to RA1:2. U4B:5=0V (grounded). Negative feedback from U4B:7 via RA1:1 to the inverting input holds U4B:6 equal to U4B:5, i.e. 0V. U4B:7 shows the normally amplified 1KHz signal. This is all normal opamp operation with a 1KHz signal (U4B:6 is a "null junction"). Now, simultaneously, U4B is oscillating internally (we have no idea why), but since the oscillation is internal to U4B and not an input signal via RA1, the oscillation is not nulled by negative feedback at U4B:6 or U4B:7. While the spurious oscillation signal is large, it is not so large as to completely disrupt normal U4B amplifier and negative feedback and (via an internal process we will never know) internally the U4B adds the normal 1KHz signal and the spurious high freq signal.

3. That leaves us pretty much where we were: Why does the U4B oscillate internally? Why does a light load (10K) kill that oscillation? However, thanks to your experimentation we do know one (very viable) solution: add a load to the output of U4B, even if we don't understand why that works. Experiment: Show that adding a 10K resistor from U4B:7 to ground kills the oscillation. (Done!) Now connect the 10K from U4B:7 to the positive +3V (and/or +3.3V) power rail. Does the resistor still kill the oscillation? Next experiment: Repeat but connect to -3V (and/or -3.3V). Result? The experiments won't lead directly to an answer, but more info helps.

4. If we fail to find a better solution, another experiment: Change the value of RA1 to be low enough that it kills the oscillation? (e.g. <10K)
@Vinnie90
Identifying loops: In general there are two kinds to find: loops revealed by reviewing a schematic and loops revealed by reviewing a PCB layout. In the case of "schematic loops", you look for hypothetical loops based on your circuit knowledge. For instance, I suggested that there is a large loop connecting U4B:6 to U4B:5. I looked for that loop because (a) U4B:5 and U4B6 are the differential inputs of U4B and (b) because I was unsettled when viewing the schematic at how far the signal from U1:10 progressed without any reference to ground. There is nothing theoretically wrong as, when viewing the schematic, one assumes that there is a reliable ground plane and all relevant circuit nodes have very short paths to that plane. However, upon looking more closely at the PCB layout I could see that significant trace lengths were involved in completing the loop--presenting opportunities for coupling a signal into that loop. In more general terms, you usually ignore loops unless (a) you are aware of them or (b) there is some problem that a loop might explain, in which case you look where you think a loop would be troublesome. Loops in a PCB layout are not necessarily revealed in the schematic and loops in the schematic are not necessarily implemented in the layout. You can minimize the effect of loops by (a) eliminating them, (b) making the enclosed area of the loop as small as possible (minimize inductance and induced voltages), (c) viewing most signals as a drive & return and then keeping the drive & return as close together (as well as short) as possible, (d) minimizing the interfering signal source. You can minimize interfering signals by keeping their loops small as well, by location & orientation of the interfering traces (e.g. don't place a high level AC signal next to a high impedance input), and by shielding--either in the plane of the board via strategically placed copper or outside the board plane via metal boxes, shielded wires, etc. Analog PCB layout is definitely a skill and art. You must understand the circuit you are laying out: what is sensitive, what is not, how much current will a trace carry, proximity of traces to possible interferences. The first step is the gross layout, usually using a "rats nest" feature of layout software to highlight the most crowded areas and the general path of signals. Then you must generally try several, sometimes many, alternative placements to reach one that looks promising. Finally, as you lay out the board, you constantly--for every trace--review the layout against the schematic and your knowledge of what might be a problem. You adjust placement, trace paths, trace widths, trace spacings, locations of junctions, etc--all based on your knowledge of the circuit (and, of course, your PCB layout experience). Before you begin a layout, identify in the schematic all traces/nodes that might be troublesome so that you can be sure to give them attention as you create the layout. While neatness of a layout matters to someone viewing it, it does not matter to the components involved. Make it right first and then later, if necessary, make it neat. Do not be mislead by your schematic; components widely separated on a schematic may in fact urgently need to be immediately adjacent in the layout. Finally, before layout, review the grounding of the circuit; identify critical areas for attention during layout.
 

Thread Starter

Vinnie90

Joined Jul 7, 2016
86
2. This may be one way to view the puzzling U4B operation: A 1KHz sine wave input is applied to RA1:2. U4B:5=0V (grounded). Negative feedback from U4B:7 via RA1:1 to the inverting input holds U4B:6 equal to U4B:5, i.e. 0V. U4B:7 shows the normally amplified 1KHz signal. This is all normal opamp operation with a 1KHz signal (U4B:6 is a "null junction"). Now, simultaneously, U4B is oscillating internally (we have no idea why), but since the oscillation is internal to U4B and not an input signal via RA1, the oscillation is not nulled by negative feedback at U4B:6 or U4B:7. While the spurious oscillation signal is large, it is not so large as to completely disrupt normal U4B amplifier and negative feedback and (via an internal process we will never know) internally the U4B adds the normal 1KHz signal and the spurious high freq signal.
Now I got it. In fact, when I do not have any sinewave coming from U1, I see the same oscillations at the output U4B:7

Now connect the 10K from U4B:7 to the positive +3V (and/or +3.3V) power rail. Does the resistor still kill the oscillation? Next experiment: Repeat but connect to -3V (and/or -3.3V). Result? The experiments won't lead directly to an answer, but more info helps.
Yep that connection still kills the oscillations!

f we fail to find a better solution, another experiment: Change the value of RA1 to be low enough that it kills the oscillation? (e.g. <10K)
I think that we might have become telepathic. I tried that after lunch. Changed RA1 from a 56k to a 1k resistor array. That kills the oscillations :D

I also tried changing the op amp in a twin board from the LM6144 to a LM324 and that also does not give any oscillation
 
Last edited:

TeeKay6

Joined Apr 20, 2019
572
Now I got it. In fact, when I do not have any sinewave coming from U1, I see the same oscillations at the output U4B:7



Yep that connection still kills the oscillations!



I think that we might have become telepathic. I tried that after lunch. Changed RA1 from a 56k to a 1k resistor array. That kills the oscillations :D

I also tried changing the op amp in a twin board from the LM6144 to a LM324 and that also does not give any oscillation
@Vinnie90
There are of course other op amp choices that may be suitable for your application. Although we have found a fix for the oscillation in this instance, I do not know why the LM6144 behaves as it does, being more stable with a load. Unless you have a specific issue to discuss, I think we have done what we can wrt the oscillation in this circuit. Good luck in moving toward your final circuit.
 
Top