Why these three come first
Resistors, capacitors and diodes show up in almost every small circuit. They are simple, cheap and have no moving parts. Resistors and capacitors are passive components, meaning they do not amplify or switch by themselves. Diodes are usually grouped with them for beginners even though a diode has a more active character. Learn what each does and a large share of schematics become readable.
Practice at low voltage, such as batteries or a small regulated supply. Wear eye protection when trimming leads, since cut ends can fly, and observe polarity markings, because some of these parts can fail abruptly when connected backward.
Resistors
A resistor opposes the flow of current. Its value is in ohms, and the relationship between voltage, current and resistance is Ohm’s law: voltage equals current times resistance. If you want a more careful treatment, see the article on voltage, current and resistance.
Resistors do a few common jobs.
Limiting current. An LED will draw more and more current if you connect it straight across a supply, and it can burn out. A series resistor holds the current to a safe level. As a hypothetical example, with a 5 volt supply and an LED that drops roughly 2 volts, a 330 ohm resistor allows about (5 minus 2) divided by 330, close to 9 milliamps. Real LEDs vary, so check the datasheet.
Dividing voltage. Two resistors in series split a voltage in proportion to their values. This is a way to scale a signal down for an input pin or to read some sensors.
Pulling a line to a known level. A pull-up or pull-down resistor makes sure an input has a defined value when nothing else drives it, which is why they are central to the explanation of floating inputs.
Resistors also have a power rating, often a fraction of a watt for small types. If a resistor carries too much current it gets hot, so it is worth multiplying voltage across it by current through it to estimate the heat. In the example, 3 volts times 9 milliamps is about 27 milliwatts, well within a typical small resistor’s capability.
Values are marked by colored bands or printed codes, and a multimeter can confirm them out of circuit.
Capacitors
A capacitor stores electrical charge between two plates, and its value is in farads, usually in microfarads or smaller for hobby work. It does three useful things.
Smoothing and decoupling. Placed across a supply near a chip, a capacitor supplies brief surges of current and flattens small ripples. This is why a small capacitor is often drawn next to an integrated circuit. It keeps a chip from resetting or misreading when other parts draw current suddenly.
Filtering. A capacitor lets fast changes pass more easily than steady levels. Combined with a resistor it can remove noise or debounce a switch.
Timing. A resistor and capacitor together charge and discharge at a predictable rate, so they set delays and oscillation speeds in simple circuits.
Types matter. Ceramic capacitors are small, not polarized and good for decoupling. Electrolytic capacitors hold more charge but are polarized, with a stripe on the negative side, and can vent or fail if reversed or used above their voltage rating. Always choose a voltage rating above what the circuit will apply. A charged capacitor can retain energy after power is off, and large ones in mains equipment can be dangerous, so do not open such equipment.
Diodes
A diode lets current flow mainly one way, from anode to cathode. A stripe on the body marks the cathode. A silicon diode needs roughly 0.6 to 0.7 volts across it before it conducts, though the figure varies by type.
Typical uses:
Reverse polarity protection. A diode in series with the supply stops damage if the battery is connected backward, at the cost of a small voltage loss.
Flyback protection. When a coil such as a relay or motor is switched off, it can produce a voltage spike. A diode across the coil gives that energy a path and protects the switching transistor. This matters when a transistor drives a load, as covered in the transistor switch article.
Light emission. An LED is a diode that glows. It needs a resistor and the right polarity, as the longer lead is usually the anode.
Voltage reference or clamping. Special types such as Zener diodes hold a voltage near a set value, though they have their own limits.
Choosing and checking
- Do you need to limit current? Add a resistor.
- Does a chip or load cause supply dips or noise? Add a capacitor close to it.
- Could the supply be connected backward, or could a coil produce a spike? Add a diode.
- Is polarity marked? Match it to the diagram.
Check the value, rating and polarity of each part against your plan before powering up. If something is warm to the touch immediately after turning on, disconnect the power and recheck. Many early faults come from a part in backward or a wrong value, which a methodical circuit troubleshooting pass will catch.