How Capacitors Work – A Tutorial For Hobbyists

A capacitor is a basic electronic component that works like a tiny rechargeable battery with very low capacity. Capacitors are used to create oscillators, time delays, add a power boost, and much more.

Like most components, the easiest way to understand how a capacitor works is to see with your own eyes what it does in a circuit.

Electrolytic capacitor

When I started learning electronics as a teenager, this was the first component I learned about. The way my father explained it to me made it easy to understand even though I had no understanding of the basics of electronics.

In this guide, I’ll show you how a capacitor works so that you’ll be able to understand what it does in circuits, and how you can use it in your own projects.

Covered in this guide:

What Is a Capacitor?

A capacitor is made up of two metallic plates with a dielectric material (a material that does not conduct electricity) in between the plates. And there’s actually no more magic to it. It’s that simple and you can even make your own capacitor by using two sheets of aluminum foil with a piece of paper in between.

How capacitors are built

When you apply a voltage across the two plates, a current flows as the voltage tries to push electrons through the capacitor. But electrons can’t flow through the dielectric between the plates, so instead the electrons will build up on one plate and leave the other plate.

Eventually, the side where the electrons gather won’t have room for more electrons, so the current stops flowing. When that happens, the capacitor is fully charged. The amount of electric charge the capacitor can hold is called its capacitance.

Electrons don’t like being crowded together on one plate. They want to go over to the side with fewer electrons. So if you provide a path for the electrons to flow (for example by connecting a resistor between its legs) the electrons will flow back to the other side until there’s an equilibrium of electrons on both sides of the capacitor again.

How Capacitors Work

I like to answer the question of “How does a capacitor work?” by saying that a capacitor works like a tiny rechargeable battery with very low capacity.

But a capacitor is usually charged and discharged in a fraction of a second. So it’s not used for the same purpose as a battery. Instead, it’s used for things like adding a time delay, creating oscillators, and as tiny backup generators for microcontrollers.

Check out the video below to see how the capacitor works:

A Simple Capacitor Circuit

If you want to understand how the capacitor works without reading theory and formulas – then build this circuit:

Practical circuit for understanding capacitors

You can use a 9V battery, a standard Light-Emitting Diode (LED), and a 1000 µF capacitor. The resistor value can be around 500-1000 ohms.

Connect the battery, and you should see the LED turn on. Nothing special yet.

But when you disconnect the battery, something interesting happens… The LED stays lit for a few more seconds without being connected to the battery!

This happens because the capacitor is first charged by the battery. When you disconnect the battery, the stored charge in the capacitor flows through the resistor and LED and thereby keeping the LED on for a few more seconds, until the capacitor is discharged.

So the capacitor works similarly to a battery – it can be charged and discharged.

Charging a Capacitor

If you want to get a really good understanding of capacitors and how to use them in your circuits, there are two important things you need to know:

  • What happens to the voltage across the capacitor when you charge it?
  • What happens to the current through the capacitor when you charge it?

The Voltage Across a Capacitor

If you charge a capacitor from a 9V voltage source, the voltage across the capacitor will eventually become 9V – but not immediately. At the moment when you start charging it, the voltage will start at 0V.

Voltage across a capacitor at time 0

But the voltage increases quickly, so if you try to measure it with a multimeter, you won’t be able to read 0V.

After some time, when it is fully charged, the voltage across it becomes 9V (or whatever voltage you used to charge it):

Voltage across a capacitor when fully charged

The voltage increases quickly in the beginning, then slowly at the end. The time it takes to charge the capacitor depends on how much current is flowing. In the example above, it would be determined by the resistor R1.

Typical charging curve for capacitors, showing voltage over time

The Current Through a Capacitor

When you start charging a capacitor, the current flows freely without any resistance in the very beginning.

Current through a capacitor at time=0

As the capacitor charges, the resistance increases so that less and less current can flow. When the capacitor is fully charged no more current flows through it:

No current through flows when it's fully charged

Here’s a simplified graph that shows how the current slows down with charging time:

Typical charging curve for capacitors, showing current over time

Types of Capacitors

There are many different capacitor types. But when you start out, the main thing to remember is the difference between a polarized and a non-polarized capacitor.

A polarized capacitor needs to have its positive side connected toward plus, and the other side toward minus. Otherwise, you might destroy it. This is a side-effect of how large-value capacitors are made.

A non-polarized capacitor can be connected either way, it doesn’t matter.

You can recognize one or the other in a schematic diagram by looking at the capacitor symbol. The polarized capacitor will have a plus marking.

Polarized vs Non-Polarized Capacitors

A non-polarized capacitor can be used, even if the schematic for the project you’re building calls for a polarized capacitor. But not necessarily the other way around.

If you need a polarized capacitor, you need something called an electrolytic capacitor. The most common types are Aluminium and Tantalum. Aluminum is the cheapest of the two. But if you need a smaller and more durable capacitor, you should choose the Tantalum type.

If you need a non-polarized capacitor, the most common types are Ceramic and Film.

Ceramic capacitors are small and cheap. It’s the most common choice for non-polarized capacitors. But if you have any special requirements like low tolerance, high reliability, or a capacitor that is able to operate under high temperatures, then choose a Film capacitor.

In the photo below you can see a ceramic capacitor on the left and an aluminum electrolytic capacitor on the right:

Two capacitors on a breadboard

What Are Capacitors Used For?

Capacitors are used for a lot of things, such as:

  • Adding a time delay in a circuit
  • Making oscillators (for example to make a light blink)
  • Creating audio filters (such as low-pass and high-pass filters)
  • Remove ripple in a power supply
  • Adding short bursts of energy (for example to power the flash of a camera)
  • Stabilizing the voltage supply of a microcontroller

…and much more. I’ll go through a few specific circuit examples below that you can use to improve your understanding of the capacitor.

Example 1: Add a Time Delay

In this example, when the input signal goes low, the output from the 555 timer goes HIGH for a certain period of time before going back to LOW. You could for example use it to turn on the lights on your porch for 2 minutes every time an IR sensor detects that there is someone present.

In this circuit, it’s the capacitor C1 that adds the time delay. All the 555 timer does is provide the logic to check the voltage level across the capacitor against a threshold level, then turn the output on or off accordingly.

555 Timer circuit with time delay

Example 2: Create an Oscillator (Blinking an LED)

In this blinking LED example circuit, the voltage across the capacitor is interpreted as either a 1 (HIGH) or a 0 (LOW) by the NOT gate.

Exampel of capacitor used to create blinking light circuits

The output becomes the opposite of the input. So if the input is LOW, the output is HIGH. When the output is HIGH, the output voltage will start charging the capacitor so that it eventually also ends up HIGH. But when it does, the output will switch to being LOW. When the output is LOW, it will make the capacitor start discharging so that it eventually also ends up being LOW.

And the process repeats.

Example 3: Design Audio Filters

You can combine capacitors and resistors to form filters. A filter removes specific frequencies from an audio signal and lets others pass through. For example, if you want to remove high frequencies and let the lower frequencies pass through (e.g. in a sub-woofer), you can build a low-pass filter:

How capacitors are used to build basic low-pass filter circuits

Example 4: Decoupling Capacitors for Microcontrollers

Imagine a typical alarm clock, powered by the electrical outlet on the wall in a house. If the power goes down, most alarm clocks have a backup battery that will take over and power the alarm clock until the power comes back on so that the time is not reset.

Well, in electronic circuits capacitors are used in a similar way:

If you have a circuit with a microcontroller running some code and the supply voltage to the microcontroller drops for only a split second, the microcontroller stops what it is doing and restarts. That can cause all sorts of problems, so you don’t want this.

Circuit showing the concept of decoupling capacitors

By using a capacitor, the capacitor can supply power for the microcontroller for a short period so that the microcontroller doesn’t restart. This way it will filter out noise on the power line.

A capacitor used for this purpose is called a decoupling capacitor.

Typical Capacitor Values

You have two important values for capacitors; capacitance and voltage rating.

The capacitance value of a capacitor is its “capacity” to store energy. A higher capacitance value means it can store more energy than a lower value. It is given in Farads (F).

The voltage rating is the maximum voltage a capacitor can handle. So if you have a circuit where the voltage across the capacitor can reach 12V, you need a capacitor with a voltage rating of 12V or more. It is recommended to use a capacitor rated for more than 12V so that you have some safety margin.

The capacitance value is given in Farad (F). But 1 F is a very high value. Usually, capacitor values are given as microfarad (µF), nanofarad (nF), or picofarad (pF). In the table below, you can see these values written out:

PrefixesCompact ValueWritten-Out Value
1 F100 F1 Farad
1 µF10-6 F0.000001 Farad
1 nF10-9 F0.000000001 Farad
1 pF10-12 F0.000000000001 Farad

If you look closely, you’ll see that for example, 100 nF is the same as 0.1 µF. This is good to remember. Because it’s very common to use both 0.1 µF and 100 nF to describe the same value.

Identifying A Capacitor Value

On big aluminum capacitors, the values are usually written out in cleartext. For example, if it says 2200 µF 16V, that’s the capacitance value and the voltage rating.

Electrolytic capacitor

But often on smaller capacitors, you instead have cryptic numbers. Like 102, 223, or 474. In these cases, the first two numbers make up the base pF value, and the last is the number of zeroes you add after:

102: 10 pF with 2 zeroes after is 1000 pF. Which is the same as 1 nF.
104: 10 pF with 4 zeroes after is 100000 pF. Which is the same as 100 nF. Or 0.1 µF.
223: 22 pF with 3 zeros after is 22000 pF. Which is the same as 22 nF.
474: 47 pF with 4 zeroes after is 470000 pF. Which is the same as 470 nF. Or 0.47 µF.

Learn more about capacitor values, prefixes, standards, and calculations here.

More Capacitors Tutorials

133 thoughts on “How Capacitors Work – A Tutorial For Hobbyists”

  1. Please explain this sentence( I think this is crucial part) “Since it takes some time to charge the capacitor and it takes a bit of time to discharge the capacitor, the effect becomes that the capacitor will resist alternating currents (AC), but let direct currents (DC) pass.”

    Reply
  2. Thanks a lot Mr. Oyvind for these info. May I ask how can radio reception in a solar home system be rectified. The reception is so bad unlike when connected to the grid. Thanks.

    Reply
    • It sounds like the power from the solar system is very noisy. I would suggest creating some kind of filter for it…

      Cheers!
      Oyvind

      Reply
  3. Can you give an example of an audio filter circuit that can be used by anybody for free? Math is not my calling :) I just like constructing pre-made circuits, and would like to know what capacitors to use in an audio filtering circuit, cutting frequencies above 15k and below 50hz, Thanks, ifya would, many Thanks indeed :)

    Reply
  4. Hey, Hi ! I just want to ask how to select the values of resistor & capacitor to make a low pass, high pass frequency or a band pass filter….i have a enough knowledge of electronics components individually but how to club them together to make a circuit of interest….when to connect which component ?? these questions always get a place in my mind every time….

    Reply
    • Hey!

      If you want to make a super simple and basic filter you only need one resistor and one capacitor for either a low-pass or high-pass filter.

      For a band-pass filter you can connect a low pass and a high-pass filter in cascade.

      To select values for the resistor and the capacitor you use the formula: Cut-off Frequency = 1 / (2 * 3.14 * R * C)

      So if you have decided on the cut-off frequency and the resistor value, you can find the capacitor value you need by re-arranging the formula above:

      C = 1 / (2 * 3.14 * R * frequency)

      Does it make sense?

      Cheers!
      Oyvind

      Reply
  5. thanks for your videos.

    i am interested in energy storage. What are the best capacitors able to store and for how long?

    Reply
    • At the time of writing, it’s possible to get my ebook “Creating Cheap Circuit Boards” for free if you sign up for my newsletter ;)

      Oyvind

      Reply
  6. Dear honorable Dr. Oyvind,

    High regards to your good self and commendable efforts in imparting knowledge in others. First, kindly send me your e-book “Creating Cheap Circuit Boards” as a subscriber of your newsletter.

    Second, is it possible to have the following books purchased in e-book format; either pdf or other format.

    Electronics Concepts and Theory
    #1 Getting Started in Electronics by Forrest.M.Mims

    #2 Make Electronics – Learning by Discovery by Charles Platt

    #3 All New Electronics – Self Teaching Guide by Harry Kybett & Earl Boysen

    #4 Practical Electronics for Inventors by Paul Scherz

    Best regards.

    Nurudeen

    Reply
    • Hey, the free ebook is in the first email you recieve after confirming your subscription. Check your spam folder if you can’t find it. The books you are looking for – I recommend you go to amazon.com and see if they have them. I don’t.

      Oyvind

      Reply
    • So there is a sote called humblebundle, that where i got most of my e-books from they offer them once in awhile. So i received like 20 ebooks for only 15 bucks which were mostly all from Make: electronics

      Reply
  7. Hello Mr Oyfind
    I hope that you can help me with my problem say i got a 380 volt or A 220 Volt
    generator and this is feeding 380 or 220volt motors
    Is there a way that i can use capasitors to cut out volt drop to the motors [in series or parr]?

    NB I am not a pro on this please help me

    theuns

    Reply
    • Hey Theuns

      In theory that should work, but you would probably need some really big capacitors. I haven’t worked with those kinds of things, so I would advice you to talk to someone who has done it before.

      Cheers!
      Oyvind

      Reply
  8. I have a quick couple of question here. Why a capacitor is used in a ceiling fan? And what is the source to charge a capacitor? Is it AC or DC source?

    Reply
    • 1. There are so many ways a capacitor could be used in a ceiling fan, so it’s hard ti answer that.

      2. Both. But with AC you will also discharge it

      Oyvind

      Reply
  9. Excellent explanation!

    The way I think of a capacitor or an inductor is that I think of them as tanks in a water system. A capacitor is a ‘tank’ for voltage. So, if there is less or no voltage in the circuit the capacitor ‘tank’ will supply it until it is completely drained. Similarly, an inductor is a ‘tank’ for current. So, if there is less or no current in the circuit the inductor ‘tank’ will supply it until it is completely drained.

    After a water stoppage in a water system, if you are connected directly to the pipe from the water company, you will have water pouring out immediately from the faucet when the water supply is resumed. On the other hand, if you have a tank you will not get water from the faucet until the tank is filled first. The presence of a tank will cause a delay in getting the water out of the faucet after a water stoppage. The addition of a tank may have the advantage of continuous supply in the case of water stoppage but it will also carry with it the phenomenon of delay.

    If you carry the example of the tank in the previous paragraph to electric components, the capacitor (which is a voltage ‘tank’) will cause a delay in the presence of voltage in a circuit. The volt will lag as a result and the current will lead. Similarly, the inductor (which is a current ‘tank’) will cause a delay in the presence of current in a circuit. The current will lag as a result and the voltage will lead.

    Reply
  10. I’m working on a project, what is the difference between a Ceramic Capacitor and Electrolytic Capacitor. Pros and Cons of both?

    This article was really helpful.

    Thank you.

    Reply
  11. hi…!!! frd..i could nt how to make any circuit, and cocept..pls help how to understand…still i dnt get clear concept about circuit and devices…can give any idea???

    Reply
  12. In my own contribution, I think the answer to the question should have been explain in a plain not by further telling us the meaning of capacitor… course we needed to hw a capacitor works so I think the answer shud have been on how a capacitor works… thank you

    Reply
  13. If i have a constant supply of say 1V…can i use a capacitor to build up to 9v, then discharge and repeat.i.e. in the analogy of the water tank, a small inlet fills up the tank, which then unloads its volume, then repeats the process. Is there a simple circuit to achieve this

    thanks
    dingo

    Reply
  14. Hi Mr. Oyvind, I really like how you explain those stuff. But I need your help. How am I going to explain capacitor with my classmates using cellphone as an example? I need to explain to them in a very simple language I can. I hope you can help me. Thank you

    Reply
    • 1. Learn how the capacitor works (by reading this article).
      2. Figure out some use case in the mobile phone where a capacitor is used, and explain it without using complex words.

      Good luck!
      Oyvind

      Reply
  15. How does the capacitor work?
    It is possible to discharge when charging in progress?
    Or it will only discharge when fully charge?

    Reply
  16. Hello Dr. Oyvind, and thank you so much for sharing your knowledge with us.
    I have a question about capacitors.
    I am a DIY audio effects builder, mainly to use in my guitar playing. Up to now I simply copied circuits on the net, but I’d like to go a bit further in understanding. My first obstacle is … a capacitor!
    I found out that, in the effects I build, the input signal (from my guitar) goes to a capacitor, and from there to the rest of the circuit. Shouldn’t this be insulating the input? What’s the point in putting a capacitor in series with the input, before going to transistors, op amp’s etc.?
    Sorry if my question is dumb, a good concept of infinity is my ignorance…
    Thank you in advance!

    Reply
    • Hey Benagro,

      A capacitor in series on the input will only let ac signals through. So if you for example connected a battery directly to the input, it would be ignored by the rest of the circuit.

      Cheers!
      Oyvind

      Reply
  17. Hi

    I want to know that in the complex circuit -full of component- the capacitor can be used to store charge from man DC battery, then capacitor supply another part of circuit permanently?
    i mean when capacitor charged by main DC power can simultaneously supply another circuit or another part?

    thanks

    Reply
  18. Hi ,nice explanation for capacitors but i don’t understand how the capacitor discharges ,in mostof the circuits we connect the connect capacitor in between the ckt then, how will the electrons collected in positive plate will reach the negative plate when there is no dielectric in between.

    Reply
    • For example, yu can connect a battery directly to the capacitor and it will charge pretty fast. To discharge it, connect for example a resistor between the two pins of the capacitor and the electrons will flow through the resistor (or any other electronic circuit).

      Cheers!
      Oyvind

      Reply
  19. Hi, please could you tell me if there are different types of capacitor that allow for different lengths of time for the discharge of the energy, what I trying very poorly to ask is, can you get some capacitors that will discharge in milliseconds and others that discharge in seconds and if so what is the maximum length of time they can they take to discharge.

    Thanks in advance from a very uneducated man

    Reply
  20. Hi Oyvid

    I have had a look and a read of your posts, i am unable to find what im looking for, I have a 47000uf 40 vdc capacitor that is fed from a 24v dc supply, it is used as a smoothing capacitor i believe, it is then in parallel to a set of batteries that are being charged from it and is used to drive a 24v dc motor back and forth, the problem i have is that the capacitor has gone faulty and has increased the output to 36 volts. i need to change the capacitor but unsure if i need the same size or could i use a smaller uf rating?
    I take it that the 40v dc is its max working voltage?
    Regards
    Dave

    Reply
  21. Yeh! man I have learnt a lot from the video clip “How to work a capacitor” .
    Thank you,
    But I have also a curiosity about the question, “Why a capacitor is connected through A.C. supply?”
    If your answer is only for smoothing the circuit or about high pass , low pass; please I want to know about high pass and low pass circuit.

    If you send your reply to-
    [email protected]

    I shall by highly grateful to you.

    Reply
  22. Hi

    I have a dc motor that does not start up sometimes. It is a bidirectional motor that runs in one direction, then stops and then runs in the opposite direction. Sometimes, not always, it wont start running, I have to tap it or give it a turn. I want to put a cap on as a Kick Starter but am not sure of the values. Please assist me:-)

    Reply
    • I would be making an educated guess at why caps are used in a ceiling fan and I think it has to do with the use of a dimmer switch on the fan motor / light fixture. Dropping the voltage via a dimmer switch, on light bulbs makes them dim. This is called a potentiometer. If you do the same thing to the fan motor and drop the available voltage, this causes current to go up (voltage and current are inversely proportionate to each other). This in turn will cause the fan motor to hum very loudly and would eventually burn out the fan motors windings. You can install capacitors and resistors into the fan itsef to turn the potntiometer effect into a rheostat effect. Now, the current goes down instead of the voltage and the fan slows silently in cadance with the dimming light kit on the ceiling fan.

      Reply
  23. Hi Oyvind,

    I wish to create an AC to DC converter, 100~240VAC input, 24VDC output & 5A. From electronic book, it mentioned converting from AC to DC by using Full Wave Rectifier, but that cannot fit to what I need. Let say I design a circuit according to input 110VAC and I can get 24VDC output, but when I change the input to 230VAC, the output VDC also vary. Please can you guide me how to create a constant 24VDC output with 5A, regardless of the input supply?
    Thanks and appreciated

    Ervin Yu

    Reply
  24. heyy oyvind. I tried to put capacitor in my circuit just as u did in ur video but the led still gets off without a delay. Tried it in series and Parallel, can u tell what goes wrong?? The arrangement of components are same as urs in the video!.. On it. Is written 63 v and 1microfarad

    Reply
  25. Hi Sir

    What If we use a conductive dielectric material in the capacitor for AC supply?

    The current that will through it will be the displacement current??

    Reply
  26. This is such a great explanation on the basics of capacitors.

    I really like your video example showing how a capacitor acts as a “local storage” element that will charge up in the presence of a voltage, and will discharge when that voltage is removed. What a great way to illustrate that with a LED.

    And of course, given how a capacitor works, it makes total sense to use them for decoupling and filtering.

    Thanks for putting this together.

    Mike

    Reply
  27. Great Video, thanks. I am an amature model rocketer getting back into the hobby after a 40 year hiatus and want to build a firing circuit that amplifies the 12v dc energy into a momentary surge or pulse that will ignite multiple engine clusters (if you’re familiar with the hobby) and send the model rocket skyward. Basicly you are heating up nichrome wire with resistance to generate a spark to ignite the propellant in solid fuel model rocket motors. With multiple motors you have a significant voltage drop across the circuit so the possibility of a misfire is high. I figure that if the amperage is boosted with the help of a capacitor this will solve the problem Thanks!

    Reply
  28. You did an excellent job of teaching what a capacitor is and how it works. You physical explanation was great and understandable for those of us who are visual learners. It was basic, easy to understand, engaging, with a flawless explanation. You are a good teacher.

    Reply
    • If the input is DC, it will behave like a wire without resistance at first (for a few micro- or nanoseconds). Then after a few milliseconds or seconds, it will behave like one side has no connection to the other side.

      Best,
      Oyvind

      Reply
  29. Sir, i started engg. In elecctronics.but u don’t know basics. Please send me basic electronics pdf or ebooks by mail.

    Reply
  30. Dear Sir,
    Very good article, I want to learn hardware design and software for arm processor to develop a project need guidance, please let me know how I can contact you.
    Thank you

    Reply
  31. Thanks Dear,I appreciate your efforts in educating us.
    Sir,I believe students learn easily when difficult problems are presented graphically.
    Sir, please can you explain how a capacitor work as a filter and as a Decoupler using circuit diagrams the way you did in transistor and LDR circuit explanations.
    Thanks sir as I wait for your response.

    Reply
  32. We have problem with AC voltage for microswitch, I preferred provide 0.022 Micro Farads non-electrolytic capacitor parallel to that switch to avoid leakage current in it. when we are measuring the voltage with respect to ground i am getting 170 VAC one pole at micro switch and nearly 50 VAC at other pole, so I am planning to provide capacitor in parallel to filter the voltage.
    can you tell me my idea is correct or not?

    Reply
  33. Pls, I need more explanation about; how a capacitor works when a DC current passes through it in series connection & in parallel connection. Also, when AC current does the same.

    Reply
  34. Can a capacitor on an Air conditioner work some of the time and not work some of the time? On my RV, one A/C works all the time but the other 2 work some of the time. Their fans blow but the air is not cold.

    Thank you.

    Reply
  35. How actually is the capacitor work means how the charges flow in the circuit through the air medium. What is the principle of working

    Reply
  36. Sir what happened to capacitor if we remove it from circuit at that instant?
    either it Discharges or remain constant

    Reply
  37. I understand the electrons will build up on one side. But, what about the other side – why don’t electrons build up there too?

    Reply
    • yasir

      it will not build up on the other side because of the dielectric inside the capacitor which has a high resistance.

      Reply
  38. I’m a super beginner, so this might be a stupid question, but: on your sub-woofer example, why can’t a resistor alone be used to filter out high frequencies? Why the extra step of adding a capacitor for that function?

    Thanks

    Reply
    • Sound signals are voltages that go up and down rapidly. Low frequencies move up and down slower than high frequencies.

      In the filter circuit mentioned above, when the input signal goes from low to high, the capacitor starts to charge. When it is charging, most of the current will go through the capacitor (instead of whatever is connected after the filter). When the capacitor is fully charged, the current starts flowing through whatever is connected after the filter.

      But if the signal changes from low to high, then high to low again before the capacitor has the chance to charge much (meaning it’s a high frequency), then no current flows through whatever comes after the filter.

      So high frequencies are filtered out by the capacitor.

      If on the other hand, the change from low to high and high to low happens slowly (low frequencies), so that the capacitor has more than enough time to charge, then most of the current flows through whatever is connected after the filter.

      Reply

Leave a Comment