ESP Logo
 Elliott Sound Products Project 00 

Opamp Bypassing

© 2023, Rod Elliott - ESP

Opamp Bypassing

One of the main problems people face when using opamps is oscillation.  This is particularly true with fast opamps, and the NE5532 can be particularly vulnerable.  In some cases, the oscillation will be internal, and it can't be seen on a scope.  The situation is often worst with opamps connected as voltage followers (100% feedback) because the opamp's bandwidth is at its absolute maximum.

The effects can be subtle, sometimes being heard as 'hum', despite the opamp(s) being used with regulated supplies which have virtually no hum.  The exact mechanism that causes 'hum' is not known, but my suspicion is that the oscillation amplitude and/or frequency are modulated by external mains frequency electrostatic fields.  This is then demodulated by the internal circuitry, with the result being what sounds like 'ordinary' hum of the kind you may get from a ground loop.

The bypassing requirements depend on the opamps used - some are more likely to oscillate than others.  Simple, low-frequency opamps such as the μA741 or LM358 can often be used with no bypassing at all, but even if you use these, some form of bypassing is a good idea.  Most ESP projects use dual opamps with dual supplies.  If a PCB is available, I almost always use the physical location shown in Fig. 1, but this can (and does) vary depending on the layout.

Many circuits on the ESP site and elsewhere don't show the bypass caps.  This is done to keep the schematic easy to follow, and the proper application of bypass components is expected.  It's up to the constructor to understand that bypassing is a requirement, not an option.  Almost all descriptions will point out that bypass caps are required, and some show that as a separate drawing, others don't.

figure 1
Figure 1 - Schematic Representation And Physical Location Of Bypass Caps

The schematic representation shown above indicates a pair of 10μF caps from each supply to ground, and a 100nF (preferably multilayer ceramic) cap between the supplies of each opamp package.  Although dual opamps are shown, the same applies for single or quad packages (I never use the latter).  The pinouts are different, but the principles are unchanged.

Proper bypassing can be tricky if you wire a circuit on Veroboard, and one of the best methods is to connect the bypass cap directly between the supply pins, under the board.  It can be a bit tricky to ensure that there's no chance for shorts between Veroboard tracks, but it can be done, and it's something I often do with prototypes and one-off circuits.

The bypassing shown is the minimum you can get away with.  Many ESP boards include a 10μF cap between the supplies, and 100nF ceramic caps from each supply to ground.  You can use polyester or polypropylene caps instead of multilayer ceramic (MLCC) caps, but they may not have the same performance at 10s of MHz as the MLCC.  One thing that's very important is to keep the capacitor leads as short as possible - every 10mm of lead length adds around 10nH of inductance.

This added inductance can have effects that are far worse than you ever imagined.  A 100nF cap with 2×10mm leads has about 20nH of inductance.  If you calculate the resonant frequency, it's only 3.56MHz.  Above that frequency, the bypass circuit starts to become inductive.  Contrary to popular belief, this does not mean that the cap isn't doing anything, but supply impedance will be about 1Ω at 10MHz.  The impedance starts to rise above the resonant frequency, and continues to rise as the frequency increases.

Opamps don't need to supply instantaneous (high frequency) current peaks during normal operation, and the bypass caps serve a very different role in digital (logic) circuits.  In these circuits, very fast switching demands high current peaks, and the inductance of the PCB power supply traces can cause misbehaviour.  With opamps, we just need to ensure that the supply impedance remains low at all frequencies within the frequency range of the opamp.  That doesn't just mean the rated unity gain frequency, because various internal parts can interact at higher frequencies if the supply impedance is non-zero.

One thing you see (and will see recommended on countless sites) is the use of 2, 3 or more caps in parallel, with diminishing values.  You may see 10μF in parallel with 100nF with a 10nF cap in parallel again.  If the distances between the cap pins is minimal (2.54mm/ 0.1"), the lowest value cap does nothing, and does half that if its leads are longer than 0mm.  If the application is RF (radio frequency, above ~1MHz) you might find that a 10μF electrolytic cap can't reduce the supply rail impedance due to its ESR (equivalent series resistance) and ESL (equivalent series inductance).  Despite nonsense you will read, just because a capacitor (e.g. an electro) is wound, that does not mean that it's an inductor.  The layers are closely spaced (micrometres apart) and 'talk' to each other, virtually eliminating inductance.

The two most important factors for any bypass cap are the lead spacing (as inserted in the board) and the lead length.  Closely spaced short leads contribute the least inductance.  Widely spaced and/or long leads are a recipe for disaster for bypassing.  If you like the idea of paralleled caps, by all means use them, but if you have the equipment I strongly recommend that you test the combination.  Mostly, you'll find that it does no good at all.  I'm unsure how this ever became 'standard practice', but it's generally bollocks!

Much of the claim is based on a calculation for resonance.  A larger capacitance has a lower resonant frequency for a given inductance, based on the formula ...

fo = 1 / ( 2π × √ ( L × C ))

If you only work with that and assume it represents reality for bypassing, you'll get silly answers that fail to consider reality.  If we were to assume lead inductance of (say) 50nH, a 1,000μF has a resonant frequency of 22.5kHz, but a 10,000μF cap has a resonant frequency of only 7.1kHz.  If you consider resonance to be the be-all and end-all, the 10,000μF cap can't be used for audio.  Anyone who has used 10,000μF filter caps in an amplifier supply knows that this is nonsense.  Adding a 100nF ceramic capacitor does absolutely nothing!

The ceramic caps I suggest in parallel with opamps are not directly in parallel with the input caps, as there can be anything from 50mm to perhaps 120mm of PCB traces between the two.  The inductance is often more than enough to cause problems.  Although some PCBs appear to have gone overboard (as it were) with bypassing, it's a bit like heatsinks.  Just as you can't have a heatsink that's too big, you can't have too much bypassing.  Keeping the supply rail impedance as low as possible has never caused a circuit to malfunction.

Discrete circuits often (but not always) need bypassing too.  If intended for audio, bypassing should consist of a pair of 10μF caps from each supply rail to ground, with one or more 100nF MLC caps as close to the active circuitry as possible.  For simple circuits that perform basic switching, mostly there will be a supply cap as a matter of course, but if not, a 10μF bypass does no harm and costs little.  In short, it's always better to err on the side of caution.  If you include a bypass cap that's not strictly necessary, no harm is done.  If you don't use a bypass cap where one is needed, expect trouble.

To prove the point, I tested a 10μF, 63V electro (not selected - first out of the bag), using a 1V RMS signal.  With the scope leads right at the base of the cap (close to zero lead length), resonance was at 23.7MHz, with a residual signal of 74mV.  The residual was primarily due to ESR (1.8Ω), and my generator has a 50Ω output impedance.  Adding just 20mm of lead to the measurement point left me with a residual of ~350mV at 24MHz, and the resonant frequency was hard to find because it was very broad, but was at around 250kHz.  Adding a 100nF ceramic cap in parallel made exactly zero difference, although the presence of my fingers holding the cap did have some effect.

It's also worth noting that capacitance meters don't always tell the whole truth.  Mine claimed that my 10μF cap was only 1.7μF at 100kHz


Single Supply Circuits

With single-supply circuits, bypassing is still essential.  These often include a 'virtual ground', typically at half the supply voltage.  So if the supply is 12V, the virtual ground (aka Vref depending on the circuit) will usually be at 6V.  It needs a good bypass to ground, and the capacitor size is determined by the low-frequency limit and circuit impedances.  In some cases, as little as 10μF is enough, but in others you may need 1mF (1,000μF) or more.  The input signal is commonly referred to the actual ground, but there are circuits where the 'virtual' and 'real' grounds are the same for AC.  The supply needs to be bypassed to either the virtual or real ground, depending on the circuit topology.

With single supply circuits (with or without a virtual ground), the required bypassing will usually be shown on the schematic.  The complexity (or otherwise) depends on the circuit, and some may not require anything beyond a cap across the incoming supply.  In a few cases, it may be necessary to include an inductor/ capacitor low-pass filter if the DC is coming from an external switchmode (plug-pack/ wall-wart) supply.  Any ESP project that requires this will show how it's done, but schematics from other sources may or may not think it's important.

The noise from SMPS is always well above the audio range, but there are cases where it can be intrusive, even though it should not be audible.  It's not possible to cover every eventuality, because the diversity of circuits is extreme.  Simple switching circuits, timers and other non-audio applications are usually not fussy, but if you encounter erratic behaviour, suspect supply noise and/or inadequate bypassing as a first guess (assuming that you know the circuit works from an alternative (noise-free) voltage source.


References

I suggest that you read Capacitors, Section 3 (Parasitic Inductance in Bypass Applications), as this has more info.  The whole article is useful, so it's worth reading it all.


 

HomeMain Index ProjectsProjects Index

Copyright Notice. This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is © 2023.  Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro-mechanical, is strictly prohibited under International Copyright laws.  The author grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference while constructing the project.  Commercial use is prohibited without express written authorisation from Rod Elliott.
Change Log:  Published October 2023.