DC Circuits · #2 of 52

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

  1. Explain voltage, current and resistance as a cause-and-effect relationship
  2. Use $V = IR$ to compute any one quantity from the other two
  3. Compute electrical power with $P = VI$, $P = I^2R$ and $P = V^2/R$
  4. 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:

V=IRV = IR

where VV is voltage in volts, II is current in amps and RR is resistance in ohms. Rearrange it depending on what you know:

I=VR,R=VII = \frac{V}{R}, \qquad R = \frac{V}{I}

That second form, I=V/RI = V/R, 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.

A resistor color-code diagram showing digit colors, tolerance bands and a brown green red gold worked example.
A resistor is a physical part before it is a number. The color bands are a compact printed interface for value and tolerance.
Portrait of Georg Simon Ohm.
Georg Ohm · 1789-1854 measured how current through a conductor depends on voltage and resistance, then published the relationship in 1827. Every resistor calculation in this course starts from his law. read more →

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:

P=VIP = VI

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:

P=I2R,P=V2RP = I^2R, \qquad P = \frac{V^2}{R}

The first form, I2RI^2R, 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.

Carbon and ceramic resistors of different physical sizes and power ratings.
Power rating has a body. Larger resistors are not larger because the equation changed, but because heat has to leave the part. · David Ludovino, CC BY-SA 3.0

A 3.3 V pin drives a resistor of 1 kΩ to ground. What current flows?

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.

I: 3.30 mA P: 10.9 mW

Try these moves:

  1. Hold resistance at 1000 ohms and raise voltage from 3.3 V to 6.6 V. Current doubles.
  2. Now drop resistance from 1000 ohms to 500 ohms. Current doubles again.
  3. 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 simple LED circuit diagram with a battery, resistor and light-emitting diode in series.
The LED resistor is the first design move many students make: choose the current before the circuit chooses it for you. · Unknown, CC BY-SA 2.5

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:

R=3.32.00.010=130 ΩR = \frac{3.3 - 2.0}{0.010} = 130\ \Omega

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 9 volt battery, wires, LED and resistor laid out as components for a simple LED circuit.
The equation becomes hardware only after you choose actual parts, actual leads and an actual source with limits. · Mr. D.M.C. Janiththa, CC BY-SA 4.0
An array of axial lead resistors with different body colors and band markings.
Most resistors on a board are quiet. They set currents, divide voltages, bias transistors and keep pins inside their limits. · Evan-Amos, Public domain

A resistor carries 20 mA and has 220 Ω resistance. About how much power does it dissipate?

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.

A cutaway diagram of a carbon-film resistor showing the helical resistive film around the core.
The schematic symbol hides construction. Real resistance comes from material, geometry, contacts, coating and heat path. · jjbeard, Public domain
A close-up cross section of a carbon-film resistor showing its internal layers.
A resistor is not an ideal line on paper. It is a manufactured object with tolerances, temperature behavior and failure modes. · TubeTimeUS, CC BY-SA 4.0

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.

Practice 1 warm-up

You have a 5 V supply and a 1000 Ω resistor. Compute the current.

Show worked solution

I=V/R=5/1000=0.005I = V/R = 5/1000 = 0.005 A, which is 5 mA.

Practice 2 core

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 3.32.0=1.33.3 - 2.0 = 1.3 V.

I=V/R=1.3/2200.0059I = V/R = 1.3/220 \approx 0.0059 A, or 5.9 mA.

P=VI=1.3×0.00590.0077P = VI = 1.3 \times 0.0059 \approx 0.0077 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: V=IRV = IR.
  • Resistance turns a dangerous current path into a chosen current path.
  • Power is P=VIP = VI, and in resistors it becomes heat.
  • The I2RI^2R 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.

full glossary →