* Z:\home\khalils\Downloads\files\data\raw_asc\191b92cc7e8c_sense_amp_second_try.asc
* Generated by LTspice 26.0.1 for Windows.
;.tran 1000u
;.step param Vcm 1 15 1
R4 N004 0 100k
R8 N002 N006 100Mega
M4 OUT N007 N008 N008 2N7002
R6 N007 0 10k
C2 N004 NC_01 100n
R9 N003 IN_P 10k
M2 N009 N009 0 0 2N7002
R7 OUT N007 1k
M5 N002 N002 N001 N001 BSS84
R10 N006 0 10k
R3 N005 IN_N 10k
V4 N010 0 SINE({Vcm} {Vdd} 5k 0 0 180)
R1 N001 N009 {Ri}
Q1 N001 N003 N006 0 2N3904
V3 N001 0 {VCC}
M6 OUT N002 N001 N001 BSS84
V1 IN_P N010 SINE(0 {Vdiff} 500k 0 0 0) AC 1
Q2 N001 N005 N007 0 2N3904
M3 N008 N009 0 0 2N7002
M1 N002 N006 N008 N008 2N7002
V2 IN_N N010 SINE(0 {Vdiff} 500k 0 0 180) AC 1 180
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.param VCC=10
.param Ri=250
.param Vcm=5
.param Vdiff=10m
.param Vdd=0.000100m
.ac dec 100 10k 100mega
.param Lb=3m
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1688 832
WIRE 144 -432 -752 -432
WIRE 512 -432 144 -432
WIRE 880 -432 512 -432
WIRE 1248 -432 880 -432
WIRE 880 -320 880 -432
WIRE 880 -320 784 -320
WIRE 992 -320 880 -320
WIRE 784 -240 784 -320
WIRE 992 -240 992 -320
WIRE 1248 -240 1248 -432
WIRE 144 -224 144 -432
WIRE 880 -224 832 -224
WIRE 944 -224 880 -224
WIRE -80 -176 -144 -176
WIRE 80 -176 0 -176
WIRE 784 -112 784 -144
WIRE 784 -112 688 -112
WIRE 784 -96 784 -112
WIRE 880 -96 880 -224
WIRE 880 -96 784 -96
WIRE 992 -96 992 -144
WIRE 1088 -96 992 -96
WIRE 1120 -96 1088 -96
WIRE 1584 -96 1472 -96
WIRE 512 64 512 -432
WIRE 1120 96 1120 -96
WIRE 448 112 400 112
WIRE 688 112 688 -112
WIRE 784 144 784 -96
WIRE 992 144 992 -96
WIRE -256 224 -480 224
WIRE -144 224 -144 -176
WIRE -144 224 -256 224
WIRE 144 224 144 -128
WIRE 688 224 688 192
WIRE 688 224 144 224
WIRE 736 224 688 224
WIRE 1120 224 1120 176
WIRE 1120 224 1040 224
WIRE -256 272 -336 272
WIRE 16 272 -256 272
WIRE 400 272 400 112
WIRE 400 272 96 272
WIRE 512 272 512 160
WIRE 1120 272 1120 224
WIRE 1120 272 512 272
WIRE 1584 288 1584 -96
WIRE 784 304 784 240
WIRE 896 304 784 304
WIRE 992 304 992 240
WIRE 992 304 896 304
WIRE 1248 304 1248 -160
WIRE 1248 304 1136 304
WIRE -752 336 -752 -432
WIRE -480 336 -480 224
WIRE -336 336 -336 272
WIRE 896 336 896 304
WIRE 1248 336 1248 304
WIRE 1136 416 1136 304
WIRE 1136 416 944 416
WIRE 1200 416 1136 416
WIRE 144 464 144 224
WIRE 512 480 512 272
WIRE -480 496 -480 416
WIRE -416 496 -480 496
WIRE -336 496 -336 416
WIRE -336 496 -416 496
WIRE -416 560 -416 496
WIRE -752 720 -752 416
WIRE -416 720 -416 640
WIRE -416 720 -752 720
WIRE 144 720 144 544
WIRE 144 720 -416 720
WIRE 512 720 512 560
WIRE 512 720 144 720
WIRE 896 720 896 432
WIRE 896 720 512 720
WIRE 1040 720 896 720
WIRE 1248 720 1248 432
WIRE 1248 720 1040 720
WIRE 1584 720 1584 368
WIRE 1584 720 1248 720
WIRE 1040 768 1040 720
SYMBOL nmos 1040 144 M0
SYMATTR InstName M4
SYMATTR Value 2N7002
SYMBOL npn2 448 64 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 1232 -256 R0
SYMATTR InstName R1
SYMATTR Value {Ri}
SYMBOL nmos 736 144 R0
SYMATTR InstName M1
SYMATTR Value 2N7002
SYMBOL res 1104 80 R0
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL pmos 944 -144 M180
SYMATTR InstName M6
SYMATTR Value BSS84
SYMBOL voltage -480 320 R0
WINDOW 3 -47 -133 VRight 2
WINDOW 123 24 44 Left 2
WINDOW 39 0 0 Left 0
SYMATTR Value SINE(0 {Vdiff} 500k 0 0 0)
SYMATTR Value2 AC 1
SYMATTR InstName V1
SYMBOL voltage -336 320 R0
WINDOW 3 -47 -145 VRight 2
WINDOW 123 24 44 Left 2
WINDOW 39 0 0 Left 0
SYMATTR Value SINE(0 {Vdiff} 500k 0 0 180)
SYMATTR Value2 AC 1 180
SYMATTR InstName V2
SYMBOL res 672 96 R0
SYMATTR InstName R8
SYMATTR Value 100Mega
SYMBOL nmos 944 336 M0
SYMATTR InstName M3
SYMATTR Value 2N7002
SYMBOL voltage -752 320 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value {VCC}
SYMBOL res 1568 272 R0
SYMATTR InstName R4
SYMATTR Value 100k
SYMBOL res 496 464 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL voltage -416 544 R0
WINDOW 3 -47 -145 VRight 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value SINE({Vcm} {Vdd} 5k 0 0 180)
SYMATTR InstName V4
SYMBOL pmos 832 -144 R180
SYMATTR InstName M5
SYMATTR Value BSS84
SYMBOL nmos 1200 336 R0
SYMATTR InstName M2
SYMATTR Value 2N7002
SYMBOL res 16 -192 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 10k
SYMBOL res 112 256 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL npn2 80 -224 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
SYMBOL cap 1472 -112 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL res 128 448 R0
SYMATTR InstName R10
SYMATTR Value 10k
FLAG 1088 -96 OUT
FLAG 1040 768 0
FLAG -256 224 IN_P
FLAG -256 272 IN_N
TEXT -784 792 Left 2 !;.tran 1000u
TEXT 1400 -344 Left 2 !.param VCC=10
TEXT 1400 -312 Left 2 !.param Ri=250
TEXT 1400 -280 Left 2 !.param Vcm=5
TEXT 1400 -248 Left 2 !.param Vdiff=10m
TEXT 1112 -280 Left 2 !;.step param Vcm 1 15 1
TEXT 1400 -216 Left 2 !.param Vdd=0.000100m
TEXT -784 816 Left 2 !.ac dec 100 10k 100mega
TEXT 1400 -184 Left 2 !.param Lb=3m