I'm switching a 12V 500mA resistive load (LED strip) with a
IRF540 MOSFET and it's getting very hot when it's on and conducting.
This confuses me as MOSFETs are supposed to have very low on-resistance and be great for power-switching applications. I'm driving the gate at 12V, and the data sheet says that the
IRF540's RDS is 0.077Ω at a VGS of 10V, so at 500mA current it should be dissipating a tiny amount of energy:
P = I2 ⋅ R
P (W) = (0.5)2 (A) ⋅ 0.077 (Ω)
P (W) = 0.01925
… but what I see must be dramatically greater than that, because the TO-220 package gets too hot to touch comfortably after a minute or so. CircuitLab says ≈ 1.8W which seems more reasonable from the heating observed.
What's my beginner mistake?
Edit: If you're reading this and interested in driving LED strips, see also Design considerations for LED strip PWM dimming .