qucs_s/library/Optocoupler.lib
2025-01-22 19:30:39 +03:00

624 lines
18 KiB
Plaintext

<Qucs Library 24.3.0 "Optocoupler">
<Component 4N25>
<Description>
4N25 BJT optocoupler
</Description>
<Model>
.Def:Optocoupler_4N25 _net0 _net1 _net2 _net3
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="n4N25_cir"
.Def:End
</Model>
<Spice>
* OPTO-ISO from User Library in TURBO SPICE
* Orig 8/17/99
* Modified TMH 2/15/23
*
*4N25 NPN Optoisolator pkg:DIP6
* Transistor Base not modeled
* A K C E
.SUBCKT 4N25 1 2 5 4
VM 1 12 DC 0
D1 12 2 LED
R1 10 11 450
C1 11 0 1000PF
H1 10 0 VM 3.33E-2
G1 5 6 11 0 1
Q1 5 6 4 QNPN
.MODEL LED D(IS=2.5E-12 RS=.75 CJO=3.5E-11 N=2)
.MODEL QNPN NPN(IS=3.33E-11 NF=1.35 CJC=4.74E-11 CJE=167E-12 TF=9.23E-10 TR=1.48E-7 BF=150 BR=10 IKF=.1 VAF=100)
.ENDS
.SUBCKT Optocoupler_4N25 gnd _net0 _net1 _net2 _net3
X1 _net0 _net1 _net2 _net3 4N25
.ENDS
</Spice>
<Symbol>
<Line -21 6 -18 0 #000080 2 1>
<Line -21 -6 -18 0 #000080 2 1>
<Line 20 15 0 -30 #000080 3 1>
<Line 30 30 0 -15 #000080 2 1>
<Line 20 -5 10 -10 #000080 2 1>
<Arrow 20 5 10 10 6 3 #000080 2 1 1>
<Line -30 6 -9 -12 #000080 2 1>
<Line -30 6 9 -12 #000080 2 1>
<Line -6 -6 4 -4 #000080 2 1>
<Line -12 -12 6 6 #000080 2 1>
<Arrow -2 -10 10 10 9 3 #000080 2 1 1>
<Arrow -4 0 10 10 9 3 #000080 2 1 1>
<Line -8 4 4 -4 #000080 2 1>
<Line -14 -2 6 6 #000080 2 1>
<Line -50 -20 100 0 #808080 2 1>
<Line -50 20 0 -40 #808080 2 1>
<Line 50 20 0 -40 #808080 2 1>
<Line -30 30 0 -24 #000080 2 1>
<Line -30 -6 0 -24 #000080 2 1>
<Line 30 -15 0 -15 #000080 2 1>
<Line -50 20 100 0 #808080 2 1>
<.PortSym -30 -30 1 0 P1>
<.PortSym -30 30 2 0 P2>
<.PortSym 30 -30 3 180 P3>
<.PortSym 30 30 4 180 P4>
<.ID 70 -16 X>
</Symbol>
</Component>
<Component 4N33>
<Description>
4N33 Dralington optocoupler
</Description>
<Model>
.Def:Optocoupler_4N33 _net3 _net4 _net2 _net0 _net1
Sub:X2 _net0 _net1 _net2 _net3 _net4 gnd Type="n4n33_cir"
.Def:End
</Model>
<Spice>
.subckt 4n33_MC 4 5 3 1 2
* 4 -> LED ANODE 5 -> LED CATHODE
* 3 -> EMITTER 1 -> COLLECTOR 2 -> BASE
DIO 4 10 4n33_dio
VD 10 5 0V
RD 4 5 6e7
FDD 0 2 VD 0.15
RF 2 0 1e9
CF 1 4 1e-12
XDAR 1 2 3 4n33_dar
RDAR 1 3 4e9
* MODEL FORMAT: PSpice
.MODEL 4n33_dio d(
+ IS=2.90836e-12 RS=1.81548 N=2 EG=0.644108
+ XTI=3.99996 BV=1000 IBV=0.0001 CJO=2.02387e-11
+ VJ=0.4 M=0.271299 FC=0.5 TT=1e-09
+ KF=0 AF=1)
.ends 4n33_MC
.SUBCKT 4n33_dar 1 2 3
* MODEL FORMAT: PSpice
* Darlington macro model
* External node designations
* Node 1 -> Collect
* Node 2 -> Base
* Node 3 -> Emitter
Q1 1 2 4 qmodel
Q2 1 4 3 q1model 8.93463
D1 3 1 dmodel
R1 2 4 10000
R2 4 3 1000
* Default values used in dmodel
* EG=1.11 TT=0 BV=infinite
.MODEL dmodel d(
+ IS=1e-12 RS=10.5392 N=1.00539 XTI=3.00539
+ CJO=0 VJ=0.75 M=0.33 FC=0.5
.MODEL qmodel npn(
+ IS=2.40152e-12 BF=46.1011 NF=1.2 VAF=30
+ IKF=0.00662634 ISE=9.73117e-14 NE=1.23006 BR=4.14416
+ NR=1.5 VAR=146.759 IKR=0.0662634 ISC=9.73117e-14
+ NC=2.0474 RB=10.7666 IRB=0.205422 RBM=10.5475
+ RE=0.100058 RC=0.99859 XTB=0.457057 XTI=2.9909 EG=1.05
+ CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09
+ XTF=1 VTF=10 ITF=0.01 CJC=1e-11
+ VJC=0.75 MJC=0.33 XCJC=0.9 FC=0.5
+ TR=1e-07 PTF=0 KF=0 AF=1)
.MODEL q1model npn(
+ IS=2.40152e-12 BF=46.1011 NF=1.2 VAF=30
+ IKF=0.00662634 ISE=9.73117e-14 NE=1.23006 BR=4.14416
+ NR=1.5 VAR=146.759 IKR=0.0662634 ISC=9.73117e-14
+ NC=2.0474 RB=10.7666 IRB=0.205422 RBM=10.5475
+ RE=0.100058 RC=0.99859 XTB=0.457057 XTI=2.9909 EG=1.05
+ CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09
+ XTF=1 VTF=10 ITF=0.01 CJC=0
+ VJC=0.75 MJC=0.33 XCJC=0.9 FC=0.5
+ TR=1e-07 PTF=0 KF=0 AF=1)
.ENDS
.SUBCKT Optocoupler_4N33 gnd _net3 _net4 _net2 _net0 _net1
X2 _net0 _net1 _net2 _net3 _net4 4n33_MC
.ENDS
</Spice>
<Symbol>
<.ID 70 -16 X>
<Line -21 6 -18 0 #000080 2 1>
<Line -21 -6 -18 0 #000080 2 1>
<Line -30 6 -9 -12 #000080 2 1>
<Line -30 6 9 -12 #000080 2 1>
<Line -30 30 0 -24 #000080 2 1>
<Line -30 -6 0 -24 #000080 2 1>
<Line 40 15 0 -30 #000080 3 1>
<Line 50 30 0 -15 #000080 2 1>
<Line 40 -5 10 -10 #000080 2 1>
<Arrow 40 5 10 10 6 3 #000080 2 1 1>
<Line 50 -15 0 -15 #000080 2 1>
<Line 20 -10 0 -20 #000080 2 1>
<Line 40 0 -10 0 #000080 2 1>
<Line 30 0 -10 -10 #000080 2 1>
<Line 4 -6 4 -4 #000080 2 1>
<Line -2 -12 6 6 #000080 2 1>
<Arrow 8 -10 10 10 9 3 #000080 2 1 1>
<Arrow 6 0 10 10 9 3 #000080 2 1 1>
<Line 2 4 4 -4 #000080 2 1>
<Line -4 -2 6 6 #000080 2 1>
<Line -45 20 0 -40 #000080 2 1>
<Line 65 20 0 -40 #000080 2 1>
<Line -45 20 110 0 #000080 2 1>
<Line -45 -20 110 0 #000080 2 1>
<.PortSym -30 -30 4 180 P4>
<.PortSym -30 30 5 0 P5>
<.PortSym 50 30 3 180 P3>
<.PortSym 50 -30 1 0 P1>
<.PortSym 20 -30 2 0 P2>
</Symbol>
</Component>
<Component ACPLK30T>
<Description>
Automotive MOSFET driver photovoltaic optocoupler
</Description>
<Model>
.Def:Optocoupler_ACPLK30T _net0 _net1 _net2 _net3
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="ACPLK30T_cir"
.Def:End
</Model>
<Spice>
* Copyright 2014 Avago Technologies
* ACPL-K30T Spice Macromodel
* Modified 2/22/23
* ACPL-K30T.cir changed to ACPLK30T.cir to remove need for LTspice compat
* Dietmar Warning, add NR=2 to .model PDC
* https://sourceforge.net/p/ngspice/discussion/120973/thread/8c874eb3ec/
*
.subckt ACPLK30T AN CA VOUT+ VOUT-
*E1 N002 CA N014 N016 {CTR} ; removed need for LTspice compat
E1 N002 CA N014 N016 0.083
XX1 AN CA N016 N014 vbu
XX2 N002 CA N017 N015 pdnoc
XX3 N002 CA N008 N017 pdnoc
XX4 N002 CA N015 N013 pdnoc
XX5 N002 CA N013 N012 pdnoc
XX6 N002 CA N012 N010 pdnoc
XX7 N002 CA N010 N007 pdnoc
XX8 N002 CA N007 N004 pdnoc
XX9 N002 CA N004 N003 pdnoc
XX10 N002 CA N003 P001 pdnoc
XX11 N002 CA P002 P003 pdnoc
XX12 N002 CA P003 N001 pdnoc
XX13 N002 CA P001 P002 pdnoc
E2 N011 VOUT- N008 N001 1
R2 N009 N011 1k
D1 VOUT- N001 D
D2 N008 VOUT+ D
E3 N009 N006 N008 VOUT- 1
Q1 VOUT+ N006 N005 0 NPN
R3 VOUT- N005 3k
C1 VOUT- N009 37n
C2 VOUT- VOUT+ 100p
*.param CTR=0.083 ; removed need for LTspice compat
.ends ACPLK30T
.subckt vbu AN CA LOPN LOPP
RSERIES AN 5 5
DELECT 5 CA VBUNOR
ELED 6 LOPN 5 CA 1
DOPTIC 6 8 VBUNORC
FPHOTO LOPN 3 VSENSE 1
VSENSE 8 LOPN 0
RL 3 LOPN 0.1
EOUT LOPP LOPN 3 LOPN 60
VSIM LOPN CA 0
Rnl 6 N001 5k
Vnl N002 LOPN 0
Fnl LOPN LOPN Vnl 1
Dsw N001 N002 DSW
.model DSW D Is=1e-4
.model VBUNOR D IS=330E-21 N=1.5 XTI=3 EG=1.52 BV=10.38 IBV=100u CJO=60p VJ=.75 M=.3333 FC=.5 TT=20n
.model VBUNORC D IS=330E-21 N=1.5 XTI=3 EG=1.52 BV=10.38 IBV=100u CJO=0 VJ=.75 M=.3333 FC=.5 TT=0
.ends vbu
.subckt pdnoc LOPP LOPN AN CA
D1 AN CA PDC
G1 CA AN LOPP LOPN 0.0010
.model PDC D IS=1E-14 N=1.5 CJO=10p M=0.95 VJ=0.75 ISR=100.0E-12 BV=100 TT=5E-9 NR=2; NR=2 added for ngspice
.ends pdnoc
.model D D
.model NPN NPN
.model PNP PNP
.SUBCKT Optocoupler_ACPLK30T gnd _net0 _net1 _net2 _net3
X1 _net0 _net1 _net2 _net3 ACPLK30T
.ENDS
</Spice>
<Symbol>
<.ID -40 -96 U>
<.PortSym -60 -30 1 0 AN>
<.PortSym -60 30 2 0 CA>
<.PortSym 80 -30 3 180 VOUT_P>
<.PortSym 80 30 4 180 VOUT_N>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Line 0 0 0 0 #000080 0 1>
<Line 5 -5 -5 10 #000080 2 1>
<Line -5 -5 10 0 #000080 2 1>
<Line -15 5 20 -10 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 20 -30 60 0 #000080 2 1>
<Line 20 -25 0 -5 #000080 2 1>
<Line 20 30 0 -10 #000080 2 1>
<Line 10 -25 20 0 #000080 2 1>
<Line 10 -15 20 0 #000080 2 1>
<Line 15 -10 10 0 #000080 2 1>
<Line 10 -5 20 0 #000080 2 1>
<Line 15 0 10 0 #000080 2 1>
<Line 10 5 20 0 #000080 2 1>
<Line 15 10 10 0 #000080 2 1>
<Line 10 15 20 0 #000080 2 1>
<Line 15 20 10 0 #000080 2 1>
<Line 15 -20 10 0 #000080 2 1>
<Line 80 30 -60 0 #000080 2 1>
<Rectangle 40 -20 20 40 #000080 2 1 #c0c0c0 1 0>
<Line 50 -20 0 -10 #000080 2 1>
<Line 50 30 0 -10 #000080 2 1>
<Text 46 16 5 #000080 90 "TURN OFF">
<Line 50 -35 0 -10 #000080 2 1>
<Line 45 -40 10 0 #000080 2 1>
<Line 45 40 10 0 #000080 2 1>
</Symbol>
</Component>
<Component MOC223>
<Description>
MOC223 Dralington optocoupler
</Description>
<Model>
.Def:Optocoupler_MOC223 _net0 _net2 _net1 _net3 _net4
Sub:X2 _net3 _net4 _net1 _net0 _net2 gnd Type="moc223_cir"
.Def:End
</Model>
<Spice>
.subckt moc223_MC 4 5 3 1 2
DIO 4 10 moc223_dio
VD 10 5 0V
RD 4 5 6e7
FI 0 11 VD 1
RFI 11 0 1000
XDL 11 0 12 delay_Sub
VDD 12 13 0
RXDL 13 0 1000
FDD 0 2 VDD 0.1
RF 2 0 1e9
CF 1 4 1e-12
XDAR 1 2 3 moc223_dar
RDAR 1 3 4e9
.MODEL moc223_dio d
+ IS=2.12534e-12 RS=1.37765 N=2 EG=0.6
+ XTI=2.96819 BV=1000 IBV=0.0001 CJO=1.84171e-11
+ VJ=1.203 M=0.356504 FC=0.5 TT=1e-09
+ KF=0 AF=1
.ends moc223_MC
.SUBCKT delay_Sub 1 2 3
RIN 1 2 1.0E9
E1 10 0 1 2 1
TD 10 0 11 0 Z0=50 TD=3e-06
RD 11 0 50
EO 30 2 11 0 1
RO1 30 3 1
RO2 3 2 1.0E9
.ENDS
.SUBCKT moc223_dar 1 2 3
Q1 1 2 4 qmodel
Q2 1 4 3 q1model 8.88022
D1 3 1 dmodel
R1 2 4 10000
R2 4 3 1000
* Default values used in dmodel
* EG=1.11 TT=0 BV=infinite
.MODEL dmodel d
+ IS=1e-12 RS=9.52529 N=0.995253 XTI=2.99525
+ CJO=0 VJ=0.75 M=0.33 FC=0.5
.MODEL qmodel npn
+ IS=2.99506e-12 BF=19.5647 NF=1.11791 VAF=56.0325
+ IKF=0.088067 ISE=1.43852e-13 NE=2.13329 BR=1.01562
+ NR=1.45409 VAR=98.9714 IKR=0.0952542 ISC=9.99997e-14
+ NC=1.99519 RB=9.57894 IRB=0.195253 RBM=9.52549
+ RE=0.0977153 RC=0.999915 XTB=0.503191 XTI=2.99553 EG=1.11591
+ CJE=2.15822e-11 VJE=0.95 MJE=0.23 TF=9.99885e-10
+ XTF=1 VTF=10 ITF=0.01 CJC=1.56635e-11
+ VJC=0.432344 MJC=0.345351 XCJC=0.9 FC=0.5
+ TR=1e-07 PTF=0 KF=0 AF=1
.MODEL q1model npn
+ IS=2.99506e-12 BF=19.5647 NF=1.11791 VAF=56.0325
+ IKF=0.088067 ISE=1.43852e-13 NE=2.13329 BR=1.01562
+ NR=1.45409 VAR=98.9714 IKR=0.0952542 ISC=9.99997e-14
+ NC=1.99519 RB=9.57894 IRB=0.195253 RBM=9.52549
+ RE=0.0977153 RC=0.999915 XTB=0.503191 XTI=2.99553 EG=1.11591
+ CJE=2.15822e-11 VJE=0.95 MJE=0.23 TF=9.99885e-10
+ XTF=1 VTF=10 ITF=0.01 CJC=0
+ VJC=0.432344 MJC=0.345351 XCJC=0.9 FC=0.5
+ TR=1e-07 PTF=0 KF=0 AF=1
.ENDS
.SUBCKT Optocoupler_MOC223 gnd _net0 _net2 _net1 _net3 _net4
X2 _net3 _net4 _net1 _net0 _net2 moc223_MC
.ENDS
</Spice>
<Symbol>
<.ID 70 -16 X>
<Line -21 6 -18 0 #000080 2 1>
<Line -21 -6 -18 0 #000080 2 1>
<Line -30 6 -9 -12 #000080 2 1>
<Line -30 6 9 -12 #000080 2 1>
<Line -30 30 0 -24 #000080 2 1>
<Line -30 -6 0 -24 #000080 2 1>
<Line 40 15 0 -30 #000080 3 1>
<Line 50 30 0 -15 #000080 2 1>
<Line 40 -5 10 -10 #000080 2 1>
<Arrow 40 5 10 10 6 3 #000080 2 1 1>
<Line 50 -15 0 -15 #000080 2 1>
<Line 20 -10 0 -20 #000080 2 1>
<Line 40 0 -10 0 #000080 2 1>
<Line 30 0 -10 -10 #000080 2 1>
<Line 4 -6 4 -4 #000080 2 1>
<Line -2 -12 6 6 #000080 2 1>
<Arrow 8 -10 10 10 9 3 #000080 2 1 1>
<Arrow 6 0 10 10 9 3 #000080 2 1 1>
<Line 2 4 4 -4 #000080 2 1>
<Line -4 -2 6 6 #000080 2 1>
<Line -45 20 0 -40 #000080 2 1>
<Line 65 20 0 -40 #000080 2 1>
<Line -45 20 110 0 #000080 2 1>
<Line -45 -20 110 0 #000080 2 1>
<.PortSym -30 -30 4 180 P4>
<.PortSym -30 30 5 0 P5>
<.PortSym 50 30 3 180 P3>
<.PortSym 50 -30 1 0 P1>
<.PortSym 20 -30 2 0 P2>
</Symbol>
</Component>
<Component MOC3082>
<Description>
MOC3082 OPTO TRIAC with zero crossing switching
model provided by Helmut Sennewald 11/23/2008
</Description>
<Model>
.Def:Optocoupler_MOC3082 _net0 _net3 _net1 _net2
Sub:X1 _net0 _net3 _net1 _net2 gnd Type="MOC3082_sub_cir"
.Def:End
</Model>
<Spice>
* OPTO TRIAC With Zero Crossing Switching
* Helmut Sennewald 11/23/2008
* 04/12/2009, change in B-sources: V(ctrl10) -> V(ctrl10,4)
*
* Ported to ngspice Vadim Kusnetsov 2/15/23
*
* MOC3082 I_trig=10mA
* D+ D- MT2 MT1
*
.subckt moc3082_sub 1 2 3 4
.PARAM Itrig=10m
.PARAM RH1=20k
.PARAM RH2=20k
.PARAM RH3=16.7k
Q1 vb1p vb1 4 0 NPN1
Q2 vb1 vb1p vd1 0 PNP1
R3 vb1 4 {RH2}
D1 1 2 DL
R1 ctrl10 4 1
C1 ctrl10 4 10u
R2 ctrl1 vb1 {RH1}
R4 vd1 vb1p {RH3}
B1 ctrl10 4 I=-500*I(D1)*3m/Itrig
R7 vb2p 4 {RH3}
R6 vd2 vb2 {RH2}
Q3 vb2p vb2 vd2 0 NPN1
Q4 vb2 vb2p 4 0 PNP1
D3 vd2 3 D1
D2 3 vd1 D1
R5 N001 vb2 {RH1}
E1 vd2 N001 ctrl1 4 -1
R34 3 4 100MEG
R12 ctrl1 4 1
B2 ctrl1 4 V=(V(ctrl10,4)>1.45 && abs(V(34)) < 12?2:0)
C2 ctrl1 4 1u
B3 34 0 I=-V(3,4)/1000
R13 34 0 1k
C3 34 0 .1u
.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)
*.ends moc3082_sub
.ends moc3082
.SUBCKT Optocoupler_MOC3082 gnd _net0 _net3 _net1 _net2
X1 _net0 _net3 _net1 _net2 moc3082_sub
.ENDS
</Spice>
<Symbol>
<.ID -40 -96 X>
<.PortSym -60 -30 1 0 P1>
<.PortSym -60 30 2 0 P2>
<.PortSym 80 -30 3 180 P3>
<.PortSym 80 30 4 180 P4>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 40 6 0 24 #000080 2 1>
<Line 40 -30 0 24 #000080 2 1>
<Line 58 6 -36 0 #000080 2 1>
<Line 22 10 5 0 #000080 2 3>
<Line 27 10 4 -4 #000080 2 3>
<Line 31 6 -9 -12 #000080 2 1>
<Line 31 6 9 -12 #000080 2 1>
<Line 49 -6 9 12 #000080 2 1>
<Line 49 -6 -9 12 #000080 2 1>
<Line 58 -6 -36 0 #000080 2 1>
<Line -10 2 4 -4 #000080 2 1>
<Line -16 -4 6 6 #000080 2 1>
<Arrow -6 -2 10 10 9 3 #000080 2 1 1>
<Arrow -8 8 10 10 9 3 #000080 2 1 1>
<Line -12 12 4 -4 #000080 2 1>
<Line -18 6 6 6 #000080 2 1>
<Rectangle 6 14 24 20 #000080 2 1 #c0c0c0 1 0>
<Line 22 14 0 -4 #000080 2 3>
<Text 8 18 8 #000080 0 "ZCC">
<Line 14 14 0 -28 #000080 2 3>
<Line 14 -14 26 0 #000080 2 3>
<Line 30 24 10 0 #000080 2 3>
<Line 80 30 -40 0 #000080 2 1>
<Line 80 -30 -40 0 #000080 2 1>
</Symbol>
</Component>
<Component MOC3052>
<Description>
600V triac optocoupler; no zero-cross. LTspice mode is required for this model. Designed by Zabb Csaba: https://fotoelektronika.com/spice-models/
</Description>
<Model>
.Def:Optocoupler_MOC3052 _net0 _net3 _net1 _net2
SpLib:X1 _net0 _net3 _net1 _net2 File="moc3052_3062.cir" Device="MOC3052" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT Optocoupler_MOC3052 gnd _net0 _net3 _net1 _net2
XX1 _net0 _net3 _net1 _net2 MOC3052
.ENDS
</Spice>
<SpiceAttach "moc3052_3062.cir">
<Symbol>
<.ID -40 -96 X>
<.PortSym -60 -30 1 0 P1>
<.PortSym -60 30 2 0 P2>
<.PortSym 80 -30 3 180 P3>
<.PortSym 80 30 4 180 P4>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 40 6 0 24 #000080 2 1>
<Line 40 -30 0 24 #000080 2 1>
<Line 58 6 -36 0 #000080 2 1>
<Line 31 6 -9 -12 #000080 2 1>
<Line 31 6 9 -12 #000080 2 1>
<Line 49 -6 9 12 #000080 2 1>
<Line 49 -6 -9 12 #000080 2 1>
<Line 58 -6 -36 0 #000080 2 1>
<Line 80 30 -40 0 #000080 2 1>
<Line 80 -30 -40 0 #000080 2 1>
<Line 0 2 4 -4 #000080 2 1>
<Line -6 -4 6 6 #000080 2 1>
<Arrow 4 -2 10 10 9 3 #000080 2 1 1>
<Arrow 2 8 10 10 9 3 #000080 2 1 1>
<Line -2 12 4 -4 #000080 2 1>
<Line -8 6 6 6 #000080 2 1>
</Symbol>
</Component>
<Component MOC3063>
<Description>
600V triac optocoupler with zero-cross detector. LTspice mode is required for this model. Designed by Zabb Csaba: https://fotoelektronika.com/spice-models/
</Description>
<Model>
.Def:Optocoupler_MOC3063 _net0 _net3 _net1 _net2
SpLib:X1 _net0 _net3 _net1 _net2 File="moc3052_3062.cir" Device="MOC3063" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT Optocoupler_MOC3063 gnd _net0 _net3 _net1 _net2
XX1 _net0 _net3 _net1 _net2 MOC3063
.ENDS
</Spice>
<SpiceAttach "moc3052_3062.cir">
<Symbol>
<.ID -40 -96 X>
<.PortSym -60 -30 1 0 P1>
<.PortSym -60 30 2 0 P2>
<.PortSym 80 -30 3 180 P3>
<.PortSym 80 30 4 180 P4>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 40 6 0 24 #000080 2 1>
<Line 40 -30 0 24 #000080 2 1>
<Line 58 6 -36 0 #000080 2 1>
<Line 22 10 5 0 #000080 2 3>
<Line 27 10 4 -4 #000080 2 3>
<Line 31 6 -9 -12 #000080 2 1>
<Line 31 6 9 -12 #000080 2 1>
<Line 49 -6 9 12 #000080 2 1>
<Line 49 -6 -9 12 #000080 2 1>
<Line 58 -6 -36 0 #000080 2 1>
<Line -10 2 4 -4 #000080 2 1>
<Line -16 -4 6 6 #000080 2 1>
<Arrow -6 -2 10 10 9 3 #000080 2 1 1>
<Arrow -8 8 10 10 9 3 #000080 2 1 1>
<Line -12 12 4 -4 #000080 2 1>
<Line -18 6 6 6 #000080 2 1>
<Rectangle 6 14 24 20 #000080 2 1 #c0c0c0 1 0>
<Line 22 14 0 -4 #000080 2 3>
<Text 8 18 8 #000080 0 "ZCC">
<Line 14 14 0 -28 #000080 2 3>
<Line 14 -14 26 0 #000080 2 3>
<Line 30 24 10 0 #000080 2 3>
<Line 80 30 -40 0 #000080 2 1>
<Line 80 -30 -40 0 #000080 2 1>
</Symbol>
</Component>