Resistors

Resistors are the most common component in electronics. They resist current flow, and by controlling current you can control voltage drops, set bias points, protect other components, and build voltage dividers. Understanding resistors well means understanding a huge portion of circuit behavior.

Types

  • Fixed resistors — the standard kind, a specific resistance value. Carbon film, metal film, wirewound. Metal film is the default for most signal work — better tolerance and lower noise than carbon film.
  • Potentiometers (pots) — adjustable resistance via a wiper. Used for volume controls, tuning, and anywhere you need a user-adjustable value.
  • Trimmers — small potentiometers meant for one-time or infrequent adjustment, usually set with a screwdriver.
  • Thermistors (NTC/PTC) — resistance changes with temperature. NTC (negative temperature coefficient) resistance drops as temperature rises. Used for temperature sensing and inrush current limiting.
  • Photoresistors (LDRs) — resistance drops with increasing light. Cheap and slow, good enough for simple light-sensing applications.

Reading the Color Code

Through-hole resistors have colored bands that encode the resistance value. The standard 4-band code:

Band 1: First digit
Band 2: Second digit
Band 3: Multiplier (number of zeros)
Band 4: Tolerance (gold = ±5%, silver = ±10%)

Colors → digits:
Black  0    Green  5
Brown  1    Blue   6
Red    2    Violet 7
Orange 3    Gray   8
Yellow 4    White  9

Multiplier special cases:
Gold   = ×0.1
Silver = ×0.01

Example: Brown-Black-Red-Gold = 1, 0, ×100, ±5% = 1000Ω (1kΩ) ±5%

In practice, just use a multimeter to measure — it's faster and more accurate than reading color bands under poor lighting.

Standard Values

Resistors don't come in every value. The E12 series (12 values per decade, ±10% tolerance) and E24 series (24 values, ±5%) are what you'll find at most suppliers. E96 and E192 for precision work. When you calculate a needed resistance, round to the nearest standard value:

E12 preferred values (×1, ×10, ×100, etc.):
1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2

Common Applications

Current Limiting

The most common use — protect an LED or other component from too much current:

Supply: 5V
LED forward voltage: 2V
Desired current: 20mA

R = (V_supply - V_LED) / I
R = (5V - 2V) / 0.02A = 150Ω

Use a 150Ω or 180Ω resistor.

Voltage Divider

Two resistors in series divide a voltage proportionally:

       Vin
        |
       [R1]
        |
       Vout ← measured here
        |
       [R2]
        |
       GND

Vout = Vin × R2 / (R1 + R2)

Example: Vin=12V, R1=10kΩ, R2=10kΩ
Vout = 12V × 10k / (10k + 10k) = 6V

Voltage dividers only work well when the load impedance is much higher than the divider resistance. If you draw significant current from Vout, the ratio changes.

Pull-up and Pull-down

Ensures a digital pin has a defined state when nothing is actively driving it:

Pull-up: resistor from VCC to the pin → pin reads HIGH by default
Pull-down: resistor from pin to GND → pin reads LOW by default

Typical values: 4.7kΩ to 10kΩ

Power Rating

Resistors have a maximum power they can dissipate before overheating. Common ratings: 1/8W, 1/4W, 1/2W, 1W, 2W. Calculate power dissipation and then choose a resistor rated well above that:

P = I² × R   or   P = V² / R   or   P = V × I

If 100mA flows through a 47Ω resistor:
P = (0.1)² × 47 = 0.47W → use a 1W resistor minimum