opamps and local decoupling of rails, some questions

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Samuel Groner said:
I use rail-to-rail decoupling all the time, with excellent results. Typically I have 2x 100 nF caps to ground, and 10-100 uF rail-to-rail for each chip. Very important is the provision for enough damping of the decoupling system--either by some small resistance in series with the rail, or the use of low-Q (electrolytic) capacitors. As far as I can tell from the limited info given about the systems where rail-to-rail decoupling has failed, insufficient damping must have been the cause. In a power supply system where no provisions for damping have been taken, the addition of a high-Q (film, ceramic) capacitor can easily provoke instability by shifting the resonance frequency into a region where the opamps have less PSRR. However, this is not the fault of rail-to-rail decoupling per se, but the omission of damping.

I admit there was no damping in the two cases I mentioned.  That's certainly a cheap and good way to ensure isolation of all the opamps. I suppose (sub 0.1ohm) "damping" from the PCB rails doesn't count. Perhaps it's time for some experiments, trace cutting time!
 
Samuel Groner said:
Typically I have 2x 100 nF caps to ground, and 10-100 uF rail-to-rail for each chip.
This is precisely the case where I say
There is a case for BOTH rail to ground AND rail to rail capacitors where board space is limited in a power amplifier ...
At the risk of simplification in the presence of Guru Groner .. the 2x100n to ground deal with stability while the 10-100u rail to rail help HF THD.  But this is 3 components instead of 2.  I submit that equal or better results will obtain with simply 2x10u from rail to ground.  ie the important bits are the rail to ground ones.  You can omit the rail to rail bits but omit the rail to ground electrolytics at your peril.

Very important is the provision for enough damping of the decoupling system--either by some small resistance in series with the rail, or the use of low-Q (electrolytic) capacitors.
+1.  Remember, for some highly strung OPAs, 1" of power supply track represents unacceptable inductance.

However, this is not the fault of rail-to-rail decoupling per se, but the omission of damping. I have implemented several GHz opamps and composite opamp topologies (two opamps within one global loop, not for the faint of heart) where I too used rail-to-rail coupling, and this stuff was stable even on the first prototype board.
Sam, was this ONLY rail to rail or did you have some rail to earth too?

Key to understanding the advantages of rail-to-rail decoupling (or the general problem of decoupling for low distortion) is the separation of the signal current loop and the current loop of the harmonics which are generated because of the class B nature of typical output stages (and occur, to a surprising amount, even with class A designs). The signal current loop flows from the supply through the output stage, through the load, and through ground (let's ignore the case where the load is connected to a virtual ground for simplicity) back to the supply. The loop of the class B harmonics however never passes through the load (as the load hopefully get a clean signal delivered), but travels from one supply through the entire output stage right to the other supply rail.

An ideal decoupling system could completely isolate these loops, and keep both as short as possible for minimal crosstalk/distortion. The signal current loop would be bypassed to the load, and the class B harmonics loop to the other supply. Unfortunately it is not easy to completely separate these paths, and usually some compromise must be made. IME, the approach described above does pretty well usually.
http://www.aes.org/e-lib/browse.cfm?elib=3911 .. probably the definitive treatment ... but Baxandall was talking about this in the early 1970's.

Bottom line is that decoupling must be engineered, not left to a few "rule-of-thumbs" and guesses. No approach will be optimum in any case.
Thanks for your contribution Sam which I whole heartedly second.  I'm interested in any cases where you have had success with ONLY rail to rail decoupling.

The point about 'rules of thumb' is that they give good results in all (??) situations.  Does anyone have a case where 2x10u near the OPAs on both rails to (a separate dirty) ground gives bad results?

PS For a really dirty solution, you can get away with 10u on just one rail; the one with poorer PSRR of the OPA.  This works for stability.  HF THD will not be as good but this is better than ONLY decoupling rail to rail.
 
Kingston said:
Samuel Groner said:
I use rail-to-rail decoupling all the time, with excellent results. Typically I have 2x 100 nF caps to ground, and 10-100 uF rail-to-rail for each chip. Very important is the provision for enough damping of the decoupling system--either by some small resistance in series with the rail, or the use of low-Q (electrolytic) capacitors. As far as I can tell from the limited info given about the systems where rail-to-rail decoupling has failed, insufficient damping must have been the cause. In a power supply system where no provisions for damping have been taken, the addition of a high-Q (film, ceramic) capacitor can easily provoke instability by shifting the resonance frequency into a region where the opamps have less PSRR. However, this is not the fault of rail-to-rail decoupling per se, but the omission of damping.

I admit there was no damping in the two cases I mentioned.  That's certainly a cheap and good way to ensure isolation of all the opamps. I suppose (sub 0.1ohm) "damping" from the PCB rails doesn't count. Perhaps it's time for some experiments, trace cutting time!

Just a little update on experiments with damping. I managed to use some 0.82-1uF film caps rail-to-rail with an existing design after adding damping (4R7) for each rail going to an opamp. I already had rail-ground-rail 100nF X7R ceramics there and adding a 1uF film without damping had previously fried ADA4898-2 and made LME49880 oscillate for mercy.

Note, I didn't actually measure any performance improvement yet, this experiment was just to see if damping would solve that frying problem.

This was a such a simple and great tip, thank you very much! Too bad it's a bit difficult to incorporate into an existing PCB. Sure some kind of damping groups can be made, but fanning it out individually to all opamps in a +5 opamp design makes some nasty looking hacked PCB's.

[edit]

Also thanks JohnRoberts for that headphone return current tip from another thread. I suppose it relates to this thread as well. Similar to ricardos opamp ground "star" where audio is sanctified to its own "ground bus" and not tacked along decoupling caps all over the place. I rerouted headphone PSU/decoupling area ground directly to "star" and eliminated all crossbleed.  Now a zeroed master fader actually does what it should.

Now that I have something like intermediate understanding on opamp decoupling in general, I might have a thing or two to say about this mixer I'm reworking...  :eek:

Difficultātem facit doctrīna
 
Kingston said:
Too bad it's a bit difficult to incorporate into an existing PCB. Sure some kind of damping groups can be made ..
Just use electrolytics instead of your 100ns for rail to ground.

Electrolytics in this application have exactly the correct amount of damping built in.  And the size of electrolytic isn't critical either.  Anything above 1u will work.  Bigger electrolytics have lower ESR but it so happens that the bigger capacitance makes the whole circuit less susceptible so the damping is still correct.

But bigger electrolytics will usually give you better HF distortion if everything else is good.

Once you have your rail to ground electrolytics near your OPAs, you can add any other scheme you fancy without worry.  The damping inherent in the electrolytics will damp any & everything else correctly.

In case you haven't figured it out, the damping doesn't have to be in series with the supply rails but can be in series with the caps.  Then you can add caps without ESR, eg Golden Pinnae films or more ceramics,  in parallel with the damping electrolytics without problem or stuff rail to rail too.
 
ricardo said:
In case you haven't figured it out, the damping doesn't have to be in series with the supply rails but can be in series with the caps.  Then you can add caps without ESR, eg Golden Pinnae films or more ceramics,  in parallel with the damping electrolytics without problem or stuff rail to rail too.

Nice! Time for more experiments then.
 
The 2x100 nF to ground deal with stability while the 10-100 uF rail to rail help HF THD.

Yes, that's the essence. The rail-to-rail however can also improve stability; that's because most opamps have, in the MHz region, considerably higher CMRR than PSRR. As the rail-to-rail cap draws any supply ripple "in common" to both rails, the ripple appears as common-mode signal and is rejected by the CMRR of the opamp, no just the PSRR.

But this is 3 components instead of 2.

One could argue that two 100 nF X7R 0603 caps are essentially "for free", particularly if you have a few dozen of them anyway because it is a mixed-signal design (what I do most).

Was this ONLY rail to rail or did you have some rail to earth too?

Of course with rail-GND too.

I'm interested in any cases where you have had success with ONLY rail to rail decoupling.

Nowadays I'm using one-cap rail-to-rail decoupling for slow auxiliary amps (e.g. TL071 servo), which don't drive any external loads, only.

I managed to use some 0.82-1 uF film caps rail-to-rail with an existing design after adding damping (4r7) for each rail going to an opamp.

Thanks for reporting back--good to hear that this helped!

Just use electrolytics instead of your 100 nFs for rail to ground.

How can you assure proper HF decouplig with just electrolytics? Aging etc. could shift the ESR of the caps to a point where stability is impaired. Just recently throwed a 220 uF electrolytic (perhaps 10 years old, new-old-stock) at the 5.5 digit LCR meter--at 100 kHz, it was essentially a pure resistance!

Samuel
 
Thanks for your comments & experience which are much appreciated, Sam.

Samuel Groner said:
The rail-to-rail however can also improve stability; that's because most opamps have, in the MHz region, considerably higher CMRR than PSRR. As the rail-to-rail cap draws any supply ripple "in common" to both rails, the ripple appears as common-mode signal and is rejected by the CMRR of the opamp, no just the PSRR.
That's an interesting concept.  Is there a formal treatment of this anywhere?  Or is this your experience?

Nowadays I'm using one-cap rail-to-rail decoupling for slow auxiliary amps (e.g. TL071 servo), which don't drive any external loads, only.
My experience is that once you get to 5532/4 and better, you need some Rail to Gnd stuff.  Even though TL071 is nominally 'faster' than 5532/4

How can you assure proper HF decouplig with just electrolytics? Aging etc. could shift the ESR of the caps to a point where stability is impaired. Just recently throwed a 220 uF electrolytic (perhaps 10 years old, new-old-stock) at the 5.5 digit LCR meter--at 100 kHz, it was essentially a pure resistance!
If you do a full analysis of a typical power amp or OPA circuit stability, you'll find that at 100kHz, pure resistance rail to ground near the device is not a problem .  The main PSU at some distance doesn't even have to be super.  Of course this assumes, low THD at 100kHz is not a priority.  ;D

This is from my misspent youth trying to design (instead of fudge) power amps and also trying to figure out how to get various OPA internal circuits into my home brewed circuit analyser.

I've done very little mixed-signal stuff so Sam's advice is pertinent for that.  But for simple analog, I suggest 2x10u near each OPA rail to a dirty (with apologies to JR) ground is
  • hard to beat
  • never causes problems even with old caps
 
ricardo said:
In case you haven't figured it out, the damping doesn't have to be in series with the supply rails but can be in series with the caps.  Then you can add caps without ESR, eg Golden Pinnae films or more ceramics,  in parallel with the damping electrolytics without problem or stuff rail to rail too.

This concept now somewhat eludes me. Let's say resistance to PSU regulator through all PCB traces/vias/cable is 1-3 ohms, a common situation. If I now add a 10uF electrolytic with like 5-10 ohms in series right next to an opamp, wouldn't the opamp still want to draw all (or at least most) of it's current through the lesser resistance of the regulator, instead of this cap right next to it that has much higher resistance to the opamp?
 
Kingston said:
ricardo said:
In case you haven't figured it out, the damping doesn't have to be in series with the supply rails but can be in series with the caps.  Then you can add caps without ESR, eg Golden Pinnae films or more ceramics,  in parallel with the damping electrolytics without problem or stuff rail to rail too.

This concept now somewhat eludes me. Let's say resistance to PSU regulator through all PCB traces/vias/cable is 1-3 ohms, a common situation. If I now add a 10uF electrolytic with like 5-10 ohms in series right next to an opamp, wouldn't the opamp still want to draw all (or at least most) of it's current through the lesser resistance of the regulator, instead of this cap right next to it that has much higher resistance to the opamp?
This is a stability issue.  To model it accurately (?) you have to put the inductance of the tracks to the PSU in too.  Have a look at the AES Cherry paper I linked to for how to make this work in your favour instead of against.

Whether the current comes from the local caps or the supply depends on many interacting factors.  Resistance in PS tracks or capacitors is usually not a problem for stability.  It IS for distortion.

Stability is a separate issue.  If you want to investigate this formally, Cherry has a number of papers in JAES which are pertinent and accurate.  Bit hard work though.

But just try it and see.  Replace the local 100ns with 10u electrolytics to ground and see if your supa dupa OPAs still oscillate with or without rail to rail.  You'll probably notice a small improvement in 20kHz distortion too.

BTW, while I wouldn't claim that my circuit model (or any simulation for that matter) was accurate, I did get my TL07x & 553x models to the stage that predicted under some circumstances, TL07x would be OK with rail to rail while 553x wouldn't.  But this was all 20+ yrs ago.
 
That's an interesting concept. Is there a formal treatment of this anywhere?

If someone else has spelled this out before me, I wouldn't know about it! 8)

Even though TL071 is nominally 'faster' than 5532/4.

I'd say GBW, not slew-rate, counts...

For the records some links on the topic:

www.analog.com/static/imported-files/application_notes/AN-202.pdf
www.designers-guide.org/Design/bypassing.pdf
www.analog.com/static/imported-files/tutorials/MT-101.pdf

Samuel
 
My experiments in mixer improvement have proven fruitful. The studiomaster trilogy (schematic: http://www.groupdiy.com/index.php?topic=44841.0) has now seen a drop of noise floor of some 20dB in general and 30dB at best!! I had modified the PSU long a go already, but little good that did with the godawful sham of a decoupling scheme and "one ground for everyone at random" concept they had.

In the best scenario of stereo channel strip to group output (unity gain) the chain just barely registers when measured through RME HDSP AD/DA. Only THD is a little worse than the RME, but still very acceptable. Master strip is a little worse due to especially bad PCB design that cannot be completely salvaged.

The original PSU and decoupling designs and especially PCB's were crappy - there's no better word for it - and their original specs in the manual outright lied. Their THD specs were shall we say optimistic. Maybe an individual prototype channel once approached those specs.

The boards now probably cannot take more hacking. I'll post a picture later so you can all have a laugh at the sheer amount of reroutes. There's now added damping (4r7 to 10r) here and there, every opamp has it's own 100nF ceramics rails to ground, and most importantly these drain-grounds are now separate from the all the reference-grounds. There's some grouping involved with the damping resistors, and there I have also used 10uF electrolytics to ground with 1uF film rail-to-rail.

Compare this to the original schematic and you can see what a great improvement this is.

I now know what it takes to (re)design a more complex but quiet environment for opamps. Thank you everyone that helped.

Next I will deafen oscillations of some of the more "sonar grade" opamps I'm using. Something like 5-20mV ~20mHz here and there that don't actually show up in outputs. I guess I could even ignore these, but the perfectionist in me says I can't.

Also this long ribbon cable of main bus is a frequency dependent mixer in itself and I would love to have less crosstalk.
 
Kingston said:
Something like 5-20mV ~20mHz here and there that don't actually show up in outputs. I guess I could even ignore these, but the perfectionist in me says I can't.
Don't ignore this.  A quick effective solution is to solder 1u electrolytics rail to ground near the OPAs, maybe on the back of the board across the 100n ceramics if the PCB is now too fragile for replacement.

When you get rid of the spurious oscillation, THD will improve at all frequencies.  It's not just the 20MHz you see (??) that contributes to THD but that the internal circuits are not operating at their best when doing even small oscillation.
 
ricardo said:
When you get rid of the spurious oscillation, THD will improve at all frequencies.  It's not just the 20MHz you see (??) that contributes to THD but that the internal circuits are not operating at their best when doing even small oscillation.

I figured as much. Just that I already improved a THD of the most important signal chain in the mixer from ~0.02% to 0.0011% (input of stereo strip to group output, all at unity gain). I could be more than happy with that.

But now there are some places with even 160mV ~23Mhz oscillation (nearly pure sinewave in most cases). That's awful and needs to be gone of course. The place where I see that still has 0.004% THD which is also pretty ok in my book. Most of the oscillations are more tame, around 10mV ~50Mhz.

By the way I can't seem to get rid of any of these oscillations by adding caps.

Should I start adding bigger feedback compensation caps or what other solutions are there? I'm running some very high bandwidth opamps here and I can throw away all the Mhz. Flatness up to 40-50khz is also good enough in my book, which is what I'm already seeing.

Currently there are no compensation caps everywhere, as the original opamps were much lower bandwidth, but there are some and those spots are still oscillating(22-68pF). Also, is there a calculator somewhere where I could quickly check the -3dB roll off point for a feedback compensation cap.

Diverging a bit off topic, but might as well ask.
 
Kingston said:
By the way I can't seem to get rid of any of these oscillations by adding caps.

Should I start adding bigger feedback compensation caps or what other solutions are there? I'm running some very high bandwidth opamps here and I can throw away all the Mhz. Flatness up to 40-50khz is also good enough in my book, which is what I'm already seeing.

Currently there are no compensation caps everywhere, as the original opamps were much lower bandwidth, but there are some and those spots are still oscillating(22-68pF).
Can you post some circuits with the offending OPAs marked?
  • Is there a ground plane that extends under the OPAs or their + & - i/p nets?  This often leads to stray capacitance that requires larger compensation caps.
  • When you scope the oscillation, are you connecting the earth lead on the probe near the offending OPA clean earth?  Sometimes, the oscillation isn't from the OPA but is picked up cos the convoluted earthing path seen by the scope.
  • Keep the 1uFs to ground near the OPAs even if they don't cure the problem.  You need them to make things sensible for the other measures.  Or try 10uFs
Last resort is to revert to an old faithful like 5532 in specific places.  ;D  Should get 0.0011% THD unity gain easy ..  even on a complex strip with loads of these in series given half decent design .. and decoupling.  8)
 
ricardo said:
Can you post some circuits with the offending OPAs marked?
  • Is there a ground plane that extends under the OPAs or their + & - i/p nets?  This often leads to stray capacitance that requires larger compensation caps.
  • When you scope the oscillation, are you connecting the earth lead on the probe near the offending OPA clean earth?  Sometimes, the oscillation isn't from the OPA but is picked up cos the convoluted earthing path seen by the scope.
  • Keep the 1uFs to ground near the OPAs even if they don't cure the problem.  You need them to make things sensible for the other measures.  Or try 10uFs
Last resort is to revert to an old faithful like 5532 in specific places.  ;D  Should get 0.0011% THD unity gain easy ..  even on a complex strip with loads of these in series given half decent design .. and decoupling.  8)

Studiomaster Trilogy 166 schematic: http://www.groupdiy.com/index.php?topic=44841.0

(why I'm even bothering with some early nineties mixer with this much attention, it's because it's quite small and fully modular and it makes it easy. A learning project. And because I can of course.)

Worst offenders are "right output board" and "left output board" IC1 and IC2 (group strip summing and fader buffers). I'm now using OPA827 (IC1a and b) and ADA4898-2 (IC2) there. They actually behave roughly equally even if I switch the order. Lesser offenders are "stereo input circuit" IC4 and IC5 (ADA4898-2) and its filter section IC2 and IC3 (OPA2211).

I'm already using NE5532 pan and fader buffers, in all stereo and mono channel strips.

There are no ground planes. These are all single sided boards. The reference/ground is a wider trace at the edge of the board where it jumps to all the circuits where needed. And yes it's convoluted at times. The decoupling drain/ground is now its own solid core wire.

I should start a new thread "prodding around, not quite sure where", because I think most of those oscillations might in fact be scope artifacts. I have paid absolutely no attention to the earthing path of the scope. That might also explain why I don't see oscillation on outputs: there I'm probing the TRS plug directly. Scope noob here.

I'll have a try with the 1uF set with one board and scope again with more attention to the scope earthing path.
 
Kingston said:
Studiomaster Trilogy 166 schematic: http://www.groupdiy.com/index.php?topic=44841.0
Thanks for these, Kingston.

Worst offenders are "right output board" and "left output board" IC1 and IC2 (group strip summing and fader buffers). I'm now using OPA827 (IC1a and b) and ADA4898-2 (IC2) there. They actually behave roughly equally even if I switch the order. Lesser offenders are "stereo input circuit" IC4 and IC5 (ADA4898-2) and its filter section IC2 and IC3 (OPA2211).
Apart from slightly better noise with ADA4898-2 or OPA2211 at IC1 in the RIGHT & LEFT OUTPUT BOARDs, I don't think you will hear or measure any difference from 5532 in any of the other spots.  5532 will have better HF THD than the original 4560s if everything else is done properly.

I'll bet big money that your improvements are mainly from your better decoupling and new earthing.

Please let us know how you get on with a few 1uFs and more attention to the scope earthing path.

You can see why some people hear HUGE differences when they roll OPAs.  Not everyone checks as carefully as you've done.
 
Just a few thoughts on this:

* When chasing oscillating opamps keep in mind the most significant issues:
- Decompensated opamps (e.g. a OPA637) are only stable above a certain noise gain.
- Capacitive loading at the output. Isolate with a series R or other suitable techniques. A 10 MHz opamp often takes ~100 pF without complaining; for a 100 MHz part this might shrink to a few pF. Also keep in mind that probing directly at the opamp output will add capacitive loading. Use a series resistor to isolate the probe.
- Capacitive loading at the inverting input. Cancel with a feedback capacitor; for general audio work, I'd size the time constant with the corresponding feedback resistor for about 300 kHz (this assumes a unity-gain stable opamp).
- Improper power supply bypassing. See this thread...

* I don't think the ADA4898-2 is a very suitable chip for such a mod. First of all, it doesn't have good audio performance--surely voltage noise is low, but distortion within the audio frequency range is poor (it has comparably excellent distortion performance above 100 kHz, and that's what the datasheet rants about). Second, its ~100 MHz unity gain frequency screams for a ground plane and good RF layout (at least at noise gains below 10). Without such, stability will be plain guesswork.

* To check stability, you absolutely need a proper scope and 10x probes. In certain cases, oscillation can occur above the unity gain bandwidth of the used opamps. So even with just NE5532s around, a 100 MHz scope is not a luxury.

Samuel
 
Samuel Groner said:
- Also keep in mind that probing directly at the opamp output will add capacitive loading. Use a series resistor to isolate the probe.
...
- To check stability, you absolutely need a proper scope and 10x probes.
+1 to the 10x probes.  A crude series R can hide MHz stuff cos if forms a LP filter with the probe capacitance.  A 10x probe is compensated for this.

I don't think there is much to be gained using the uber OPAs instead of 5532.  Unless you want stability & oscillation problems.

http://nwavguy.blogspot.com.au/2011/08/op-amp-measurements.html is a authoritative & refreshing look at what's available and includes some useful new finds.

I have one caveat.  LM4562 has a horrible latching behaviour when common range mode is exceeded.  I wouldn't use it with simple single supply or in HP filter circuits that might be overloaded.

[edit]NJM4562 has comparable performance but uses a completely different topology so should be OK on simple single supply.[/edit]
 
I've a 100Mhz scope with 10x probes, Rigol DS1052E that got universal praise at eevblog upgraded to 100Mhz by their recommendation. What size resistor should there be in series with the opamp output and probe? I've been measuring the output pin directly of course, didn't know any better...

As far as me playing around with exotic opamps that began with blind swapping, it seems I'm finally asking the right questions. I also suspect it was the better decoupling implementation that gave me these improvements, little to do with opamps themselves. 0.001% THD is still several zeroes away from what the better opamps are capable of in ideal environments. Perhaps after this thread I'll gravitate towards new designs where I will achieve that.

Samuel Groner said:
Capacitive loading at the inverting input. Cancel with a feedback capacitor; for general audio work, I'd size the time constant with the corresponding feedback resistor for about 300 kHz (this assumes a unity-gain stable opamp).

Is this the compensation/integration cap parallel to the feedback resistor? How do I calculate the time constant and the corresponding cap size?
 
Back
Top