LessonOhm's law · 16 min

Ohm's law at work: LEDs, cables and current shunts

Ohm's law is simple; using it well is a skill. This lecture works through the places it turns up every day in real products, and the parts where it does not simply apply.

Prefixes: the size of the numbers

Convert to plain units (or use mA with kΩ) before you calculate.
PrefixSymbolFactorExample
megaM× 1 000 0001 MΩ: a microcontroller's input, a high-value divider
kilok× 10004.7 kΩ: a typical resistor; also written 4k7
(none)× 112 V, 2 A, 470 Ω
millim× 0.00120 mA: an LED's current; 100 mΩ: a current shunt
microµ× 0.00000150 µA: a sleeping microcontroller

1. The resistor in front of every LED

An LED is not a resistor: once its voltage reaches about 2 V (red) or 3 V (blue, white) the current shoots up with only a tiny further rise in voltage. Connected straight to a battery it would take far too much current and burn. So a resistor in series takes up the rest of the voltage and sets the current.

R = (Vsupply − VLED) / ILED
Vsupply
the supply voltage (V)
VLED
the LED's forward voltage: about 2 V red, 2.1 V yellow/green, 3 V blue/white
ILED
the current you want: 5 - 20 mA for an indicator
9 V, a red LED and 470 Ω: the resistor has 9 − 2 = 7 V across it, so I = 7 V / 470 Ω ≈ 15 mA.
9 V, a red LED and 470 Ω: the resistor has 9 − 2 = 7 V across it, so I = 7 V / 470 Ω ≈ 15 mA.
Worked example: an LED on 9 V

A red LED (2.0 V) should run at 15 mA from a 9 V battery. Which resistor?

  1. The resistor's voltage: 9 − 2.0 = 7.0 V.
  2. R = 7.0 V / 0.015 A = 467 Ω.
  3. The nearest standard value is 470 Ω: I = 7.0 / 470 = 14.9 mA.

Answer: 470 Ω.

2. Voltage lost in cables

A cable is a (small) resistance in series with everything, so a current through it costs voltage: V = I × Rcable. Remember the current goes out and comes back: count both wires.

Worked example: a solar panel cable

A solar panel 15 m from its charge controller delivers 8 A through 2.5 mm² copper cable. How much voltage is lost?

  1. Loop length: 2 × 15 = 30 m.
  2. R = ρ L / A = 1.68 × 10−8 × 30 / 2.5 × 10−6 = 0.20 Ω.
  3. V = I × R = 8 × 0.20 = 1.6 V.

Answer: 1.6 V - almost a tenth of the panel's 18 V gone in the cable. 6 mm² cable cuts it to 0.67 V.

3. Measuring current with a shunt

A 0.1 Ω shunt in the lamp's 0 V lead. The 0.42 A lamp current makes 0.042 V across it: I = V / 0.1 Ω.
A 0.1 Ω shunt in the lamp's 0 V lead. The 0.42 A lamp current makes 0.042 V across it: I = V / 0.1 Ω.

To measure a current without a meter in the loop, put a small, accurate resistor - a shunt - in series and measure the voltage across it. The shunt is chosen small so it wastes little voltage. Battery monitors, solar charge controllers, phone chargers and the popular INA219 current-sensor module (a 0.1 Ω shunt) all do this.

4. Parts that do not follow Ohm's law

A resistor's straight line and an LED's curve00.511.522.53051015202530V (V)I (mA)LED turns on
100 Ω resistorred LED

A resistor's current rises in a straight line. An LED (and any diode) passes almost nothing until about 1.7 V, then the current rises steeply. A lamp filament's resistance rises as it heats up: a 12 V 5 W lamp is 28.8 Ω when glowing but only about 3 Ω cold, so it takes a big surge of current at switch-on. R = V / I is still true at every moment - but R is not a constant for these parts.

Practice 1Which resistor runs a blue LED (3.0 V) at 10 mA from 5 V?

Hint

R = (Vsupply − VLED) / I.

Show the answer

Answer: 200 Ω

R = (5 − 3) / 0.010 = 200 Ω.

Practice 2A 0.1 Ω shunt has 0.35 V across it. What current flows?

Hint

I = V / R.

Show the answer

Answer: 3.5 A

I = 0.35 / 0.1 = 3.5 A.

Practice 3Convert 0.0047 MΩ to ohms.

Hint

1 MΩ = 1 000 000 Ω.

Show the answer

Answer: 4700 Ω

0.0047 × 1 000 000 = 4700 Ω (4.7 kΩ).

Challenge 4Two red LEDs (2.0 V each) in series run from 12 V at 20 mA. What resistor is needed?

Hint

In series the LED voltages add up.

Show the answer

Answer: 400 Ω

The LEDs take 2 × 2.0 = 4.0 V; the resistor the other 8.0 V. R = 8.0 / 0.020 = 400 Ω (use 390 Ω: 20.5 mA).

Challenge 5A 10 A load is 12 m from its battery. What is the smallest copper cable area (in mm²) that keeps the voltage lost in the cable to 0.5 V?

Hint

Allowed R = 0.5 V / 10 A. Loop length = 24 m. Then A = ρ L / R.

Show the answer

Answer: 8.06 mm²

R ≤ 0.05 Ω. A = 1.68 × 10−8 × 24 / 0.05 = 8.06 × 10−6 m² = 8.06 mm². Buy the next standard size up: 10 mm².