* Z:\home\khalils\Downloads\files\data\raw_asc\51c5633f2a4a_TermostatoOT.asc
* Generated by LTspice 26.0.1 for Windows.
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Optos\PC817A.asy)
V1 N001 N007 24
XU2 N010 N002 P001 RX PC817 Igain=1m ;pnba A)K)C)E
D5 N002 N009 1N750
R4 OT1 N001 100
D6 N002 N004 BZX84C15L
VTX N006 0 PULSE(0 3.3 0 0 0 5m 10m)
D4 N002 0 1N4148
R1 N004 N003 330
I1 0 N007 PULSE(6m 17m 0 0 0 5m 10m)
D3 N002 OT1 1N4148
M1 N009 N004 N003 N003 AO3423
R5 N006 N005 330
D1 OT1 N003 1N4148
R3 N010 N002 100
XU1 N005 0 N004 N008 PC817 Igain=1m ;pnba A)K)C)E
V3 P001 0 3.3
D7 N002 N008 1N750
D2 0 N003 1N4148
R2 N009 N010 220
R6 RX 0 10k
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 100m
.lib PC817.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1636 680
WIRE -384 -208 -496 -208
WIRE -160 -208 -304 -208
WIRE 48 -208 -160 -208
WIRE -496 -144 -496 -208
WIRE -32 -112 -96 -112
WIRE 48 -112 48 -208
WIRE 48 -112 32 -112
WIRE 80 -112 48 -112
WIRE 192 -112 144 -112
WIRE 192 -64 192 -112
WIRE 336 -64 192 -64
WIRE 384 -64 336 -64
WIRE 496 -64 464 -64
WIRE 656 -64 496 -64
WIRE 896 -64 848 -64
WIRE 1104 -64 976 -64
WIRE -496 -32 -496 -64
WIRE -96 0 -96 -112
WIRE -32 0 -96 0
WIRE 48 0 32 0
WIRE 80 0 48 0
WIRE 192 0 192 -64
WIRE 192 0 144 0
WIRE 336 32 336 -64
WIRE 656 32 576 32
WIRE 880 32 848 32
WIRE 496 48 496 -64
WIRE 496 48 384 48
WIRE 880 64 880 32
WIRE 1104 64 1104 16
WIRE -496 80 -496 48
WIRE -240 80 -496 80
WIRE -160 80 -240 80
WIRE 48 80 48 0
WIRE 48 80 -160 80
WIRE -240 112 -240 80
WIRE 496 128 496 48
WIRE 336 144 336 128
WIRE 336 144 256 144
WIRE 336 160 336 144
WIRE 256 208 256 144
WIRE 336 256 336 240
WIRE 768 256 336 256
WIRE 1072 256 1040 256
WIRE 336 272 336 256
WIRE 1072 288 1072 256
WIRE 576 336 576 32
WIRE 768 352 640 352
WIRE 1008 352 960 352
WIRE 1104 352 1008 352
WIRE -96 400 -96 0
WIRE 256 400 256 272
WIRE 256 400 -96 400
WIRE 336 400 336 352
WIRE 336 400 256 400
WIRE 496 400 496 192
WIRE 496 400 336 400
WIRE 576 400 496 400
WIRE 640 400 640 352
WIRE 640 400 576 400
WIRE 1008 464 1008 432
SYMBOL voltage -496 -160 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 24
SYMBOL voltage 944 256 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
SYMATTR InstName V3
SYMATTR Value 3.3
SYMBOL diode -32 16 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D4
SYMATTR Value 1N4148
SYMBOL voltage 1104 -80 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName TX
SYMATTR Value PULSE(0 3.3 0 0 0 5m 10m)
SYMBOL diode -32 -96 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D3
SYMATTR Value 1N4148
SYMBOL current -496 48 R180
WINDOW 0 24 80 Left 2
WINDOW 3 24 0 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName I1
SYMATTR Value PULSE(6m 17m 0 0 0 5m 10m)
SYMBOL res 320 256 R0
SYMATTR InstName R3
SYMATTR Value 100
SYMBOL zener 592 400 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D7
SYMATTR Value 1N750
SYMBOL diode 80 16 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value 1N4148
SYMBOL res 320 144 R0
SYMATTR InstName R2
SYMATTR Value 220
SYMBOL Optos\\PC817A 752 -16 M0
SYMATTR InstName U1
SYMBOL res -288 -224 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 100
SYMBOL pmos 384 128 R180
SYMATTR InstName M1
SYMATTR Value AO3423
SYMBOL Optos\\PC817A 864 304 R0
SYMATTR InstName U2
SYMBOL res 992 336 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL diode 80 -96 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL zener 272 272 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D5
SYMATTR Value 1N750
SYMBOL res 992 -80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R5
SYMATTR Value 330
SYMBOL res 480 -80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 36 59 VTop 2
SYMATTR InstName R1
SYMATTR Value 330
SYMBOL zener 512 192 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D6
SYMATTR Value BZX84C15L
FLAG 1008 464 0
FLAG 880 64 0
FLAG 1104 64 0
FLAG 1072 288 0
FLAG 1104 352 RX
FLAG -160 -208 OT1
FLAG -240 112 0
FLAG -160 80 OT2
TEXT -240 472 Left 2 !.tran 100m