Author Topic: Are de-coupling caps always needed?  (Read 3920 times)

0 Members and 1 Guest are viewing this topic.

Offline level6Topic starter

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
Are de-coupling caps always needed?
« on: December 19, 2019, 06:29:24 pm »
If I'm using an opamp for a very low frequency application, i.e. a voltage comparator, do I always need supply de-coupling capacitors at the opamp device? I already have de-coupling at the power supplies for the board I'm working on.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Are de-coupling caps always needed?
« Reply #1 on: December 19, 2019, 06:34:35 pm »
Yes.
Readers discretion is advised..
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Are de-coupling caps always needed?
« Reply #2 on: December 19, 2019, 06:39:10 pm »
You need to be an expert to predict when you don't need decoupling caps, and even experts don't get it right all the time.

The frequency of your signals is usually irrelevant; what matters is how your particular opamp in your particular circuit interacts with the inductance in the power leads and other "parasitic" capacitances. To make it simpler: if you use a 200MHz opamp for a 1Hz signal, then it may well oscillate at several tens of MHz :)

Old engineering adage: "amplifiers oscillate, oscillators won't".
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: jadew, Jacon, schmitt trigger

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 866
  • Country: us
    • AG6QR Blog
Re: Are de-coupling caps always needed?
« Reply #3 on: December 19, 2019, 06:40:25 pm »
If you're using an op-amp as a comparator, the transitions from one state to the other may contain high frequency components, even if the transitions don't happen often.

There are multiple reasons why a comparator is better for the task than an op amp, but that's for another thread.

If there are truly no high frequency components in the input or output of the op amp, you may be able to do without the decoupling caps right near the chip.  But follow the data sheet, or deviate from it at your own risk.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #4 on: December 19, 2019, 06:44:24 pm »
Basically decoupling of low speed low density parts like most opamps and discrete logic is done by convention as it isn't usually worth the effort to figure out what you really need.  For high speed/density parts like big FPGAs or SOCs, or very high speed amplifiers you need to be more careful.

The part speed matters more than the signal.  A high speed opamp needs better bypassing even if the signal it sees is relatively slow.  It also depends on what else is in the circuit, how far away your "bulk" capacitors are, and how you are using the part, and what your requirements are.

Bypass capacitors are also important for EMI, so your circuit may work properly but radiate a lot of excess noise on the power supply wiring, which you may or may not care about.

So your circuit will probably work without local bypass.  Is it worth your effort to figure that out vs. just putting capacitor there?
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: Are de-coupling caps always needed?
« Reply #5 on: December 19, 2019, 06:48:23 pm »
And ceramic capacitors are cheap, I mean, really cheap.

Won't hurt if you added a 0.1uF/16v X7R that is not really required.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Are de-coupling caps always needed?
« Reply #6 on: December 19, 2019, 07:41:10 pm »
If you're using an op-amp as a comparator, the transitions from one state to the other may contain high frequency components, even if the transitions don't happen often.

Too many people don't realise that.

Here's one set of measurements that "validate" the theory: https://entertaininghacks.wordpress.com/2018/05/08/digital-signal-integrity-and-bandwidth-signals-risetime-is-important-period-is-irrelevant/
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline level6Topic starter

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #7 on: December 19, 2019, 07:43:12 pm »
Thanks for everyone's input!

I see it is a unanimous "YES" :-)
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5571
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #8 on: December 19, 2019, 10:34:00 pm »
I'm going to add to the yes votes by saying that the pedagogical answer is no.  You don't always need them.  But the analysis to prove that you don't is difficult, and often results in the answer that they really are needed.  And as stated before the decoupling caps are really cheap.  And have fringe benefits in reducing susceptibility to power line spikes and the like.  If you aren't insanely pushed for space or cost use decoupling caps.
 

Offline mcovington

  • Regular Contributor
  • *
  • Posts: 191
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #9 on: December 20, 2019, 12:31:16 am »
Opamps need them more than most kinds of circuits.

Wasn't there an EEVBLOG video, or somebody's video, about how digital circuits don't need one on every chip?  But opamps do.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17429
  • Country: us
  • DavidH
Re: Are de-coupling caps always needed?
« Reply #10 on: December 20, 2019, 03:10:54 am »
It depends on the parts involved and the loads and the circuit layout.  Slow parts, meaning low gain-bandwidth product parts, have low di/dt (slow change in current over time) so inductance in the supply connections has less of an effect and decoupling can be located further away, possibly at the power supply.  A circuit using 4 LM324s over 8 square inches could likely get by with just a 1 microfarad tantalum or 10 microfarad aluminum electrolytic capacitor across the supply pins our regulator's output.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 827
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #11 on: December 20, 2019, 04:08:39 am »
What do decoupling capacitors do?  They provide a shorter path for your current to set up.

When you create a signal current, as it flows down you trace, a return current must be set up at the exact same time.  This return current is essentially the magnetic field.  So before your signal current can move down the trace, the magnetic field must be set up between your positive charge and ground.  The more distance the current moves through the longer it takes to set up.  Two ways to address this are to run your positive and gnd trace next to each other, or -- even better -- have a big copper plane under your trace.  The closer the return path and the signal path, the less time it takes for the magnetic field to set up.

When the term frequency is used, it does not always mean what you see in a sine or square wave.  It has to do with the edge time.  Picture a square wave that is switching between 0 and 1 at 1 MHz.  In order for the signal to get from 0 to 1 fast enough for it to happen 1 million times a second, the rate at which the voltage needs to change must be fast enough.  On your oscilloscope, your frequency counter will see the 1 MHz signal.  Now let's change our square wave into just a single transition from 0 to 1.  The rate of that transition will still be the same.  Now the signal doesn't transition back to 0, your oscilloscope will not see a frequency.  The transition did happen and it happened at the same speed of a 1 MHz signal.   Thus it is important to consider the speed of the step edge when you are thinking about frequency.

So what does the decoupling capacitor do?  It provides a very short path down to the ground plane.  We have heard the term "capacitors pass AC and block DC."  AC is changing current and DC is steady current.  The current from the magnetic field passes through the capacitor.  Since the capacitor is close to your IC, is small, and connects to the ground plane the magnetic field can do this much more quickly then if the field has to "reach" around the board to set up.  Since the magnetic field sets up more quickly, the decoupling capacitor allows your signal to change more quickly.  Inductance is reduce and we know high frequency currents take the path of less inductance.

Since the magnetic field sets up more quickly, it also had to spread out less in order to set up.  Most of the magnetic field is between the trace and the ground plane.   This "loop" to the gnd is very small.  If field has to set up across the board (because there is no close return path) then the magnetic field of the ground loop will set up between the trace and the ground point.  It will travel through everything in between.  So reducing the size of the loop by using the decoupling capacitor, you also reduce the size of the ground loops and the amount of magnetism radiated across the board.   This reduces noise.  So decoupling capacitors also reduce the noise that your changing current creates.

I've mentioned ground plane in this explanation.  If you don't have a ground plane and use traces to provide the gnd, then the shape of your traces is important.  If your grd trace follows your signal trace it acts much like the gnd plane.  The size of the capacitor (distance between the terminals) will be most of the distance between the traces.  If you route your gnd trace around the board, and away from the signal trace, then the distance between traces becomes more significant than the size of the capacitor.  This effectively removes the benefit of the decoupling capacitor.   So if you are not paying much attention to your return path, decoupling capacitors might not be needed.

This response is getting too long, so I will stop here.  I may not be 100% correct, but I believe I am close.  The important thing to understand is that the 100nF high frequency decoupling capacitor helps the magnetic field's establishment time and reduces the field's size, and this works if you keep you ground loops small.
« Last Edit: December 20, 2019, 07:44:36 am by JustMeHere »
 
The following users thanked this post: I wanted a rude username

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Are de-coupling caps always needed?
« Reply #12 on: December 20, 2019, 08:47:21 am »
Quote
What do decoupling capacitors do?  They provide a shorter path for your current to set up.
Is that a SHORT circuit ?   ;)
Don't ask a question if you aren't willing to listen to the answer.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: Are de-coupling caps always needed?
« Reply #13 on: December 20, 2019, 02:11:18 pm »
Unless the manufacturer's data sheet specifies otherwise, the most important bypass cap on an op amp is between the positive and negative power pins, by as short a path as possible.  This is a nuisance, since they are usually on opposite ends of the part.  The next most important cap is between the power pin from which the output voltage is generated (usually the negative pin) and ground.  Of course, single-supply op amp circuits usually ground that pin directly.  If you give a feedback amplifier an excuse to oscillate, it will take it.
 

Offline level6Topic starter

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #14 on: December 20, 2019, 04:33:56 pm »
The next most important cap is between the power pin from which the output voltage is generated (usually the negative pin) and ground.  Of course, single-supply op amp circuits usually ground that pin directly.  If you give a feedback amplifier an excuse to oscillate, it will take it.

Wouldn't you want a cap on the positive supply also, in the case of dual rails?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #15 on: December 20, 2019, 06:59:25 pm »
You need to be an expert to predict when you don't need decoupling caps...


I vote this answer as the forum winner for the day!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Are de-coupling caps always needed?
« Reply #16 on: December 20, 2019, 07:32:48 pm »
You need to be an expert to predict when you don't need decoupling caps...


I vote this answer as the forum winner for the day!

Yep.  We can explain why -- but honestly, it's not an explanation the beginner will get much use out of, so it's just as well to leave it well-enough-alone, as above... :-//

It's not something you need to take on faith, but it's also not something that can be explained instantly.  The gap between must be bridged with knowledge.

(So of course, I'll go on to explain, fully expecting the zooming "over my head" sounds from readers.  I know, sorry.)

In short, the problem is not just transient (see above examples, like use as a comparator), but dynamic.  It is a problem of stability.

The amplifier responds to differences in voltages, not just between its inputs proper, but between its power pins as well (this is measured as PSRR, Power Supply Rejection Ratio).

We can make the amplifier proper, into an oscillator, by connecting a feedback circuit between its input and output.

Well, if the power pins act as inputs as well, we can also construct an oscillator by connecting a feedback circuit in its power pins.  The power pins are both input and output, so it's not obvious if we can get [un]lucky enough for this to oscillate -- but, just whether it's possible, absolutely.

In fact, transient reasons aren't very interesting to general purpose op-amps: the output might change state in microseconds, and might deliver tens of mA in that time.  That's a slew rate of 10mA/us.  Current rate times inductance equals voltage drop.  The inductance needed for a significant voltage drop (say 1V) is a whopping L = V / (dI/dt) = 100uH.  That's a long power cable (about as many meters, give or take)!  And that would just be a momentary dip, it might not necessarily oscillate.

The trick is, an amplifier might oscillate in the low MHz, and combined with stray capacitances of nF to uF, we can end up with an accidental feedback network that makes the power supply oscillate.  This is plausible in breadboarding situations.  This is the most likely failure condition, I think.

In lieu of a complete analysis, the best preventative against this situation, is probably a nice little electrolytic capacitor, say 1-10uF, across the supplies.  This is better than a film or ceramic cap of the same value, because the electrolytic has adequate ESR to dampen oscillations in most cases.  Additional bypass (usually local to other chips) can be, say, 0.1uF ceramic or whatnot.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Are de-coupling caps always needed?
« Reply #17 on: December 20, 2019, 07:51:33 pm »
You need to be an expert to predict when you don't need decoupling caps...


I vote this answer as the forum winner for the day!

And don't ignore the rest of the sentence, viz " and even experts don't get it right all the time." :)

Plus the obligatory dig: solderless breadboards suck (time and willpower), Manhattan construction rulez.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #18 on: December 20, 2019, 07:55:31 pm »
You need to be an expert to predict when you don't need decoupling caps...


I vote this answer as the forum winner for the day!

Yep.  We can explain why -- but honestly, it's not an explanation the beginner will get much use out of, so it's just as well to leave it well-enough-alone, as above... :-//

It's not something you need to take on faith, but it's also not something that can be explained instantly.  The gap between must be bridged with knowledge.

(So of course, I'll go on to explain, fully expecting the zooming "over my head" sounds from readers.  I know, sorry.)

In short, the problem is not just transient (see above examples, like use as a comparator), but dynamic.  It is a problem of stability.

The amplifier responds to differences in voltages, not just between its inputs proper, but between its power pins as well (this is measured as PSRR, Power Supply Rejection Ratio).

We can make the amplifier proper, into an oscillator, by connecting a feedback circuit between its input and output.

Well, if the power pins act as inputs as well, we can also construct an oscillator by connecting a feedback circuit in its power pins.  The power pins are both input and output, so it's not obvious if we can get [un]lucky enough for this to oscillate -- but, just whether it's possible, absolutely.

In fact, transient reasons aren't very interesting to general purpose op-amps: the output might change state in microseconds, and might deliver tens of mA in that time.  That's a slew rate of 10mA/us.  Current rate times inductance equals voltage drop.  The inductance needed for a significant voltage drop (say 1V) is a whopping L = V / (dI/dt) = 100uH.  That's a long power cable (about as many meters, give or take)!  And that would just be a momentary dip, it might not necessarily oscillate.

The trick is, an amplifier might oscillate in the low MHz, and combined with stray capacitances of nF to uF, we can end up with an accidental feedback network that makes the power supply oscillate.  This is plausible in breadboarding situations.  This is the most likely failure condition, I think.

In lieu of a complete analysis, the best preventative against this situation, is probably a nice little electrolytic capacitor, say 1-10uF, across the supplies.  This is better than a film or ceramic cap of the same value, because the electrolytic has adequate ESR to dampen oscillations in most cases.  Additional bypass (usually local to other chips) can be, say, 0.1uF ceramic or whatnot.

Tim

Perhaps you misunderstood my reason for voting the comment as winner.  That answer conveys the complexity of the problem in the fewest number of words so I felt it deserved accolades.

I was not being pejorative.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Are de-coupling caps always needed?
« Reply #19 on: December 20, 2019, 07:59:06 pm »
Yes.

Imagine an eevblog thread would finish that way  :-DD
Readers discretion is advised..
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Are de-coupling caps always needed?
« Reply #20 on: December 20, 2019, 08:35:49 pm »
Perhaps you misunderstood my reason for voting the comment as winner.  That answer conveys the complexity of the problem in the fewest number of words so I felt it deserved accolades.

I was not being pejorative.

I didn't feel my response was calling out pejorativeness?  I agree, and basically my response stands as a far less optimal example. ;D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17429
  • Country: us
  • DavidH
Re: Are de-coupling caps always needed?
« Reply #21 on: December 20, 2019, 09:21:12 pm »
Unless the manufacturer's data sheet specifies otherwise, the most important bypass cap on an op amp is between the positive and negative power pins, by as short a path as possible.  This is a nuisance, since they are usually on opposite ends of the part.  The next most important cap is between the power pin from which the output voltage is generated (usually the negative pin) and ground.  Of course, single-supply op amp circuits usually ground that pin directly.  If you give a feedback amplifier an excuse to oscillate, it will take it.

It is more complicated than that because decoupling depends on the current return path from the output which can go to either the positive or negative supply.  Analog devices published an excellent application note included below which shows the details of what is going on.
 
The following users thanked this post: oPossum

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 827
  • Country: us
Re: Are de-coupling caps always needed?
« Reply #22 on: December 21, 2019, 01:10:35 am »
Quote
What do decoupling capacitors do?  They provide a shorter path for your current to set up.
Is that a SHORT circuit ?   ;)

No.  Look up displacement current, and watch Dave's video on capacitors passing AC current.  And Yes (whoops), after watching the video to the end, you're right too.  As the capacitor is charging, it is a short circuit.

« Last Edit: December 21, 2019, 01:20:03 am by JustMeHere »
 

Offline Jwillis

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: ca
Re: Are de-coupling caps always needed?
« Reply #23 on: December 22, 2019, 05:16:07 am »
I have a noob question about decoupling caps on op amps . I read somewhere that aside from one at each rail tied to ground it was suggested to put one from rail to rail as well right close to the op amp . Is that really necessary?
Another question is since I'm running the ones I have (OPA445) at +55V and -15V I can't find any ceramics for that voltage. Higher voltage polys would work just as well right?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17429
  • Country: us
  • DavidH
Re: Are de-coupling caps always needed?
« Reply #24 on: December 22, 2019, 05:23:52 am »
I have a noob question about decoupling caps on op amps . I read somewhere that aside from one at each rail tied to ground it was suggested to put one from rail to rail as well right close to the op amp . Is that really necessary?

The application note from Analog Devices that I included in my earlier post covers what is required and why.  For a dual supply, sometimes the third capacitor is used to further reduce impedance when the load is attached to a supply rail instead of ground.  A load might be connected this way to keep its return current out of a sensitive ground circuit.

Quote
Another question is since I'm running the ones I have (OPA445) at +55V and -15V I can't find any ceramics for that voltage. Higher voltage polys would work just as well right?

100 volt ceramic capacitors are common but plastic film capacitors work fine also.
« Last Edit: December 22, 2019, 05:26:13 am by David Hess »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf