# What is a decoupling capacitor and how do I know if I need one?

What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?

How do I know if I need one and if so, what size and where it needs to go?

This question mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?

Would an SN74195N 4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?

I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well.

-
They are referred to as decoupling caps (not smoothing caps) in the industry. –  Brian Carlton Apr 19 '10 at 13:53
@Brian Thanks for the clarification. I modified the title to make it easier for future users to find (but left the reference in the body to make it searchable via smoothing capacitor). –  Lawrence Johnston Apr 20 '10 at 5:20
Should this be merged with electronics.stackexchange.com/questions/2262/… ? –  davidcary Nov 13 '10 at 23:06

I was the one that asked that question. Here is my rudimentary understanding:

You attach capacitors across $V_{CC}$/GND to try and keep the voltage more constant. Under a DC circuit, a capacitor acts like an open circuit so there is no problem with shorting there. As your device is powered up ($V_{CC}$=5V), the capacitor is charged to capacity and waits until there is a change in the voltage between $V_{CC}$ and GND ($V_{CC}$=4.5V). At this point, the capacitor will discharge to try and bring the voltage back to the level of charge inside the capacitor (5V). This is called "smoothing" (or at least that is what I call it) because the change in voltage will be less pronounced.

Ultimately, the voltage will not ever return to 5V through a capacitor, rather the capacitor will discharge until the charge inside it is equal to the supply voltage (to an equilibrium). A similar mechanism is responsible for smoothing if $V_{CC}$ increases too far beyond its average ($V_{CC}$=5.5V perhaps).

As for why you need them, they are very important in high speed digital and analog circuits. I can't imagine you would need one for a SN74195, but it can't hurt!

-
Thanks for this answer. It conveyed a lot of useful information at a basic enough level that I could understand it. –  Lawrence Johnston Apr 19 '10 at 1:07
To elaborate on this, a decoupling cap is used in the context described above but it also in place to provide somewhat instantaneous current demand to the chip it's "decoupling". You might wonder why such a thing is needed if your supply has sufficient current provisions. To answer this question you must consider that traces in PCBs, and any wire in general, has inductance and as such instantaneous current demand (i.e. at each clock pulse of an MCU) cannot be met quick enough given that current can only change at a given rate through an inductor. The cap acts as a current reservoir of sorts. –  sherrellbc Jul 21 '14 at 14:50

Power supplies are slow...they take roughly 10 us to respond (i.e. bandwidth up to 100 kHz). So when your big, bad, multi-MHz microcontroller switches a bunch of outputs from high to low, it will draw from the power supply, causing the voltage to start drooping until it realizes (10 us later!) that it needs to do something to correct the drooping voltage.

To compensate for slow power supplies, we use decoupling capacitors. Decoupling capacitors add fast "charge storage" near the IC. So when your micro switches the outputs, instead of drawing charge from the power supply, it will first draw from the capacitors. This will buy the power supply some time to adjust to the changing demands.

The "speed" of capacitors varies. Basically, smaller capacitors are faster; inductance tends to be the limiting factor, which is why everyone recommends putting the caps as close as possible to VCC/GND with the shortest, widest leads that are practical. So pick the largest capacitance in the smallest package, and they will provide the most charge as fast as possible.

-
Good, accurate answer. Ceramic capacitors are better for high-speed decoupling because they are "faster". The bulk (polarized) tantalum capacitors are only for lower frequency because they are "slow" (due to ESR -- think small RC filter inside the capacitor). When people say "smoothing" capacitor I think more of the bulk capacitance on the output of a power supply, not decoupling at the power pins. I haven't used that term since ENG101. –  Analog Arsonist Sep 24 '12 at 22:26
Wouldn't the IC always be pulling from the capacitor directly? Not to split hairs here but... –  cbmeeks Aug 21 '14 at 20:48

A smoothing capacitor (a.k.a. decoupling capacitor ) is used to reduce the change in power supply voltage. When you draw high currents from your power supply (like when digital logic switches state) you will see a change in supply voltage. Switching tries to draw large instantaneous currents and produces a voltage drop due to the impedance of the voltage source and the connection between the voltage source and the IC. A decoupling capacitor will help to maintain (or smooth) the supply voltage at the device. Placing this storage element close to the IC reduces the change in voltage at the IC.

Unless you measure the supply voltage at each IC when the IC is drawing its maximum switching currents it is difficult to say how effective the capacitor will be. For most digital devices the recommendation is 0.1uF ceramic very close to the device. Since the capacitors are small and low-cost most designers will just add the capacitors. Sometimes if I have two logic devices that are very close you may be able to orient a single capacitor between two ICs. This is usually not the case.

Power supply ICs have larger smoothing capacitor requirements since the swithing currents are larger. For those devices you need to look closer at the application ripple requirements to determine the appropriate filtering capacitor.

-

Normally called a "bypass cap", because the high-frequency noise bypasses the IC and flows directly to ground, or a "decoupling cap", because it prevents the current draw of one IC from coupling into another IC's power supply.

"how do I know if a specific chip is one?"

Just assume they all do. :) If a chip is drawing current intermittently, it will cause the supply voltage to droop intermittently. If another chip is "downstream", it will see that noise on its power pins. If it's bad enough, it can cause errors or noise or whatever. So generally we put bypass caps on everything, "upstream" from the IC. (Yes, the orientation of the traces and the locations of the components matters, since copper is not a perfect conductor.)

-
Here is an interesting rule-of-thumb that I found from a document that TI wrote (its in the order of: TYPE then MAX FREQUENCY) Aluminum Electrolytic, 100 kHz; Tantalum Electrolytic, 1 MHz; Mica, 500 MHz; Ceramic, 1 GHz –  Kellenjb Apr 18 '10 at 13:45
+1 For "bypass cap" and noise... –  Johan Apr 19 '10 at 14:50
You match my definition of bypass and decoupling cap. Glad to hear one more soul has read just too much. –  Kortuk Apr 21 '10 at 13:09

Just to add more on EM emissions.

Most companies will recommend 0.1uF caps at each power input. Keep in mind this is only the bare minimum required to avoid voltage dips that could effect operation. If your building a PCB board that needs to pass FCC part 15 for emissions you need to go further.

Ultimately you need to calculate the entire capacitance needed on the power supply plane based on the PCB design and power usage. A general rule of thumb i use as a starting place is 1 10uF tantalum cap per major IC (microcontroller, ADC, DAC, etc) and then a 0.1uF and a 10nF cap at every power pin on every IC and the 10nF caps need to be small, preferable 0402 or at most 0603 sized to avoid the lead inductance from the package nullifying the effect of the capacitor.

I highly recommend this book if you plan to get into high speed digital design, high speed meaning anything over 1mhz really.

-
+1 for mentioning the 10nF caps. 0.1uF is good for default, but the 10nF or even 1nF caps will have lower impedances at high frequencies because they have lower parasitic inductances. –  Jason S Apr 22 '10 at 12:39
Parasitic inductance is dominated by the package size, not the total capacitance. Sure, there's a correlation between maximum capacitance and package size, so you're mostly right, but a 10nF cap in a 0805 package will have about the same parasitic inductance as a 10uF in an 0805 package. The corollary is that if you have 100 nF cap in an 0603 package, adding a 10nF cap in an 0603 package isn't going to help you very much, if at all. –  ajs410 Apr 12 '13 at 22:12

Questions related to decoupling seem to be coming up a lot lately. I gave a detailed answer here: Decoupling caps, PCB layout

That talks about decoupling issues and layout. Power supply smoothing is a totally different matter. That generally requires larger caps that have to be able to store a reasonable amount of energy since the power supply ripple frequency is much lower than the frequencies decoupling caps are intended to handle.

-

I would like to emphasis one of jluciani's points. It is very important to put the capacitor as close to the chips power input as possible. This can help eliminate any noise that is introduced any where else, either in your circuit, from the power supply, or even some noise being radiated from a source off of your board.

jluciani is correct that 0.1uF is very common for being placed next to ICs. Simply think of the capacitance as how much charge the capacitor can hold, so the bigger the capacitance the more charge it is holding. If you put capacitors in parallel, you add more capacity resulting in a higher effective capacitance.

As far as your question about if that chip needs it or not, I would say, it wouldn't hurt. The datasheet will usually specify if the chip needs decoupling (aka smoothing) capacitors and if so what the recommended value is.

-

To measure the effects of the current spikes on the supply voltage you'd need a fast oscilloscope. It depends on the speed of the circuits, but I guess you'd need 200MHz to 1GHz bandwidth.

Also, if the power supply circuit carrying the current spikes is large then it will cause radio emissions, which is frowned upon for various technical and legal reasons. A bypass capacitor acts like a shortcut for these spikes, so there is much less emission.

-
Most voltage spikes are visible even on a 100MHz oscilloscope since their frequency is related to your clock. An ATmega running at 8MHz will show a spike every 1/8MHz = 125ns. –  jpc Apr 20 '10 at 9:09

Bypass caps are sufficiently cheap that in many cases there's no reason not to put them everywhere. If space or cost are extreme issues, however, it may be reasonable to leave off a few. The key is to recognize what may happen if they are left off. My suggestion would be to assume a worst-case scenario if they're left off: (1) RF radiation at the input switching frequency may be increased, and (2) any time an input switches, assume the device's outputs and internal state may be arbitrarily glitched. If either of these behaviors would be a problem, bypass caps are required. If neither would be a problem (e.g. because none of the inputs switch often enough for radiation to be a problem, the device has no internal state, and nothing will care about the state of the outputs at the moments when the inputs are switching) then bypass caps may be omitted.

-

In a general case, some or many ICs, transistors or valves (tubes) will be connected to the same power supply. As a device in these situations operates, it draws varying amounts of current from the power supply in accordance with the signal passing through it. As power supplies are not perfect, the varying current causes a varying voltage to appear on the supply rails. All the other devices connected to the same power supply will then feel this voltage ie. a noise signal will be coupled into them. This may cause instability in analogue circuits or wrong switching in digital ones. By placing DEcoupling capacitors at points described above, the power supply voltage becomes more stable, and the devices are decoupled from each other.

-

Often the datasheet for the chip specifically calls out how many and what size capacitors to use. If it doesn't, best practice is to attach a 1 uF cap to the power pins of each chip, plus a larger cap somewhere on the board. (Before 2001, best practice used 0.1 uF caps).

p.s.: have you considered using a 74HC595 or 74HC166 rather than the 74195? I suspect that would work just as well, and free up some pins on your Arduino.

-

Capacitor is storage element and it will save energy in the form of charge. Coming back to decoupling cap, it's also called as bypass capacitor since it will bypass supply ripple and this charged cap will try to maintain fixed dc voltage at VDD pin.

-