Control brightness of incandescent lamp via Arduino

Hi, I have a requirement to automatically control the brightness of an incandescent lamp running off the mains voltage. I don't think PWM works with incandescent lamps, does it? Any ideas how I can get the lamp to dim? The only way I can think of is to buy a light dimmer and use a servo to turn it, controlling the servo from the Arduino, but that seems like a horrible hack.

Thanks for any advice.

A triac and zero-crossing detector circuit usually does it. The mains zero-cross 120 times per second at 60Hz. You need to wait for a specific time before turning on the triac. Just a pulse does it. Once it it turned on, it will stay on until the next zero crossing.

If you want full bright, leave the triac on.

If you want about "half bright", turn on the triac about 1/240th of a second after zero crossing.

If it was a DC incandescent lamp then PWM would work fine, BTW.

Thanks, MarkT. I missed that. :)

I forgot to mention there are two types of triacs available. One will turn on any time in the cycle (for resistive loads), and one that will turn on only at zero crossing (for inductive loads).

MarkT: If it was a DC incandescent lamp then PWM would work fine, BTW.

Couldn't he just rectify the AC & then PWM the resulting pulsed DC with a suitably rated transistor? I don't even see why you would need to smooth it first and the incandescent lamp won't care.

The zero-crossing + timing idea is really neat. I think its beyond my still-noob-level skills though. I’ll try rectifying and PWMing to the incandescent.

Thanks, everyone.

adman: The zero-crossing + timing idea is really neat. I think its beyond my still-noob-level skills though. I'll try rectifying and PWMing to the incandescent.

Thanks, everyone.

Might be obvious but you may prefer to use an optoisolator between the low-voltage and high-voltage sides to keep them nicely separated.

I forgot to mention there are two types of triacs available. One will turn on any time in the cycle (for resistive loads), and one that will turn on only at zero crossing (for inductive loads).

No there isn't, it could be that there are two types of SSR using triacs to switch, but there is only one type of triac.

My bad, Grumpy_Mike. I forgot to put ‘driver’ in there. The triacs are the same.