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


closed as unclear what you're asking by Bimpelrekkie, Voltage Spike, uint128_t, winny, Chetan Bhargava Aug 17 '17 at 20:09

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Your question is chaotic 1) it is unclear what your trying to achieve and why 2) you include a schematic without any TRIAC yet you ask about a TRIAC. After that more chaos because you see all kind of pitfalls (noise, zero crossings) which you do not understand. I suggest that you stop (at least for the moment) trying to design a solution yourself. Try to find existing circuit solutions and try to understand how they work. Then pick one of those designs and build that or modify it slightly to fit your needs. \$\endgroup\$ – Bimpelrekkie Aug 4 '17 at 21:15
  • \$\begingroup\$ I think I tried asking too much at once. I realized the solution to my first set of questions. I have looked for circuits to modify but that was part of my issue, they often show a RC snubber but wikipedia discusses using inductors to reduce RF noise, as well as my own experience seeing inductors in professional dimmers. So I'm looking for answers as to why these circuits wouldn't use inductors when it seems pretty standard? \$\endgroup\$ – Caps Aug 4 '17 at 21:46
  • 2
    \$\begingroup\$ See Decapod's answer to electronics.stackexchange.com/questions/313617/… for a good robust zero-cross detector from Elektor magazine. \$\endgroup\$ – Transistor Aug 4 '17 at 22:38

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!)

  • \$\begingroup\$ Thank you for the detailed answers! I did find that about the optocoupler after a bit more research. Regarding the inductor/RC snubber, cost isn't that big of an issue. I'm not mass producing this, would I be better off with something like this? \$\endgroup\$ – Caps Aug 4 '17 at 23:07
  • \$\begingroup\$ @Caps -- a CMC might not be a bad plan, but I'd still have the RC snubber in place \$\endgroup\$ – ThreePhaseEel Aug 5 '17 at 2:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.