Film vs ceramic vs electrolytic caps for smoothing

I'm a beginner in electronics, I read somewhere that it is advantageous to put a 10µf cap after my external power supply to get a more steady current/voltage flow. Some also advice using 1µf and 0.1µf caps before sensor modules and what not to smooth things out. Is this good advice?

Also, in case it is, which kind of caps? I have film (CBB polypropylene), electrolytic (chinese, so I don't trust them too much), and ceramic. I realize the anser will vary depending on what I'm making, but I thought in general and primarily to get a more steady current/voltage flow.

I've noticed the film caps have way higher max voltages than the electrolytic ones, I have heard that electrolytic caps should be run at 80% of their voltage to actually achieve their rated capacitance, thus it's better to use e.g 16V electrolytic caps in a 9V circuit than 100V electrolytic caps. Is this true? And does similiar rules exist for film and ceramic caps?

Capacitors are weird beasts. The tolerances are usually large - like 20%; you wouldn’t accept a resistor 20% below the rated value. The capacitance can change with temperature and change over time. In the worst case they can physically leak corrosive electrolyte into your project.

For filtering, the basic rule of thumb is to put 0.1uF next to every digital chip. Some chips will have specific input capacitances in the datasheet. The chip in the Arduino has several power pins around the edge and several caps required.

Beyond that, you need to know what frequencies and energies you are filtering. Small caps can absorb high frequency that the bigger caps can’t. There’s some good online textbooks but I don’t have any links with me right now.

Usually sensor modules have the necessary decoupling caps on them - though there are certainly examples of insufficiently decoupled modules (ESP8266 and NRF24's often require an extra cap on the supply). If you do, I would use a ceramic cap for this (just like you would use for decoupling).

It's generally a good idea to put a cap between power and ground on any project. If it's connected via wires to an external, regulated power supply, I'd do a somewhat larger electrolytic, 47~470. If you've got the power supply feeding a voltage regulator, the voltage regulator may have specific requirements for input caps (and almost certainly will for the output cap). Follow those guidelines!

Generally speaking, you use ceramic caps or electrolytic caps. Electrolytic caps have higher capacitance (for given size/price - at least above 10uF or so), but also higher ESR and ESL, so they don't filter high frequency noise as well as ceramics. Film caps are bulkier and more expensive; typically you'd use them for AC stuff (as they're not polarized, while most electrolytics are).

It used to be that tantalum caps were important too - they filled a spot between ceramic and electrolytic caps. In the past, they were commonly used for decoupling. But they're expensive, have a (somewhat undeserved) reputation for exploding, and are being displaced by ceramic caps as the technology has developed.

Never use an electrolytic or tantalum cap up to the limit of it's spec'ed voltage - that's begging for trouble. Really, using any component right up to the limit of it's specs is.

Two useful but a bit in depth links:
Capacitor Tutorial (Electrolytic, Tantalum, & Plastic Film)
Bypass Capacitor Tutorial

Just some random capacitor info...

A 10uF ceramic or film capacitor would be expensive. Typically, anything above 1uF is usually electrolytic or tantalum. (Tantalum caps are a type of electrolytic.)

A power supply filter capacitor would typically be 1000uF or more. Switching power supplies (that operate at higher frequencies) might use something like 100uF. An additional 10uF isn't going to do anything.

The capacitor's uF value should be within spec as along as the voltage is within spec.

You generally should leave some voltage safety margin. A 16V capacitor in a 16V circuit should be OK, but standard practice would be to use a cap rated at 25V or more.

Capacitor values usually are not critical unless you're using them in a tuned circuit or a filter circuit. In most cases you could replace a 1000uF cap with a 2000uF cap and the circuit would work fine. (But of course, you shouldn't change/substitute values unless you understand the circuit and what the cap is doing.)

Film capacitors can be made in tighter tolerances, so often you'll see film capacitors used in tuned circuits or filters.

Electrolytic capacitors don't work well at high frequencies (MHz, etc). That is, they don't "work like capacitors" at higher frequencies. That's why you'll often see a small ceramic (or film) capacitor in parallel with an electrolytic. Tantalum caps are better in this regard, but sometimes you'll see a tantalum "bypassed" with a ceramic also.

Electrolytic capacitors are polarized, but other capacitors can be connected either way. (There are non-polarized electrolytics, but I believe these are made by connecting two back-to-back capacitors in series. and they may have "poor" electrical characteristics.)

Ceramic caps are cheap up to 10uF now, at least at lowish voltages.

Talking about that, what are the opinions of disk vs. MLCC caps, given same value and voltage rating? So basically comparing this with this.

For logic decoupling ceramic caps are used due to their low inductance - nothing else is important at
those frequencies.

For decoupling at lower frequencies (such as audio amps), aluminium or tantalum electrolytics are a
good match.

For decoupling the value or stability isn't at all critical.

Plastic film caps are needed for anything where linearity or precision is needed, such as opamp
filters, audio coupling, signal conditioning before an ADC. Film capacitors are not microphonic like
ceramics, which is another reason audio circuitry uses them rather than ceramic.

For DC-DC converters the ripple-current rating and ESR becomes important, as large pulsed currents
are flowing.

For very accurate circuitry you go to exotics like PTFE film capacitors (very low dielectric absorption) or
silver-mica (bit old-school those).

To make things complicated there are two main classes of ceramic, the high value ceramics with very
poor linearity and stability, and the low value ones with extremely good stability used in RF circuitry
for tuned circuits and filters.

Basically no one capacitor type is good for every use...

Thanks for this thread everyone.

There's some useful discussion here that's missing from a lot of online articles on the subject.

+1 karma all round.