There are a lot of misconceptions about capacitors, so I wanted to briefly clarify what capacitance is and what capacitors do.
Capacitance measures how much energy will be stored in the electric field generated between two different points for a given difference of potential. This is why capacitance is often called the 'dual' of inductance. Inductance is how much energy a given current flow will store in a magnetic field, and capacitance is the same, but for the energy stored in an electric field (by a potential difference, rather than current).
Capacitors do not store electric charge, which is the first big misconception. They store energy. For every charge carrier you force onto one plate, a charge carrier on the opposite plate leaves. The net charge remains the same (neglecting any possible much smaller unbalanced 'static' charge that might build up on asymetrical exposed outer plates).
Capacitors store energy in the dielectric, NOT in the conductive plates. Only two things determine a capacitor's effectiveness: its physical dimensions (plate area and distance separating them), and the dielectric constant of the insulating between the plates. More area means a bigger field, closer plates mean a stronger field (since field strength is measured in Volts per meter, so the same difference of potential across a much smaller distance yields a stronger electric field).
The dielectric constant is how strong a field will be generated in a specific medium. The 'baseline' dielectric constant is \$\varepsilon\$, with a normalized value of 1. This is the dielectric constant of a perfect vacuum, or the field strength that occurs through spacetime itself. Matter has a very large impact on this, and can support the generation of much stronger fields. The best materials are materials with lots of electric dipoles that will enhance the strength of a field generated within the material.
Plate area, dielectric, and plate separation. That's really all there is to capacitors. So why are they so complicated and varied?
They aren't. Except the ones with much more than thousands of pF of capacitance. If you want such ludicrous amounts of capacitance as we mostly take for granted today, such amounts as in millions of picofarads (microfarads), and even order of magnitudes beyond, we are at the mercy of physics.
Like any good engineer, in the face of limits imposed by the laws of nature, we cheat and get around those limits anyway. Electrolytic capacitors and high capacitance (0.1µF to 100µF+) ceramic capacitors are the dirty tricks we used.
2. Electrolytic capacitors
The first and most important distinction (for which they're named for) is that electrolytic capacitors use an electrolyte. The electrolyte serves as the second plate. Being a liquid, this means it can be directly up against a dielectric, even one that is unevenly shaped. In aluminum electrolytic capacitors, this enables us to take advantage of aluminum's surface oxidation (the hard stuff, sometimes deliberately porous and dye impregnated for colours, on anodized aluminum which amounts to an insulating Sapphire coating) for use as the dielectric. Without an electrolytic 'plate' however, the unevenness of the surface would prevent a rigid metallic plate from getting close enough to gain anything advantage from using aluminum oxide in the first place.
Even better, by using a liquid, the surface of aluminum foil can be roughened, causing a large increase in effective surface area. Then it is anodized until a sufficiently thick layer of aluminum oxide has formed on its surface. A rough surface of which all will be directly adjacent to the other 'plate' – our liquid electrolyte.
There are problems, however. The most familiar one is polarity. Anodization of aluminum, if you couldn't tell by its similarity to the word anode, is a polarity-dependent process. The capacitor must always be used in the polarity that anodizes the aluminum. The opposite polarity will allow the electrolyte to destroy the surface oxide, which leaves you with a shorted capacitor. Some electrolytes will slowly eat away this layer anyway, so many aluminum electrolytic capacitors have a shelf-life. They are designed to be used, and that use has the beneficial side effect of maintaining and even restoring the surface oxide. However, with long enough disuse, the oxide can be completely destroyed. If you must use an old dusty capacitor of unsure condition, it is best to 'reform' them by applying a very low current (hundreds of µA to mA) from a constant current power supply, and let the voltage rise slowly until it reaches its rated voltage. This prevents the very high leakage current (initially) from damaging the capacitor, and slowly rebuilds the surface oxides until the leakage is hopefully at acceptable levels.
The other problem is that electrolytes are, due to chemistry, something ionic dissolved in a solvent. Non-polymer aluminum ones use water (with some other 'secret sauce' ingredients added to it). What does water do when current flows through it? It electrolyses! Great if you wanted oxygen and hydrogen gas, terrible if you didn't. In batteries, controlled recharging can reabsorb this gas, but capacitors do not have an electrochemical reaction that is reversed. They're just using the electrolyte as a thing that is conductive. So no matter what, they generate minute amounts of hydrogen gas (the oxygen is used to build up the aluminum oxide layer), and while very small, it prevents us from hermetically sealing these capacitors. So they dry out.
The standard useful life at maximum temperature is 2,000 hours. That's not very long. Around 83 days. This is simply due to higher temperatures causing the water to evaporate more quickly. If you want something to have any longevity, it is important to keep them as cool as possible, and get the highest endurance models (I've seen ones as high as 15,000 hours). As the electrolyte dries out, it becomes less conductive, which increases ESR, which in turn increases heat, which compounds the problem.
Tantalum capacitors are the other variety of electrolytic capacitors. These use manganese dioxide as their electrolyte, which is solid in its finished form. During production, manganese dioxide is dissolved in an acid, then electrochemically deposited (similar to electroplating) onto the surface of tantalum powder which is then sintered. The exact details of the 'magic' part where they create an electrical connection between all the tiny pieces of tantalum powder and the dielectric is not known to me (edits or comments are appreciated!) but suffice it to say, tantalum capacitors are made from tantalum because of a chemistry that permits us to easily manufacture them from a powder (high surface area).
This gives them terrific volumetric efficiency, but at a cost: the free tantalum and manganese dioxide can undergo a reaction similar to thermite, which is aluminum and iron oxide. Only, the tantalum reaction has much lower activation temperatures - temperatures that are easily and quickly achieved should opposite polarity or an overvoltage event punch a hole through the dielectric (tantalum pentoxide, much like aluminum oxide) and create a short. This is why you see tantalum capacitors voltage and current derated by 50% or more. For those unaware of thermite (which is a lot hotter but still not dissimilar to the tantalum and MnO2 reaction), there is a ton of fire and heat. It is used to weld railroad rails to each other, and it does this task in seconds.
There are also polymer electrolytic capacitors, which use conductive polymer that, in its monomer form, is a liquid, but when exposed to the right catalyst, will polymerize into a solid material. This is just like super glue, which is a liquid monomer that polymerizes solid once it is exposed to moisture (either in/on the surfaces it is applied to, or from the air itself). In this way, polymer capacitors can be mostly a solid electrolyte, which results in reduced ESR, greater longevity, and generally better robustness. They still have some small amount of solvent in the polymer matrix however, and it is needed to be conductive. So they still dry out. No free lunch sadly.
Now, what are the actual electrical properties of these types of capacitors? We already mentioned polarity, but the other is their ESR and ESL. Electrolytic capacitors, due to being constructed as a very long plate wound into a coil, have relatively high ESL (equivalent series inductance). So high in fact, that they are completely ineffective as capacitors above 100kHz, or 150kHz for polymer types. Above this frequency, they are basically just resistors that block DC. They won't do anything to your voltage ripple, and instead will make the ripple be equal to the ripple current multiplied by the capacitor's ESR, which can often make ripple even worse. Of course, this means any sort of high frequency noise or spike will just shoot right through an aluminum electrolytic capacitor like it wasn't even there.
Tantalums are not quite as bad, but they still lose their effectiveness with medium frequencies (the best and smallest ones can almost hit 1MHz, most lose their capacitive characteristic around 300–600kHz).
All in all, electrolytic capacitors are great for storing a ton of energy in a small space, but are really only useful for dealing with noise or ripple below 100kHz. If not for that critical weakness, there would be little reason to use anything else.
3. Ceramic Capacitors
Ceramic capacitors use a ceramic as their dielectric, with metallization on either side as the plates. I will not be going into Class 1 (low capacitance) types, but only class II.
Class II capacitors cheat using the ferroelectric effect. This is very much akin to ferromagnetism, only with electric fields instead. A ferroelectric material has a ton of electric dipoles that can, to some degree or another, be oriented in the presence of an external electric field. So the application of an electric field will pull the dipoles into alignment, which requires energy, and causes a massive amount of energy to ultimately be stored in the electric field. Remember how a vacuum was the baseline of 1? The ferroelectric ceramics used in modern MLCCs have a dielectric constant on the order of 7,000.
Unfortunately, just like ferromagnetic materials, as a stronger and stronger field magnetizes (or polarizes in our case) a material, it begins running out of more dipoles to polarize. It saturates. This ultimately translates into the nasty property of X5R/X7R/etc type ceramic capacitors: their capacitance drops with bias voltage. The higher the voltage across their terminals, the lower their effective capacitance. The amount of energy stored is still always increasing with voltage, but it is not nearly so good as you would expect based on its unbiased capacitance.
Voltage rating of a ceramic capacitor has very little effect on this. In fact, the actual withstanding voltage of most ceramics is much higher, 75 or 100V for the lower voltage ones. In fact, many ceramic capacitors I suspect are the exact same part but with different part numbers, the same 4.7µF capacitor being sold as both a 35V and 50V capacitor under different labels. The graph of some MLCCs' capacitance vs. bias voltage is identical, save for the lower voltage one having its graph truncated at its rated voltage. Suspicious, certainly, but I could be wrong.
Anyway, buying higher rated ceramics will do nothing to combat this voltage related capacitance falloff, the only factor that ultimately plays a role is the physical volume of the dielectric. More material means more dipoles. So physically larger capacitors will retain more of their capacitance under voltage.
This is also not a trivial effect. A 1210 10µF 50V ceramic capacitor, a veritable beast of a capacitor, will lose 80% of its capacitance by 50V. Some are a little better, some are a little worse, but 80% is a reasonable figure. The best I have seen was a 1210 (inches) keep about 3µF of capacitance by the time it hit 60V, in a 1210 package anyway. A 10µF 1206 (inches) sized 50V ceramic will be lucky to have 500nF left by 50V.
Class II ceramics are also piezoelectric and pyroelectric, though this doesn't really impact them electrically. They have been known to vibrate or sing due to ripple, and can act as microphones. Probably best to avoid using them as coupling capacitors in audio circuits.
Otherwise, ceramics have the lowest ESL and ESR of any capacitor. They're the most 'capacitor-like' of the bunch. Their ESL is so low that the primary source is the height of the end terminations on the package itself Yes, that height of an 0805 ceramic is the main source of its 3 nH of ESL. They still behave like capacitors into the many MHz, or even higher for specialized RF types. They also can decouple a lot of noise, and decouple very fast things like digital circuits, things electrolytics are useless for.
In conclusion, electrolytics are:
- lots of bulk capacitance in a tiny package
- terrible in every other way
They are slow, they wear out, they catch fire, they will turn into a short if you polarize them wrong. By every criteria capacitors are measured by, save for capacitance itself, electrolytics are absolutely terrible. You use them because you have to, never because you want to.
- Unstable and lose a lot of their capacitance under voltage bias
- Can vibrate or act as microphones. Or nanoactuators!
- Are otherwise awesome.
Ceramic capacitors are what you want to use, but aren't always able to. They actually behave like capacitors and even at high frequencies, but can't match the volumetric efficiency of electrolytics, and only Class 1 types (which have very small amounts of capacitance) are going to have a stable capacitance. They vary quite a bit with temperature and voltage. Oh, they also can crack and are not as mechanically robust.
Oh, one last note, you can use electrolytics just fine in AC/non-polarized applications, with all their other problems still in play of course. Just connect a pair of regular polarised electrolytic capacitors, with same polarity terminals terminals together, and now the opposite polarity ends are the terminals of a brand new, non-polar electrolytic. As long as their capacitance values are fairly well-matched and there is limited amount of steady state DC bias, the capacitors seem to hold out in use.