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

digital-logicopto-isolatortriac

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.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

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.