Electrical – IC controlled triac dimmer design, zero crossing detection and inductor sizing


I'm trying to create a dimmer that uses an IC to control the triac firing. My understanding is that I need a random phase optocoupled triac driver. However I need to know when the zero crossing is on the IC. I've seen circuits similar to below for optocouplers

The collector goes to the IC

Here's where I'm confused, every depiction of an optocoupler shows the two left pins as an anode and cathode, which brings me to my first questions.

  1. Does the DC side only conduct on the half wave? Or is it actually two parallel diodes in opposite directions? If that's the case,

  2. Could I implement my zero crossing detection by having the far right wire go to an external interrupt on my IC and just switch between positive and negative edge trigger, causing an interrupt when it crosses zero because it switches between VCC and GND going to the pin?

  3. Wouldn't the Vf of the diode cause issues because it wouldn't conduct until slightly past the zero crossing whenever the AC crosses the Vf?

Next, regarding noise, I've seen several ways of minimizing this.

  1. Is it better to turn on at the zero crossing and shut off midwave or turn off at the zero crossing and turn on midwave as far as minimizing noise?

  2. Sometimes I see inductors, sometimes I see RC snubbers in dimming circuits. Most online circuits show the RC snubber, but the ETC Sensor dimmers I've worked with have very large inductors (though I don't know if there's also an RC). Is there a reason to use one over the other/both?

When choosing a size for the inductor,

  1. Do triacs have a rated switching speed? (e.g. to calculate the dI/dt across the inductor, do I assume it's an instantaneous change or is there a rated 'speed' for a triac? The only dv/dt ratings I've seen on a triac have to do with protecting it from false firing.

Thank you so much

Best Answer

To answer your questions in turn, starting with your optocoupler questions:

  1. You want an optocoupler with a bipolar (vs. unipolar) input: this means the input LEDs are in inverse parallel, allowing you to sense both halves of the AC waveform.

  2. Provided the optocoupler output is clean, that's more than fine for generating a zero-cross interrupt -- you don't need to bother with switching the interrupt edge, though, as the interrupt pulse will look the same on both half-cycle-transitions.

  3. With the bipolar input optocoupler, the Vf actually works in your favor, giving you a pulse centered on the actual zero-crossing assuming a symmetric mains waveform.

As to your noise questions:

  1. You are talking about the distinction between "leading edge" and "trailing edge" dimming here. Some loads (like ordinary incandescent bulbs) are happy with either, while others require one or the other; even for loads that can use either, trailing-edge is superior as it generates less EMI. However, a TRIAC can't be turned off, or "commutated", by its gate -- it relies on the AC zero-cross to commutate. So, all TRIAC dimmers are leading-edge by their nature -- trailing-edge or switchable-mode dimming requires the use of IGBT or MOSFET switches instead of TRIACs, which is much costlier.

  2. RC networks are used for snubbing because mains inductors are big, chunky, and expensive; snubbing also is needed to protect the triac from transients causing accidental turn-ons and such.

Last but not least, to address your concern about snubber design, Fairchild Semiconductor AN-3008 provides a design procedure. Fortunately, most lighting loads (save for MLV transformers and perhaps magnetic fluorescent ballasts) are not particularly stringent regarding snubbing, so a first-cut snubber should suffice. (Motors are far worse!)