The part got so hot you can't touch it, or it shuts itself down after a while? It probably needs a heatsink. And the question "does it need one or not" has an answer in numbers, not guesswork. Once you understand the idea, you'll also be able to choose the right heatsink instead of experimenting.
Step 1: the power dissipated
Calculate how many watts the part turns into heat:
- Linear regulator: P = (Vin − Vout) × I. See the LM317 and the 7805.
- MOSFET: P = I² × Rds(on). See the MOSFET.
- Transistor as a switch: P ≈ Vce(sat) × Ic.
- Diode: P ≈ Vf × I. See diode types.
- Resistor: P = I² × R. See Ohm's law and power.
Step 2: thermal resistance
Every part resists heat leaving it, and that resistance is in °C/W: how many degrees each watt raises the temperature.
chip temperature = ambient temperature + power × sum of thermal resistances
- θJA: from the chip to the air without a heatsink. A 7805 in a TO-220 package is about 50 °C/W.
- θJC: from the chip to its metal back, about 5 °C/W.
- θCS: from its back to the heatsink (paste or insulator), about 0.5–1 °C/W.
- θSA: the heatsink itself, stated in its specifications. A medium heatsink is about 10 °C/W.
Think of it as an electrical circuit
Heat flows like current, thermal resistances behave like resistors in series, and the temperature difference across each one is like the voltage across it. So it's exactly Ohm's law: ΔT = P × θ. And each resistance in the chain adds temperature on top of the one after it.
Example: a 7805 dissipating 2 W in 25 °C air
Without a heatsink:
- 25 + 2 × 50 = 125 °C. That's at the chip's limit. It will get very hot, and its thermal protection will shut it down.
With a 10 °C/W heatsink:
- 25 + 2 × (5 + 0.5 + 10) = 25 + 31 = about 56 °C. Very comfortable.
The practical rule: keep the calculated chip temperature well below its maximum (say under 100 °C for a chip rated 125–150 °C), and remember that the air inside an enclosure is hotter than the room.
Choosing a heatsink by calculation
Instead of trying heatsinks, turn the equation around and calculate the largest allowed θSA:
θSA ≤ (target chip temperature − ambient) ÷ power − θJC − θCS
Example: an LM317 producing 5 V from 15 V at 0.5 A, that is (15 − 5) × 0.5 = 5 W. The air inside the enclosure is 40 °C (not 25), and we want the chip below 100 °C:
- (100 − 40) ÷ 5 = 12 °C/W allowed for the whole chain.
- 12 − 5 − 0.5 = 6.5 °C/W for the heatsink.
So look for a heatsink rated 6.5 °C/W or less. That's a medium finned heatsink, not the small U-shaped clip. If you find you need less than about 3 °C/W, the heatsink will be very large, which is a sign to consider another solution (below). The linear regulator heat calculator does this whole calculation.
Example: a MOSFET switching 10 A
An IRLZ44N switching a 10 A load, with Rds(on) of about 0.025 Ω:
- Power = 10² × 0.025 = 2.5 W.
- Without a heatsink (θJA about 62 °C/W): 25 + 2.5 × 62 ≈ 180 °C. It will burn out.
- With a 10 °C/W heatsink (and θJC about 1.4): 25 + 2.5 × (1.4 + 0.5 + 10) ≈ 55 °C.
And note that with PWM a MOSFET dissipates extra heat while switching on and off, so leave a bigger margin. Make sure it's logic-level if a microcontroller drives it, or the real Rds(on) will be several times the rated figure.
Enclosures and fans
- A closed enclosure heats the air inside it, so the "ambient temperature" in the calculation must be the temperature inside the enclosure, which can be 15–20 °C above the room. Vents at the bottom and top create a natural airflow.
- A fan cuts the heatsink's θSA to half or less. A small 5 V fan can let you use a much smaller heatsink, but it becomes a part that can fail and make noise.
- The sun: a device in direct summer sun can exceed 60 °C inside its enclosure. Allow for it.
How do you measure temperature?
- Touch: a part you can't hold for more than a second is probably above 60 °C. An indication, not a measurement.
- A probe thermometer (many multimeters have a temperature mode with a K-type probe) taped to the back of the part.
- A thermal camera or infrared thermometer: quick, but shiny surfaces read wrong.
And remember the junction inside is hotter than the body by P × θJC.
Fitting the heatsink properly
- Thermal paste: a thin layer between the chip and the heatsink. A thick layer insulates instead of conducting.
- The metal back of chips is usually connected to a pin (ground on the 7805, the output on the LM317, the drain on a MOSFET). If the heatsink touches the chassis or other parts, use an insulator (mica or silicone) and a plastic bush for the screw.
- Fins vertical, so hot air rises out.
- Tighten the screw properly: pressure reduces θCS. But don't overtighten so much that you bend the chip body.
- Several parts on the same heatsink: add their powers in the θSA calculation, and each needs an insulator if their tabs connect to different points.
Cooling on the PCB
For small (SMD) parts, the copper area around the pad acts as a heatsink. And vias under the pad carry heat to the copper on the other side. The datasheet usually gives θJA for a specific copper area, and this is one of the PCB mistakes that gets forgotten.
A rough example: a regulator in a SOT-223 package on a small pad can have a θJA above 100 °C/W, and with about 6 cm² of copper and vias to the other side it can drop to about 50–60. So the same part handles roughly twice the power. Make the track to that part wide too: see trace width and vias.
If the heatsink would be huge
That means the loss itself is large. The better solution is usually to reduce the loss rather than enlarge the heatsink: use a buck converter instead of a linear regulator, or a MOSFET with lower Rds(on), or split the heat across two parts (for example a power resistor before the regulator).
FAQ
The heatsink is very hot; does that mean it's working? Yes, a hot heatsink is conducting heat well. If the chip is hot and the heatsink is cool, the contact between them is poor: missing paste, a thick insulator, or a loose screw.
Can I stick the heatsink on with ordinary glue? No, ordinary glue is a thermal insulator. There's special thermal adhesive, or use a screw and paste.