Capacitor
ceramic and electrolytic
Stores a small electric charge. In our projects it "smooths" the power supply — it absorbs short dips when a motor or WiFi suddenly draws current.
Open the course →How it works
The capacitor charges when the voltage rises and discharges when it falls — so it evens out fast changes. A ceramic (100 nF, "104") goes close to a sensor's power pins to filter noise. An electrolytic (10–470 µF) goes on the + and − rails when you have a servo/motor, so the ESP32 does not reset when the motor starts.
Pins and wiring
| Pin | What it is | Where it connects / why |
|---|---|---|
| + (electrolytic) | Longer leg, no marking | To the positive rail (3V3 / VIN). |
| − (electrolytic) | Shorter leg, white/grey stripe with "−" on the body | To GND. REVERSED POLARITY = it can pop (a small bang). Be careful! |
| Ceramic | No polarity | Either way. |
Specifications
Ceramic100 nF (marking 104), 50 V
Electrolytic10 µF – 470 µF, 16–25 V
Unit1 µF = 1000 nF = 1 000 000 pF
Tips and typical mistakes
- If the ESP32 resets when the servo starts moving → put 100–470 µF between VIN and GND.
- The capacitor's voltage rating must be HIGHER than the circuit voltage (for 5 V take 16 V).