One idea runs through everything: a voltage — electrical "pressure" — pushes charge through materials. From that single root grow Ohm's law, Kirchhoff's conservation laws, dividers, Thévenin reduction, and — once we let the pressure oscillate — reactance, impedance, and resonance. This is the analytical toolkit the whole book runs on.
You have a fresh 9 V battery and a microcontroller whose input pin is rated for exactly 5 V. Wire the battery straight to the pin and you push 9 V across a part built for 5 — the magic smoke escapes and the chip is dead. You do not have a 5 V battery. What you do have is a drawer full of resistors.
Can two ordinary resistors turn 9 V into 5 V? They can. The arrangement is called a voltage divider, and it is the single most-used circuit pattern in all of electronics. But the divider also hides a trap: the moment your microcontroller actually draws current, the carefully-tuned 5 V quietly sags. Understanding exactly why — and how much — requires the entire chapter ahead.
Here is the idea in one line. Stack two resistors R1 and R2 across the 9 V supply. The current that flows is the same through both (they are in series). Each resistor "drops" a share of the 9 V in proportion to its resistance. Tap the junction between them, and you read out whatever fraction R2 claims:
To get 5 V from 9 V we need R2/(R1+R2) = 5/9 = 0.556. Pick a convenient R2 = 10 kΩ and solve for the top resistor:
Check: Vout = 9 · 10000 / (8000 + 10000) = 9 · 10000/18000 = 9 · 0.5556 = 5.0 V. It works. Drag the sliders below and hunt for the 5 V output yourself.
Two resistors across a 9 V supply. Adjust R1 (top) and R2 (bottom). The tap voltage Vout is shown live. Goal: land on 5.00 V. Hint: R1 ≈ 8 kΩ with R2 = 10 kΩ.
Before voltage can push anything, there has to be something to push. That something is electric charge, carried in metals by electrons. Charge is measured in coulombs (C). A single electron carries a tiny negative charge of −1.602×10−19 C, so one coulomb is a staggering 6.24×1018 electrons — about six billion billion of them.
Current is simply the rate at which charge flows past a point. If a charge ΔQ passes in a time Δt, the current is:
So 1 A = 6.24×1018 electrons streaming past every second. Current is to charge what flow rate (litres per second) is to water (litres). The unit, the ampere, is named for André-Marie Ampère.
An LED draws 20 mA = 0.020 A. How much charge moves through it in one minute, and how many electrons is that?
Electrons: 1.2 C ÷ 1.602×10−19 C/electron = 7.5×1018 electrons in one minute — through a part the size of a lentil.
Benjamin Franklin guessed (wrong, as it turned out) that the moving charges were positive, and defined conventional current as flowing from + to −. Electrons actually drift the other way, from − to +. We have kept Franklin's convention for 250 years because the math comes out identical — just remember the two run opposite. Every arrow in this book points the conventional way.
Set a current and a time interval. The widget computes the charge transferred and the electron count, and animates carriers drifting past a cross-section. Notice how doubling the current doubles the flow density.
| Device / situation | Typical current |
|---|---|
| Indicator LED | ~20 mA |
| Smartphone (active) | ~200 mA |
| 100 W incandescent bulb (120 V) | ~0.8–1 A |
| Car starter motor | ~200 A |
| Lightning strike (peak) | ~30,000 A |
| Dangerous through the heart | 100 mA – 1 A |
Charge will sit perfectly still forever unless something urges it to move. That urge is voltage — more precisely, a potential difference. Voltage measures how much energy each coulomb of charge gains or loses moving between two points:
A 9 V battery means: every coulomb that travels from the + terminal to the − terminal through your circuit delivers 9 joules of energy. Voltage is named for Alessandro Volta, inventor of the first chemical battery.
Picture a closed loop of pipe with a pump. The pump is the battery: it raises water to high pressure. Pressure difference is voltage. Flow rate is current. A narrow constriction in the pipe is resistance. Crucially, voltage is always a difference between two points — just as pressure only means something relative to somewhere else. There is no such thing as "the voltage at one point" until you pick a reference.
That reference is called ground (or 0 V). By convention we plant a flag, declare it 0 V, and measure every other node relative to it. Ground is not a magical sink — it is just the agreed-upon zero of the pressure scale, like sea level for altitude.
A 9 V battery pushes 1.2 C through a circuit (our LED-for-a-minute from Chapter 1). How much energy did it deliver?
That energy ends up as light and heat in the LED. The battery's chemistry supplied it.
Three nodes at fixed potentials. Move the ground reference between them and watch every node voltage relabel. The differences never change — only the labels do. That is what "voltage is relative" means.
Push charge through a material and the material pushes back. That opposition is resistance, measured in ohms (Ω). Georg Ohm discovered the beautifully simple relationship binding voltage, current, and resistance — the most important equation in this book:
One ohm is the resistance that lets exactly 1 A flow when 1 V is applied. Bigger R means more push needed for the same flow — a narrower pipe. Ohm's law is the lever you pull on constantly: know any two of V, I, R and the third falls out.
A resistor's value depends on what it is made of and its dimensions. The intrinsic "stickiness" of a material is its resistivity ρ (rho, in Ω·m). A wire of length L and cross-section A has:
Longer = more resistance (longer pipe). Fatter = less resistance (wider pipe). Copper's resistivity is about 1.72×10−8 Ω·m — conductors sit near 10−8, insulators near 1014. That is a span of twenty-two orders of magnitude, the widest range of any common physical property.
Heat a metal and its atoms jiggle harder, scattering electrons more — resistance rises. The linear approximation:
where α is the temperature coefficient. This is exactly how a resistance-temperature sensor works, and why a cold incandescent filament draws a big inrush current the instant you switch it on.
An LED needs about 2 V across it and 20 mA through it, fed from 9 V. The series resistor must drop the leftover 9 − 2 = 7 V while carrying 0.020 A:
Set the voltage across a resistor and its resistance. Current I = V/R and power P = V·I are computed live and shown as bars. The resistor body glows hotter (orange → red) as dissipated power rises — this is real Joule heating.
Voltage is energy per charge; current is charge per second. Multiply them and the charges cancel, leaving energy per second — that is power, measured in watts (W):
Substituting Ohm's law gives two more forms, all equal, each handy when you happen to know a different pair of quantities:
The form P = I2R is special: it says heat dissipation grows with the square of current. Double the current and you quadruple the heat. This is Joule heating — the unavoidable conversion of electrical energy into thermal energy whenever current passes through resistance. It is the principle behind every toaster, kettle, and incandescent bulb, and the reason fat wires carry big currents without melting.
Back to our 350 Ω LED resistor carrying 20 mA. How much heat must it shed?
A standard 1/4 W (0.25 W) resistor handles this with margin. Had we wanted 200 mA, the heat would be 100× larger (0.04×350 = 14 W) and would need a chunky power resistor on a heatsink. The square law bites hard.
A 12 V device draws 8.3 A. Its power consumption:
Set voltage and current; watch all three power formulas agree and the implied resistance. The bar fills toward the resistor's power rating — cross it and the component overheats (red zone).
Real circuits have many resistors. Two simple rules collapse any ladder of them into a single equivalent — and those rules follow directly from the conservation laws we will name properly in Chapter 7.
Resistors are in series when they form a single chain with no branches — the same current must flow through every one (charge has nowhere else to go). Their resistances simply add:
The supply voltage divides among them in proportion to their values — which is exactly the voltage divider from Chapter 0. Three 1 kΩ resistors in series make 3 kΩ.
Resistors are in parallel when both ends connect to the same two nodes — each sees the full voltage, and the total current splits among them. Here the reciprocals add:
The crucial intuition: parallel resistance is always smaller than the smallest resistor. Adding another path can only make it easier for current to flow. Two equal resistors in parallel give exactly half their value.
As promised, 571 Ω is less than the smallest member (1 kΩ). And two equal 1 kΩ in parallel: R = (1000·1000)/(2000) = 500 Ω, exactly half.
Three resistors. Toggle between series and parallel wiring and watch the equivalent resistance recompute. The schematic redraws to match. Confirm: series sums, parallel falls below the smallest.
We can finally close the loop on Chapter 0. With R1 = 8 kΩ and R2 = 10 kΩ the divider reads a clean 5.0 V — as long as nothing is connected to the tap. The instant your microcontroller pin actually draws current, reality intrudes.
Your load (call it RL) appears in parallel with R2. From Chapter 5, parallel resistance is always smaller than either resistor alone. So R2 effectively shrinks, it now claims a smaller share of the supply, and Vout drops below 5 V. The lighter the load (bigger RL), the less the sag.
Load RL = 20 kΩ parallels R2 = 10 kΩ:
Our perfect 5 V collapsed to 4.09 V — an 18% error — just from a modest load. A heavier load (smaller RL) would be even worse.
Designers tame loading with a simple rule: make the divider's current at least 10× the load current, equivalently keep R1, R2 roughly ≤ RL/10. Stiffer (lower-value) dividers waste more power but hold their voltage. A divider is a reference, not a power source — for real current, you follow it with a transistor or a voltage regulator (Chapter 11).
The 9→5 V divider. Toggle the load on, then drag RL. Watch Vout sag away from 5 V as the load gets heavier. The meter turns red when the error exceeds 10%.
Ohm's law handles one resistor at a time. To analyze a whole network we need two conservation principles, stated by Gustav Kirchhoff. They are nothing more than "charge is conserved" and "energy is conserved," dressed for circuits — and every series/parallel rule you have met is a special case of them.
At any junction (node), charge cannot pile up or vanish, so:
Water-pipe version: whatever flows into a T-junction must flow out. If 3 A enters a node and one branch carries 1 A away, the other branch must carry exactly 2 A. This is why parallel branch currents add up to the total.
Walk around any closed loop and the voltage rises and drops must cancel — you return to where you started at the same potential:
The battery raises potential; each resistor drops it. KVL says the sum of the resistor drops equals the battery rise. This is why series voltages add — and it is the engine of the voltage divider.
A 9 V battery in series with R1 = 8 kΩ and R2 = 10 kΩ (our divider). KCL: the same current I flows through both (one loop, one current). KVL around the loop:
Then the drop across R2 is VR2 = I·R2 = 0.0005·10000 = 5.0 V — the divider formula, derived from Kirchhoff rather than memorized. Check: VR1 = 0.0005·8000 = 4.0 V, and 4.0 + 5.0 = 9.0 V. KVL closes.
A node with two currents flowing in and one branch out. KCL fixes the second outgoing branch automatically. Drag the inputs; the dependent branch always balances so ∑in = ∑out.
Suppose you face a tangled box of batteries and resistors with just two wires sticking out. You want to know how it behaves when you hook up a load. Must you re-solve the whole mess for every load? No. Two theorems let you replace any linear two-terminal network with a trivially simple equivalent.
Any linear network of sources and resistors, seen from two terminals, behaves exactly like a single voltage source VTh in series with a single resistor RTh.
The dual statement: the same network equals a single current source IN in parallel with a resistor RN. The two are interchangeable:
The 9 V / 8 kΩ / 10 kΩ divider seen from its output terminals:
So the divider is a 5 V source with 4.44 kΩ of internal resistance. Now reconnect that 20 kΩ load — it forms a divider with RTh:
Exactly the loaded value we computed the hard way in Chapter 6 — now it falls out in one line. That is the power of Thévenin: the loading sag is just the divider formed by RTh and RL.
When several sources act at once in a linear circuit, the response is the sum of the responses to each source acting alone (others zeroed). Analyze one source at a time, then add. It turns a multi-source headache into several easy single-source problems.
A Thévenin source VTh behind RTh feeding a load RL. Watch terminal voltage vs. delivered current as the load varies — the classic drooping source characteristic. Maximum power transfer occurs at RL = RTh.
Everything so far assumed a steady, one-direction DC (direct current). But the wall socket, radio signals, and audio all use AC (alternating current) — voltage that swings positive and negative, over and over, tracing a sine wave. Generalizing our toolkit to AC is the gateway to the entire second half of electronics.
An AC voltage is fully described by three numbers: its peak amplitude VP, its frequency f (cycles per second, hertz), and its phase φ (where in the cycle it starts):
The period T is the time for one full cycle, and f = 1/T. The angular frequency ω = 2πf packages the 2π for convenience. A 60 Hz mains supply repeats every T = 1/60 = 16.7 ms.
An AC voltage spends as much time negative as positive, so its average is zero — useless. What we want is the value that delivers the same heating power as an equivalent DC voltage. That is the root-mean-square (RMS) value. For a sine wave it works out to a clean factor:
A "120 VAC" outlet quotes the RMS value (because RMS is what determines heating and what your meter reads). Its actual peak swing is much larger:
So that outlet really swings between +170 V and −170 V, 60 times a second. The 120 V figure is the DC-equivalent for power. This is why mains insulation must be rated well above 120 V.
Build a sinusoid: set amplitude, frequency, and phase. The dashed lines mark ±VRMS = 0.707·VP. Toggle a second wave to see phase difference. Read off the period as 1/f.
Resistors burn energy. The two remaining passive components — capacitors and inductors — instead store energy and give it back, and they do something a resistor never does: they care about how fast the voltage or current is changing. This is where time and frequency enter.
A capacitor stores charge on two plates. Charge stored is proportional to voltage, the constant being capacitance C (farads):
The second form is the whole story: current flows only when voltage is changing. A capacitor resists sudden voltage changes — it takes time to charge. Put a resistor in series and the voltage approaches the supply along an exponential curve governed by the time constant τ:
R = 100 kΩ, C = 10 µF:
After one τ the capacitor reaches 63.2% of the supply; after 2τ, 86.5%; after 3τ, 95%; after 5τ it is essentially full (>99%). Those percentages are universal — they come from e−1, e−2, … and never change.
An inductor (a coil) stores energy in a magnetic field. Its defining law is the mirror image of the capacitor's:
An inductor resists sudden current changes. Inductance L scales with the square of the number of turns (L ∝ N²).
Under AC, "how hard is it to push current" becomes reactance X (ohms), and it depends on frequency:
A capacitor's reactance falls with frequency (it passes high frequencies, blocks DC). An inductor's reactance rises with frequency (it passes DC, blocks high frequencies). They are exact opposites.
Set R and C; τ = RC updates. Press Charge or Discharge to animate VC(t). Dotted markers sit at 1τ (63%), 2τ (86.5%), 3τ (95%), 5τ (99%). The vertical line sweeps with real time scaled to τ.
We have a frequency-independent resistance R and two frequency-dependent reactances XC and XL that move in opposite directions. Impedance Z unifies them — it is the total opposition to AC, combining resistance and net reactance. Because resistive and reactive effects are 90° out of phase, they combine like the sides of a right triangle:
Since XC falls with frequency and XL rises, there is exactly one frequency where they are equal. There the net reactance XL − XC is zero, they cancel completely, and the circuit is purely resistive. This special frequency is resonance f0:
L = 5 µH, C = 35 pF:
This is precisely how a radio tunes: change C (the tuning knob) and you move f0 to select a station. The sharpness of the peak is the quality factor Q = X/R — high Q means a narrow, selective resonance.
The payoff sim. XC (teal, falling) and XL (orange, rising) plotted against frequency on a log axis. Their crossing is resonance f0. Drag L and C to move it; drag R to see |Z| (purple) and its dip at f0. Toggle the |Z| trace and the resonance marker.
Every key equation from this chapter, in one place:
| Concept | Equation | In one sentence |
|---|---|---|
| Current | I = ΔQ/Δt | Charge per second; 1 A = 1 C/s. |
| Voltage | V = E/Q | Energy per coulomb; 1 V = 1 J/C. |
| Ohm's law | V = I·R | The master relation between push, flow, opposition. |
| Resistivity | R = ρL/A | Resistance from material and shape. |
| Power | P = VI = I²R = V²/R | Energy per second; heat goes as I². |
| Series R | R = R1+R2+… | Same current, resistances add. |
| Parallel R | 1/R = ∑1/Ri | Same voltage; always below the smallest. |
| Divider | Vout = VinR2/(R1+R2) | Voltage splits by resistance ratio. |
| KCL / KVL | ∑Iin=∑Iout; ∑Vloop=0 | Charge and energy conserved. |
| Thévenin | VTh, RTh = R series | Any 2-terminal box = source + resistor. |
| Norton | IN = VTh/RTh | The current-source dual of Thévenin. |
| AC | V(t)=VPsin(2πft+φ) | f = 1/T; ω = 2πf. |
| RMS | VRMS = VP/√2 | The DC-equivalent heating voltage (0.707·peak). |
| Capacitor | Q=CV; I=C·dV/dt | Fights voltage change; passes high f. |
| RC constant | τ = RC | 63% in 1τ, >99% in 5τ. |
| Inductor | V=L·dI/dt; τ=L/R | Fights current change; passes low f. |
| Reactance | XC=1/(2πfC); XL=2πfL | AC opposition; opposite slopes. |
| Impedance | |Z|=√(R²+X²) | Total AC opposition. |
| Resonance | f0=1/(2π√LC) | Where XL=XC and they cancel. |
You can now turn 9 V into 5 V, predict when it sags, collapse any network to a source-plus-resistor, and follow a signal from DC steadiness all the way to resonance. Chapter 3 hands you the real components to build with.