I've been looking to simulate an optocoupler-triac driver for an AC Load in Multisim but I can't find a working model for a light emitting optocoupler specifically(the MOC-30XX family). I would really appreciate if someone could guide me where to find a working model or how to create one. Thank you in advance.

  • \$\begingroup\$ The place I'd look is at the LTspice group on IO. You can sign up there and get access to their files. Look in their Files/z_yahoo/Lib/Opto/MOC302x OPTO TRIAC folder. It's got what you need, I think. \$\endgroup\$
    – jonk
    Oct 12, 2020 at 16:23
  • \$\begingroup\$ I could post up the files for you, though. Which do you prefer? \$\endgroup\$
    – jonk
    Oct 12, 2020 at 16:31
  • \$\begingroup\$ Thanks @jonk, can you post the MOC3021 please? \$\endgroup\$ Oct 13, 2020 at 16:34
  • \$\begingroup\$ Did you get a chance to try out the model below? I hope it helped. \$\endgroup\$
    – jonk
    Oct 23, 2020 at 0:10

1 Answer 1


This model is taken from an LTspice yahoo group (that has since moved to a .IO site.)

* Helmut Sennewald  8/10/2004
* MOC3021  I_trig=8mA
*  D+  D-  MT2  MT1
.SUBCKT MOC3021 1 2 3 4
.PARAM Itrig=8m
.PARAM RH1=20k
.PARAM RH2=20k
.PARAM RH3=16.7k
Q2 vb1 vb1p vd1 0 PNP1 off
Q1 vb1p vb1 4 0 NPN1 off
R3 vb1 4 {RH2}
D1 1 2 DL
R1 ctrl1 4 1
C1 ctrl1 4 10µ
R2 ctrl1 vb1 {RH1}
R4 vd1 vb1p {RH3}
B1 ctrl1 4 I=-500*I(D1)*3m/Itrig 
R6 vd2 vb2 {RH2}
D3 vd2 3 D1
Q3 vb2 vb2p 4 0 PNP1 off
Q4 vb2p vb2 vd2 0 NPN1 off
E1 vd2 N001 ctrl1 4 -1
R5 N001 vb2 {RH1}
R7 vb2p 4 {RH3}
D2 3 vd1 D1
R34 3 4 10000MEG
C34 3 4 30p
.MODEL PNP1 PNP(Is=1e-15 BF=10 Cjc=10p Cje=20p Tf=0.1u Ise=1e-12)
.MODEL NPN1 NPN(Is=1e-15 BF=10 Cjc=10p Cje=20p Tf=0.1u Ise=1e-12)
.MODEL D1 D(Is=0.1u Rs=2 Cj0=50p)
.MODEL DL D(Is=1e-20 Rs=5)

This is to be used with an "X" card in a Spice program. I don't know how that is handled in your Spice program. But all Spice programs support it in some fashion. The above model should work okay.


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.