Ohm's Law + Power
The First Equation That Lets a Circuit Answer Back
A resistor is a boring part until it saves your microcontroller.
Put an LED straight across 3.3 V and the circuit asks for as much current as the source, wire and LED can manage. Add one small resistor and the chaos becomes a number you can choose. That is the first magic trick of electronics: turn danger into arithmetic.
Ohm's law is often taught as a triangle to memorize. That undersells it. Ohm's law is the first compact model that lets you predict what a circuit will do before you build it, then check whether the real board agrees.
By the end, you can
- Explain voltage, current and resistance as a cause-and-effect relationship
- Use $V = IR$ to compute any one quantity from the other two
- Compute electrical power with $P = VI$, $P = I^2R$ and $P = V^2/R$
- Use current and power ratings to decide whether a resistor, LED or GPIO pin is safe
Pressure, flow and the narrow pipe
Voltage is the push. Current is the flow. Resistance is how hard the path pushes back. The water analogy is imperfect, but it is good enough for the first mental picture: raise the pressure and more flow moves through the same restriction; make the restriction tighter and less flow moves for the same pressure.
Ohm's law writes that picture in one line:
where is voltage in volts, is current in amps and is resistance in ohms. Rearrange it depending on what you know:
That second form, , is the one you will use constantly. Put 3.3 V across 1000 ohms and the current is 0.0033 A, or 3.3 mA. Put the same voltage across 100 ohms and the current is ten times larger. The source did not become more aggressive. You gave it an easier path.
Power is where the heat appears
Current tells you how much charge moves. Voltage tells you how much energy each unit of charge gives up. Multiply them and you get power:
Power is energy per second. In a resistor, that energy becomes heat. That is why a tiny resistor can burn even when the voltage looks harmless. Use Ohm's law to write power in two other useful forms:
The first form, , is the one that should make you cautious. Double the current and you get four times the heat. That square law will come back in cable losses, MOSFET conduction loss, motor windings and thermal design.
A 3.3 V pin drives a resistor of 1 kΩ to ground. What current flows?
-
Correct. $I = V/R = 3.3/1000 = 0.0033$ A, which is 3.3 mA.
-
That would require a resistance of about 10 ohms, not 1000 ohms.
-
That is off by a factor of ten. Check the conversion from amps to milliamps.
-
A kiloamp is not plausible for a microcontroller pin and a 1 kΩ resistor.
Drive the law yourself
Move the voltage and resistance sliders. Watch the current and power readouts, then push into the warning zones. The demo is deliberately simple because the idea is supposed to become mechanical in your hands.
Try these moves:
- Hold resistance at 1000 ohms and raise voltage from 3.3 V to 6.6 V. Current doubles.
- Now drop resistance from 1000 ohms to 500 ohms. Current doubles again.
- Watch power while current doubles. It rises faster than your intuition wants.
The LED resistor is the first real design
An LED is not a resistor. Once it turns on, its voltage stays roughly around its forward voltage, and a small voltage change can produce a large current change. That is why you do not connect an LED directly to a GPIO pin. You add a resistor to define the current.
A red LED might drop about 2.0 V at a comfortable current. From a 3.3 V pin, that leaves about 1.3 V across the resistor. If you want about 10 mA:
You would likely choose a standard 150 ohm or 220 ohm resistor. The LED will be a bit dimmer, the GPIO will be happier and the battery will last longer. Engineering is full of choices like that: calculate the edge, then step back from it.
A resistor carries 20 mA and has 220 Ω resistance. About how much power does it dissipate?
-
Correct. $P = I^2R = 0.02^2 \times 220 = 0.088$ W.
-
That is fifty times too high. Remember to square current in amps, not milliamps.
-
That misses a factor of twenty. 20 mA through 220 Ω drops 4.4 V, so power is 4.4 V times 0.02 A.
-
That would be close if the current were about 32 mA.
Where Ohm's law stops being enough
Ohm's law describes ohmic materials and components: current is proportional to voltage, and resistance is the proportionality. Many important parts are not ohmic. Diodes have an exponential current-voltage curve. MOSFETs behave like controlled switches or controlled current sources depending on region. Capacitors and inductors care about change over time.
That does not make Ohm's law obsolete. It becomes the local tool you use around other models: the resistor in series with an LED, the on-resistance of a MOSFET, the copper resistance of a winding, the shunt resistor in a current sensor. The trick is knowing which part of the circuit is actually acting like a resistor.
You have a 5 V supply and a 1000 Ω resistor. Compute the current.
Show worked solution
A, which is 5 mA.
An ESP32 GPIO drives a red LED. Assume the GPIO is 3.3 V, the LED drop is 2.0 V and you choose a 220 Ω resistor. Estimate the current and the resistor power.
Show worked solution
The resistor sees about V.
A, or 5.9 mA.
W, or 7.7 mW. That is far below a common 0.25 W resistor rating, and the GPIO current is modest.
Key takeaways
- Ohm's law is a predictive model: .
- Resistance turns a dangerous current path into a chosen current path.
- Power is , and in resistors it becomes heat.
- The form explains why current is so expensive in wires, windings and switches.
- Component ratings matter before you build, not after something smells hot.
Ohm's law is the first sentence in the language of circuits. It does not say everything, but it says enough to begin a conversation with the board: I expect this current, this drop, this heat. Then you build it, measure it and find out whether the board agrees.