Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 46 · Getting Started

Ohm's law, power and Kirchhoff's laws

Master voltage, current, resistance and power, then use Kirchhoff's current and voltage laws and a short Python solver to analyze real circuits.

Three ideas carry almost all of circuit analysis: Ohm's law, which relates voltage, current and resistance for a resistor; the power formula, which tells you how fast energy is converted; and Kirchhoff's two laws, which say that charge and energy are conserved in any circuit. Together they let you predict the current in every wire and the voltage across every part of a circuit built from sources and resistors. Later, when diodes and transistors appear, you will use exactly the same laws. Only the component equations change.

This lesson works through each idea with numbers, then shows how to let a computer solve a circuit that is too big to do by hand.

A series loop with a 9 V battery, a 1 kilo-ohm resistor and a 2 kilo-ohm resistor, with the voltage drops and the node current rule
The loop law and the node law on one small circuit: 9 V = 3 V + 6 V, and 5 mA in = 2 mA + 3 mA out.

What you will learn

  • The meaning and units of voltage, current, resistance and power
  • How to apply Ohm's law and the power formulas in all their forms
  • Kirchhoff's current law (KCL) and voltage law (KVL), and how to use them
  • How to combine resistors in series and in parallel
  • How to solve a multi-node circuit with the node-voltage method in Python

Key terms

Voltage (V): the energy given to each coulomb of charge between two points, measured in volts. It is always measured between two points.

Current (I): the rate of flow of charge, in amperes (A). One ampere is one coulomb per second.

Resistance (R): how strongly a component opposes current, in ohms (Ω).

Node: a point where two or more components connect. All wire at the same node has the same voltage.

Loop: any closed path through the circuit.

Voltage and current in plain words

Think of water in pipes. Current is the amount of water flowing past a point each second. Voltage is the pressure difference that pushes it. Resistance is a narrow section of pipe. The analogy has limits, but it already gives the right instincts: pressure is measured across something, flow is measured through it, and a narrow pipe needs more pressure to carry the same flow.

In electronics we use conventional current, drawn as flowing from positive to negative through the outside circuit. (Electrons in a metal actually drift the other way. Benjamin Franklin's sign convention came before the electron was discovered, and it stuck.) All formulas in this course use conventional current.

Small and large quantities are written with prefixes. Learn these until they are automatic:

Prefix Symbol Factor Example
mega M 10⁶ 2.2 MΩ
kilo k 10³ 4.7 kΩ
milli m 10⁻³ 5 mA
micro µ 10⁻⁶ 100 µF
nano n 10⁻⁹ 10 nF
pico p 10⁻¹² 22 pF

Ohm's law

For a resistor the current is proportional to the voltage across it. Georg Ohm published this in 1827:

TEXT
V = I × R        I = V / R        R = V / I

A 1 kΩ resistor with 5 V across it carries 5 V / 1000 Ω = 5 mA. Doubling the voltage doubles the current. A component that obeys this proportionality at every voltage is called ohmic or linear. Resistors are (to a good approximation) ohmic. Diodes and transistors are not, which is why they get their own chapters.

Power

When current I flows through a voltage drop V, energy is converted at a rate

TEXT
P = V × I = I² × R = V² / R

measured in watts. The 1 kΩ resistor above dissipates 5 V × 5 mA = 25 mW as heat. A standard small resistor is rated 0.25 W (250 mW), so it runs cool. Put 24 V across the same resistor and the power is 24²/1000 = 0.576 W, more than double the rating: it will burn. Always check power, not just resistance.

Kirchhoff's laws

Gustav Kirchhoff formulated two rules in 1845 that apply to any circuit, even nonlinear ones.

Kirchhoff's current law (KCL): the currents flowing into a node add up to the currents flowing out. Charge does not pile up at a junction. In the figure, 2 mA and 3 mA enter a node and 5 mA leaves.

Kirchhoff's voltage law (KVL): the voltages around any closed loop add up to zero. Energy is conserved: whatever the source gives, the components take. In the series loop in the figure, the battery rises by 9 V and the two resistors drop 3 V and 6 V.

A worked example

Take a 9 V battery in series with R₁ = 1 kΩ and R₂ = 2 kΩ.

  1. The same current flows through both resistors (they are in series, so there is nowhere else for it to go).
  2. KVL around the loop: 9 V = I·R₁ + I·R₂ = I × (1 kΩ + 2 kΩ).
  3. So I = 9 V / 3 kΩ = 3 mA.
  4. V₁ = 3 mA × 1 kΩ = 3 V and V₂ = 3 mA × 2 kΩ = 6 V.
  5. Check: 3 V + 6 V = 9 V. ✓

Series resistors simply add. For resistors in parallel, every resistor has the same voltage, and the currents add (KCL), so the conductances (1/R) add:

TEXT
Series:    R = R1 + R2 + R3
Parallel:  1/R = 1/R1 + 1/R2 + 1/R3      (two resistors: R = R1·R2 / (R1 + R2))

Two 1 kΩ resistors in parallel make 500 Ω. A parallel combination is always smaller than the smallest resistor. A useful shortcut: 1 kΩ in parallel with 1 kΩ is half; 1 kΩ in parallel with 100 Ω is a little under 100 Ω (about 91 Ω).

Bigger circuits: the node-voltage method

Real circuits have several nodes. The systematic way to solve them is:

  1. Pick a ground node (0 V).
  2. Give every other node a voltage unknown.
  3. Write KCL at each unknown node, replacing each current with (voltage difference)/R.
  4. Solve the resulting linear equations.

Because the equations are linear, they have the matrix form G · v = i, where G is the conductance matrix. Each diagonal entry is the sum of the conductances touching that node. Each off-diagonal entry is minus the conductance between two nodes. The right-hand side is the current injected into each node. This is exactly what circuit simulators such as SPICE do (they add extra machinery for nonlinear parts).

Common misconceptions

"Current is used up as it flows through a resistor." The same current that enters a resistor leaves it. What drops is the voltage: energy is converted to heat.

"Voltage flows through a component." Voltage is a difference between two points. We say "voltage across" a part and "current through" it.

"A battery supplies a fixed current." An ideal battery fixes the voltage; the current depends on the load.

Try it

First, a three-node circuit solved with the node-voltage method. A 10 V source feeds node 1 through R₁ = 1 kΩ. Node 1 connects to ground through R₂ = 2 kΩ and to node 2 through R₃ = 1 kΩ. Node 2 connects to ground through R₄ = 2 kΩ. Try changing the values and see how the node voltages react.

Python Node-voltage solver (solves G v = i with NumPy)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Second, a styled bar chart of where the voltage goes in the series circuit. Change the resistors and the bars always add up to the battery voltage, which is KVL in action.

Python Voltage drops in a series circuit (KVL check)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. A 4.7 kΩ resistor has 12 V across it. What is the current?

    I = V/R = 12 / 4700 = 2.55 mA.
  2. 2. How much power does the resistor in the previous question dissipate?

    P = V·I = 12 V × 2.55 mA = 30.6 mW, or V²/R = 144/4700.
  3. 3. Two resistors of 6 kΩ are connected in parallel. What is the total?

    R = 6k·6k / (6k+6k) = 3 kΩ. Parallel combinations are smaller than either resistor.
  4. 4. At a node, 7 mA enters through one wire and 3 mA through another. One wire leaves. What current leaves?

    KCL: current in equals current out, so 7 + 3 = 10 mA.
  5. 5. Going around a loop you meet +12 V, a drop of 5 V and another drop. What is the other drop?

    KVL: 12 − 5 − x = 0, so x = 7 V.

Summary

  • Ohm's law: V = I·R. Power: P = V·I = I²R = V²/R.
  • KCL: currents into a node equal currents out. KVL: voltages around a loop sum to zero.
  • Series resistors add; parallel conductances add.
  • The node-voltage method turns any resistor network into G·v = i, solvable by computer.
  • Voltage is measured across, current through; current is not used up.

Next: Voltage dividers and Thévenin equivalents