← all lessons
DC Circuits · #2 of 20

Ohm's Law + Power

V = I × R, P = V × I

Why it matters

Ohm’s Law is the foundation of all electronics. Without it, you’re guessing. Power tells you if components will overheat and fail.

The idea

Ohm's Law

The relationship between voltage (V), current (I), and resistance (R): V = I × R
        <div class=

Demo

Adjust Voltage and Resistance to see how current and power change.

Watch for:

Key takeaways

Going deeper

Ohm’s Law applies to linear (resistive) circuits. Diodes, transistors, and other non-linear components have more complex relationships. For DC circuits with resistors, Ohm’s Law is king.

Math details

Ohm's Law:
  V = I × R
  I = V / R
  R = V / I

Power:
  P = V × I
  P = I² × R  (substitute V = I×R)
  P = V² / R  (substitute I = V/R)

Example calculations:
  Given: V = 5V, R = 1000Ω
  I = 5V / 1000Ω = 0.005A = 5mA
  P = 5V × 0.005A = 0.025W = 25mW

Component ratings:
  Resistor: usually 0.25W (1/4W) or 0.5W (1/2W)
  LED: typically 20mA max current, ~0.1W power
  ESP32 GPIO: 40mA max source, 28mA max sink

Implementation

LLM Prompt: Current Calculator