Ohm's law and power: how hot will the part get?
V = IR gives the current, and P = VI gives the heat a part must handle. Worked through with an LED resistor and a shunt resistor.
Ohm's law
V = I × R. Know two of the three values and you have the third.
LED resistor calculation: to light a red LED (forward voltage 2.0 V) at 10 mA from a 3.3 V pin, the voltage across the resistor is 1.3 V.
R = 1.3 V / 0.01 A = 130 Ω → nearest standard value 150 Ω
Power
P = V × I = I²R = V²/R. The energy a resistor turns into heat.
The LED resistor above dissipates 1.3 V × 10 mA = 13 mW, so a 1/16 W (62 mW) chip resistor is enough.
Shunt resistor example
Measuring a 20 A motor current with a 10 mΩ shunt:
- Voltage: 20 A × 0.01 Ω = 0.2 V
- Power: 20² × 0.01 = 4 W
A 4 W resistor is the size of a finger and needs heat sinking. That is why high-current shunts are made 1 mΩ or less, and the smaller voltage is made up with an amplifier.
Working rule
The basic rule is to stay within 50% of the rated power. The rating shrinks further at high ambient temperature, so check the derating curve in the datasheet.
Use one form instead of memorising three
V = I × R is all you need. Put what you want on the left and you get I = V / R and R = V / I. Power is P = V × I, and substituting Ohm's law gives P = I² × R = V² / R.
Example 1: choosing an LED resistor
To light a red LED (forward voltage about 2.0 V) at 10 mA from a 3.3 V pin, the voltage across the resistor is 3.3 − 2.0 = 1.3 V.
R = 1.3 V / 0.010 A = 130 Ω → choose the standard value 150 Ω
P = 1.3 V × 0.010 A = 13 mW → a 1/10 W resistor is enough
Blue and white LEDs have a forward voltage around 3 V, which leaves almost nothing from 3.3 V. In that case drive them from 5 V, or use a much smaller resistor.
3D labRun what you have read so far→Example 2: why a linear regulator runs hot
An LDO that takes 12 V and delivers 3.3 V at 200 mA throws away all the excess voltage as heat.
P = (12 − 3.3) V × 0.2 A = 1.74 W
If the thermal resistance of a SOT-223 package is about 60 °C/W, the temperature rises by 1.74 × 60 ≈ 104 °C. At 25 °C ambient that is already 129 °C, so it cannot be used as it is. Two lines of arithmetic give the conclusion: lower the input voltage or switch to a switching converter.
Example 3: current-sense resistor
Using a 10 mΩ shunt to measure a 10 A motor current gives a voltage of 10 × 0.01 = 0.1 V and a power of 10² × 0.01 = 1 W. A larger resistance gives a larger signal, and the loss grows in proportion to it; double the current, though, and the loss is four times as large. So choose a shunt resistor that runs at half its rated power or less.
Criteria when choosing parts
| Part | Value to check | Margin |
|---|---|---|
| Resistor | Power dissipation | 50% of rating or less |
| MCU pin | Current per pin and the total | Well below the datasheet's absolute maximum ratings |
| Wiring, connectors | Allowed current | Check the temperature rise as well |
| MOSFET | I² × Rds(on) |
Calculate with the hot Rds(on) |
An MCU pin can usually carry only a few mA up to about 20 mA, and there is a separate limit on the total for all pins. Larger loads are switched through a transistor.
Check yourself
- What are the current and power for a single 100 Ω resistor on 5 V? Is a 1/4 W resistor all right?
- If the voltage across the same resistor is doubled, by what factor does the heat grow?