* Z:\home\khalils\Downloads\files\data\raw_asc\d6afb09c8568_sense_inhibit3.asc
* Generated by LTspice 26.0.1 for Windows.
R1 DB N013 {R_TRIM}
R2 VCC N001 {R_ISENSE}
V1 VCC 0 {VCC}
Q4 V_LOAD N003 N002 0 TIP42C
Q5 0 N009 N003 0 2N3906
Q7 DB DB N007 0 2N3906
R7 VCC VT 145
R13 VT N005 145
RT VCC VT {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
D2 V_LOAD N003 BAT54SHY
R12 LEFT MIDDLE {R_SET}
L4 N011 MIDDLE {L_SET}
V5 V_LOGIC 0 3.3
V8 _INH 0 PULSE(3.3 0 50n 1n 1n {TON} {TC})
M2 N010 N008 V_LOAD V_LOAD RSL020P03
C1 VCC N001 62n
D3 N010 LEFT 1N914
D9 0 LEFT BZX84C27VLY
D5 N015 N014 BAT54
R6 0 N015 100
R10 N021 N014 220
R11 N014 V_LOGIC 220
Q11 N015 N014 V_LOGIC 0 2N3906
Q12 0 _INH N021 0 2N3906
D7 N018 N019 BAT54
R15 V_LOAD N008 {R_DRVH}
R16 N016 N018 110
R17 N018 0 110
Q14 V_LOGIC N015 N016 0 2N3904
Q15 N019 N018 0 0 2N3904
D12 RIGHT 0 1N914
L1 N001 N002 1p
D4 N004 VCC BZX84C6V2L
R3 N006 0 4.7k
Q8 0 N006 N013 0 2N3906
Q9 N006 N006 N004 0 2N3906
R4 N009 DB 200
Q1 N007 N007 N005 0 TIP42C
R9 N008 _DRV 1
R14 _DRV N019 {R_DRVL}
D1 N020 _I_SRC_EN BAT54
R18 N017 N020 110
R19 N020 0 110
Q2 V_LOGIC _INH N017 0 2N3904
Q6 _I_SRC_EN N020 0 0 2N3904
R20 VCC _I_SRC_EN {R_DRVL}
LF1 N012 N011 {L_SET*1023}
LF2 N012 RIGHT {L_SET*1024}
.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
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran {TC*20}
.step temp 0 75 25
* .op
;.step param VCC 18 25 1
.lib ../../spice_models/tip42c.bjt
.param VCC=20
;.step param R_SET 100 350 5
.param beta=3468
;.step param beta 3100 4000 100
* {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
;.step param R_SET 15 30 15
.temp 25
.step param L_SET list 5n 10n 20n
.lib ../../spice_models/tip41c.bjt
.param L_SET=1p
.param R_SET=15
.param TON=350n
.param TC=750n
.param R_ISENSE=0.562
* WATCH OUT FOR 200mA CURRENT!!!!\nWATTAGE AND Q26 HEALTH CONCERNS
* WATCH OUT FOR 300mA PEAK CURRENT!!!!\nSELECTED ZENNER MIGHT BE MAD ABOUT IT
;.step dec param L_COMP 100n 1000n 3
;.step param R_TRIM 3k 4k 25
.param R_TRIM=3.0k
* Depending on the number of compensation elements, R_TRIM needs to be:\n673 for 0\n1.17k for 1\n3k for 2\n60k for 3\nThese numbers are approximate.
.param R_DRVH=100
.param R_DRVL=200
;.step param R_DRVH 50 150 10
K LF1 LF2 1
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 4220 5156
WIRE -2496 -1376 -2928 -1376
WIRE -2416 -1376 -2496 -1376
WIRE -2160 -1376 -2416 -1376
WIRE -1312 -1376 -2160 -1376
WIRE -1200 -1376 -1312 -1376
WIRE -1312 -1344 -1312 -1376
WIRE -1200 -1328 -1200 -1376
WIRE -2160 -1264 -2160 -1376
WIRE -2160 -1264 -2352 -1264
WIRE -1312 -1232 -1312 -1280
WIRE -1200 -1232 -1200 -1248
WIRE -1200 -1232 -1312 -1232
WIRE -2352 -1200 -2352 -1264
WIRE -2160 -1200 -2160 -1264
WIRE -1200 -1200 -1200 -1232
WIRE -2352 -1072 -2352 -1120
WIRE -2208 -1072 -2352 -1072
WIRE -2160 -1072 -2160 -1120
WIRE -2160 -1072 -2208 -1072
WIRE -1200 -1056 -1200 -1120
WIRE -2496 -1024 -2496 -1376
WIRE -2160 -1008 -2160 -1072
WIRE -1504 -1008 -1584 -1008
WIRE -1264 -1008 -1504 -1008
WIRE -1504 -912 -1504 -1008
WIRE -1312 -912 -1504 -912
WIRE -1200 -912 -1200 -960
WIRE -1200 -912 -1248 -912
WIRE -2496 -880 -2496 -960
WIRE -2160 -880 -2160 -928
WIRE -2560 -832 -2656 -832
WIRE -2224 -832 -2320 -832
WIRE -1200 -784 -1200 -912
WIRE -1200 -768 -1200 -784
WIRE -1200 -768 -1264 -768
WIRE -2656 -752 -2656 -832
WIRE -2496 -752 -2496 -784
WIRE -2496 -752 -2656 -752
WIRE -2320 -752 -2320 -832
WIRE -2160 -752 -2160 -784
WIRE -2160 -752 -2320 -752
WIRE -2160 -720 -2160 -752
WIRE -2224 -672 -2320 -672
WIRE -1200 -672 -1200 -768
WIRE -1376 -656 -1408 -656
WIRE -1264 -656 -1264 -688
WIRE -1264 -656 -1296 -656
WIRE -1248 -656 -1264 -656
WIRE -2320 -592 -2320 -672
WIRE -2160 -592 -2160 -624
WIRE -2160 -592 -2320 -592
WIRE -1584 -576 -1584 -1008
WIRE -2160 -528 -2160 -592
WIRE -2128 -528 -2160 -528
WIRE -1808 -528 -2128 -528
WIRE -1648 -528 -1728 -528
WIRE -1200 -512 -1200 -576
WIRE -2928 -496 -2928 -1376
WIRE -2160 -464 -2160 -528
WIRE -1200 -352 -1200 -448
WIRE -1120 -352 -1200 -352
WIRE -1040 -352 -1120 -352
WIRE -928 -352 -960 -352
WIRE -880 -352 -928 -352
WIRE -608 -352 -800 -352
WIRE -448 -352 -528 -352
WIRE -256 -352 -368 -352
WIRE -128 -352 -256 -352
WIRE -128 -336 -128 -352
WIRE -1200 -272 -1200 -352
WIRE -2160 -176 -2160 -384
WIRE -2496 -128 -2496 -752
WIRE -2224 -128 -2496 -128
WIRE -2496 -80 -2496 -128
WIRE -2928 16 -2928 -416
WIRE -2496 16 -2496 0
WIRE -2496 16 -2928 16
WIRE -2320 16 -2496 16
WIRE -2160 16 -2160 -80
WIRE -2160 16 -2320 16
WIRE -1584 16 -1584 -480
WIRE -1584 16 -2160 16
WIRE -1200 16 -1200 -208
WIRE -928 16 -1200 16
WIRE -128 16 -128 -272
WIRE -128 16 -928 16
WIRE -2320 48 -2320 16
WIRE -928 96 -928 16
WIRE -832 368 -1488 368
WIRE -768 368 -832 368
WIRE -1552 480 -1616 480
WIRE -784 480 -1552 480
WIRE -720 480 -784 480
WIRE -496 480 -720 480
WIRE -2480 672 -2672 672
WIRE -2368 672 -2480 672
WIRE -2080 672 -2368 672
WIRE -1776 672 -2080 672
WIRE -1008 672 -1776 672
WIRE -2368 720 -2368 672
WIRE -2080 816 -2080 672
WIRE -1488 816 -1488 368
WIRE -720 816 -720 480
WIRE -1776 832 -1776 672
WIRE -1008 832 -1008 672
WIRE -2368 864 -2368 800
WIRE -2240 864 -2368 864
WIRE -2144 864 -2240 864
WIRE -1840 880 -1920 880
WIRE -1072 880 -1152 880
WIRE -2368 944 -2368 864
WIRE -720 944 -720 896
WIRE -592 944 -720 944
WIRE -544 944 -592 944
WIRE -2240 960 -2240 864
WIRE -2176 960 -2240 960
WIRE -2080 960 -2080 912
WIRE -2080 960 -2112 960
WIRE -1776 976 -1776 928
WIRE -1008 976 -1008 928
WIRE -2080 1040 -2080 960
WIRE -1920 1040 -1920 880
WIRE -1920 1040 -2080 1040
WIRE -1584 1040 -1648 1040
WIRE -1488 1040 -1488 896
WIRE -1488 1040 -1520 1040
WIRE -816 1040 -880 1040
WIRE -720 1040 -720 944
WIRE -720 1040 -752 1040
WIRE -2368 1072 -2368 1024
WIRE -1488 1088 -1488 1040
WIRE -720 1088 -720 1040
WIRE -2656 1120 -2688 1120
WIRE -2544 1120 -2656 1120
WIRE -2432 1120 -2544 1120
WIRE -1776 1136 -1776 1056
WIRE -1648 1136 -1648 1040
WIRE -1648 1136 -1776 1136
WIRE -1552 1136 -1648 1136
WIRE -1008 1136 -1008 1056
WIRE -880 1136 -880 1040
WIRE -880 1136 -1008 1136
WIRE -784 1136 -880 1136
WIRE -2080 1184 -2080 1040
WIRE -1776 1200 -1776 1136
WIRE -1008 1200 -1008 1136
WIRE -2368 1328 -2368 1168
WIRE -2368 1328 -2608 1328
WIRE -2208 1328 -2368 1328
WIRE -2080 1328 -2080 1264
WIRE -2080 1328 -2208 1328
WIRE -1776 1328 -1776 1280
WIRE -1776 1328 -2080 1328
WIRE -1488 1328 -1488 1184
WIRE -1488 1328 -1776 1328
WIRE -1008 1328 -1008 1280
WIRE -1008 1328 -1488 1328
WIRE -720 1328 -720 1184
WIRE -720 1328 -1008 1328
WIRE -496 1328 -720 1328
WIRE -2208 1408 -2208 1328
WIRE -2544 1472 -2544 1120
WIRE -1152 1472 -1152 880
WIRE -1152 1472 -2544 1472
FLAG -2320 48 0
FLAG -2208 -1072 VT
FLAG -2416 -1376 VCC
FLAG -2128 -528 DB
FLAG -928 96 0
FLAG -2976 352 0
FLAG -2976 272 V_LOGIC
FLAG -2336 496 _INH
FLAG -2336 576 0
FLAG -1408 -656 _DRV
FLAG -1120 -352 LEFT
FLAG -256 -352 RIGHT
FLAG -1200 -784 V_LOAD
FLAG -2656 1120 _INH
FLAG -2480 672 V_LOGIC
FLAG -1552 480 VCC
FLAG -2208 1408 0
FLAG -832 368 _DRV
FLAG -592 944 _I_SRC_EN
FLAG -784 480 VCC
FLAG -928 -352 MIDDLE
SYMBOL res -2176 -480 R0
SYMATTR InstName R1
SYMATTR Value {R_TRIM}
SYMBOL res -1216 -1344 R0
SYMATTR InstName R2
SYMATTR Value {R_ISENSE}
SYMBOL voltage -2928 -512 R0
SYMATTR InstName V1
SYMATTR Value {VCC}
SYMBOL pnp -1264 -960 M180
SYMATTR InstName Q4
SYMATTR Value TIP42C
SYMBOL pnp -1648 -480 M180
SYMATTR InstName Q5
SYMATTR Value 2N3906
SYMBOL pnp -2224 -624 M180
WINDOW 0 -25 28 Left 2
WINDOW 3 -86 72 Left 2
SYMATTR InstName Q7
SYMATTR Value 2N3906
SYMBOL res -2176 -1216 R0
SYMATTR InstName R7
SYMATTR Value 145
SYMBOL res -2176 -1024 R0
SYMATTR InstName R13
SYMATTR Value 145
SYMBOL res -2368 -1216 R0
WINDOW 3 -440 -107 Left 2
SYMATTR Value {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
SYMATTR InstName RT
SYMBOL schottky -1248 -928 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D2
SYMATTR Value BAT54SHY
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -1056 -336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R12
SYMATTR Value {R_SET}
SYMBOL ind -784 -368 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L4
SYMATTR Value {L_SET}
SYMBOL voltage -2976 256 R0
SYMATTR InstName V5
SYMATTR Value 3.3
SYMBOL voltage -2336 480 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -519 61 Left 2
SYMATTR Value PULSE(3.3 0 50n 1n 1n {TON} {TC})
SYMATTR InstName V8
SYMBOL pmos -1248 -576 M180
SYMATTR InstName M2
SYMATTR Value RSL020P03
SYMBOL cap -1328 -1344 R0
SYMATTR InstName C1
SYMATTR Value 62n
SYMBOL diode -1216 -512 R0
SYMATTR InstName D3
SYMATTR Value 1N914
SYMBOL diode -1184 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D9
SYMATTR Value BZX84C27VLY
SYMBOL schottky -2112 976 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D5
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -2096 1280 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R6
SYMATTR Value 100
SYMBOL res -2384 1040 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R10
SYMATTR Value 220
SYMBOL res -2384 816 M180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R11
SYMATTR Value 220
SYMBOL pnp -2144 912 M180
SYMATTR InstName Q11
SYMATTR Value 2N3906
SYMBOL pnp -2432 1168 M180
SYMATTR InstName Q12
SYMATTR Value 2N3906
SYMBOL schottky -1584 1024 M90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D7
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -1280 -784 R0
SYMATTR InstName R15
SYMATTR Value {R_DRVH}
SYMBOL res -1792 960 R0
SYMATTR InstName R16
SYMATTR Value 110
SYMBOL res -1792 1184 R0
SYMATTR InstName R17
SYMATTR Value 110
SYMBOL npn -1840 832 R0
SYMATTR InstName Q14
SYMATTR Value 2N3904
SYMBOL npn -1552 1088 R0
SYMATTR InstName Q15
SYMATTR Value 2N3904
SYMBOL diode -144 -336 R0
SYMATTR InstName D12
SYMATTR Value 1N914
SYMBOL ind -1216 -1216 R0
SYMATTR InstName L1
SYMATTR Value 1p
SYMBOL zener -2480 -960 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D4
SYMATTR Value BZX84C6V2L
SYMBOL res -2512 -96 R0
SYMATTR InstName R3
SYMATTR Value 4.7k
SYMBOL pnp -2224 -80 M180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL pnp -2560 -784 M180
WINDOW 0 -25 28 Left 2
WINDOW 3 -86 72 Left 2
SYMATTR InstName Q9
SYMATTR Value 2N3906
SYMBOL res -1712 -544 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 200
SYMBOL pnp -2224 -784 M180
SYMATTR InstName Q1
SYMATTR Value TIP42C
SYMBOL res -1280 -672 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 1
SYMBOL res -1504 800 R0
SYMATTR InstName R14
SYMATTR Value {R_DRVL}
SYMBOL schottky -816 1024 M90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D1
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -1024 960 R0
SYMATTR InstName R18
SYMATTR Value 110
SYMBOL res -1024 1184 R0
SYMATTR InstName R19
SYMATTR Value 110
SYMBOL npn -1072 832 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL npn -784 1088 R0
SYMATTR InstName Q6
SYMATTR Value 2N3904
SYMBOL res -736 800 R0
SYMATTR InstName R20
SYMATTR Value {R_DRVL}
SYMBOL ind -512 -368 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName LF1
SYMATTR Value {L_SET*1023}
SYMATTR Type ind
SYMBOL ind -464 -336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName LF2
SYMATTR Value {L_SET*1024}
SYMATTR Type ind
TEXT -2624 456 Left 2 !.tran {TC*20}
TEXT -2624 136 Left 2 !.step temp 0 75 25
TEXT -2624 104 Left 2 ;.op
TEXT -2624 168 Left 2 !;.step param VCC 18 25 1
TEXT -2624 200 Left 2 !.lib ../../spice_models/tip42c.bjt
TEXT -2624 232 Left 2 !.param VCC=20
TEXT -2616 304 Left 2 !;.step param R_SET 100 350 5
TEXT -2640 -1448 Left 2 !.param beta=3468
TEXT -2624 -1496 Left 2 !;.step param beta 3100 4000 100
TEXT -2160 -1496 Left 2 ;{300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
TEXT -1968 -1424 Left 2 !;.step param R_SET 15 30 15
TEXT -2616 -1584 Left 2 !.temp 25
TEXT -1592 -1424 Left 2 !.step param L_SET list 5n 10n 20n
TEXT -2192 200 Left 2 !.lib ../../spice_models/tip41c.bjt
TEXT -1592 -1456 Left 2 !.param L_SET=1p
TEXT -1960 -1456 Left 2 !.param R_SET=15
TEXT -2632 360 Left 2 !.param TON=350n
TEXT -2624 408 Left 2 !.param TC=750n
TEXT -944 -1488 Left 2 !.param R_ISENSE=0.562
TEXT -2192 560 Left 2 ;WATCH OUT FOR 200mA CURRENT!!!!\nWATTAGE AND Q26 HEALTH CONCERNS
TEXT -48 -256 Left 2 ;WATCH OUT FOR 300mA PEAK CURRENT!!!!\nSELECTED ZENNER MIGHT BE MAD ABOUT IT
TEXT -1424 -1552 Left 2 !;.step dec param L_COMP 100n 1000n 3
TEXT -2104 72 Left 2 !;.step param R_TRIM 3k 4k 25
TEXT -2096 112 Left 2 !.param R_TRIM=3.0k
TEXT -2128 272 Left 2 ;Depending on the number of compensation elements, R_TRIM needs to be:\n673 for 0\n1.17k for 1\n3k for 2\n60k for 3\nThese numbers are approximate.
TEXT -1360 424 Left 2 !.param R_DRVH=100
TEXT -1080 424 Left 2 !.param R_DRVL=200
TEXT -1248 280 Left 2 !;.step param R_DRVH 50 150 10
TEXT -552 -288 Left 2 !K LF1 LF2 1
CIRCLE Normal -2256 -1104 -2432 -1216 2