Capacitors, diodes, transistors
9 min read
These three small parts appear in nearly every project. One stores charge, one is a one-way valve, and one is an electronic switch.
Capacitor: a tiny tank
A capacitor stores charge and releases it quickly. When a motor starts and the supply dips, the capacitor fills the gap.
- 100 nF beside a chip removes fast noise.
- 470 µF across a servo supply handles sudden current.
Round electrolytic capacitors have a minus stripe, and they can burst if fitted backwards. Pick a voltage rating well above your supply.
Diode: a one-way valve
Current flows only from the anode to the cathode, which is the end with the stripe. An LED is a diode that gives light.
Motors, pumps, relays and valves contain coils. When a coil switches off it throws back a sharp voltage spike. A diode across the coil, with the stripe towards plus, gives that spike a safe path. This is called a flyback diode, and you will see it in our pump and valve wiring.
Transistor: a small signal controls a big load
A board pin can give only a small current, which is not enough for a motor. A MOSFET solves this. The pin controls the gate, and the MOSFET switches the heavy current through the load.
- Connect the load between the supply and the MOSFET.
- Connect the MOSFET source to ground.
- Connect a 220 Ω resistor from the pin to the gate.
- Connect a 10 kΩ resistor from the gate to ground, so the load stays off during start-up.
Choose a logic-level MOSFET. It turns fully on at 3.3 V or 5 V.
Quick quiz
1. Which way does the stripe of a flyback diode face?
2. What happens to an electrolytic capacitor fitted backwards?
3. Why use a MOSFET with a motor?