This guide to capacitors for beginners aims to give you all the knowledge you need for Raspberry Pi and Arduino projects.
Capacitors are made to store an electric charge, comparison to a rechargeable battery is often mentioned. It takes some time to charge the capacitor, then the energy is stored until it’s release. That’s the very basic way of describing what it does. Generally, it takes the same amount of time to charge a capacitor and to discharge it. When the component is being charged, the voltage starts to increase, a spike in voltage is not linear, and the more energy is stored, the slower voltage (and charge) increases.
Capacitors respond differently to DC and AC power. When DC is applied to the capacitor in series (coupling), it will charge up, and upon reaching its capacitance no current will be passed through (see leakage below though). If AC is applied, the capacitor will attempt to even out the voltage spikes by releasing stored charge. Instead of retyping it’s all here I found an excellent explanation describing DC/AC behaviour here.
The capacity of the component is expressed in farads (F), other characteristics include maximum voltage we can drop across the pins, leakage – which tells us how much current can go through the component causing the capacitor to drain it. Resistance especially in series (ESR) this value is generally small but can add up when multiple capacitors are used, and tolerance which like in resistors tells us how precise is the capacitor’s specification.
One of the most popular capacitors. Comes in a compact size, and small capacitance. On the plus side, the component suffers very little ESR and leakage. Ceramic capacitors are well suited for high freq coupling and decoupling applications. It’s worth mentioning that these are usually bi-directional, not suffering from the polarity limitations.
The biggest advantage of electrolytic capacitors is the ability to store a big charge and deal with high voltages. The high capacitance also means that the component is polarized and need to be placed in the circuit accordingly. Longer pin is the anode, capacitor often is labeled accordingly as well. Failing to adhere to correct placement will end up with an explosion and a shorted circuit. The disadvantage of these is leakage, which means they are not ideal for charge storage, but very useful to deal with high voltage applications.
What’s so super about these you ask? Created to store as much charge as possible, the tradeoff here is the low voltage. To overcome this limitation, these capacitors are used in series to be able to deal with bigger voltages.
Capacitors are passive components, ceramic ones are bidirectional, while electrolytic are polarized and need to be placed accordingly to avoid spectacular failure!
I’m going to skip the technical calculations, as in real situations we will be either looking for a specific capacitance needed, or checking if the current capacitance and voltage will allow us to continue. The relation between charge stored (Q), voltage (V) and capacitance is as follows:
You will quickly notice that in any given capacitor (known and fixed capacitance (C)) stored charge will depend on the value of voltage dropped across the component. So one 1F (farad) would be the ability to store 1 unit of energy per volt.
Knowing this dependency – we can introduce the current.
i = C*(dV)/(dt)
In a situation where the voltage is steady, dV is essentially 0V and no current is flowing through the capacitor.
As you probably know by know components act differently based on a circuit design. Capacitors behave exactly opposite to resistors when placed in series or parallel.
1/Ctot = 1/C1+1/C2+1/C3
Similarly, if you have 2 capacitors you can use the easier way to calculate the total capacitance:
Ctot = C1*C2/(C1+C2)
As mentioned before putting resistors in series allows us to increase the voltage we can put through the capacitors, so if C1 and C2 are able to deal with 2V each, the total voltage in the circuit could reach up to 4V.
Storing and releasing charge can be used to stabilize and even out the voltage spikes. This configuration allows using the capacitors as buffer negating high-frequency noise, taking the small excess voltage, and releasing it back during the voltage drops. This helps to protect sensitive modules like ICs. Since only high frequencies can run through the capacitors, there is no risk in creating the short between VCC and GND. For best decoupling performance, capacitors should be placed as close as possible to the module we are trying to protect.
Power Supply Filtering
We already know from this article that diodes can be used as a bridge rectifier to change the AC into DC. adding a parallel capacitor to the mix we can level the voltage spikes and provide a much more steady stream of power.
Energy Storage and Supply
I have mentioned this before, capacitors aren’t as efficient as batteries however they can release the charge much quicker. This particular behaviour is used to power up a camera flash, which requires a short burst of energy. After the discharge capacitor needs only a few moments to recharge again. Another advantage of the capacitor over the battery is the charging cycles. Capacitors are very resistant to the damage caused by charge and discharge cycles.
Since capacitors respond uniquely to different frequencies, we can use them to block the low frequencies or DC signal while allowing high-end output to go through. This is used in radio applications or even speakers where a capacitor is used as a passive crossover making sure that high-end output of the music signal is never passed over to the subwoofer.
To avoid sometimes catastrophic failures when working with capacitors you should always use components with a higher tolerance than required by the circuit. Voltage spikes can be deadly to your capacitors and entire boards or components. This is why you should always check the working limits of your capacitors against the calculated and expected voltages. Process this is called de-rating.
This should give you a great start to your projects. If you think something else should be included in the capacitors for beginners guide let me know in the comments.