🔬 The principle

What it means: every electric circuit has three characters. Voltage V is the push — the pump pressure that shoves charge around. Current I is the flow — how much charge passes a point each second. Resistance R is the squeeze — how hard the path fights that flow. Ohm's law is the deal between them: more push → more flow; more squeeze → less flow.

Think water pipes: a battery is a pump raising the pressure (volts), the wire is a pipe, and a resistor is a narrow section. Halve the pipe's width and only half as much water squeaks through per second. Current is the litres-per-second; voltage is the pressure behind it; resistance is how narrow the pipe is.

Why it matters in robotics: an LED is nearly a zero-ohm path — plug it straight into 5 V and I = V/R predicts a destructive current, so we always add a resistor. A stalled motor is just V divided by its winding resistance — often amps, which is why motor drivers are rated in amps and batteries sag. And battery runtime is capacity divided by the current your circuit draws. One tiny formula decides all three.

Where you see it in real engineering

Every resistor colour code you read, every fuse you pick, every voltage divider feeding a sensor pin — they are all V = IR rearranged. Electronics engineers use it a dozen times an hour; that's why the units are named after Mr Ohm and Mr Watt.

🧮 The maths

V = I × R  ·  I = V / R  ·  R = V / I  ·  P = V × I
V — voltage (volts, V) · I — current (amps, A) · R — resistance (ohms, Ω) · P — power (watts, W)
handy scale: 1 A = 1000 mA, so 0.05 A = 50 mA
Worked example: 9 V across 180 Ω → I = 9/180 = 0.05 A = 50 mA, and P = 9 × 0.05 = 0.45 W of heat and light. Try it: mode "Current", V = 9, R = 180, lamp off.

Assumptions & limitations: the resistor is ideal (linear, and it doesn't heat up or drift), the battery has no internal resistance and the wires are perfect. In this simulation the total circuit resistance includes the optional 5 Ω lamp — when the lamp is ticked, the current is I = V/(R + 5 Ω), not V/R, and the resistance tile shows R + 5. This simulation is an educational approximation of a real circuit: real resistors change with temperature and real batteries sag under load.

🕹 Simulation workspace

Controls

add a lamp (5 Ω)
The solved-for slider is locked — it moves by itself.

Readouts

Voltage—
Current—
Resistance—
Power P = V×I—
Current is fixed by V and R: double the voltage doubles the current, double the resistance halves it. Power (what actually makes heat/light) grows with the square: V×2 → P×4.
Dots = charge flowing through the wire. Their speed is the current; the lamp's brightness is the power.

📈 Graphs

The I–V line for the current total resistance is straight through the origin: double the voltage → double the current. The red dot is your circuit's operating point right now, and it always sits on the line.

🧪 Guided experiments

🏆 Engineering challenges

🌍 Real-world applications

💡 LED resistor sizingAn Arduino pin supplies 5 V; a red LED drops ~2 V and survives 20 mA. R ≥ (5−2)/0.02 = 150 Ω — the classic 220–330 Ω choices add margin.
⚙️ Motor stall currentLock a motor's shaft and I = V/Rwinding — often several amps. That number sizes your driver chip and explains battery sag.
🔋 Battery runtimeDivide capacity (mAh) by the current drawn: 2000 mAh at 100 mA ≈ 20 hours. Ohm's law sets that current through R_total.
🛡️ Fuses & wire sizingFuses blow from I²R heating: you pick them from the current a wire can survive — and every path is V = I·R_total.
🔧 Try it with hardwareBuild the classic LED circuit: LED + 330 Ω resistor, powered from an Arduino UNO R4 WiFi 5 V pin. Predicted I = (5 − 2)/330 ≈ 9 mA — confirm it with a multimeter in series.
📡 ESP32 ADC dividerTwo resistors split a voltage: Vout = V·R₂/(R₁+R₂). It's Ohm's law twice — that's how battery monitors work on ESP32 robots.

✅ Check your understanding

📌 What you discovered

➡ Engineering takeaway: before you connect anything, compute I = V/R_total — the resistor you choose is what keeps the magic smoke inside the LED.