* Z:\home\khalils\Downloads\files\data\raw_asc\bdfafc1f3f6a_Draft1.asc
* Generated by LTspice 26.0.1 for Windows.
XU1 N010 0 N006 N012 PC817 Igain=1m ;pnba A)K)C)E
D1 0 N010 D
V1 N009 0 PULSE(0 5 1 0 0 2 4 3)
V2 N006 0 5
R1 N010 N009 1k
XU2 N005 0 N003 0 PC817 Igain=1m ;pnba A)K)C)E
R3 N005 N004 22k
R4 N001 N003 20k
V3 N004 0 PULSE(0 12 1 0 0 2 4 3)
Q1 N007 N013 0 0 2N3055
R2 N013 N012 1kR
R5 N002 N007 1kR
R6 N008 0 10k
S1 N008 N002 N002 N007 MYSW
V4 N002 0 24
V5 N001 0 5
R7 N019 N018 22k
R8 N015 N017 20k
V6 N018 0 PULSE(0 12 1 0 0 2 4 3)
V7 N015 0 5
Q2 N017 N019 0 0 NPN
R9 N021 N020 200
V8 N020 0 PULSE(0 5 1 0 0 2 4 3)
V9 N016 0 12
Q3 N016 N021 N022 0 NPN
R10 N022 0 200
V10 N011 0 3.3
D2 N011 N014 D
D3 N003 N014 D
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.tran 10
.model MYSW SW(Ron=1 Roff=1Meg Vt=12 Vh=0)
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Optos\PC817A.asy)
.lib PC817.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1464 692
WIRE -656 -496 -816 -496
WIRE 784 -464 576 -464
WIRE 848 -464 784 -464
WIRE -656 -400 -656 -496
WIRE -816 -384 -816 -416
WIRE -688 -320 -752 -320
WIRE -656 -320 -688 -320
WIRE -592 -320 -656 -320
WIRE -1264 -304 -1328 -304
WIRE -1040 -304 -1184 -304
WIRE -752 -304 -752 -320
WIRE -752 -304 -848 -304
WIRE -1328 -288 -1328 -304
WIRE -1328 -272 -1328 -288
WIRE 576 -256 576 -464
WIRE 672 -256 576 -256
WIRE 432 -224 336 -224
WIRE 576 -224 576 -256
WIRE 784 -224 784 -464
WIRE -1040 -208 -1088 -208
WIRE -768 -208 -848 -208
WIRE 672 -208 672 -256
WIRE 736 -208 672 -208
WIRE -1328 -176 -1328 -208
WIRE -1088 -176 -1088 -208
WIRE -768 -176 -768 -208
WIRE -688 -112 -688 -320
WIRE 336 -112 336 -144
WIRE 576 -112 576 -144
WIRE 736 -112 736 -160
WIRE 736 -112 576 -112
WIRE 784 -112 784 -144
WIRE -64 -64 -112 -64
WIRE 64 -64 16 -64
WIRE 160 -64 64 -64
WIRE 160 -48 160 -64
WIRE 176 -48 160 -48
WIRE 432 -48 432 -224
WIRE 432 -48 368 -48
WIRE -112 -32 -112 -64
WIRE 64 -32 64 -64
WIRE 576 0 576 -112
WIRE 784 0 784 -32
WIRE -928 48 -1040 48
WIRE 64 48 64 32
WIRE 176 48 64 48
WIRE 400 48 368 48
WIRE 512 48 480 48
WIRE 528 48 512 48
WIRE -928 80 -928 48
WIRE -832 80 -928 80
WIRE -688 80 -688 -48
WIRE -688 80 -768 80
WIRE -112 128 -112 48
WIRE 64 128 64 48
WIRE -1040 144 -1040 128
WIRE -368 160 -528 160
WIRE 576 160 576 96
WIRE -368 256 -368 160
WIRE 496 256 336 256
WIRE -528 272 -528 240
WIRE -368 336 -464 336
WIRE -304 336 -368 336
WIRE -976 352 -1040 352
WIRE -672 352 -896 352
WIRE -464 352 -464 336
WIRE -464 352 -560 352
WIRE -1040 368 -1040 352
WIRE 336 368 336 336
WIRE -1040 384 -1040 368
WIRE -672 400 -672 352
WIRE -624 400 -672 400
WIRE 496 432 496 256
WIRE 496 432 400 432
WIRE -480 448 -560 448
WIRE -112 448 -176 448
WIRE 192 448 -32 448
WIRE 400 448 400 432
WIRE 400 448 304 448
WIRE -176 464 -176 448
WIRE -1040 480 -1040 448
WIRE -480 480 -480 448
WIRE -176 480 -176 464
WIRE 192 496 192 448
WIRE 240 496 192 496
WIRE 384 544 304 544
WIRE 384 560 384 544
WIRE 496 560 384 560
WIRE -176 576 -176 544
WIRE 384 576 384 560
WIRE 496 672 496 640
FLAG -112 128 0
FLAG 336 -112 0
FLAG 64 128 0
FLAG -768 -176 0
FLAG -1328 -176 0
FLAG 576 160 0
FLAG 784 0 0
FLAG 848 -384 0
FLAG -1088 -176 0
FLAG -816 -384 0
FLAG -480 480 0
FLAG -1040 480 0
FLAG -528 272 0
FLAG -176 576 0
FLAG 336 368 0
FLAG 496 672 0
FLAG -1040 144 0
SYMBOL Optos\\PC817A 272 0 R0
SYMATTR InstName U1
SYMBOL diode 80 32 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMBOL voltage -112 -48 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value PULSE(0 5 1 0 0 2 4 3)
SYMBOL voltage 336 -240 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL res 32 -80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL Optos\\PC817A -944 -256 R0
SYMATTR InstName U2
SYMBOL res -1168 -320 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 22k
SYMBOL res -672 -416 R0
SYMATTR InstName R4
SYMATTR Value 20k
SYMBOL voltage -1328 -304 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value PULSE(0 12 1 0 0 2 4 3)
SYMBOL npn 512 0 R0
SYMATTR InstName Q1
SYMATTR Value 2N3055
SYMBOL res 496 32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 1kR
SYMBOL res 560 -240 R0
SYMATTR InstName R5
SYMATTR Value 1kR
SYMBOL res 768 -128 R0
WINDOW 0 40 42 Left 2
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL sw 784 -128 M180
SYMATTR InstName S1
SYMATTR Value MYSW
SYMBOL Misc\\battery 848 -480 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V4
SYMATTR Value 24
SYMBOL voltage -816 -512 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V5
SYMATTR Value 5
SYMBOL res -880 336 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 22k
SYMBOL res -384 240 R0
SYMATTR InstName R8
SYMATTR Value 20k
SYMBOL voltage -1040 352 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V6
SYMATTR Value PULSE(0 12 1 0 0 2 4 3)
SYMBOL voltage -528 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V7
SYMATTR Value 5
SYMBOL npn -624 352 R0
SYMATTR InstName Q2
SYMBOL res -16 432 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 200
SYMBOL voltage -176 448 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V8
SYMATTR Value PULSE(0 5 1 0 0 2 4 3)
SYMBOL voltage 336 240 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V9
SYMATTR Value 12
SYMBOL npn 240 448 R0
SYMATTR InstName Q3
SYMBOL res 480 544 R0
SYMATTR InstName R10
SYMATTR Value 200
SYMBOL voltage -1040 32 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V10
SYMATTR Value 3.3
SYMBOL diode -832 96 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMBOL diode -704 -112 R0
SYMATTR InstName D3
TEXT -144 184 Left 2 !.tran 10
TEXT 880 -168 Left 2 !.model MYSW SW(Ron=1 Roff=1Meg Vt=12 Vh=0)