Ohm's Law and Kirchhoff's Laws
A supply and a rechargeable cell both feed one load resistor through their own series resistors. Does the cell help the supply, or does the supply push current backwards into the cell? Ohm's law alone cannot say, because no single resistor has a known voltage across it. Two more laws, due to Gustav Kirchhoff (1845), close the gap: one for currents at a node and one for voltages around a loop. With Ohm's law they are enough to analyse every linear circuit in this course. The physics of Ohm's law is covered in Current, Resistance and Ohm's Law; here we use it as an element law.
Ohm's law as an element law
For a resistor with the passive sign convention (current enters the terminal marked , see Circuit Elements and Sign Conventions):
If you draw the current arrow into the terminal instead, the law becomes . Either is fine, as long as the sign follows the arrows you drew. The power absorbed is : a resistor never delivers energy.
Kirchhoff's current law (KCL)
Charge does not pile up in a wire junction, so
The same holds for any closed surface around part of a circuit (a supernode), which is useful later.
Kirchhoff's voltage law (KVL)
Voltage is a difference of potential, so going around any closed loop and returning to the start gives zero net change:
Walk the loop in one direction; add a branch voltage when you enter its terminal first (a voltage drop) and subtract it when you enter its terminal first (a rise). Both laws hold at every instant, for AC and transients as well as DC, as long as the circuit is small compared with the wavelength (the lumped-circuit assumption, see the intro).
How many independent equations?
A circuit with nodes and branches has
- independent KCL equations (the last node's equation is the sum of the others),
- independent KVL equations (one per mesh in a planar circuit),
which together with element laws give exactly enough equations for the branch currents and branch voltages. Solving for branch currents directly is the branch-current method; nodal and mesh analysis are shortcuts that need fewer unknowns.
In the figure, treat each source with its series resistor as one branch: nodes ( and ground) and branches, so one KCL equation and two KVL equations for the three currents , , .
Worked example: does the cell charge or discharge?
Given: , , , , ; reference directions as in the figure.
Find: , , , , and whether delivers or absorbs power.
Solve: in and mA:
From the loop equations, and . Into KCL: , so , , , and .
The negative means the current flows opposite to the arrow: goes from through into the terminal of . The cell absorbs : it is being charged, because is higher than its .
Check: power balance. delivers ; the resistors absorb , and absorbs . .
In Python: the branch-current equations as a matrix
import numpy as np
# unknowns: i1 (R1, towards x), i2 (R2, down), i3 (R3, towards x), in mA; resistances in kOhm
A = np.array([[1.0, -1.0, 1.0], # KCL at x: i1 - i2 + i3 = 0
[2.0, 2.0, 0.0], # KVL loop 1: 2 i1 + 2 i2 = 10
[0.0, 2.0, 1.0]]) # KVL loop 2: 1 i3 + 2 i2 = 4
b = np.array([0.0, 10.0, 4.0])
i1, i2, i3 = np.linalg.solve(A, b)
print(f"i1 = {i1:.3f} mA, i2 = {i2:.3f} mA, i3 = {i3:.3f} mA")
print(f"v_x = {2 * i2:.3f} V")
# power balance (mW): sources deliver V*i out of their + terminal
p_sources = {"V1": 10 * i1, "V2": 4 * i3}
p_res = {"R1": 2 * i1**2, "R2": 2 * i2**2, "R3": 1 * i3**2}
for k, p in {**p_sources, **p_res}.items():
print(f"{k}: {p:7.3f} mW {'delivered' if k[0] == 'V' else 'absorbed'}")
print(f"delivered {sum(p_sources.values()):.3f} mW = absorbed {sum(p_res.values()):.3f} mW")i1 = 2.750 mA, i2 = 2.250 mA, i3 = -0.500 mA
v_x = 4.500 V
V1: 27.500 mW delivered
V2: -2.000 mW delivered
R1: 15.125 mW absorbed
R2: 10.125 mW absorbed
R3: 0.250 mW absorbed
delivered 25.500 mW = absorbed 25.500 mW
A negative "delivered" power is absorbed power. Checking the power balance is the quickest way to catch a sign error anywhere in an analysis.
Guided lab: verify KCL and KVL with measurements
Hand calculation. As above: ; resistor voltages , , (higher at ).
Simulation. In the netlist lab, slide . Below the current in flows into the cell ( negative); at exactly it is zero, because is the voltage would have without that branch, ; above the cell delivers.
At it shows and (the lab measures from c to x, the same direction as ).
What you would measure. Use two channels of a bench supply ( and , current limits ) in place of the source and the cell; never use a real lithium cell for this. With 1 % resistors and a DMM:
- Measure every resistor voltage with the red lead on the end you marked . Sum them with signs around each loop: expect within about (the sum of the readings' uncertainties).
- Measure the three currents with the meter in series (or compute them from the resistor voltages and measured resistances). Expect , and , each within about 2 %; KCL at should close within the meter's resolution.
- Note that the supply set to is sinking . Many single-quadrant bench supplies cannot sink current; their output then rises above the setting. If the reading is not , that is why: add a resistor across that output so it always sources.
Hazards and safe setup: low voltage, current-limited; maximum resistor dissipation . Don't connect a real rechargeable cell to a circuit that charges it without a proper charger.
Pitfalls
- Treating a negative answer as an error. It only means the current flows against the arrow you drew. Keep the arrows and the signs; don't redraw mid-solution.
- Writing KCL at every node. One of the equations is redundant; including it makes the system singular.
- KVL through a current source. The voltage across a current source is unknown; either avoid loops through it or give it a voltage unknown.
- Mixing drop and rise conventions within one loop equation.
Practice
- A node has currents and entering and leaving through known branches. What is the current in the fourth branch, and which way does it flow?
- A loop contains a source and three resistors with drops of , and . Find .
- A planar circuit has 6 nodes and 9 branches. How many independent KCL and KVL equations does it give?
Answer
- must leave through the fourth branch.
- , so .
- KCL: . KVL: (four meshes).
Test yourself
KCL is a statement of…
- conservation of energy
- conservation of charge
- Ohm's law
- Faraday's law
A circuit has 4 nodes and 6 branches. How many independent KVL equations does it have?
- 2
- 3
- 4
- 6
Your analysis gives . What does it mean?
- the analysis is wrong
- 0.5 mA flows opposite to the arrow drawn for
- the resistor absorbs negative power
- the current is AC
A source with across it has flowing INTO its + terminal. It…
- delivers 2 mW
- absorbs 2 mW
- delivers 8 mW
- absorbs no power