Close

Dimming and switching considerations

A project log for LOLB

lots of lightbulbs

Moritz WalterMoritz Walter 08/31/2015 at 21:093 Comments

Dimming or switching lightbulbs can be done in many ways. MOSFETs, Triacs, SSRs, relays, all of them somehow do the same job. However, MOSFETS need DC or at least half-bridge-rectified DC, therefore you can PWM them easily. Alternatively, you can skip the rectifier and use triacs. However, you cannot just PWM triacs and a zero-crossing detection and precise timing control then becomes necessary. If you just aim to switch the bulbs on and of, mechanical relays or SSRs could be an option, too. In fact, the old version used mechanical relays, which is probably the worst choice of all listed options here, but I was young, dumb and without money, all I had was a bazzilion of miniature relays.

Before rebuilding the electronics, I’ll try to make a sophisticated guess on which way is the best for this application. I literally went back and forth between the possible options, which shall be documented here.

Low voltage or mains voltage

Low voltage yields less direct danger, but still can cause fires. In your home, the mains line will be secured by at least one leakage current fuse, so any mistake you make will darken out your home in an instant instead of slowly catching fire. MOSFETs are way cheaper for lower voltages than higher voltages. Triacs work for both. Low voltage lighting requires transformers or switching power supplies, adding up to the cost of the project, if you're using LEDs that might not be a big problem.

AC or DC

DC allows simple PWM using MOSFETs but MOSFETs will produce more heat with higher switching frequencies, AC allows phase control with less switching losses but requires a zero detection circuit and precise timing control.

Triac, SSR, mechanical relay or MOSFET

Triacs can be dimmed with phase control, DA-SSRs usually bring their own zero-crossing detection, so no dimming possible, DD-SSRs are slow and very expensive. Triacs are generally much cheaper than SSRs, but require additional optotriacs to drive them. When driving many optotriacs or SSRs from a micro controller, additional logic level MOSFETs become necessary. Mechanical relays may be too loud for this application and will wear out quickly.

LEDs, low-voltage halogen or 230V light bulb

LEDs are very efficient, versatile and easy to control. In fact, doing this with LEDs is so simple, for a product one should really do this with LEDs and try to get the light bulb aesthetics with some tricks on the way. However, a project must be challenging, too, and luckily I cannot imagine how to get this aesthetics with LEDs. Reworking lightbulbs by removing the filament and adding LEDs could be an option, but seems rather tedious than challenging. 12 V halogen could be an option and could be driven by cheap low voltage MOSFETS. 230V light bulbs are very cheap and have the best aesthetics, however they would require triacs with phase control since 230V MOSFETs are rather expensive. I’ve seen 12 V E27 light bulbs, but they were also expensive and would require a transformer or power supply.

Cost considerations

The 16 lightbulbs in the jar are supposed to be controlled individually, so we end up having 16 analog channels. Going after the best possible aesthetics, good old 230V lightbulbs, maybe even vintage style edison bulbs, are the choice. Using a half-bridge-rectifier and 16 high voltage MOSFETs, just PWM’ing them, is possible, but they are very expensive. Using 16 triacs is much cheaper, since the zero crossing detection circuit only has to be built once for all 16 channels. Additional logic level MOSFETs will be necessary either way. These cost considerations depend on which parts you can source for which price.

Choice

I chose to use 230V E27 light bulbs and triacs. After going into the actual component prices I realized that even the necessity of having additional optotriacs for driving the power triacs is still cheaper than any high voltage MOSFET and any SSR I could find anywhere. Also, this is a nice project for digging into phase controlled dimming.

Discussions

esot.eric wrote 09/01/2015 at 09:26 point

FYI: I have used SSRs in a fashion kinda like triacs (with zero-crossing detection via uC, turning off after some percentage of the waveform) with success... They're obviously more expensive, and I'm not really even sure why I did, except there were lots of SSRs in supply. Not sure what type they were.

I dig the look of it!

  Are you sure? yes | no

esot.eric wrote 09/01/2015 at 09:29 point

Hah! Just caught the video! Actually those relays are pretty cool-sounding, kinda like flames burning wood :)

  Are you sure? yes | no

Moritz Walter wrote 09/01/2015 at 10:34 point

Hey, exactly, if you have a cheap supply for SSRs, those considerations will probably shift, I've checked my usual suspects and they turned out generally more expensive than a triac+optotriac. If you used SSRs, they probably were without internal zero crossing detection, otherwise you would not have been able to switch during the half wave. About the sound, well, I also found it cool in the beginning but it soon became an annoyance ^^c

  Are you sure? yes | no