This is my first time posting on a forum so please pardon me if i do anything incorrectly.

I'm kinda new with using TRIACs, i'm using them as a replacement for a Relay and my sole goal is to switch a light bulb on and off from an arduino. I'm having serious trouble with combining the Optocoupler (4n35) with the TRIAC. When I first prototyped the TRIAC on a breadboard without the optocoupler, using wires, it worked totally fine, would switch ON and OFF when I made contact/removed contact of the GND wire at T2.

See schematic here

When I introduced the optocoupler, the Gate on the TRIAC seems to be triggered on all the time and i'm not to switch ON / OFF as expected on a relay.

Can somebody please tell me what i'm doing wrong here and provide me with a more accurate explanation on the triggering of a gate on a triac? All i understand is that you need some current flowing between Gate and MT1 (Some say MT2!), which means that you put the gate on 5V, MT2 on GND (or vice versa) and you'll trigger the TRIAC and short MT1 and MT2 allowing AC conductivity between them

Thanks and sorry for the long post.

  • 3
    \$\begingroup\$ Possible duplicate of electronics.stackexchange.com/questions/30168/… \$\endgroup\$
    – Marla
    Dec 22 '15 at 3:06
  • \$\begingroup\$ Hello Marla, I've read the post you are referring to before and it isn't exactly my case, as I'm having weird beahviour with the TRIAC triggering whether I connect a GND or a VCC to the Gate. Please check my comment on WhatRoughBeast below and my photo as well. Thank you for the help :) \$\endgroup\$ Dec 22 '15 at 5:07
  • \$\begingroup\$ @MoustafaMowaffakElDamer From your diagram the operation of the Triac is difficult to predict. \$\endgroup\$
    – vini_i
    Dec 22 '15 at 21:43
  • \$\begingroup\$ Your post is very scary. Your schematic on the mains side shows GND and two neutrals connected by a triac. One of the neutrals has a fuse with no sign of a live feed or the light bulb. You then say you were switching the triac directly from the Arduino! This is extremely dangerous (i.e., high probability of fatal electric shock) and the fact that you tried it suggests that you don't understand the danger you are posing to yourself and that you shouldn't be doing this sort of work. \$\endgroup\$
    – Transistor
    Dec 22 '15 at 22:54
  • \$\begingroup\$ @transistor No the schematic is misleading in that part, it's just a label, this is a schematic on eagle im using for making the PCB and i've added a socket at the end that you won't be able to see. Don't worry, i have around 3 years experience with power electronics and am a trained engineer, TRIACS still baffle me though. Thanks \$\endgroup\$ Dec 23 '15 at 9:20

Here is a TRIAC circuit using an optocoupler. enter image description here

The AC wave form is broken up into four quadrants. The Triac has different operational needs in each quadrant.

enter image description here

A Triac is actually two SCRs back to back. An SCR works like a diode accept it has a trigger pin. When an SCR is forward biased it conducts just like a diode. When an SCR is revers biased it won't conduct util the trigger pin is activated. When the trigger pin is activated the SCR will conduct until the current and voltage across it go down to zero. When talking AC the "zero crossing" happens from Q4 to Q1 and from Q2 to Q3.

enter image description here

Because in essence you have to trigger two different SCRs depending what quadrant your in the triggering needed changes. To trigger at the beginning of Q1 you need positive voltage on the pin. Once the Trica is triggered it will continue conducting until the next zero crossing between Q2 and Q3. During the zero crossing the Triac will stop conducting and require triggering again at the beginning of Q3 but now with a negative voltage. It is this positive negative back and forth switch that necessitates the Opto-Triac.

Two notes. First, this circuit allows the load to be turned on and off only. If you want to reduce power to the load like a dimmer you need to chop the AC wave form. To do this you need a zero crossing detection circuit. By sensing when the zero crossing occurs you can time and turn on the Triac part way into Q1 and Q3 or even part way into Q2 and Q4. The latter requires a four quadrant Triac.

Second, if using this circuit to drive anything other then a resistive load then a snubber is needed. When driving an inductive load like a motor, the current and voltage wave form become shifted compared to each other. This means that the current and voltage can't hit zero at the same time causing the Triac to continue conducting even without triggering. The snubber helps to realign the current and voltage allowing the Trica to shut off during zero crossings.

  • \$\begingroup\$ Thanks for the reply, but your schematic is using an Opto-Triac , not an optocoupler. Is that correct? I'm looking to drive the triac from an optocoupler that is witched on or off from an Arduino \$\endgroup\$ Dec 22 '15 at 5:00
  • \$\begingroup\$ @MoustafaMowaffakElDamer Yes that is correct. The Opto-Triac is needed to be able to trigger the "Big Triac" in all the quadrants. If only using a transistor Opto you lose the ability to trigger the Triac in two quadrants. \$\endgroup\$
    – vini_i
    Dec 22 '15 at 12:42
  • \$\begingroup\$ Would you please be so kind as to simply explain the actual meaning of the 4 Quadrants for the TRIAC, i read about it alot on many forums and articles but i couldn't grasp the implications of this. \$\endgroup\$ Dec 22 '15 at 15:28
  • \$\begingroup\$ @MoustafaMowaffakElDamer I updated my answer to fill in your Quadrant question. \$\endgroup\$
    – vini_i
    Dec 22 '15 at 20:06
  • \$\begingroup\$ Thank you so much for the explanation, Now I get it! So essntially the opto triac will provide triggering for the TRIAC in all 4 cases (quadrants). My question is, why is it when I apply a GND to MT2 and a 5V to Gate, the triac is switched on (lamp is ON with no problems , meaning that AC current/voltage is alternating but the lamp is still on) , shouldn't the absence of an optotriac hinder this? Also why is it that after I put the MT2 to GND, Gate to 5VCC, after the triac is ON, what ever value I put Gate to (GND or 5V) , it stays on. Thank you so much for your help \$\endgroup\$ Dec 22 '15 at 20:58

Your problem is that the optocoupler is not properly connected to the triac. Unless the 5 VDC supply has a ground connected to AC neutral, there is no current path through the triac to turn it on. And since I assume the 5V supply is part of your logic, this would be a very bad idea.

  • \$\begingroup\$ Thanks WhatRoughBeast for you super fast reply, can you please post a schematic? and I also have a follow up question. Even without an Optocoupler, the TRIAC is behaving abnormally, please find a link to a photo i've taken of my breadboard connection attached. The Gate on the triac is triggered whether i connect it to GND OR VCC .. it's really frustrating! Breadboard circuit \$\endgroup\$ Dec 22 '15 at 5:04
  • \$\begingroup\$ @MoustafaMowaffakElDamer - You need to understand how the triac works. When the voltage across the triac is positive, the gate drive must be positive, but when the voltage is negative, the gate drive must be negative. And AC gives alternatively positive and negative voltages. So your basic approach is wrong. See vini_i s answer. \$\endgroup\$ Dec 22 '15 at 23:23

Having viewed your schematic and your linked photograph :

In the photograph, I don't see the optocoupler.

Do Not connect your Arduino Ground or +5v to the Triac. That could really hurt your Arduino.

For using an optocoupler with TRANSISTOR (not triac driver), try the schematic shown below. You can see that using Optocoupler with transistor output involves a much more complex circuit than using an Optocoupler with Triac Driver. Also, using a transistor Optocoupler, you can only turn on half wave cycle (as mentioned in others answers.

With no signal from your Arduino, the Triac should be OFF. If your light bulb is ON, then the Triac has been damaged.

MAJOR EDIT : Removed old defective circuit. Added new working circuit.

enter image description here

  • \$\begingroup\$ Wouldn't this schematic mean : 1. The AC voltage/current is going to trigger the TRIAC 2. AC current will flow through the optocopler? Is 1 possible, and is 2 Safe? \$\endgroup\$ Dec 22 '15 at 15:35
  • \$\begingroup\$ I completely changed the circuit diagram in my answer, so that a circuit could be seen using an Optocoupler transistor. \$\endgroup\$
    – Marla
    Dec 22 '15 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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