Author Topic: Decoupling capacitors are mysterious.  (Read 33026 times)

0 Members and 1 Guest are viewing this topic.

Offline CarlG

  • Regular Contributor
  • *
  • Posts: 155
  • Country: se
Re: Decoupling capacitors are mysterious.
« Reply #25 on: August 02, 2013, 04:52:55 pm »

It seems like a black art to me, especially on digital circuitry. I fully understand digital logic but what kind of mindset helps you look at digital devices also as analog devices?

Thanks for any insight you have,

- Fatlimey,.
There are (at least) two ways to look at a capacitor for decoupling: as storage for charge, and as a "impedance shunt". The first is for supplying charge to the capacitive load, the latter to shunt the inductive reactance on the collector/drain of the output transistor. [I refer to 'output' even though the driven node may be internal.]

First, simultaneous switching outputs is one parameter to consider. If you have a device driving a (large) capacitive load (say 32 bit address and 32 bit data with 50 pF on each output) you have 3.2 nF total load. In order to avoid a voltage drop of say 5% at the closest located (ideal) "decoupling" capacitor, you'll need 19x the load, i.e 64 nF. (capacitive voltage divider) However, the rise time of modern logic is so short so in practice you'll need plane capacitance to avoid local voltage drops due to the inductance between the decap and device. This also helps prevent EMI. For small devices and/or small Cloads, the plane capacitance naturally gets less important.

Note that this implies that the decap only is "active" for low-to-high transitions. For high-to-low transitions, a low inductance return path is needed to avoid ground bounce. The decap is not involved.

Secondly, the output stage might be seen as a open emitter/source stage. The gain is gmXC, and gmXD, respectively. The decap obviously keeps the gain down, which is what you want to avoid oscillations. This is just like any analog amplifier stage.

The reactance of the decap vias quickly dominates over the plane inductance, meaning that the location is not critical if you just consider a simple case (one driver, one load), assuming that the decap is directly coupled to power/gnd planes. However, the decaps must be placed so that transients currents doesn't disturbed other, more sensitive parts.

Altera has a spreadsheet for help on calculating the proper decoupling, usable for general purpose; not only for Altera devices. I can't find it now, but I count on help from the community :) The crux is to estimate the power on each supply. Worst case approach i.e. a transient current from zero to max may be needed to be on the safe side e.g for a processor that is in deep sleep and goes fully active.

"Poking around until the weirdness disappears?" is of course not a good idea. You don't want to encounter that type of problem...there are enough problems getting a system up and running, so you don't want random glitches making your system go wild. Imagine, you might have verified a system "fully" and everything is fine. Then you add a function, and suddenly it (sometimes) resets in elevated temperature. In that situation, you really want to be sure that it's NOT the decoupling that is the culprit. And then, if it is, you're still lucky that you found it so early! It could have been a field upgrade that made it crash, and make every customer buy the competitors product next time...
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Decoupling capacitors are mysterious.
« Reply #26 on: August 02, 2013, 05:09:00 pm »
But the basic answer is that, in general, when it comes to decoupling capacitors we just pretty much pick the value out of the air.
That may be true for hobby stuff but it isn't true for real design.

We go so far as to actually run impedance plots on capacitors , find the correct mix to get a band in which the decoupling works.
I'm working on a biphase switcher right now. I just spent a whole day looking at the spectrum on the output , finding where the peaks are and finding capacitors that are in resonance a those frequencies to dampen the noise.

the board layout plays a role , the power grid plays a role , even the supply topology plays a role.

I am tweaking the input capacitors going into the switching regulator as well as the output bulk capacitors to get this thing to be as noise-free as possible.

For large boards the board is powered up under load and a network analyser makes a plot of the power rail spectrum. and then capacitor finding takes place. there is even special software where you feed capacitor models and it shows you to rejection impedance over frequency. you bet your ass that people making those tablets and cellphones are optimizing the snot out of it . even simple things like little wifi or Bluetooth modules are carefully tuned. you'd be creating so much crap in the spectrum the sensitivity would go to zilch..

on the harddisk front : the chip is actually designed with the real external capacitor models in account. don't you dare replace a 0805 tdk 22uf 6v3 x7r with a murata ... it will not work as well... it is really that specific.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline CodyShaw

  • Contributor
  • Posts: 44
  • Country: ca
    • My Blog!
Re: Decoupling capacitors are mysterious.
« Reply #27 on: August 02, 2013, 08:13:47 pm »
Yes, we also "poke around until the weirdness/problem disappears"!

Sometimes literally... Many a time have I needed an extra little capacitance to make something work, and I simply poked a wet pinky at it...

Works a charm ;)
Candidate for Bachelor of Applied Science, Electrical Engineering, University of Waterloo, Waterloo, ON, Sept. 2011 – Present
3A Electrical Engineering
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Decoupling capacitors are mysterious.
« Reply #28 on: August 03, 2013, 01:49:20 pm »
There are actually decoupling capacitors specially designed for GSM phones, where they have a low impedance point carefully controlled so as to fall at the centre of each of the GSM frequency bands, so it has a low at 800, 1800 and 2700MHz so it can decouple all 3 bands in a GSM chipset with a single component. TDK makes these, and I assume they are also avalable from other sources, though probably not as a hobby part.
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Decoupling capacitors are mysterious.
« Reply #29 on: August 03, 2013, 07:31:54 pm »
There are actually decoupling capacitors specially designed for GSM phones, where they have a low impedance point carefully controlled so as to fall at the centre of each of the GSM frequency bands, so it has a low at 800, 1800 and 2700MHz so it can decouple all 3 bands in a GSM chipset with a single component. TDK makes these, and I assume they are also avalable from other sources, though probably not as a hobby part.

Maybe not quite the same thing, but you _can_ get microwave capacitors with a controlled Q and a known, sharp series resonance for delicate VHF/UHF hobby work. Just a question of knowing they exist, and not mind paying a lot more per capacitor.
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Decoupling capacitors are mysterious.
« Reply #30 on: August 06, 2013, 05:22:24 am »
I'm wondering about suppressing physical switch transients... Say, I have a switch that pulls a pin to ground when closed. Is there a way (and a point) to get rid of, or at least dampen the sawlike transients, and instead get a smooth voltage slope?
I'd appreciate if someone could point me to an example circuit if there is a best practice for this sort of thing. :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Decoupling capacitors are mysterious.
« Reply #31 on: August 06, 2013, 05:30:28 am »
RC filter?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Decoupling capacitors are mysterious.
« Reply #32 on: August 06, 2013, 05:34:10 am »
It's common to throw a 0.1uF cap across the terminals for that reason.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Decoupling capacitors are mysterious.
« Reply #33 on: August 06, 2013, 05:43:14 am »
That still gives you a sharp falling edge. I don't know why that's an issue, but if you really want both transitions smooth, I'd use a low pullup resistor (4.7k perhaps), then a separate RC filter with a much higher resistance (47k - 100k) to filter that voltage. That way R is close to equal on both edges (Rfilter on the falling edge, Rfilter + Rpullup on the rising edge).
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline lgbeno

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: 00
Decoupling capacitors are mysterious.
« Reply #34 on: August 06, 2013, 06:20:34 am »
Fun topic, Bruce Archambeault actually spoke at a IEEE EMC Conference that I was at a few years ago.

Also recommend Ott and I think Lee Hill of Silent Solutions does one of the best seminars.

Best part is that it "always depends" but I have seen certain situations where we were having EMI issues at a given frequency, started populating decoupling capacitors with a device that had a SRF in that same band and life was good.

I think that aside from doing power analysis like free electron describes the "deep V" method is most recommended and a general best practice from most of the speakers that I've heard. 

Regardless of on package decoupling on something like a Xilinx FPGA, I would also put them at the board level.


Sent from my iPhone using Tapatalk 2
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Decoupling capacitors are mysterious.
« Reply #35 on: August 06, 2013, 04:45:54 pm »
I'm more worried about the mini sawtooth / square wave that metallic terminals tend to cause. I'm pretty sure no IC likes that. A sharp drop or rise is okay I guess.

By the way I've been reading up on noise suppression filters lately, and it seems that nowadays it's all caps in low frequency range... :) I wonder if the reason chokes fell out is due to their size and weight.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Decoupling capacitors are mysterious.
« Reply #36 on: August 06, 2013, 04:54:13 pm »
I'm more worried about the mini sawtooth / square wave that metallic terminals tend to cause. I'm pretty sure no IC likes that. A sharp drop or rise is okay I guess.

Huh? Why? It's not inductive, you're not getting sharp spikes. Do you have a storage scope handy? Hook a button up to it and see what it captures - it's a lot gentler than you'd imagine.

Quote
I wonder if the reason chokes fell out is due to their size and weight.

Yup.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Decoupling capacitors are mysterious.
« Reply #37 on: September 02, 2013, 03:27:48 pm »
Another question. :)

Say I have an area of copper on the PCB that is totally surrounded by high impedance components... like the output of a voltage divider made up of two 1MOhm resistors, fed into the non-inverting input of an op-amp. I'm thinking that the amp may start amplifying a lot of EMI in this configuration - should I add a capacitor to ground?

Also, should the two power rails of an op-amp be connected with a capacitor, or is that only for digital ICs?

...and, what about the gate of various FETs? Usually the pulldown/pullup path is really high impedance, as we don't want to waste current there... Is there a risk of EMI turning the transistor on and off with, say, a 1MOhm pulldown to ground, and the positive signal turned off (let's assume infinite resistance)? Should there be a capacitor in parallel with the pulldown to give a lower impedance at higher freqs?
« Last Edit: September 02, 2013, 03:36:00 pm by Sigmoid »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Decoupling capacitors are mysterious.
« Reply #38 on: September 02, 2013, 03:36:41 pm »
Say I have an area of copper on the PCB that is totally surrounded by high impedance components... like the output of a voltage divider made up of two 1MOhm resistors, fed into the non-inverting input of an op-amp. I'm thinking that the amp may start amplifying a lot of EMI in this configuration - should I add a capacitor to ground?

Use a guard trace. Buffer the signal to get a low-impedance version, then run that through a trace surrounding the high-impedance parts. No current will leak across zero potential difference. Ideally, you should unmask the trace so there is no leakage through the solder mask, but at a 500k Thevenin impedance you hardly need that except for very high-precision applications.

If you're concerned about high frequency EMI that could jump the guard you will need full shielding, but test first. The lily is pretty enough without a gold finish.

Quote
Also, should the two power rails of an op-amp be connected with a capacitor, or is that only for digital ICs?

I think it's a good idea. It's not as necessary, and a lot of low-precision, low-frequency analog circuits leave them out and just use one bulk capacitor per analog section. I tend to decouple everything as well as I can when practical - easier to throw a couple caps down than figure out later where I need them.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Decoupling capacitors are mysterious.
« Reply #39 on: September 02, 2013, 06:04:30 pm »
Also, should the two power rails of an op-amp be connected with a capacitor, or is that only for digital ICs?

Only in a single supply application (or in some special applications).

As a standard technique it is very good practice / highly recommended to decouple each opamp supply pin to ground, thus using two capacitors per opamp package in a dual supply configuration. The usually recommended size for audio is 0.1uF, with some larger 'bulk' capacitors, 10-100 uF or so, scattered about the board at regular intervals (5 cm radius or so).

High power, high frequency or other odd configuration opamps may need more/different decoupling than this, but this is usually specified in the datasheet.

You frequently see just one decoupling cap per opamp (package) used in circuits designed by beginners, connected rail-to-rail, but this is usually wrong. Analog Devices has several app note on this whole issue, explaining why this is so and that generally you need to use two caps, given how the current flows out of the opamp output.

...and, what about the gate of various FETs? Usually the pulldown/pullup path is really high impedance, as we don't want to waste current there... Is there a risk of EMI turning the transistor on and off with, say, a 1MOhm pulldown to ground, and the positive signal turned off (let's assume infinite resistance)? Should there be a capacitor in parallel with the pulldown to give a lower impedance at higher freqs?

Answer similar to the high impedance summing node for an opamp. If capacitance isn't an issue, then you may sometimes want a guard ring or added capacitance, but you need to test. Frequently this question is another reason why you should use a double sided PCB layout, one side being a solid ground fill below any critical, high frequency sensitive areas and components. The copper foil will act both as a small capacitor from any high impedance nodes to ground, and it will be an electrostatic screen, giving at least a partial screening against surrounding EM fields.
 

Offline Sigmoid

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: us
Re: Decoupling capacitors are mysterious.
« Reply #40 on: September 03, 2013, 02:52:56 pm »
Thanks for the replies :) So a Thevenin resistance of 500k isn't that critical? That's somewhat of a relief. :)

Quote
Buffer the signal to get a low-impedance version, then run that through a trace surrounding the high-impedance parts.
As in, get the output of the op-amp and connect it up to the guard traces?

Quote
The usually recommended size for audio is 0.1uF, with some larger 'bulk' capacitors, 10-100 uF or so, scattered about the board at regular intervals (5 cm radius or so).
So in a single supply audio scenario, if I place a .1uF at the power pins of each op-amp, and a single 10uF electrolytic on the centre of the power rail (it's a small PCB), that should take care of most problems? Or do I need a 10uF per op-amp?

Quote
a double sided PCB layout, one side being a solid ground fill below any critical, high frequency sensitive areas and components
This sounds like a pretty cool thing to try. :D What about component pins? Does it cause problems if I have cutouts in the plane? (I'm doing through-hole now, for ease of assembly.) I've heard that holes in a plane can bring in unwanted inductance. Or is that only in multi-megahertz applications?
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Decoupling capacitors are mysterious.
« Reply #41 on: September 03, 2013, 03:45:28 pm »
Yes, connect the output of the op amp to the guard trace, but only if it is at the same potential. If the op amp has (above unity) gain, I would connect the output of the feedback voltage divider to the trace instead (provided it has a much lower impedance than the high impedance input). If the op amp is inverting, I'd use a second op amp to get the guard trace potential.

So in a single supply audio scenario, if I place a .1uF at the power pins of each op-amp, and a single 10uF electrolytic on the centre of the power rail (it's a small PCB), that should take care of most problems? Or do I need a 10uF per op-amp?

Sounds fine. Remember that the capacitors should go to whichever rail current will return to - this means that if you have a bipolar power supply and the output current sinks to ground, you need two capacitors, each between a rail and ground, not just one between the rails.

Just one between the two rails could actually hurt your power supply rejection - if there is noise on just one rail, you will couple it onto the other as well.

Quote
I've heard that holes in a plane can bring in unwanted inductance. Or is that only in multi-megahertz applications?

Yup. Don't worry about it.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Decoupling capacitors are mysterious.
« Reply #42 on: September 03, 2013, 04:21:56 pm »
guys, the question you need to ask yourself first is
- what am i trying to do ?

there are 3 possible answers to that question
- trying to remove crosstalk in an analog system. like keeping the induced voltage ripple from a power stage out of the preamplifier
- making sure the switching induced voltage ripple on a digital rail doesn't cause my flipflops to go wonky ...
- solving an electromagentic compliance problem.

each problem has its own unique attack vector and strategy. and there may be additional criteria that can make this stuff very difficult.

Most difficult is the beancounters. don't add cost ! reduce the bom , reduce the number of to be placed parts as it reduces assembly cost. don't specify 5 different values if 4 will do ( economy of scale. buying 2 million 100 nf caps i cheaper than buying 1 million 100nf and 1 million 10nf )

a second difficult problem is : you only got this much room and it can only be that tall...(cellphones, tablets, smartphones, laptops ,diskdrives )

let's start without the additional criteria

analog domain : crest factors of signals are generally low and edges are slow.  stuff that doesnt draw a lot of current doesnt need a lot of bypass cap. the caps are mainly used for local filtering of the power rail if you are far from the source on a daisy chain construction. if your analog power structer is a well coupled power/ground plane the decoupling caps don't do jack-shit. opamps have good psrr. loose transistor circuits will be powered via a lowpass filter ( 10 ohms folowed by a 10uf or 47uf ceramic to ground creating a clean local rail.
if you have fast edges you have peak currents. then you need local caps close to the power pins of the device driving these signals. these caps need to be tuned so they can release their energy fast enough. ceramic caps are so good these days that you wil get away with a couple of 100nf shunting the rails.
for really high frequencies the effect of the caps becomes negligible as you get far more dampening from the power planes in the board themselves (provided you have well coupled power distribution planes).
DANGER : local regulators do need good output decoupling as they can not take in energy ! the output impedance of a regulator delivering current is very low. good. the outpu impedance of a regulator tring to absorb energy is infinite

so , if you come from the power plane in to the pass element of the regulator,  into your circuit you lost all the effect of the plane. you need to reconstruct it locally using caps. the mass effect is gone. if the local circuit drives anything reactive that may feed energy back into the rail you need ot be able to shunt that locally.

example : i have a plane with 15 volts on it. a local opamp needs 5 volt so i place a little 5 volt regulator close and make alittle power island. the opamp drives a reactive load ( coil , cap ) so energy can flow back into my local 5 volts rail , lifting it above 5 volts. voltage reglators are on-demand only. do i have 5 ? no -> add a bit electrons by sending the pass element in conduction. do i have 5 ? yes ->  turn off the pass element. so if energy comes back and the 5 volt rail lifts above 5 volt the regulator just turns off the pass element ! at that point you are effectvely disconnected from the main bulk and plane decoupling before the regulator. o you will need something locally that can shunt this energy to ground.

digital domain:
edges are fast current peaks during switching especially in cmos. so you need to shunt the ripple locally by peppering one cap per chip. this used to be true in ttl and 40xx world...
complex chips have their own strategy.
As edge speed increases the capacitance need to be tuned. modern chips are all edge controlled , or differential (lvds , pcix,sata ) done to reduce ripple.

compliance:
this is the kick in the butt. while your system may work perfectly fine with 1 100nF cap it may fail the compliance testing miserably. standing waves created in the board , peaks in the spectrum .. loose plane edges forming a dipole antenna radiating in one direction... they may all be casue for failure. and that when the magic begins .... now you need to find the failing frequencies , the spot where it emanates from , find the exact value cap that is tuned on that frequency and shunt the energy. this is where emc chambers , network analysers , field solvers and all the other epxensive stuff comes into play. this is greybeard / wizard / deep pockets with big wads of cash territory.

and when you finally got it passing the beancounters and mechanical boys step in ..... wash -rinse- repeat ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf