Lesson 6 of 15
Power Dissipation
Power in a Resistor
When current flows through a resistor, electrical energy is converted to heat. The power dissipated is:
P = I² · R
Using Ohm's law (V = IR), there are three equivalent forms:
P = I² · R (use when you know I and R)
P = V² / R (use when you know V and R)
P = V · I (use when you know V and I)
Unit: Watt (W)
1 Watt = 1 Joule per second = 1 Volt × 1 Ampere
Resistor Ratings
Resistors have a power rating — the maximum power they can safely dissipate (commonly 1/8W, 1/4W, 1/2W, 1W). Exceed it and they fail or catch fire.
Before choosing a resistor, always verify:
P_calculated < P_rating
With a 2× safety margin is good practice.
Examples
| Current (A) | Resistance (Ω) | Power (W) |
|---|---|---|
| 2A | 5Ω | 20W |
| 1A | 10Ω | 10W |
| 3A | 4Ω | 36W |
| 0.1A | 100Ω | 1W |
Energy Over Time
If the power is constant, energy consumed in time t:
E = P · t (joules, if P in watts and t in seconds)
Your Task
Implement double power_dissipated(double i, double r) that returns the power dissipated as P = I² · R.
TCC compiler loading...
Loading...
Click "Run" to execute your code.