If you are using PWM to control the brightness of an incandescent
light, should you use an inductive kickback diode to protect the
transistor?
NO. not necessary - can't hurt, but can't help
It is of course recommended to use when you are driving coils, relays,
motors, etc.
A light is a coil, althought I would guess the inductance is pretty
low.
Yeah, it is resonant in the MHZ range and very low Q - ignore it.
Would good practice be to put the diode in "just in case", or its
absolutely unneeded?
Waste of time and money, unless you might stick a coil in there.
Relays with snubber diodes across the coils will open more slowly and
arc longer - and shorten the relay life in some applications - one of
those compromise things again, but only if the relay has to interrupt
power on its contacts with some inductance present.
Does the answer change depending whether you use a bipolar or mosfet.
Yes
Mosfets are great devices (they save power and can do what bipolars
can't)
Mosfets do require special treatment. A spike on a mosfet may damage
it, if the intrinsic diode isn't fast enough. Generally it takes a
fast switching diode (reverse biased) between Drain and Source to
protect it from a load transient.
You might use a 30 amp mosfet protected by a 15 amp fuse - but the
transient caused by the fuse interrupting the 15+ amp short circuit
current may still eat the mosfet.
Mosfet gates are very fussy to transients. A long wire run to the
gate can have enough inductance to cause the mosfet to go belly-up.
Generally you'd use a resistor in series with the gate (which slows
turn-on) to protect it, by dropping the transient across the intrinsic
gate capacitance, and may also want diodes to snub transients in
extreme cases. And a mosfet once turned on - will stay on if there
isn't some discharge path for the gate - only a few pico farads as a
rule but still requires a discharge path. (high power mosfets usually
have larger gate capacitance but we are still only talking a 100K gate
to source (or so depending on transistor, and speed needed - relays
are slow in comparison so speed shouldn't be a concern)
I love mosfets. They can really make a lot of otherwise tricky
projects go smoothly (like replacing relays with SS devices and no
maintenance). But they have some quirks before you can apply them for
every application.
Not trying to dissuade you - mosfets are better than bipolars for most
things that I do, but they take a little understanding.