* Z:\home\khalils\Downloads\files\data\raw_asc\d8a31a8b42e5_schematic.asc
* Generated by LTspice 26.0.1 for Windows.
* High Pass Filter
* Schmitt Trigger
* output of hpf room light is 100mV \noutput of hpf no room light 160mV
* current gain of 52.5
* output of amplifier room light is 2V\noutput of amplifier no room light 3.90V
* output of schmitt trigger room light 3.90V\noutput of schmitt trigger no room light 3.90V
* check actual 52.5K resistor- it was changed
* Library below included based on ModelFile attribute of instance XU1, XU3, XU4, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\UniversalOpAmp.asy)
R2 Vout N001 10k
XU1 N004 N005 0 5V Vout level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R1 hp_signal 0 3.3k
R7 Vref 5V 10k
XU3 5V N002 5V 0 schmittIn level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
C1 hp_signal phototransistor_voltage 470n
R4 N002 0 1k
V4 N003 0 SINE(2.5 2.5 1k)
R8 schmittIn N002 52.5k
R3 N001 N003 10k
XU4 hp_signal followerOut 5V 0 followerOut level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
R10 N005 5V 1k
R9 N005 0 1k
R6 Vref 0 10k
V2 5V 0 5V
V3 N004 0 4
R5 0 phototransistor_voltage 100k
V1 phototransistor_v 0 5 AC 1
XU2 N001 Vref 5V 0 Vout level1 Avol=1Meg GBW=10Meg Vos=0 En=0 Enk=0 In=0 Ink=0 Rin=500Meg ;pnba In+)In-)V+)V-)OUT
.tran 0.001
.lib UniversalOpAmp1.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3660 1464
WIRE 2880 368 2816 368
WIRE 3040 368 2960 368
WIRE 1584 480 1584 432
WIRE 2160 480 2080 480
WIRE 1552 496 1472 496
WIRE 2272 496 2224 496
WIRE 2304 496 2272 496
WIRE 1648 512 1616 512
WIRE 1712 512 1648 512
WIRE 2160 512 2112 512
WIRE 1552 528 1472 528
WIRE 752 544 656 544
WIRE 784 544 752 544
WIRE 944 544 848 544
WIRE 1088 544 944 544
WIRE 2192 544 2192 528
WIRE 2192 544 2176 544
WIRE 2720 544 2672 544
WIRE 2816 544 2816 368
WIRE 2816 544 2800 544
WIRE 2864 544 2816 544
WIRE 3040 560 3040 368
WIRE 3040 560 2928 560
WIRE 3120 560 3040 560
WIRE 752 576 752 544
WIRE 944 576 944 544
WIRE 1584 576 1584 544
WIRE 2864 576 2816 576
WIRE 2112 592 2112 512
WIRE 2176 592 2112 592
WIRE 2272 592 2272 496
WIRE 2272 592 2256 592
WIRE 2112 608 2112 592
WIRE 2896 624 2896 592
WIRE 1472 640 1472 528
WIRE 1648 640 1648 512
WIRE 1648 640 1472 640
WIRE 944 656 752 656
WIRE 2816 656 2816 576
WIRE 2816 656 2784 656
WIRE 752 688 752 656
WIRE 2816 688 2816 656
WIRE 1568 896 1536 896
WIRE 1680 896 1648 896
WIRE 3008 928 3008 896
WIRE 2976 944 2912 944
WIRE 3232 960 3040 960
WIRE 2976 976 2928 976
WIRE 3008 1024 3008 992
WIRE 2928 1056 2928 976
WIRE 2928 1056 2896 1056
WIRE 2928 1088 2928 1056
RECTANGLE Normal 1320 804 2144 1160 2
RECTANGLE Normal 368 372 1216 712 2
RECTANGLE Normal 1960 372 2448 724 2
SYMBOL Res 2800 672 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL Res 928 560 R0
SYMATTR InstName R1
SYMATTR Value 3.3k
SYMBOL cap 848 528 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 470n
SYMBOL Res 2096 592 R0
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL Res 2272 576 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 52.5k
SYMBOL OpAmps/UniversalOpAmp 2192 496 M180
SYMATTR InstName U3
SYMBOL Res 2912 1072 R0
SYMATTR InstName R9
SYMATTR Value 1k
SYMBOL OpAmps/UniversalOpAmp 1584 512 M180
SYMATTR InstName U4
SYMBOL Voltage 2608 832 R0
SYMATTR InstName V2
SYMATTR Value 5V
SYMBOL Res 768 672 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL OpAmps/UniversalOpAmp 3008 960 M180
SYMATTR InstName U1
SYMBOL Voltage 2688 544 R90
WINDOW 0 -32 56 VBottom 2
WINDOW 3 32 56 VTop 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value SINE(2.5 2.5 1k)
SYMBOL OpAmps\\UniversalOpAmp 2896 560 M180
SYMATTR InstName U2
SYMBOL Res 2800 640 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 10k
SYMBOL Res 2816 528 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL Voltage 1664 896 R90
WINDOW 3 32 56 VTop 2
WINDOW 0 -32 56 VBottom 2
SYMATTR Value 5
SYMATTR InstName V1
SYMATTR Value2 AC 1
SYMBOL Res 2976 352 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 41 57 VTop 2
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL Voltage 2928 944 R90
WINDOW 0 -32 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName V3
SYMATTR Value 4
SYMBOL Res 2912 1040 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 1k
FLAG 1088 544 hp_signal
FLAG 1536 896 0
FLAG 1680 896 phototransistor_v
FLAG 752 688 0
FLAG 656 544 phototransistor_voltage
FLAG 2816 768 0
FLAG 2704 656 5V
FLAG 2608 928 0
FLAG 2608 848 5V
FLAG 3120 560 Vout
FLAG 2928 1168 0
FLAG 2816 1056 5V
FLAG 3008 1024 0
FLAG 3008 896 5V
FLAG 3232 960 Vout
FLAG 2832 944 0
FLAG 2592 544 0
FLAG 2816 656 Vref
FLAG 2192 464 0
FLAG 2112 688 0
FLAG 2176 544 5V
FLAG 2304 496 schmittIn
FLAG 1584 432 0
FLAG 1584 576 5V
FLAG 1472 496 hp_signal
FLAG 1712 512 followerOut
FLAG 2896 624 5V
FLAG 2896 528 0
FLAG 2080 480 5V
TEXT 816 448 Left 2 ;High Pass Filter
TEXT 1496 912 VRight 2 !.tran 0.001
TEXT 2736 280 Left 2 ;Schmitt Trigger
TEXT 872 312 Left 2 ;output of hpf room light is 100mV \noutput of hpf no room light 160mV
TEXT 2216 680 Left 2 ;current gain of 52.5
TEXT 2088 320 Left 2 ;output of amplifier room light is 2V\noutput of amplifier no room light 3.90V
TEXT 3136 360 Left 2 ;output of schmitt trigger room light 3.90V\noutput of schmitt trigger no room light 3.90V
TEXT 2032 760 Left 2 ;check actual 52.5K resistor- it was changed