You have found the ultimate guide on Capacitors.
In this guide, I show you exactly what you need to know about capacitors and how to use them in electronics.
What Is A Capacitor?
A common question is how do we define capacitor? The best capacitor definition that I have found is:
capacitor = electrical component that stores electrical energy in the form of an electric field
#1 Lesson: The major thing you need to know about capacitors is that they "love" to keep voltage steady, and will use current to make it happen.
That may not make sense to you just yet, so let's take a look at a few other things next to make it much clearer.
The key thing to know about capacitors is something called capacitance. Let's look at a good capacitance definition.
What Is Capacitance?
Capacitance is pretty straight forward. It is the ability of something to hold an electric charge, which you can think of as a collection of electrons.
We can say that something with higher capacitance can hold a bigger charge (collection of electrons) at a given Voltage than something with lower capacitance.
An analogy would be like buckets of water. In this example, a 5 gallon bucket can hold more water than a 1 gallon bucket. Capacitance is similar to the size of the bucket.
Capacitance is measured in units called Farads, or F for short. This was named after Michael Faraday, an infamous contributor to the discovery of electromagnetism.
If you want to dive into the specifics of a Farad, it is 1 Coulomb per Volt (C/V).
Coulombs represent the electric charge that can be transported using 1 Amp of electric current in a duration of 1 second of time.
A Volt is simply a measure of electric potential. To put it in perspective, your common AA and AAA batteries are typically 1.5 Volts.
The key thing to take away here is that the more capacitance a capacitor has, the more charge it can store up, and you can determine this by its rating in Farads.
What Does A Capacitor Do?
Now that we know a little bit more about capacitance, let's discuss how we can use that ability.
In anything related to electricity, there is always the interaction of electrical energy, which is moving electrons from one place to the next.
And since we humans want to be able to manipulate the laws of physics, it becomes necessary to have the ability to store electrical energy.
That's where capacitors come into the picture. They are components that we make to give us a certain ability of charge storage so that we can better manipulate the transfer of electrical energy.
Capacitors let us have better control over the storage of electrical energy.
With that said, there is a nifty way to represent a capacitor so that we can put it into schematics.
One thing to notice here is that there are regular capacitors, that don't mind which orientation of voltage you put across them.
There are also capacitors that only work well if you put the higher voltage on a dedicated pin. This is called a polarized capacitor. In fact, they usually blow up if you get the voltage backwards.
The capacitor polarity is designated by the '+' symbol on one of the capacitor pins, meaning that the higher voltage should be connected there.
What is even more interesting is that there are capacitors in which you can adjust to change the capacitance value. It is called a variable capacitor.
Here are how the symbols are typically drawn:
How Does A Capacitor Work?
The best way to understand how a capacitor works is to look at the parallel plate model. We will check that out next.
Parallel Plate Capacitor
This model shows a capacitor in its simplest form. It consists of two conductive plates separated by a dielectric material.
Now a dielectric is a fancy word that just means an insulator that reacts a certain way in the presence of an electric field.
Something to be aware of is that the dielectric material will have a property called permittivity.
Permittivity is basically the amount of resistance the material develops when exposed to an electric field. It is given by the symbol Epsilon (ε) and changes depending on the material.
A diagram of the model can be seen below. Notice the height of the dielectric is also the distance (d) between both conductive plates.
From the above model, the formula for capacitance is:
Where C is capacitance, ε is permittivity, A is the surface area of the conductive plates, and d is the distance between the conductive plates, which is also the height of the dielectric material. The result is in Farads (F).
Typically, its easier to write ε as:
This way, we can use k as the relative permittivity of our dielectric material times the permittivity of space, which is 8.854E-12 F/m. Note that k = 1 for air.
So the area of the plates and the distance between them are things that we can change based on how we construct our capacitor. The permittivity is a property of the material we select for our dielectric.
Build Your Own
To drive home the points here, let's have a fun little experiment that you can do at home. Let's build a capacitor! It doesn't take long.
For this home built capacitor, I'm using aluminum foil for the conductive plates and wax paper for the dielectric material.
By using dimensions of 5 inches by 6 inches, I cut the two conductive plates out of aluminum foil and also cut a piece of wax paper just a little bigger to prevent the two plates shorting out.
A picture of the capacitor can be seen below. I simply stacked all 3 pieces on top of each other with the wax paper in between the pieces of aluminum foil.
A close up picture of the capacitor can be seen below. Notice how the wax paper is between the two sheets of aluminum foil.
I then placed a heavy book on top to flatten everything out in order to really decrease the distance between the plates. Using a multimeter, I measured the capacitance by connecting the probes to both pieces of aluminum foil.
The measurement came out to about 5 nano-Farads of capacitance, which can also be predicted by using the equation if you know the permittivity and thickness of wax paper.
Imagine now if we rolled this capacitor up, making sure that the plates don't touch each other, and crunched it down into a small package. We would have a nice 5 nF capacitor.
Next, let's talk about the energy stored in a capacitor.
Say you have a fresh capacitor that has never been in a circuit. When a voltage is applied across the capacitor's terminals, current will flow into one of the capacitor's plates, creating a build up of charge, and flow out of the other plate, creating a negative charge.
This transfer of charge sets up an electric field across the plates of the capacitor. Depending on the how much resistance is in series with the capacitor will determine how fast current can flow into and out of the capacitor's plates.
The capacitor charge time, is dependent on the capacitor time constant.
Typically, in a simple circuit with a resistor and capacitor, as seen below, the resistor will restrict the flow of current.
Therefore, the time constant for this simple circuit is:
time constant = Tau τ = R * C
With the above circuit values, the time constant is equal to:
Tau τ = 1000 * 0.000001 = 0.001 seconds
The time constant (RC) is considered 1 tau, which is the time in which the capacitor will reach 0.63 of its full steady state voltage in the circuit.
And the handy rule of thumb is that a capacitor will fully charge up around 5 τ, or 5 times the time constant. Therefore, in our example, a full charge time is:
charge time = 5 * (1000 * 0.000001) = 0.005 seconds
If you are wondering why it takes 5 * RC in seconds to charge a capacitor, its because the capacitor charge up follows an exponential curve.
In order to calculate the voltage for this exponential charging curve, we can use this equation:
Where V(t) is the voltage across the capacitor after a specific time (t), Vo is the voltage from the source, and RC is the time constant.
From our example circuit with a 12 Volt source, 1k Ohm resistor, and 1 micro-Farad capacitor, here is how the voltage across the capacitor looks plotted out while its charging up:
Notice how 1 tau (RC) is equal to 0.001 seconds and by 5 * RC = 0.005 seconds, the voltage has reached steady state of 12 Volts.
The same things are at play when the voltage source is removed from the circuit and the capacitor is fully charged up.
Now the capacitor is at a higher voltage than the rest of the circuit, and the energy will flow from the capacitor and into the circuit.
The voltage for capacitor discharge is also exponentially decaying. In order to calculate it, we can use this equation:
Just like before, V(t) is the voltage across the capacitor at time (t), RC is the time constant, and Vo is the voltage of the fully charged capacitor in the beginning.
With the same example circuit from before, here is how the discharge curve looks:
Check out what happens at one RC time constant, and then by 5 * RC = 0.005 seconds.
How To Discharge A Capacitor
So the question comes up: how do you discharge a capacitor?
Well, the easiest way to think about it is that you need to get the capacitor away from any voltage sources, which means remove it from the circuit or turn off the voltage source.
However, there's a few things here to consider. Remember, safety first. You need to determine what voltage the capacitor has been charged up to.
If it is high voltage, or anything above 25 Volts, you need to consider your safety. You don't want to shock yourself, others, or anything in your environment. It doesn't take much current to kill you.
If you don't know what you are doing, then get professional assistance from someone who does. Your situation could be dangerous.
For low voltage circuits (under 25 Volts), the simple thing to do is to connect resistance across the capacitor related to the voltage it is charged up to and how much capacitance the capacitor has in it.
Using the equations covered before, you can calculate the time constant by choosing a resistor for the specific capacitor you are discharging to determine how long it will take to discharge.
However, you definitely don't want to pull too high of current from the capacitor that it might damage it, or possibly heat the resistor up and damage it.
Say for example, we have a 25 Volt circuit and we want to discharge a 100 micro-Farad (uF) capacitor in it. Assuming there is no resistance already in the circuit that would naturally drain the charge out of it.
If we turn off the 25 Volt source, and then carefully connect a 10,000 Ohm resistor across the terminals of the capacitor, then we can calculate whether or not we will blow up the resistor and how long it will take to empty the capacitor.
Current (through Resistor) = V / R = 25 Volts / 10k Ohm = 0.0025 Amps
Power Dissipated (Resistor) = I ^ 2 * R = (0.0025 * 0.0025) * 10k Ohm = 0.06 Watts
Since most 10k resistors are usually 1/4 Watt max power rated, the resistor can handle this just fine. Why? Because 0.0625 Watts < 0.25 Watts.
Now the question is how long will it take to empty the capacitor? Let's calculate the time constant:
time constant = R * C = 10k Ohms * 100 uF = 1 second
Next, we use the 5 * RC rule of thumb and figure out that it will take 5 seconds to empty the capacitor with the 10k Ohm resistor.
Getting a little deeper into the behavior of capacitors, something that will come up is the term impedance.
What's neat is that capacitors "react" a certain way to different frequencies of alternating current (AC). This is known as capacitive reactance.
In order to find the impedance of a capacitor, we use a simple equation:
Here, we have the capacitance (C), frequency in radians (w), and frequency in Hertz (f).
As you can see from the equation, the capacitor impedance decreases with increasing frequency. You can use this effect with the intent of capacitors to act as "shorting paths" for certain frequencies. We will discuss that later.
Equivalent Series Resistance
We often treat capacitors in the theoretical sense of only having capacitance. However, in the real world, they also have some built in resistance.
So you are probably asking, well doesn't a capacitor just have capacitance? Theoretically yes, but we can never build perfect components, as they always have passive extra properties from the process of making things.
This built in resistance is known as the equivalent series resistance (ESR), which is a great way to help simulate some real world effects with capacitors.
The resistance comes from the leads of the capacitor, as well as the losses in the dielectric.
The ESR of a capacitor can vary depending on the type of capacitor, and can possibly change over time.
It can be measured with a carefully designed test, and usually can be found in the capacitor's datasheet.
For some applications, designers don't pay much attention to the capacitor's ESR. However, in some circuits it does matter though. On occasion, a problem in the circuit design might come up and be related to it.
I've seen circuits that worked flawlessly for years, and then all of the sudden with new builds of the boards, problems came out of nowhere.
After tracking down the problem, the root cause was that a few capacitors were changed from one type to another (Tantalum to Electrolytic), but with the same capacitance rating.
The ESR had changed and altered the behavior of the design.
It turns out there are many different ways to make a capacitor out of different materials. Let's walk through each of the major types.
Ceramic capacitors get their name from the ceramic dielectric used in their construction.
They come in many different package types. The most common use for them is decoupling, which we will cover later. Another place they are seen often is in oscillator circuits.
They are well suited for high frequencies and high current pulsing.
Aluminum capacitors are part of the electrolytic family. These capacitors use aluminum oxide as the dielectric.
This type is very common and fairly cheap. They perform well in low frequency applications, so you often see them in DC power supply filtering and audio circuits.
They are polarized, so you have to be careful how you hook them up. Otherwise, they explode pretty quickly.
Film capacitors get their name because the dielectric is made out of plastic film.
They are very good at handling high current pulse loads, so are often found in motor and snubber circuits.
Tantalum capacitors are another member of the electrolytic family. They use tantalum pentoxide as the dielectric.
Tantalums are more expensive, so you usually find them on circuits that are more for high performance and need the specific features of this type of capacitor.
They are often more reliable than other types. Tantalums are polarized, so they must be hooked up correctly. They tend to have a slower failure time than Aluminum when hooked up wrong.
One time I had a circuit board powered up for over 5 minutes before a Tantalum exploded because it was hooked up wrong.
Super capacitors are considered electrochemical. They are often known as electric double-layer capacitors (EDLC).
These are great at bridging the gap between regular capacitors and batteries.
For example, if you have a circuit that needs a small supply current to keep a memory device stable or to run a real time clock, you can use these to supply current when the power supply is off or the battery goes dead.
They can be handy alternatives to batteries in applications like aerospace where a battery may not be allowed.
These days, many multimeters will have a built in capability of testing capacitors.
I personally like auto ranging multimeters, so it will adjust to find the right measurement.
If you are using an older multimeter, just make sure to set the measurement range to right above the expected value of your capacitor.
You also want to make sure and get the polarity of the capacitor correct if it is polarized, so that you hook it up correctly to the multimeter.
There are dedicated tester units out there if you need a more heavy use capability.
Keep in mind that it is hard, if not impossible to measure a capacitor while it is in the circuit.
Typically, troubleshooters will test for a short across the capacitor while its in the circuit, which is a common failure, by measuring the resistance across it. If the short is true, then you simply replace the capacitor.
Capacitors come in all sorts of packages, from through hole, surface mount, to chassis mount.
The most common packages you will run into in consumer electronics is surface mount. If you build circuits at home, you will usually get through hole so that you can use them with breadboards.
These capacitors were the predominant package type decades ago. They still have a lot of popularity for hobbyist as well as prototypes. Higher current circuit boards still use these as well.
In the picture below, you can see some common examples that you will run across:
From left to right: ceramic, ceramic, film, aluminum electrolytic
For through hole capacitors, there will be markings on the part to tell you what the capacitor value is. Check out the video below to see how:
Surface mount components offer the ability to drastically reduce the size of electronics by compacting the part density on circuit boards.
For low voltage circuits, which is the majority of digital electronics, you can get some very small size capacitors into surface mount packages.
Notice in the following image the difference between Tantalum capacitors and ceramic capacitors in the FPGA circuit.
Note how the Tantalums are big enough to have clear markings for their values, but the ceramics are so small that they don't have any markings.
Like other electrical components, capacitors come in many different sizes for surface mount. The key thing is that there is an Imperial system as well as a Metric system.
The table below shows some common package sizes in the Imperial code system.
Package Code (Imperial)
Specifications And Ratings
Some things to look for when choosing a capacitor is not only the capacitance, but also:
- Capacitance tolerance
- Temperature range
- Temperature coefficient
Let's look at an example part. A very common capacitor is a 0.1 uF ceramic that is great for reducing noise in DC circuits.
If we look at the GRM155R71C104KA88J at Digikey, we can see the different specs that we care about. We can also dig into the datasheet to get even more details.
This part is a +/- 10% accuracy capacitor with a max Voltage rating of 16 Volts. It has a wide temperature range and a X7R temperature coefficient.
Standard Capacitor Values
Now let's cover some common values that you will run across in electronics.
A 0.01 uF capacitor can be found in circuits that need higher frequencies filtered out. It is usually a ceramic capacitor, and if it is a through hole component, it will be marked as a 103 capacitor.
The 0.1 uF capacitor is a common one you will see almost everywhere. Typically, it will be a ceramic capacitor and works well at decoupling DC power supply rails. As far as through hole, the markings will be as a 104 capacitor.
A 1uF capacitor and a 10uF capacitor are other common ones seen in circuits. They do a good job of helping smooth out ripple noise in DC voltages.
For super capacitors, a 1 Farad capacitor or even a 2 Farad capacitor is seen often on boards that need a little current even if the power goes out or the battery dies.
Of course there are many different capacitor values available. Usually, the designer determines what ideal capacitor is needed for a circuit and then goes to see what is available through distributors.
Part of the design is picking a capacitor that is in high demand so that you can ensure you won't face part shortages during production. Naturally, price is a big factor too.
Now that we know all about capacitors, we can look at some very handy dandy ways of using them in electronics.
Capacitor Ripple Current
Ripple current is just the AC parts of a voltage source applied to the capacitor.
The thing you need to know is that the capacitor will generate heat due to the dielectric losses caused by the ripple current.
Therefore, its important that this heat generated doesn't get too high that it damages the capacitor.
Capacitors will usually have a max rating to not exceed for ripple current, so this should be considered for the circuit design.
Capacitors In Parallel
Often times, the need arises to use several different value capacitors in parallel to target different frequencies or to simply get a higher total capacitance out of many lower ones.
The equation to calculate the equivalent capacitance is as follows:
Let's walk through a quick example circuit to demonstrate how easy it works. In the circuit below, we have three capacitors.
To calculate the equivalent capacitance, we do the following:
total capacitance = C1 + C2 + C3 = 1 uF + 1 uF + 1 uF = 3 uF
Capacitors In Series
While having capacitors in series is not commonly done, you might run across it on occasion.
Some designers will use this arrangement to allow for the voltage drop across the capacitors to be able to use lower voltage rated capacitors to save cost.This is generally not good design practice.
It's tricky because you cannot guarantee the voltage drop across each capacitor will be even, so if it is not done right, it often leads to circuit failure. Definitely not a recommended practice unless you really understand the dynamics of the circuit.
Another area where it is used is for safety where if a capacitor shorts out, it can cause a lot of damage.
By placing a capacitor in series with another one, if one shorts out, the other will prevent the short by still working. In this case, you would want both capacitors to be rated at a max voltage much higher than the circuit to avoid the issue mentioned before.
To calculate the equivalent capacitance for series capacitors, use this equation:
And here is a circuit example to show you the equation in action. In this circuit, we also have three capacitors:
To calculate the equivalent capacitance, we do the following:
total capacitance = 1 / (1/C1 + 1/C2 + 1/C3) = 1 / (1/1 uF + 1/2 uF + 1/3 uF) = 0.55 uF
A coupling capacitor is one that is used to pass only the AC parts of the signal. It is also known as AC coupling. Given that it only passes AC, it is also called a DC blocking capacitor.
There are many analog circuit applications for this type of capacitor where you only want to pass the AC portion of the signal.
Another great benefit is that since it removes the DC from the signal, it helps to alleviate any voltage level differences that might develop between two systems.
Say for example you have a Blue Ray player and a TV separated by a 10 foot cable, then the designer usually considers using a capacitor on the output and the input of those cable connectors to remove any DC voltage that might develop between the two units.
A decoupling capacitor, also known as a bypass capacitor, is simply using a capacitor to let unwanted AC noise pass through the capacitor and back to ground. This helps to control the noise.
Different value capacitors help filter out different frequency noise. You can of course use multiple values to target multiple frequencies by placing a capacitor in parallel with other ones.
You will see these all of the time near the supply voltage pins of chips. Usually a value of 0.1 uF can be found, or the datasheet of the chip will specify the ideal value.
Some chips even require multiple values on different pins to help reduce noise.
Another place that is an obvious use of these capacitors is in a DC regulator circuit. The datasheet for the regulator, such as the 7805, will call out a few capacitors and the specific type to place on both the input and the output of the circuit.
The capacitors help to keep the circuit stable as well as filter ripple noise.
One of my favorite uses is to remove noise from digital ground. If you have a board that is in a metal box, then usually you will have a digital ground and a chassis ground (the metal box).
You have to be careful how these grounds reference each other. Usually, a box will connect to other things by cables, and this invites all sorts of noise into your digital ground.
One way to help remove the noise is to use a capacitor between digital ground and chassis ground that is selected to pass specific frequencies of noise that you are having trouble with.
The trick is that you want this capacitor (or more than one) as close to the cable connector as possible.
If you don't get it close to the cable connector, then the noise will come into your digital ground and couple itself to many places in your board circuits. I have seen this problem so many times over the years.
What is your favorite capacitor story? Tell me about it in the comments below.