Thoughts on a high frequency function generator.

OBW0549

Joined Mar 2, 2015
3,566
The fact the oscillation is mostly on one slope of the triangle wave makes me think it isn't the op-amp. Unless, the op-amp bypassing is not good enough on one power supply. Have you ever seen an op-amp oscillate on only one edge of a transition?
Yes, I've run into that; an LM6134 in an amplifier that "burst into song" right at the positive peak of an output signal.
 

OBW0549

Joined Mar 2, 2015
3,566
Any idea why only at the peak???
No, other than the general observation that in any op amp, gain and phase margins are not absolutely independent of input or output voltage levels, especially in a RRIO op amp like the LM6134. I'm no longer terribly surprised when I see an op amp oscillate at some input/output voltage levels but not at others.
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
No, other than the general observation that in any op amp, gain and phase margins are not absolutely independent of input or output voltage levels, especially in a RRIO op amp like the LM6134. I'm no longer terribly surprised when I see an op amp oscillate at some input/output voltage levels but not at others.
Thanks for the insight.

I have not had a chance to do any serious troubleshooting. The only useful observation, so far, is that the oscillation occurs with both SIP's having either the ADA4817 or the J-FET buffered EL2030. This implies that the oscillation is not necessarily the op-amp.

I am compiling a list of things to check...
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
Here is the latest circuit. No major changes. This is to make sure we are discussing exactly what I have.

Oops. I just saw one difference from the circuit "as built". I don't have R2, the 51 ohm resistor at the input of the op-amp. I keep putting off adding this to the ADA4817 op-amp SIP since it is tricky to do without damaging what I already have. It is even harder to add to the EL2030 SIP. :( (I just added this to my to do list.)

upload_2018-1-27_10-17-41.png
 

Attachments

Thread Starter

RichardO

Joined May 4, 2013
2,270
I looked at the oscillation some and I am confused. There is oscillation without the op-amp plugged in. However, the oscillation does seem to be worse with the op-amp.

This leads me to believe that either the current source or the current switch is oscillating. The character of the oscillation varies in an unpredictable way when I change the value of the timing cap. I'm letting this rattle around in the back of my mind for now.


In the mean time I got distracted. I decided I would make a PCB for the Dual Comparator circuit. I have a good portion of a reel of SMD microwave transistors and plenty of the rest of the parts. The transistors have an F_t of greater than 5 GHz. See the attached spec.

I managed to under-etch the board so I had to clear some shorts. A straight pin or safety pin works well for this. The material I used was 1/16" thick. With another piece of PCB sandwiched to it to get a ground plane it ended up 1/8" thick. Not what I had planned but it works. One offshoot is that the capacitance to ground is less than a 1/16" board. This is good.

It is not obvious in the picture but the trace along the left edge of the board is patched. I managed to peel the trace up when I awkwardly pulled the board from a socket. The wire/pin and trace are held in place by fingernail polish. (The red jumper wires are not repairs. They are the "circuit side" of the board.)

After all of the fixes, the new board works in the breadboard. Now, back to that screwy oscillation.

Dual_Comparator.JPG
 

Attachments

tindel

Joined Sep 16, 2012
939
Richard,

It was good speaking with you the other day! I've been chewing on this a bit. I recalled you mentioning that you're getting the high freq oscillation on top of your saw-tooth, and that you had the oscillations without the opamp in place as well (Something you mentioned here again). This, of course, is a indicator that the source of the problem is not your op-amp.

Something occurred to me today while looking at your post... transistors WILL oscillate on their own when driven by a low impedance source. I don't understand the details, nor have I first hand experience with the phenomena. However, I have had some wiser engineers describe the phenomena to me - and I've always made the prescribed 'fix' and have never had a problem. The circuits I've had to 'fix' these for are high power MOSFET's with insane input capacitances (>1000p). While not exactly the same, the operating frequencies you're working at may be causing these problems even with the low transistor input capacitances (sub 10p? - I'm too lazy to look) you have.

When I went to look through your schematic today, sure enough you have a low impedance source driving your two most important transistors! The problem I think you're seeing is essentially a series RLC natural response problem. The output of U8 is essentially driving a capacitive load (Q7 and Q8 bases) at these frequencies with very low impedance and is resulting in a underdamped solution! The problem is just exacerbated with the SBB construction you have, making a larger L than what is really desired. I would be willing to wager a coffee that this is where your high freq oscillations are coming from.

The good news is that you have some options to fix the problem.
  • Lower L from the driver (U8) such that the output impedance of the flip-flop is adequate to dampen the ringing. This get's back to my comment during the meeting the other night - $**t or get off the pot. Design and layout the circuit on a single PCB board with good high-speed routing.
  • Add R from the output of your flip-flop is your other option. Don't add much R that's for sure - maybe as little as 1 ohm. You're not really trying to slow down the rise time so much as dampen the response. Therefore this change should not slow down your operating speed too much (although, it may end up being the limiting speed factor). I would put resistors on both R7 and R8 to keep them matched, of course.
  • Try lower input capacitance transistors - Not sure this is an option for you or not.
  • You may need to do a combination of these things.
If I were you, I'd look up your input capacitance, estimate your inductance, and take a stab at your output impedance and determine if you're in the ball park of being under-damped - I'm guessing you are. Then I'd calculate a resistor value that will get you critically damped, and then multiply that by about 2 and put that resistor on the base of the transistors to try to dampen out the ringing to see if the theory is plausible. Then I'd start lowering the resistance until I found the right balance of speed and lack of oscillation - i.e. critically damped.

Good luck!
Tinman

P.S. I remember a time when I was talking to a very good and bright engineer about this same exact problem he was having on some transistors that were oscillating on board he was designing. I remember asking him 'Why do you think it's oscillating?'. His response, "Because I have a couple of poles in the right hand plane."
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
="tindel, post: 1232397, member: 178169"] I recalled you mentioning that you're getting the high freq oscillation on top of your saw-tooth, and that you had the oscillations without the opamp in place as well (Something you mentioned here again). This, of course, is a indicator that the source of the problem is not your op-amp.
I think that it is both the transistor(s) and the op-amp oscillating. It is hard to tell at this point.

Something occurred to me today while looking at your post... transistors WILL oscillate on their own when driven by a low impedance source. I don't understand the details, nor have I first hand experience with the phenomena. However, I have had some wiser engineers describe the phenomena to me - and I've always made the prescribed 'fix' and have never had a problem. The circuits I've had to 'fix' these for are high power MOSFET's with insane input capacitances (>1000p). While not exactly the same, the operating frequencies you're working at may be causing these problems even with the low transistor input capacitances (sub 10p? - I'm too lazy to look) you have.
I don't understand the phenomena either. Note that the transistors I am using have capacitances less than 1pF. See the attachments...

When I went to look through your schematic today, sure enough you have a low impedance source driving your two most important transistors! The problem I think you're seeing is essentially a series RLC natural response problem. The output of U8 is essentially driving a capacitive load (Q7 and Q8 bases) at these frequencies with very low impedance and is resulting in a underdamped solution! The problem is just exacerbated with the SBB construction you have, making a larger L than what is really desired. I would be willing to wager a coffee that this is where your high freq oscillations are coming from.
That is hard to argue against. I keep putting off the fix until I understand the problem better. The plan will be to add something like 50 ohms between the flip-flop outputs and the current switch transistor bases.

The good news is that you have some options to fix the problem.
  • Lower L from the driver (U8) such that the output impedance of the flip-flop is adequate to dampen the ringing. This get's back to my comment during the meeting the other night - $**t or get off the pot. Design and layout the circuit on a single PCB board with good high-speed routing.
  • Add R from the output of your flip-flop is your other option. Don't add much R that's for sure - maybe as little as 1 ohm. You're not really trying to slow down the rise time so much as dampen the response. Therefore this change should not slow down your operating speed too much (although, it may end up being the limiting speed factor). I would put resistors on both R7 and R8 to keep them matched, of course.
  • Try lower input capacitance transistors - Not sure this is an option for you or not.
  • You may need to do a combination of these things.
I don't think I need the PCB's yet. I believe my hand wired circuits are good enough. We shall see. :rolleyes:
The current switch transistors are connected through short wires to the Q outputs of the F-F. There are no jumpers on the breadboard. I can easily add the damping resistors on the hand soldered perfboard. Note that the oscillation happens on both the SBB and the soldered version of the "mother board". This implies to me that the oscillation is not caused by the mother board.

If the oscillation is in the current source transistor then I will have to do a cut and jumper on the I-2I PCB to add the damping resistor(s). At this point, there are arguments either way as to whether this transistor is the one oscillating. Since the oscillation is larger on the positive slope of the triangle I think it is only the positive current source or current switch transistor(s) oscillating -- most likely the current switch.
If I were you, I'd look up your input capacitance, estimate your inductance, and take a stab at your output impedance and determine if you're in the ball park of being under-damped - I'm guessing you are. Then I'd calculate a resistor value that will get you critically damped, and then multiply that by about 2 and put that resistor on the base of the transistors to try to dampen out the ringing to see if the theory is plausible. Then I'd start lowering the resistance until I found the right balance of speed and lack of oscillation - i.e. critically damped.
As I mentioned above, I will probably use something 50 ohms. My calculations show a 3dB point above 1GHz which should do the job. ;)

Good luck!
Tinman
Thanks!!!!


P.S. I remember a time when I was talking to a very good and bright engineer about this same exact problem he was having on some transistors that were oscillating on board he was designing. I remember asking him 'Why do you think it's oscillating?'. His response, "Because I have a couple of poles in the right hand plane."
:D
 

Attachments

tindel

Joined Sep 16, 2012
939
See the attached simulation and image.
I recall you saying your around 10MHz right now, with a 100MHz oscillation. Forgive me if I have some of this wrong.

Your input capacitance is actually about 4p. Reference: https://www.infineon.com/dgdl/mosfet.pdf?fileId=5546d462533600a4015357444e913f4f. I got the 2.965pF from the Cje value of the spice model (Cje is the "B-E zero-bias depletion capacitance", per the LTspice help menu) that is in the datasheet you provided and the Ccb. Cin ~= Cbe(aka Cje)+Ccb. You may not agree with this point, but I'll let you play around with the numbers. There are certainly other interactions with being biased, in an active mode, frequency, etc.

I calculated based on 100MHz oscillations that you probably have ~800nH inductance with leads and stuff - this seems high to me, but on a SSB layout, perhaps this is true. I actually calculated it's probably closer to 100nH, but that would make your oscillation at a much higher frequency than 100MHz.

I guessed an output impedance @10MHz on your FF that it's ~100 ohms, which is probably about right. This allows the ringing to continue through the entire half cycle. Risetimes are 2ns per the FF datasheet nominal value.

It looks like your damping resistor needs to be more on the order of 1k. 2kohm is probably where I'd start and move down from there.
 

Attachments

Thread Starter

RichardO

Joined May 4, 2013
2,270
See the attached simulation and image.
I recall you saying your around 10MHz right now, with a 100MHz oscillation. Forgive me if I have some of this wrong.

Your input capacitance is actually about 4p. Reference: https://www.infineon.com/dgdl/mosfet.pdf?fileId=5546d462533600a4015357444e913f4f. I got the 2.965pF from the Cje value of the spice model (Cje is the "B-E zero-bias depletion capacitance", per the LTspice help menu) that is in the datasheet you provided and the Ccb. Cin ~= Cbe(aka Cje)+Ccb. You may not agree with this point, but I'll let you play around with the numbers. There are certainly other interactions with being biased, in an active mode, frequency, etc.

I calculated based on 100MHz oscillations that you probably have ~800nH inductance with leads and stuff - this seems high to me, but on a SSB layout, perhaps this is true. I actually calculated it's probably closer to 100nH, but that would make your oscillation at a much higher frequency than 100MHz.

I guessed an output impedance @10MHz on your FF that it's ~100 ohms, which is probably about right. This allows the ringing to continue through the entire half cycle. Risetimes are 2ns per the FF datasheet nominal value.

It looks like your damping resistor needs to be more on the order of 1k. 2kohm is probably where I'd start and move down from there.
Thanks for your time on this. :D

For reference: The generator is running fairly cleanly at 10 MHz or a bit more. The oscillation is something like 125 to 150 MHz. If you need bettr numbers I can get them for you.

I am not sure where you are getting the value of 2.965pf. The current switch transistors never see zero bias except during the transitions of the outputs of the flip-flop. Because of this I think the capacitance is smaller than you number.

The current switch transistors are either off or looking into a low impedance. This is either ground or the timing cap. I don't think that the current switch transistors ever sees any voltage gain so Miller capacitance does not apply. This is, again, because the loads in the collectors are either zero ohms (ground) or the timing cap.

The current source transistor is looking into the emitters of the current switch transistor. This is basically a cascode configuration so there should be very little Miller capacitance in the current source transistor.


I think the small signal output impedance of the Flip-flop is probably more like 26mv/8ma = 3 ohms. It can't be more than the 121 ohm load at DC.

A damping resistor of 1 K ohm would slow my risetime a huge amount. If we use 1 K ohm with your 3 pF transistor capacitance we get a time constant of 3 ns. It needs to be far less that to keep from rounding the tips of the triangle wave. The MC10EL31 has a typical risetime of about 0.225ns. This says that I need a much smaller damping resistor to not degrade the risetime. That is why I am thinking of using 50 ohms.

One final thought. In the simulation, I need to put some inductance in the timing capacitor circuit to see what effect it has.


Again, thanks for your input. :D:D I need someone to keep me honest and not going down the wrong path. :eek:
 

Attachments

Thread Starter

RichardO

Joined May 4, 2013
2,270
Inductance of a straight wire: I'm guessing the inductance of 1" of straight 24ga wire is about 25nh.

Well, in LTspice, I put some inductances (100nH each) around the timing cap part of the circuit and....
I sure do get nasty oscillation. I may have overdone the inductances since I no longer get the triangle wave!

The oscillation really slows down the simulation so I am having a slow time analyzing what is happening and where when running on my slow, antique computer.

upload_2018-2-6_17-5-15.png
 

Attachments

tindel

Joined Sep 16, 2012
939
Looked at this some more - indeed you're right, adding the inductance on the charge capacitors does appear to create ringing. I'd suspect this is your problem - or at least contributing to your problem. Also, adding resistance does negatively affect the frequency - as you pointed out.

I guess that leaves you with reducing the inductance - AKA - spin a board already!

One small point of contention - and I know you know this, but just a gentle reminder, a straight wire does not introduce inductance. Loops introduce inductance. Remember every source has a return... it's the loop you need to minimize. A calculator I use for estimating loop inductance is here: https://www.eeweb.com/tools/rectangle-loop-inductance
 

Attachments

tindel

Joined Sep 16, 2012
939
One more thought - could you use a darlington pair configuration to drive the timing cap? You'd need a lot less current from your FF - which could possibly improve the ringing a bit.

ETA: Nevermind - that was a dumb idea. I just simulated it and it was not a good solution - it added a pretty significant non-linearity, didn't get rid of the oscillation either. Still needed the damping resistors - which still reduces the maximum frequency.
 
Last edited:

Thread Starter

RichardO

Joined May 4, 2013
2,270
I guess that leaves you with reducing the inductance - AKA - spin a board already!
Not even close to that yet. I need to understand everything going on first. Also, I don't have the MC10EL31 flip-flop and MAX9601 comparator yet.

I _do_ have the PCB layout started. It is tricky getting all of the parts on top of each other so the traces have zero length. :D


After posting the circuit with the inductances, I realized I left one out. There should also be an inductance between the PNP current source transistor's collector and the emitters of the current switch.

I am in the process of estimating the actual stray inductance values for plugging into the simulation. I _really_ want the simulation to match what I have.
 

Mark Hughes

Joined Jun 14, 2016
409
@RichardO ,
Time to make a board buddy. DipTraceStarter edition runs about $75 and has two signal layers (so you can make a four layer board, two signal + two planes). And you can order your board, assembled, for probably another $75 from Macrofab.
Let me know as things progress and we can discuss turning this project into an official AAC front-page article.
Mark
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
I guess that leaves you with reducing the inductance - AKA - spin a board already!
"We will sell no wine before its time."

One small point of contention - and I know you know this, but just a gentle reminder, a straight wire does not introduce inductance. Loops introduce inductance. Remember every source has a return... it's the loop you need to minimize.
Ignoring that awkward detail...

Wire on the PCB SIP's and the breadboard: (The lengths are in inches).

L1 +I to pin 9 of I-2I 1.0
pin 9 to pin 1 of current sw. 1.1
pin 9 to emitters Q7,8 0.6
---
2.7 !!!

L2 Q8 collector to pin 5 0.1
pin 5 to dual comp pin 3 0.5
---
0.6

L3 -I to pin 10 of I-2I 0.8
pin 10 to current switch pin 5 1.4
pin 5 to switch transistor 0.1
---
2.3 !!!

-I to DIP switch 1.8 put ferrite bead on
wire???

L4 ??

L5 ??


edit: D--- editor ruined my formatting. The number at the end of the line is the length.
 

Thread Starter

RichardO

Joined May 4, 2013
2,270
Here is my simulation with the latest changes.

Simulating the circuit really ran slow so I got rid of parts of the circuit that were not needed to find the source of the oscillation.

In the simulation, I added some inductors to mimic the stray inductances of the wiring.
I also added some 50 ohm resistors but they did not have any obvious effect. These resistors have been "commented out" by making them 0.5 ohms.

I did these changes to the SBB prototype:
One ferrite bead on the wire going to the op-amp from the -I pin of the I-2I PCB.
Two beads on of the 10pF timing cap -- one on each lead.
A bead on the wire going from -I pin to the DIP with the other timing caps.
The triangle is fairly clean at about 30 MHz on the SBB. I have not had a chance to add the beads to the soldered version yet.

upload_2018-2-12_13-29-25.png
upload_2018-2-12_13-36-29.png
 

Attachments

Thread Starter

RichardO

Joined May 4, 2013
2,270
It has been a while.

I have some parts now and I am working on a PCB layout. The first prototype will be hand etched. It will have a solid ground plane on one side.

The PCB layout is going to be a b**** on a 2-layer PCB. Because of this I am forced to put parts on both sides of the board.


My plan is to mount all resistors and caps, that have one end grounded, to the ground plane side of the board. I will also mount the variable caps on the ground plane side since they are huge (compared to the other parts).

To do this I am going to need what I am calling "hidden vias". These are vias that are under a surface mount IC. Normally I would use 30ga wire for the via but the IC won't sit flat with that large wire underneath.

The hidden vias will be done by pressing square pins into either a 24 mil diameter hole (#73 drill) or a 22.5 mil diameter hole (#74 drill). The pins are from some 2mm header connectors that I have a bunch of. The pins are 20 mils square.

I made a tool to start the pins in straight in the holes before pressing them into place. It is a brass tube with a center hole just a bit bigger than the pin. I plugged the hole in the tube with a wire so that the pin extends out just enough to get it started. The tool is held in a pin vise.

The pins make a connection to the pad without soldering. Since I don't know how long the connection will last before corrosion sets in, I plan on soldering the ends of the pins to the pad

Here are some pictures of a test I did to determine the hole size I need for the pins:

Ends_close.JPG Ends_pins.JPG Tool_connector.JPG Tool_pins.JPG
 

Mark Hughes

Joined Jun 14, 2016
409
@RichardO,
Why go through such a punishing exercise? You can use Diptrace's free edition to create a four-layer board, and have it manufactured and assembled at Macrofab for <$100. Or have a PCB board house manufacture 4-boards for you for <$50 and assemble the parts yourself.
Best,
Mark
 
Top