* Z:\home\khalils\Downloads\files\data\raw_asc\0d9d1ac4ebc7_core_sense_amp1.asc
* Generated by LTspice 26.0.1 for Windows.
* .dc VINA -100m 100m 0.1m
* .dc VINA -12 12 0.1
* .ac oct 100 1 100mega
;.dc VINA -100m 100m 0.1m
;.step param Rfb 0.01m 100 10
;.step param Va 8 22 1
;.step param iset 5m 20m 1m
;.step param R_th 100 2000 100
R15 N015 V- 1m
VINA INA 0 PWL file=ampl_train.pwl AC 0.5
Q1 CA INA N011 0 2N3904
R5 0 OA {Rt2}
D2 N003 N001 1N750
VINB INB 0 0 AC -0.5
Q3 OB N010 N006 0 2N3906
R10 N013 N009 220
R6 0 OB {Rt2}
R18 N003 0 500
R17 N009 0 220
Q12 N005 N003 N002 0 2N3906
Q10 N008 sense_out 0 0 2N3904
R2 N012 N014 {Rfb}
R14 v+ CA {Rt}
R3 N006 N005 {Rfb2}
D3 N009 output BAT54
R4 N007 N005 {Rfb2}
R12 V+ v+ 1m
Q4 OA N004 N007 0 2N3906
VN 0 V- {Va}
R8 N010 0 4.7k
Q8 N015 OB sense_out 0 2N3906
R7 N004 0 4.7k
Q2 CB INB N012 0 2N3904
VP V+ 0 {Va}
Q6 v+ CB N010 0 2N3904
Q11 output N009 0 0 2N3904
R9 v+ sense_out {4.7k*2}
R1 N011 N014 {Rfb}
R11 VCC N008 100
R13 v+ CB {Rt}
VP1 VCC 0 3.3
D1 sense_out N008 BAT54
R20 VCC output 100
Q13 N001 N001 v+ 0 2N3906
Q7 VCC N008 N013 0 2N3904
Q5 v+ CA N004 0 2N3904
R19 v+ N002 {R_th}
R21 v+ sense_out {4.7k*2}
R16 N014 N015 {12/Iset}
Q9 N015 OA sense_out 0 2N3906
.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
.step temp -25 100 25
.param Rfb=Rt/sqrt(sqrt(2)*gain)
.param Rt=Va/Iset
.param Iset = 7m
.param Va = 15
.param Rt2=cm_out*2/Iset2
.param gain=40
.param Rfb2=Rt2/sqrt(sqrt(2)*gain)
.param cm_out=0.6
.param Iset2 = Iset
.tran 40u
.param R_th=800
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 4868 1856
WIRE -224 -1328 -272 -1328
WIRE -176 -1328 -224 -1328
WIRE -64 -1328 -112 -1328
WIRE -32 -1328 -64 -1328
WIRE 144 -1328 64 -1328
WIRE 368 -1328 144 -1328
WIRE 608 -1328 560 -1328
WIRE 656 -1328 608 -1328
WIRE 304 -1264 240 -1264
WIRE 368 -1264 304 -1264
WIRE -272 -1200 -272 -1328
WIRE -112 -1200 -112 -1328
WIRE 64 -1200 64 -1328
WIRE 240 -1200 240 -1264
WIRE 560 -1200 560 -1328
WIRE -64 -800 -112 -800
WIRE 0 -800 -64 -800
WIRE 240 -800 80 -800
WIRE 432 -800 240 -800
WIRE 752 -800 432 -800
WIRE 896 -800 752 -800
WIRE 912 -800 896 -800
WIRE 1088 -800 912 -800
WIRE 1312 -800 1088 -800
WIRE 1808 -800 1312 -800
WIRE 1968 -800 1808 -800
WIRE 2176 -800 1968 -800
WIRE 1312 -736 1312 -800
WIRE 1088 -704 1088 -800
WIRE 1216 -656 1152 -656
WIRE 1088 -576 1088 -608
WIRE 1216 -576 1216 -656
WIRE 1216 -576 1088 -576
WIRE 1088 -544 1088 -576
WIRE 1312 -480 1312 -656
WIRE 1088 -432 1088 -480
WIRE 1248 -432 1088 -432
WIRE 1088 -368 1088 -432
WIRE 1088 -240 1088 -288
WIRE 240 -192 240 -800
WIRE 432 -192 432 -800
WIRE 1808 -144 1808 -800
WIRE 1968 -144 1968 -800
WIRE 752 -112 752 -800
WIRE 240 -64 240 -112
WIRE 512 -64 240 -64
WIRE 688 -64 512 -64
WIRE 1568 -64 1120 -64
WIRE 2192 -32 2160 -32
WIRE 2288 -32 2192 -32
WIRE 2592 -32 2288 -32
WIRE 2832 -32 2592 -32
WIRE 1312 0 1312 -384
WIRE 1312 0 1216 0
WIRE 1408 0 1312 0
WIRE 912 16 912 -800
WIRE 432 64 432 -112
WIRE 512 64 432 64
WIRE 848 64 512 64
WIRE 1216 64 1216 0
WIRE 1408 64 1408 0
WIRE 2288 96 2288 -32
WIRE 2832 96 2832 -32
WIRE 240 112 240 -64
WIRE 432 112 432 64
WIRE 1808 112 1808 -64
WIRE 1968 112 1968 -64
WIRE 1968 112 1808 112
WIRE -144 160 -192 160
WIRE 176 160 -144 160
WIRE 592 160 496 160
WIRE 1216 192 1216 144
WIRE 1408 192 1408 144
WIRE 2592 192 2592 -32
WIRE 752 208 752 -16
WIRE 1120 208 1120 -64
WIRE 1120 208 752 208
WIRE 2192 224 2176 224
WIRE 2288 224 2288 176
WIRE 2288 224 2256 224
WIRE 2736 224 2720 224
WIRE 2832 224 2832 176
WIRE 2832 224 2800 224
WIRE 912 240 912 112
WIRE 1152 240 912 240
WIRE 1568 240 1568 -64
WIRE 1568 240 1472 240
WIRE 2288 240 2288 224
WIRE 2528 240 2288 240
WIRE 240 256 240 208
WIRE 432 256 432 208
WIRE 2288 288 2288 240
WIRE 2832 288 2832 224
WIRE 2912 288 2832 288
WIRE 2976 288 2912 288
WIRE 1808 336 1808 112
WIRE 1968 336 1968 112
WIRE 2096 336 1968 336
WIRE 2176 336 2176 224
WIRE 2176 336 2096 336
WIRE 2224 336 2176 336
WIRE 2592 336 2592 288
WIRE 1408 384 1408 288
WIRE 1488 384 1408 384
WIRE 1744 384 1488 384
WIRE 240 400 240 336
WIRE 352 400 240 400
WIRE 432 400 432 336
WIRE 432 400 352 400
WIRE 2832 400 2832 288
WIRE 1968 416 1968 336
WIRE -144 432 -192 432
WIRE 592 432 592 160
WIRE 592 432 -144 432
WIRE 752 432 752 208
WIRE 912 432 912 240
WIRE 2592 448 2592 416
WIRE 2720 448 2720 224
WIRE 2720 448 2592 448
WIRE 2768 448 2720 448
WIRE 1216 464 1216 288
WIRE 1488 464 1216 464
WIRE 1904 464 1488 464
WIRE 352 496 352 400
WIRE 2592 496 2592 448
WIRE 1216 512 1216 464
WIRE 1408 512 1408 384
WIRE 1216 624 1216 592
WIRE 1312 624 1216 624
WIRE 1408 624 1408 592
WIRE 1408 624 1312 624
WIRE 2288 656 2288 384
WIRE 2592 656 2592 576
WIRE 2832 656 2832 496
WIRE 752 672 752 512
WIRE 912 672 912 512
WIRE 1312 672 1312 624
WIRE -64 736 -96 736
WIRE -32 736 -64 736
WIRE 352 736 352 576
WIRE 352 736 48 736
WIRE 1808 736 1808 432
WIRE 1808 736 352 736
WIRE 1968 736 1968 512
WIRE 1968 736 1808 736
WIRE 2176 736 1968 736
SYMBOL pnp 1152 -608 R180
SYMATTR InstName Q13
SYMATTR Value 2N3906
SYMBOL diode 1104 -480 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value 1N750
SYMBOL pnp 1248 -384 M180
SYMATTR InstName Q12
SYMATTR Value 2N3906
SYMBOL diode 2736 240 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D3
SYMATTR Value BAT54
SYMBOL res 336 480 R0
SYMATTR InstName R16
SYMATTR Value {12/Iset}
SYMBOL npn 496 112 M0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL voltage -272 -1216 R0
SYMATTR InstName VP
SYMATTR Value {Va}
SYMBOL res 224 -208 R0
SYMATTR InstName R14
SYMATTR Value {Rt}
SYMBOL res 1792 -160 R0
SYMATTR InstName R9
SYMATTR Value {4.7k*2}
SYMBOL npn 2528 192 R0
SYMATTR InstName Q7
SYMATTR Value 2N3904
SYMBOL res -16 -784 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R12
SYMATTR Value 1m
SYMBOL res 224 240 R0
SYMATTR InstName R1
SYMATTR Value {Rfb}
SYMBOL voltage 240 -1216 R0
WINDOW 123 24 44 Left 2
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC -0.5
SYMATTR InstName VINB
SYMATTR Value 0
SYMBOL npn 848 16 R0
SYMATTR InstName Q6
SYMATTR Value 2N3904
SYMBOL npn 2224 288 R0
SYMATTR InstName Q10
SYMATTR Value 2N3904
SYMBOL res 416 -208 R0
SYMATTR InstName R13
SYMATTR Value {Rt}
SYMBOL res 1952 -160 R0
SYMATTR InstName R21
SYMATTR Value {4.7k*2}
SYMBOL res 2576 480 R0
SYMATTR InstName R17
SYMATTR Value 220
SYMBOL npn 2768 400 R0
SYMATTR InstName Q11
SYMATTR Value 2N3904
SYMBOL voltage 64 -1216 R0
WINDOW 123 24 44 Left 2
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC 0.5
SYMATTR InstName VINA
SYMATTR Value PWL file=ampl_train.pwl
SYMBOL res 2576 320 R0
SYMATTR InstName R10
SYMATTR Value 220
SYMBOL pnp 1152 288 M180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL res 1296 -752 R0
SYMATTR InstName R19
SYMATTR Value {R_th}
SYMBOL res 1392 160 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R4
SYMATTR Value {Rfb2}
SYMBOL res 2816 80 R0
SYMATTR InstName R20
SYMATTR Value 100
SYMBOL res 64 720 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R15
SYMATTR Value 1m
SYMBOL diode 2192 240 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value BAT54
SYMBOL pnp 1904 512 M180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL pnp 1472 288 R180
SYMATTR InstName Q4
SYMATTR Value 2N3906
SYMBOL res 1392 608 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R5
SYMATTR Value {Rt2}
SYMBOL voltage 560 -1216 R0
SYMATTR InstName VP1
SYMATTR Value 3.3
SYMBOL res 2272 80 R0
SYMATTR InstName R11
SYMATTR Value 100
SYMBOL res 1200 608 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R6
SYMATTR Value {Rt2}
SYMBOL res 736 416 R0
SYMATTR InstName R7
SYMATTR Value 4.7k
SYMBOL res 1200 160 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R3
SYMATTR Value {Rfb2}
SYMBOL res 1072 -384 R0
SYMATTR InstName R18
SYMATTR Value 500
SYMBOL res 896 416 R0
SYMATTR InstName R8
SYMATTR Value 4.7k
SYMBOL voltage -112 -1104 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
SYMATTR InstName VN
SYMATTR Value {Va}
SYMBOL pnp 1744 432 M180
SYMATTR InstName Q9
SYMATTR Value 2N3906
SYMBOL npn 688 -112 R0
SYMATTR InstName Q5
SYMATTR Value 2N3904
SYMBOL res 416 240 R0
SYMATTR InstName R2
SYMATTR Value {Rfb}
SYMBOL npn 176 112 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
FLAG -144 160 INA
FLAG -144 432 INB
FLAG -64 -800 V+
FLAG -64 736 V-
FLAG -272 -1120 0
FLAG 64 -1120 0
FLAG -112 -1120 0
FLAG 240 -1120 0
FLAG -224 -1328 V+
FLAG -64 -1328 V-
FLAG 144 -1328 INA
FLAG 304 -1264 INB
FLAG 560 -1120 0
FLAG 608 -1328 VCC
FLAG 512 -64 CA
FLAG 512 64 CB
FLAG 1488 464 OB
FLAG 1488 384 OA
FLAG 1312 672 0
FLAG 752 672 0
FLAG 912 672 0
FLAG 2096 336 sense_out
FLAG 2288 656 0
FLAG 2192 -32 VCC
FLAG 2912 288 output
FLAG 1088 -240 0
FLAG 896 -800 v+
FLAG 2832 656 0
FLAG 2592 656 0
TEXT -304 976 Left 2 !;.dc VINA -100m 100m 0.1m
TEXT -304 1008 Left 2 ;.dc VINA -100m 100m 0.1m
TEXT -232 1064 Left 2 !.step temp -25 100 25
TEXT -296 1144 Left 2 !;.step param Rfb 0.01m 100 10
TEXT -304 1040 Left 2 ;.dc VINA -12 12 0.1
TEXT -296 944 Left 2 ;.ac oct 100 1 100mega
TEXT -136 16 Left 2 !.param Rfb=Rt/sqrt(sqrt(2)*gain)
TEXT -136 -8 Left 2 !.param Rt=Va/Iset
TEXT -136 -112 Left 2 !.param Iset = 7m
TEXT -136 -136 Left 2 !.param Va = 15
TEXT -136 56 Left 2 !.param Rt2=cm_out*2/Iset2
TEXT -296 1120 Left 2 !;.step param Va 8 22 1
TEXT -136 -184 Left 2 !.param gain=40
TEXT -136 80 Left 2 !.param Rfb2=Rt2/sqrt(sqrt(2)*gain)
TEXT -136 -160 Left 2 !.param cm_out=0.6
TEXT -136 -88 Left 2 !.param Iset2 = Iset
TEXT -96 -904 Left 2 !;.step param iset 5m 20m 1m
TEXT 1048 -880 Left 2 !;.step param R_th 100 2000 100
TEXT -296 920 Left 2 !.tran 40u
TEXT 1440 -680 Left 2 !.param R_th=800