* Z:\home\khalils\Downloads\files\data\raw_asc\16e5ad3cfcd9_Sensing_Unit.asc
* Generated by LTspice 26.0.1 for Windows.
* X1
* X2
* X3
* X4
* X3
* X4
* Vd
* Vdd
* Vout = { [ LM35 - ( (X2/ (X0+X1+X2) )*Vdd ) ]* (X3/X4) } - Vd, Vout <V_zenner
* LM35: analog voltage output of LM35 temperature sensor
* Vdd: Voltage output of 5V linear voltage source
* Vd: voltage drop of diode
* X0
* Vout is zero if Voltage of LM35 is smaller \nthan voltage output of this section
* Substraction\nNote that voltage output of this section is always positive
* Voltage Follower\nNote that this section limits upper value of\nVout to V_zenner
* SET POTENTIOMETER SUCH THAT WHEN \nLM35 IS 0.24V, Vout STARTS TO INCREASE
V4 5V 0 5V
R7 N004 N008 45k
R4 N005 N007 1k
R10 N012 0 560
R2 N008 0 2.5k
D3 N013 N012 D
D4 0 N004 1N750
D2 0 N010 UDZV9_1B
R11 N010 0 500k
R3 N006 N005 25k
R6 N011 0 25k
R5 N011 LM35 1k
XU1 N008 N007 12V -12V N007 LM741/NS ;pnba In+)In-)V+)V-)OUT
R1 12V N004 3k
V3 -12V 0 -12V
XU3 Vout N012 12V -12V N013 LM741/NS ;pnba In+)In-)V+)V-)OUT
V1 LM35 0 PWL(0 0 0.2 0 0.8 1 1 1)
R8 N010 N009 10k
XU5 N011 N005 12V -12V N006 LM741/NS ;pnba In+)In-)V+)V-)OUT
XU2 N010 Vout 12V -12V Vout LM741/NS ;pnba In+)In-)V+)V-)OUT
V2 12V 0 12
D1 N006 N009 D
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.include D:\GITHUB\EE313-Term-project\Simulation\Sensing Unit\LM741.MOD
.tran 0 1 0
.model ZD D(Bv=4.7 type=zener)
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 4272 2160
WIRE -912 320 -912 256
WIRE -624 320 -624 256
WIRE -480 320 -480 256
WIRE -336 320 -336 256
WIRE -912 448 -912 400
WIRE -624 448 -624 400
WIRE -480 448 -480 400
WIRE -336 448 -336 400
WIRE -336 544 -1136 544
WIRE 416 544 -288 544
WIRE 1008 544 464 544
WIRE -912 688 -912 640
WIRE -912 768 -1088 768
WIRE 32 800 -16 800
WIRE 208 800 112 800
WIRE -480 816 -656 816
WIRE -912 832 -912 768
WIRE 880 848 704 848
WIRE -592 912 -592 864
WIRE -1088 928 -1088 768
WIRE -656 928 -656 816
WIRE -624 928 -656 928
WIRE -480 944 -480 816
WIRE -480 944 -560 944
WIRE -160 944 -480 944
WIRE -16 944 -16 800
WIRE -16 944 -80 944
WIRE 768 944 768 896
WIRE -912 960 -912 912
WIRE -624 960 -912 960
WIRE 64 960 64 912
WIRE 704 960 704 848
WIRE 736 960 704 960
WIRE -16 976 -16 944
WIRE 32 976 -16 976
WIRE 880 976 880 848
WIRE 880 976 800 976
WIRE 1088 976 880 976
WIRE 1168 976 1088 976
WIRE 208 992 208 800
WIRE 208 992 96 992
WIRE 240 992 208 992
WIRE 480 992 304 992
WIRE 592 992 560 992
WIRE 656 992 592 992
WIRE 736 992 656 992
WIRE -912 1008 -912 960
WIRE 32 1008 -16 1008
WIRE 656 1040 656 992
WIRE -592 1056 -592 976
WIRE -160 1056 -224 1056
WIRE -16 1056 -16 1008
WIRE -16 1056 -80 1056
WIRE 592 1056 592 992
WIRE 64 1072 64 1024
WIRE 768 1088 768 1008
WIRE -16 1120 -16 1056
WIRE -1088 1152 -1088 992
WIRE -912 1152 -912 1088
WIRE -912 1152 -1088 1152
WIRE 592 1152 592 1120
WIRE 656 1152 656 1120
WIRE -912 1184 -912 1152
WIRE -1136 1232 -1136 544
WIRE -336 1232 -336 544
WIRE -336 1232 -1136 1232
WIRE -16 1232 -16 1200
WIRE -288 1296 -288 544
WIRE 416 1296 416 544
WIRE 416 1296 -288 1296
WIRE 464 1296 464 544
WIRE 1008 1296 1008 544
WIRE 1008 1296 464 1296
WIRE 1088 1360 1088 976
WIRE 1088 1360 688 1360
WIRE 752 1504 752 1456
WIRE 720 1520 640 1520
WIRE 1088 1536 784 1536
WIRE 688 1552 688 1360
WIRE 720 1552 688 1552
WIRE 752 1648 752 1568
WIRE 1088 1648 1088 1536
WIRE 1088 1760 1088 1712
WIRE 640 1904 640 1520
WIRE 1088 1904 1088 1840
WIRE 1088 1904 640 1904
WIRE 1088 2048 1088 1984
SYMBOL zener 608 1120 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value UDZV9_1B
SYMBOL voltage -624 304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 12
SYMBOL res -928 672 R0
SYMATTR InstName R1
SYMATTR Value 3k
SYMBOL res -64 1040 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL res -928 992 R0
SYMATTR InstName R2
SYMATTR Value 2.5k
SYMBOL voltage -480 304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value -12V
SYMBOL voltage -336 304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value 5V
SYMBOL res 1072 1744 R0
SYMATTR InstName R9
SYMATTR Value 0
SYMBOL res 1072 1888 R0
SYMATTR InstName R10
SYMATTR Value 560
SYMBOL res -928 816 R0
SYMATTR InstName R7
SYMATTR Value 45k
SYMBOL OpAmps\\opamp2 752 1472 R0
SYMATTR InstName U3
SYMATTR Value LM741/NS
SYMBOL res 640 1024 R0
SYMATTR InstName R11
SYMATTR Value 500k
SYMBOL res -64 928 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL res 576 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 10k
SYMBOL zener -1072 992 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D4
SYMATTR Value 1N750
SYMBOL OpAmps\\opamp2 -592 880 R0
SYMATTR InstName U1
SYMATTR Value LM741/NS
SYMBOL voltage -912 304 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 0.2 0 0.8 1 1 1)
SYMBOL diode 240 1008 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMBOL OpAmps\\opamp2 64 928 R0
SYMATTR InstName U5
SYMATTR Value LM741/NS
SYMBOL LED 1072 1648 R0
SYMATTR InstName D3
SYMBOL res -32 1104 R0
SYMATTR InstName R6
SYMATTR Value 25k
SYMBOL OpAmps\\opamp2 768 912 R0
SYMATTR InstName U2
SYMATTR Value LM741/NS
SYMBOL res 128 784 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 25k
FLAG -912 448 0
FLAG -912 256 LM35
FLAG -624 448 0
FLAG -624 256 12V
FLAG -912 640 12V
FLAG -224 1056 LM35
FLAG -592 864 12V
FLAG -480 448 0
FLAG -480 256 -12V
FLAG -592 1056 -12V
FLAG -336 448 0
FLAG -336 256 5V
FLAG 64 912 12V
FLAG -16 1232 0
FLAG 64 1072 -12V
FLAG 768 896 12V
FLAG 768 1088 -12V
FLAG 1168 976 Vout
FLAG 592 1152 0
FLAG -912 1184 0
FLAG 752 1456 12V
FLAG 752 1648 -12V
FLAG 1088 2048 0
FLAG 656 1152 0
TEXT -160 352 Left 2 !.include D:\\GITHUB\\EE313-Term-project\\Simulation\\Sensing Unit\\LM741.MOD
TEXT -1096 352 Left 2 !.tran 0 1 0
TEXT -984 872 Left 2 ;X1
TEXT -984 1048 Left 2 ;X2
TEXT 56 728 Left 2 ;X3
TEXT -136 880 Left 2 ;X4
TEXT 64 1176 Left 2 ;X3
TEXT -136 1112 Left 2 ;X4
TEXT 264 1048 Left 2 ;Vd
TEXT -936 584 Left 2 ;Vdd
TEXT 1168 1024 Left 2 ;Vout = { [ LM35 - ( (X2/ (X0+X1+X2) )*Vdd )  ]* (X3/X4)  } - Vd,  Vout <V_zenner
TEXT 1168 1072 Left 2 ;LM35: analog voltage output of LM35 temperature sensor
TEXT 1168 1104 Left 2 ;Vdd: Voltage output of 5V linear voltage source
TEXT 1168 1136 Left 2 ;Vd: voltage drop of diode
TEXT -984 728 Left 2 ;X0
TEXT -824 560 Left 2 ;Vout is zero if Voltage of LM35 is smaller \nthan voltage output of this section
TEXT -280 560 Left 2 ;Substraction\nNote that voltage output of this section is always positive
TEXT 480 568 Left 2 ;Voltage Follower\nNote that this section limits upper value of\nVout to V_zenner
TEXT -1008 1256 Left 2 ;SET POTENTIOMETER SUCH THAT WHEN \nLM35 IS 0.24V, Vout STARTS TO INCREASE
TEXT 600 1248 Left 2 !.model ZD D(Bv=4.7 type=zener)