My *nix world

How to choose your decoupling capacitor

What is a capacitor

How to choose your decoupling capacitor

Fig. 1 - electrolytic capacitor

A capacitor is an passive device that stores electrical energy in an electrical field. In layman terms it is a reservoir for energy the same way a rechargeable battery is, although it has many other properties that make it useful in electronics. There are many types of capacitors (electrolytic, ceramic, tantalum), each with their own characteristics but which ultimately have all the same function.

In the image aside is shown a 100uF 25V electrolytic capacitor.


What is a decoupling capacitor

A decoupling capacitor is just a regular capacitor which is used to decouple one part of an electrical circuit from the another. The capacitor itself does not have a (new) characteristic which makes it special. Rather, is the way we use it that makes it special.

How to choose your decoupling capacitor

Fig. 2 - decoupling capacitor in a test circuit

Why do we need decoupling capacitors

If you have an electrical circuit with a power supply and two or more different loads (eg. amplifier, IC, logic, micro-controller, etc) the current drawn/pushed from/into circuit by one load could create a (AC) voltage ripple (noise) into the other circuit(load) that could severely affect it. For some circuits a ripple of few tens or hundred millivolts is not an issue, however in case of an IC or micro-controller this might cause an unexpected behavior making the circuit unpredictable.

Now just imagine the following scenario:

  • you have a circuit with a power supply that can keep up with oscillation on the order of 1MHz or lower
  • the circuit's load(s) operates in the range 10MHz or higher
  • basically it means that the power supply is not fast enough to supply with power that circuit

So we have two reasons for using a decoupling capacitor (ie. they provide two functions in a circuit):

  1. charge supply
  2. filtering.

(A) Charge Supply

So what is happening: when the 10MHz load changes its states between high and low it will pull enough current into it and will drag the power supply line to a lower voltage that will affect the rest of the circuit. On the other hand if this 10MHz load will push current into the circuit then it will create voltage oscillations (ripples) with a frequency of 10MHz which the other loads might not expect and thus their functioning might be uncertain.

We can avoid this situation simply by decoupling one part of the circuit from the other. We do that by mounting some local reservoirs of energy very close to the loads. How this is usually done is by mounting a larger reservoir very close to the power supply and a second smaller reservoir locally, very close to the load:

Q=C \cdot V where Q is the charge, C is the capacitance and V the voltage.


When the load goes through these transitions then instead of drawing current from the power supply it will draw current from the local reservoir. The larger the energy reservoir the larger the charge to make these transitions. If that is still not enough, the current is drawn ultimately from the largest reservoir mounted very close to the power supply. By doing this we are avoiding dragging the line down or creating high frequency oscillations on the line that would affect other circuits. So it's nothing special about the capacitors but with the way we are using them for a particular case.

(B) Filtering

A capacitor has this intrinsic property which is called capacitive reactance. While the capacitor is used in an AC circuit it oscillates between being charged and discharged with the frequency of the AC signal frequency. As the capacitor is charged/discharged the flow of current is limited by its internal "impedance". This internal impedance is also known as capacitive reactance (XC). The higher the capacitance (C) the less it opposes the current flow. The higher the frequency (f) of these charge/discharge transitions the less it can oppose to the current flow:

X_C=\frac{1}{2 \cdot \pi \cdot C \cdot f

When dealing with AC currents this capacitive reactance is called capacitive impedance (ZC) and is expressed as a complex number in terms of capacitance (C) and angular frequency \omega=2 \cdot \pi \cdot f expressed in radians/s:

Z_C=\frac{1}{j \cdot(2 \cdot \pi \cdot f) \cdot C}=\frac{1}{j \cdot \omega \cdot C}, where j is the imaginary unit of the complex number (ie. j2=-1).


So by mounting a capacitor between the positive and negative rail of a circuit and choosing an appropriate value, it will have such small capacitive impedance that it will actually allow current to flow through through it like in a short circuit. So any voltage ripple propagated with a frequency greater than the value it was calculated for would be shunted to the ground instead of traveling down along the line affecting the other loads on the circuit.

For very sensitive circuits this approach is necessary but not sufficient. We would need to extend it to what is called the \pi topology which includes also an inductor. But more on this another time.

What size the capacitor should have for (A) or (B) ?

(A) Charge Supply

Let's review the following equation:

Q=C \cdot V

So for a given circuit with a voltage V where we have a load which draws huge amount of current (ie. requires a large charge Q) all we need is a capacitor with large capacitance C.

(B) Filtering

Let's review the following equation:

Z_C=\frac{1}{j \cdot(2 \cdot \pi \cdot f) \cdot C}=\frac{1}{j \cdot \omega \cdot C}

So if we want to include only those voltage ripples that propagates with a specified max. frequency (\omega) then we have to make sure that the capacitor's capacitive impedance (ZC) is low, ie. we use a capacitor with large capacitance C.

So in both cases we see that a capacitor with a large capacitance is needed and therefore it raises the following question: wouldn't be reasonable to use the largest C possible? The short answer is yes and NO!


How to choose your decoupling capacitor

Fig. 3 - ideal capacitor

With an ideal capacitor (like the one aside) which has no ESL or ESR or any parasitic resistor the answer would be YES. However, in real life there is no such thing like ideal capacitor. They usually have some equivalent series inductance (ESL), some equivalent series resistance (ESR) and most probably some parasitic resistor in parallel with the capacitor, like the one in the image below:


How to choose your decoupling capacitor

Fig. 4 - how a capacitor is constructed in real life

So in the reality the capacitor 's capacitive impedance is going to be lower and lower as the frequency grows until it reaches a point (the resonant frequency) where the capacitor is going to be more and more inductive. The resonant frequency of capacitor is the point \omega=\frac{1}{\sqrt{L \cdot C}}:

So we would want to choose a smaller value for C such that we push the point \omega further.

Well, so how do we calculate the right size for the capacitor? In order to understand how to we calculate the size we should understand how the capacitor works in a real circuit.

Let's assume that we have a circuit with a capacitor that is charged and discharged during time every T seconds.

Look at the first graph in the Fig. 5 below:

  • At the beginning our circuit is at the low state then it goes in the high state. When this happens the capacitor will start charging during a short period (rise time) by drawing current from the circuit, at some point ICmax it will be fully charged then it will start discharging.
  • Its current is going to be pulled/used by the circuit, thus it starts discharging;
  • While the system is using its current we see no charge/discharge in time, its charge is almost zero
  • After T seconds the process repeats again.

The second graph is the Fourier transform of the first one where on x-axis we have the log of the frequency (f) and on the y-axis the log of the current(I). We see that the capacitor is charging linearly for a while then it reaches a certain frequency (fc) called cutoff/corner/break frequency when it rolls off.

How to choose your decoupling capacitor

Fig. 5 - capacitor charge-discharge analysis

Ok, it's good with all these details but what what do we do with all this info now? Normally we use such decoupling capacitors for high-frequency devices like transistors, ICs, micro-controllers. Usually their data sheet features such information like the peak current, the rise time (tr), the transition frequency (fT) which is given as transitions per seconds (ie. Hz). For instance the 2N2222A transistor has a peak current ICmax=0.8A, rise time tr=25ns while its transition frequency fT=300MHz.

Let's review the charge equation:

Q=C \cdot V

If we want to see how the charge varies with the time we take the derivative of this:

\frac{\Delta{Q}}{\Delta{t}}=C \cdot \frac{\Delta{V}}{\Delta{t}} \Leftrightarrow I=C \cdot \frac{\Delta{V}}{\Delta{t}} \Rightarrow C=\frac{C \cdot \Delta{t}}{\Delta{V}}=\frac{I_{tr} \cdot tr}{V_{max}}, where Itr is the current peak in the graph above, tr is the rise time and Vmax is the maximum ripple we can stand. So by answering the question what is the maximum voltage ripple Vmax that we can tolerate before the system changes its state uncontrollable given the fact that we should provide maximum ICmax current for a short period of time tr, we answer in fact the question what size the capacitor should have.


Let's say that we look in the datasheet and at transition the circuit we try to decouple from the rest of the system draws Imax=0.8A, its raise time is tr=25ns and the maximum voltage ripple we can tolerate is Vmax=0.1V. What is the size of the decouple capacitor?

C=\frac{I_{max} \cdot tr}{V_{max}}=\frac{0.8A \cdot 25 \cdot 10^{-9}}{10^{-1}}=200nF

so we would need in this case for these variables at least this capacitor to decouple the circuit from the system.

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
How to choose your decoupling capacitor

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
How to choose your decoupling capacitor

Latest posts by Eugen Mihailescu (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *


Get every new post on this blog delivered to your Inbox.

Join other followers: