I'm using an optoisolator triac (MOC3021) for switching a DC12V coil Relay. optoisolator triac Input is a digital 2.5V signal connected with a 68ohm series resistor. Isolator Load vlotage is 12V and about 30mA (normal coil relay).

when the signal is "ON" (+2.5V) the optoisolator is triggered and and it also trigger Relay But when the signal is go "OFF" the Relay Stay ON continuously.

I have disconnected the Isolator signal completely, nothing changed. relay stays ON until I disconnect 12V power. when I reconnect it All, the relay an triac is off until 2.5V signal activated and again the triac and relay stay continuously ON.


simulate this circuit – Schematic created using CircuitLab

  • 3
    \$\begingroup\$ You cant turn off a triac with DC. You need a transistor output optocoupler. \$\endgroup\$
    – Wesley Lee
    Sep 27, 2016 at 3:47
  • \$\begingroup\$ I'm using MOC3023 and MOC3063, currently. (Just wired up a pair of MOC3063, this evening, in fact.) If you trigger the triac, it will stay on as long as there is sufficient holding current (\$100\:\mu\textrm{A}\$, as I read it.) Your idea won't work this way. Not with DC like that. \$\endgroup\$
    – jonk
    Sep 27, 2016 at 3:48
  • \$\begingroup\$ you mean If I switch with AC side of power supply it works ok? \$\endgroup\$
    – rocknroll
    Sep 27, 2016 at 3:49
  • 1
    \$\begingroup\$ If you were using an AC relay instead of a DC relay and if you were using AC as the relay power source, then the MOC3021 would release the relay as soon as your photodiode stopped emitting AND the AC went through a zero-crossing. (The MOC306x includes an added zero-crossing circuit, so it won't even turn on until the zero-crossing happens even with the photodiode turned on.) \$\endgroup\$
    – jonk
    Sep 27, 2016 at 3:52
  • \$\begingroup\$ it is not possible to use AC relay or AC source, what should I do to make it work? does it need a snubber or any kind of capacitor? \$\endgroup\$
    – rocknroll
    Sep 27, 2016 at 3:59

1 Answer 1


If TRIACs have a minimal latching current going through them, they will stay on even after gate current has been removed - so with DC until the 12VDC switches off.

You need to use a transistor output optocoupler, such as 4N25, 817, etc. They are cheap and easy to find.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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