Seeking Circuit/PCB layout advice - LM4562 Interference issue

Well if the LM4562 datasheet recommends them when the opamp is used inverting I would simply follow the datasheet instead of thinking I know things better. I think it is common practice in quality designs to decouple both power supply lines per opamp even with slower opamps. Leaving these away is a severe case of the laws of cheap which don't bring optimal performance. It also seems absurd to use quality opamps and then save money by omitting normal decoupling. Many devices can be improved by adding the required decoupling...

So some stages lack RF input filtering but use fast opamps and the power supply decoupling is substandard. These seem to be the OP's fundamental issues he was looking for.
 
Last edited:
  • Like
Reactions: thermionic
Interference can be radiated or conducted.
So either down the mains lead or from RF.
So a well filtered power supply is needed.
Also an RF filter on the front end and preferably a screened enclosure.
Any wires coming in or out should have ferrite beads on them.

I built up a Maplin disco in 1980. Worked great, until local police car came by and it picked up police radio really well !
So put RF filter on front end.
 
Nonsense, decoupling with 2 caps (or even 4) in either inverting or non inverting configuration is as standard as can be except in mediocre/bad designs. Many can attest that omitting them often has more impact than applying them 😀 Spending that hard earned 50 Eurocent extra per opamp does not hurt that much. It is the minimum standard as well, some will go the extra mile by using low value series resistors or coils/beads. The debate on the so-called "3rd cap form + to -" is ongoing I believe.

I clearly recall Akai to omit decoupling altogether in some devices. It was not a success.
 
Last edited:
FWIW, I use the LM4562 (and the AD797) on 4 layer boards with quality input and output RF signal bypasses and a quality wideband power regulator system and have zero problems, even with the PCBs sitting outside of an enclosure. The 797 is a very old chip and has none of the modern RF protection, but it also has a very high gain bandwidth, well over 50MHz.

To the OP, if you want super low distortion, you will be forced to use high bandwidth amplifiers like the 4562 and 797, so you need to get used to modern RF design techniques and multilayer PCBs with ground planes and/or pours. 4 layer PCBs are quite cheap now and work incredibly well. SMD capacitors also work very well at high frequencies, and can meaningfully shunt RFI to the PCBs ground plane or ground pour.
 
I have found that LM4562s in inverting mode need both supply pins decoupled to ground, separately, right at the pins, to cure a PSU buzz. Not an issue in non-inverting mode.

That is my hypothesis also, and I don't think it's particularly limited to an LM4562. Classic decoupling has a C from each rail to ground at each opamp, not just a C across both rails. A single C might be sufficient if you have a fully-balanced signal chain, but the problem is that many filters are ground-referenced.

Consider the current path out of one opamp, through a filter and into the next opamp. The opamp must source current to supply the filter, some of which goes to ground e.g. via R8 on U1A in the output stage. Because your ground is not part of your decoupling network at the opamp, the current flowing through R8 must travel all the way back to the board-level reservoirs C5+C11, which seem to be electrolytic.

You therefore have a large-area current loop (inductor), backed by a decoupling cap that is ineffective at HF, within the feedback loop of your opamp. That is a recipe for oscillation. Remember that stability of your loop depends on its phase margin; you now have a parasitic L in series with R8, composed of a long and winding power rail and the internal inductance of C5 and C11, which changes the feedback network dramatically at RF.

Agreed also with jean-paul; a 1k/1n RC pole at every input is cheap insurance for keeping out anything that cabling might have picked up and which would kick off something in your circuit with marginal stability.

Edit: while I do not put myself forward as some sort of authority, I have a thread here that describes a recent line-level design of my own. It is well-behaved and embodies what I think are the usual design rules for decoupling and related things:
  • board level reservoirs, one per rail, fairly large. I used 22u tantalums to support 13 dual-opamps.
  • 100n ceramic rated for at least 3x the rail voltage, one per rail, at each opamp package
  • 1k/1n RC at every signal input
  • most of the board has a ground plane, underlying ideally all signal and power routes
  • power rails are run parallel to each other to minimise loop area

My layout is no good for real RF work, e.g. in the physical relationship between decoupling caps, pins and power rails (plus there are places where power rails and signal rails don't have contiguous ground plane below - it's only 2-layer) but it's good enough for audio and keeping opamps stable.
 
Last edited:
So local decoupling of both supply lines close to the IC pins keeping current loops small is still in fashion 😉 Now there once was a theory that using only 1 cap from "-" to GND and one from "+" to "-" was supposedly slightly better but it sure is not used much. I forgot the explanation.
 
Last edited:
So local decoupling of both supply lines close to the IC pins keeping current loops small is still in fashion 😉 Now there once was a theory that using only 1 cap from "-" to GND and one from "+" to "-" was supposedly slightly better but it sure is not used much. I forgot the explanation.

Well it still works, even if some of us are old-fashioned 🙂 And if you look at any RF or digital design and layout guides, this approach is mandatory. And the datasheets for several opamps also say that it is at least recommended, if not required.

I think the origin of the "one decoupling cap" approach is Doug Self, on the basis that caps from rails to ground can inject noise from the supply rails to ground. Far be it from me to say that Doug is wrong, but it's not something I have seen evidence for and is not a tradeoff I am personally willing to make - especially in a single-ended circuit powered by a regulated supply - as evidenced by the trouble that the OP had here.

The noise level in my design is dominated by the cheap opamps I use, not a few uV on the supply rails "coming through" to ground... which frankly doesn't make much sense where there is a full-board low-impedance ground pour that is by definition 0V. Is it really a problem to trade away a reduction in supply noise wrt ground for a tiny increase in common-mode noise? I think not, especially when the entire source of that noise in our situation here is probably the regulator and other loads on the supply rails, i.e. there is no true physical source of common-mode noise.

I think one-cap-only makes sense in some specific situations:
  • fully balanced designs with no ground-referenced filters
  • designs with a noisy unregulated supply
  • designs (e.g. power amp) where the signal is impressed upon the power rails#
  • designs with poor/high impedance of ground connections/planes

... none of which are applicable to line-level preamp kind of things with sensible layouts. The only thing that comes to mind is a BTL power amp.


# and yet, they primarily use rail-to-ground decoupling for single-ended power-amp designs, including Doug's! go figure.
 
So local decoupling of both supply lines close to the IC pins keeping current loops small is still in fashion 😉 Now there once was a theory that using only 1 cap from "-" to GND and one from "+" to "-" was supposedly slightly better but it sure is not used much. I forgot the explanation.
The danger with peppering bypass caps everywhere is that they couple half wave rectified audio signal current, drawn from each of the bypassed power supply pins, into lots of places throughout ground. If they don't add perfectly and thus "cancel" then you're injecting a little bit of rectified signal current into ground, and that can become the reference for parts of the circuit, essentially injecting distortion into the circuit.

The solution I like to use instead is to use a four layer PCB with two inner layers used for Vcc and Vee, and the top and bottom layers used for routing, components, and ground pours. The two power planes are driven by local regulators which require a couple uF of ceramic capacitance for stability. These caps are mounted close to each other and close to the regulators so that the regulators remain stable, and the positive and negative bypasses sum to a small portion of the PCB near the LDOs ground. The impedance of a 1 ounce copper plane is around 1 mΩ per square, which is a very small number compared even to the ESR of a bypass cap. Therefore, there is thus little need for local bypass caps - the power planes do the work. Even though the two inner planes will get "violated" by vias and through holes, as long as they are not too numerous, the power planes are relatively intact, so they remain low impedance.

"Per square" is worth mentioning in more detail: the exact distance between two points does not determine the resistance of a plane, because of the 2D current path through the plane. So, a 1 cm square will have the same 1mΩ resistance as a 1 foot square. The thickness of the plane determines the resistance, and for a 1 oz PCB, you get around 1mΩ per square. This is what makes a plane work so much better than a trace - it is electrically short compared to its width, so it is both low resistance and low inductance. Also keep in mind that the capacitance from the power planes to the outer ground pours will increase with area. and serve as a shunt capacitance of sorts.
 
One more point: none of this rectified signal current coupling through bypass caps is possible without using bipolar power supplies, which split the signal current draw between two supplies. Using a single supply prevents this completely, so it is safe to toss bypass caps around with the only penalty being random coupling throughout ground. Mind you, this can still create lots of needless problems in a circuit, but high order HF distortion is not one of them.
 
The danger with peppering bypass caps everywhere is that they couple half wave rectified audio signal current, drawn from each of the bypassed power supply pins, into lots of places throughout ground. If they don't add perfectly and thus "cancel" then you're injecting a little bit of rectified signal current into ground, and that can become the reference for parts of the circuit, essentially injecting distortion into the circuit.

Given that the circuits we are talking about are line-level and not power amplifiers, with the only loads being opamps... your assertion above requires some evidence. I do not think that you can even measure the presence of the audio signal on the power lines in a circuit like this, let alone any class-B-like non-linearity of its coupling to ground.

You are risking fundamental stability of the circuit by improper decoupling, in chasing an effect that's probably somewhere near 100dB below the actual noise floor, noting the immeasurable audio signal on the power rails, plus the significant PSRR of typical opamps.
 
Modern low-impedance opamp circuitry can have loads as low as 500 ohms on opamp outputs (*), so currents can be surprizingly high, 10mA sort of level. A negative feedback network is a load, and an inverting opamp stage loads the previous stage. A decent groundplane with 0.5 milliohm per square is probably fine with these current levels being injected at decoupling cap ground leads, but non-plane ground traces may turn these injected ground currents into IR voltages in the ground network that are large enough to compromise performance (ie prevent datasheet performance being attained). So it can be important to arrange the layout to combine the currents from the decoupling caps on a side-branch of the ground trace, so that the class B half cycles are combined before reaching the signal ground-path as in the diagram below. Or you just decouple the rails to each other (typically this is all that's needed for RF stability, but lower frequency decoupling from rails to ground is usually needed in high gain circuit to prevent coupling between output and input (positive feedback).

2" of 0.05" pcb trace is ~20 milliohms, turning 4mA (ie a 2V signal into 500ohms) to 80µV (which is 88dB down from the 2V signal, or around 0.004% of the original signal). If you choose a chip specifically for its < 0.001% THD, you don't want a 0.004% error creeping in by the back door...

Basically the ratio between ground point-to-point resistances and the load resistances is what determines the possible non-linear injection errors from decoupling caps that connect rail to ground, so the ratio between the 20 milliohms ground trace and 500 ohm load resistance determines the possible error. If the circuitry uses 10k loads the situation is much better (or if a ground plane of 0.5 milliohms/square is used).

In the power amplifier case the load resistance might be 8 ohms and ground traces a few milliohms, which is a much more serious problem (~60dB ratio), which is why you have to arrange the layout carefully to prevent half-cycle current pulses from appearing anywhere in the feedback path (often people get this wrong and unnecessarily limit the performance of their amp design under load).

opamp_ground.jpg

The blue and green dots show the paths of (large) non-linear currents (half-cycles), and the orange dots are the path of the linear output current, the use of a spur to a current combining node keeps the non-linear currents from affecting the signal ground - the linear currents can still put voltages on the ground, but for circuits with modest gain this only has a tiny effect on the gain response, not any distortion.

Note the lower frequency non-linear currents go the PSU (assuming some external load is present), the higher frequency through the bulk decoupling capacitors. If the capacitors are not well matched (unlikely for electrolytic) there is a frequency range where the non-linear currents also flow between the combine point and the PSU ground - this is a subtlety often missed, and a good reason to have all the bulk capacitance either in the PSU or on the opamp pcb only at the point the power enters.

Missing from the diagram is the normal 100nF ceramic decoupling cap between the rails at each opamp - don't forget this!

(*) Especially with opamps able to drive low impedance loads linearly like the LM4562. Low impedance circuitry keeps the voltage noise from the resistors in the circuit down to match the voltage-noise performance of the opamps themselves. We are assuming the aim is to get the best performance possible 🙂
 
Modern low-impedance opamp circuitry can have loads as low as 500 ohms on opamp outputs (*), so currents can be surprizingly high, 10mA sort of level. A negative feedback network is a load, and an inverting opamp stage loads the previous stage. A decent groundplane with 0.5 milliohm per square is probably fine with these current levels being injected at decoupling cap ground leads, but non-plane ground traces may turn these injected ground currents into IR voltages in the ground network that are large enough to compromise performance (ie prevent datasheet performance being attained). So it can be important to arrange the layout to combine the currents from the decoupling caps on a side-branch of the ground trace, so that the class B half cycles are combined before reaching the signal ground-path as in the diagram below. Or you just decouple the rails to each other (typically this is all that's needed for RF stability, but lower frequency decoupling from rails to ground is usually needed in high gain circuit to prevent coupling between output and input (positive feedback).

2" of 0.05" pcb trace is ~20 milliohms, turning 4mA (ie a 2V signal into 500ohms) to 80µV (which is 88dB down from the 2V signal, or around 0.004% of the original signal). If you choose a chip specifically for its < 0.001% THD, you don't want a 0.004% error creeping in by the back door...

Thanks for grinding the math - a very good treatment.

I'll add one more observation before "that's too low for anyone to hear" becomes part of the discussion. These half wave rectified signal currents create distortion that is rich in high harmonics, and are thus far more audible than something like simple 2nd or 3rd harmonic distortion. These high harmonics are also not easily masked by the signal itself, so again, these discontinuity style distortions are much more noxious than simple low order "transfer function curvature" type distortions.

To anyone curious f you want to measure these, a synchronous average of distortion analyzer residual FFTs usually sniffs them out. If you see anything above 4th order harmonics from an amplifier, I would say that something is wrong with power or ground and that examining the circuit with these bypass current ideas in mind may reveal the source of the problem.
 
Congratulations you have a theoretical nonlinearity at -80dB on the power supply rail when opamps are driving low-impedance loads. Now account for the PSRR of the opamps, and again we're below -100dB for distortions appearing in the signal chain.

None of which addresses the original point that opamps can be unstable - as probably seen by the OP! - when your decoupling at the opamp does not include ground.

I'm not sure that someone with an unstable preamp really cares that there is a -80dB or -100dB distortion they're avoiding when the device is making bleep noises from EMI and probably oscillating at a couple MHz.
 
Glad to see this thread as I was considering several choices for a new active filter. One problem with new packaging and SMT is it is hard to "guard" a pin. Not enough room.

The OEM application guide is not always the best answer, but it is where you should start.

Monte points out a factor I have been mentioning for years: the harmonic profile. Specifically the effect it has on exciting tweeter breakup, which generated IM, manifesting itself as HD in the audible range.

Ground planes are great, if you can do it but use of all available space on a single sided can often get you there. The goal is to reduce localized current density. Thicker foil is a good step.