* Z:\home\khalils\Downloads\files\data\raw_asc\0326935b8dd2_4N25Tst.asc
* Generated by LTspice 26.0.1 for Windows.
* Need to look for a better Opto-Coupler
* Need to look for a faster transistor
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Optos\4N25.asy)
C2 DATA_IN N004 47nF
V3 N001 0 5 Rser=0.1
R5 N002 DATA_IN 470
V1 N003 0 24 Rser=0.1
D1 K2 N001 1N4148
R6 K2 DATA_IN 10K
XU2 N001 K2 Q1B 0 NC_01 4N25 ;pnba A)K)C)E)B
Q1 Q1C_OUT Q1B 0 0 2N4401
R2 N004 A1 470
R3 N005 0 1Meg
R1 DATA_IN A1 2.21K
C1 Q1C_OUT 0 1pF
D2 0 A1 1N4148
V2 DATA_IN 0 PULSE(0 5 0.0004 0.000001 0.000001 0.0001 0.0002 10) Rser=1
R4 N003 Q1C_OUT 400 tol=1 pwr=4
XU1 A1 0 Q1C_OUT Q1B N005 4N25 ;pnba A)K)C)E)B
C3 K2 N002 47nF
.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 0.0015
.lib 4N25.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1624 772
WIRE -464 288 -464 240
WIRE -880 240 -624 240
WIRE -400 -96 -464 -96
WIRE -400 -192 -464 -192
WIRE -464 240 -96 240
WIRE -96 240 -96 144
WIRE -208 -96 -96 -96
WIRE -96 -96 -96 64
WIRE -96 240 208 240
WIRE 1168 -432 1168 -576
WIRE 1168 -576 1488 -576
WIRE 1488 -576 1488 -240
WIRE 1488 240 1488 -160
WIRE -880 -112 -880 240
WIRE -880 -192 -880 -592
WIRE 1168 -144 1168 -256
WIRE -768 -592 -880 -592
WIRE -464 -592 -624 -592
WIRE -464 -96 -464 240
WIRE -464 -592 -464 -496
WIRE -464 -192 -464 -384
WIRE 1168 240 1168 -80
WIRE 1168 240 1488 240
WIRE 912 240 912 -80
WIRE 912 240 1168 240
WIRE -208 -128 -16 -128
WIRE 912 -176 912 -192
WIRE 912 -256 976 -256
WIRE 1168 -256 1168 -352
WIRE 976 -256 1168 -256
WIRE -208 -192 912 -192
WIRE 912 -192 912 -256
WIRE -464 -192 -560 -192
WIRE -624 -192 -624 -256
WIRE -624 -336 -624 -384
WIRE -624 -448 -624 -592
WIRE -624 -592 -768 -592
WIRE -16 -128 272 -128
WIRE 128 -928 208 -928
WIRE 208 -928 208 240
WIRE 208 240 912 240
WIRE 128 -992 272 -992
WIRE 272 -992 272 -128
WIRE 272 -128 848 -128
WIRE -160 -496 -160 -560
WIRE -160 -640 -160 -688
WIRE -160 -752 -160 -768
WIRE -64 -896 -160 -896
WIRE -160 -496 -464 -496
WIRE -464 -496 -464 -464
WIRE -560 -704 -560 -848
WIRE -64 -992 -304 -992
WIRE -560 -992 -560 -928
WIRE -304 -800 -304 -768
WIRE -304 -768 -160 -768
WIRE -160 -768 -160 -880
WIRE -304 -864 -304 -992
WIRE -304 -992 -560 -992
WIRE -160 -880 -160 -896
WIRE -560 -192 -624 -192
WIRE -160 -496 -48 -496
WIRE -48 -496 -48 -560
WIRE -160 -768 -48 -768
WIRE -48 -768 -48 -640
WIRE -624 64 -624 240
WIRE -624 240 -464 240
WIRE -624 0 -624 -192
SYMBOL res -64 -656 R0
SYMATTR InstName R6
SYMATTR Value 10K
SYMBOL diode -288 -800 R180
WINDOW 0 24 72 Left 0
WINDOW 3 24 0 Left 0
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL cap 1152 -144 R0
SYMATTR InstName C1
SYMATTR Value 1pF
SYMBOL voltage 1488 -256 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 0
SYMATTR SpiceLine Rser=0.1
SYMATTR InstName V1
SYMATTR Value 24
SYMBOL res 1152 -448 R0
SYMATTR InstName R4
SYMATTR Value 400
SYMATTR SpiceLine tol=1 pwr=4
SYMBOL res -640 -352 R0
SYMATTR InstName R2
SYMATTR Value 470
SYMBOL res -112 48 R0
SYMATTR InstName R3
SYMATTR Value 1MEG
SYMBOL cap -176 -752 R0
SYMATTR InstName C3
SYMATTR Value 47nF
SYMBOL voltage -880 -208 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 0
WINDOW 3 -137 116 Left 0
SYMATTR SpiceLine Rser=1
SYMATTR Value PULSE(0 5 0.0004 0.000001 0.000001 0.0001 0.0002 10)
SYMATTR InstName V2
SYMBOL cap -640 -448 R0
SYMATTR InstName C2
SYMATTR Value 47nF
SYMBOL diode -608 64 R180
WINDOW 0 24 72 Left 0
WINDOW 3 24 0 Left 0
SYMATTR InstName D2
SYMATTR Value 1N4148
SYMBOL voltage -560 -944 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 0
SYMATTR SpiceLine Rser=0.1
SYMATTR InstName V3
SYMATTR Value 5
SYMBOL res -176 -656 R0
SYMATTR InstName R5
SYMATTR Value 470
SYMBOL res -480 -480 R0
SYMATTR InstName R1
SYMATTR Value 2.21K
SYMBOL npn 848 -176 R0
SYMATTR InstName Q1
SYMATTR Value 2N4401
SYMBOL Optos\\4N25 -304 -128 R0
SYMATTR InstName U1
SYMBOL Optos\\4N25 32 -928 R0
SYMATTR InstName U2
FLAG -464 288 0
FLAG -768 -592 DATA_IN
FLAG 976 -256 Q1C_OUT
FLAG -16 -128 Q1B
FLAG -560 -704 0
FLAG -160 -880 K2
FLAG -560 -192 A1
TEXT -1020 -56 Left 0 !.tran 0.0015
TEXT -392 -328 Left 0 ;Need to look for a better Opto-Coupler
TEXT 680 -328 Left 0 ;Need to look for a faster transistor