# Why this optoisolator triac (MOC3021) using for DC/DC switching is not turing off?

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

• You cant turn off a triac with DC. You need a transistor output optocoupler. – Wesley Lee Sep 27 '16 at 3:47
• 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. – jonk Sep 27 '16 at 3:48
• you mean If I switch with AC side of power supply it works ok? – rocknroll Sep 27 '16 at 3:49
• 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.) – jonk Sep 27 '16 at 3:52
• 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? – rocknroll Sep 27 '16 at 3:59