* SPICE netlist
R1 DB N018 {R_TRIM}
R2 N001 N005 {R_ISENSE}
V1 VCC 0 {VCC}
Q4 Vs N006 N005 0 TIP42C
Q5 0 N016 N006 0 2N3906
Q7 DB DB N014 0 2N3906
R7 VCC VT 145
R13 VT N012 145
RT VCC VT {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
D2 Vs N006 BAT54SHY
R12 LEFT N017 {R_SET}
L4 0 N017 {L_SET}
V5 V_LOGIC 0 3.3
V8 _INH 0 PULSE(3.3 0 50n 1n 1n {TON} {TC})
M2 Vd Vg Vs Vs RSL020P03
C1 VCC N004 22n
D3 Vd LEFT 1N914
D9 NC_01 LEFT BZX84C27VLY
D5 N024 N022 BAT54
R6 0 N024 100
R10 N029 N022 220
R11 N022 V_LOGIC 220
Q11 N024 N022 V_LOGIC 0 2N3906
Q12 0 _INH N029 0 2N3906
D7 N027 N028 BAT54
R15 VCC _DRV {R_DRVH}
R16 N026 N027 110
R17 N027 0 110
Q14 V_LOGIC N024 N026 0 2N3904
Q15 N028 N027 0 0 2N3904
D8 N025 N023 BAT54
R18 0 DRV 100
R19 N030 N023 2k
R22 N023 VCC 110
Q16 N025 N023 VCC 0 2N3906
Q17 0 N031 N030 0 2N3906
M1 0 N021 0 0 RSR025N03
D12 0 0 1N914
D13 0 0 BZX84C27VLY
D4 N011 VCC BZX84C6V2L
R3 N013 0 4.7k
Q8 0 N013 N018 0 2N3906
Q9 N013 N013 N011 0 2N3906
R4 N016 DB 100
Q1 N014 N014 N012 0 TIP42C
R8 DRV N021 1
R9 Vg _DRV 0.1
R14 _DRV N028 {R_DRVL}
R20 DRV N025 300
C3 NC_02 N019 5n
R21 N019 0 25
C2 NC_03 N020 100n
R5 N020 0 50
R23 VCC N002 {R_ISENSE}
Q2 N007 N003 N002 0 TIP42C
R24 N007 N009 {R_SET}
L2 0 N009 {L_SET}
V3 N003 0 19
R26 N015 Vg 300
D1 P001 Vg 1N4148
D6 P002 P001 1N4148
D10 P003 P002 1N4148
D11 P004 P003 1N4148
D14 N010 Vg STW8B12C
L1 VCC N001 10n
D15 N008 P004 1N4148
.tran {TC*20} uic
.step temp 0 75 25
;.step param VCC 18 25 1
.param VCC=20
;.step param R_SET 100 350 5
.param beta=3468
;.step param beta 3100 4000 100
;.step param R_SET 15 30 15
.temp 25
.step param L_SET list 1p 1u 2u 4u
.param L_SET=1p
.param R_SET=15
.param TON=10350n
.param TC=20500n
.param R_ISENSE=0.562
;.step dec param L_COMP 100n 1000n 3
;.step param R_TRIM 3k 4k 25
.param R_TRIM=3.0k
.param R_DRVH=200
.param R_DRVL=0.1
;.step param R_DRVH 50 150 10

* LTspice schematic (.asc)
Version 4
SHEET 1 3344 3024
WIRE 1656 -1464 1656 -1512
WIRE -1192 -1448 -1624 -1448
WIRE -1112 -1448 -1192 -1448
WIRE -856 -1448 -1112 -1448
WIRE -8 -1448 -856 -1448
WIRE 104 -1448 -8 -1448
WIRE 104 -1384 104 -1448
WIRE -8 -1240 -8 -1448
WIRE 104 -1224 104 -1304
WIRE 1656 -1192 1656 -1384
WIRE -856 -1160 -856 -1448
WIRE -856 -1160 -1048 -1160
WIRE 1592 -1144 1352 -1144
WIRE -8 -1128 -8 -1176
WIRE -1048 -1096 -1048 -1160
WIRE -856 -1096 -856 -1160
WIRE 104 -1096 104 -1144
WIRE -72 -1048 -536 -1048
WIRE 40 -1048 -72 -1048
WIRE 1352 -1048 1352 -1144
WIRE -1048 -968 -1048 -1016
WIRE -904 -968 -1048 -968
WIRE -856 -968 -856 -1016
WIRE -856 -968 -904 -968
WIRE -72 -952 -72 -1048
WIRE -8 -952 -72 -952
WIRE 104 -952 104 -1000
WIRE 104 -952 56 -952
WIRE 1656 -952 1656 -1096
WIRE -1192 -920 -1192 -1448
WIRE -856 -904 -856 -968
WIRE -56 -888 -56 -904
WIRE 1656 -808 1656 -872
WIRE -152 -792 -152 -856
WIRE -1192 -776 -1192 -856
WIRE -856 -776 -856 -824
WIRE -1256 -728 -1352 -728
WIRE -920 -728 -1016 -728
WIRE 8 -680 8 -904
WIRE 104 -680 104 -952
WIRE 1656 -664 1656 -728
WIRE -1352 -648 -1352 -728
WIRE -1192 -648 -1192 -680
WIRE -1192 -648 -1352 -648
WIRE -1016 -648 -1016 -728
WIRE -856 -648 -856 -680
WIRE -856 -648 -1016 -648
WIRE -856 -616 -856 -648
WIRE 104 -600 104 -680
WIRE 8 -584 8 -600
WIRE -920 -568 -1016 -568
WIRE 104 -568 104 -600
WIRE -296 -552 -392 -552
WIRE -152 -552 -152 -728
WIRE -152 -552 -216 -552
WIRE -56 -552 -56 -568
WIRE -56 -552 -152 -552
WIRE 8 -552 8 -584
WIRE 8 -552 -56 -552
WIRE 56 -552 8 -552
WIRE -1016 -488 -1016 -568
WIRE -856 -488 -856 -520
WIRE -856 -488 -1016 -488
WIRE -536 -472 -536 -1048
WIRE 104 -440 104 -472
WIRE -856 -424 -856 -488
WIRE -824 -424 -856 -424
WIRE -760 -424 -824 -424
WIRE -600 -424 -680 -424
WIRE 104 -408 104 -440
WIRE -1624 -392 -1624 -1448
WIRE -856 -360 -856 -424
WIRE 104 -248 104 -344
WIRE 184 -248 104 -248
WIRE 264 -248 184 -248
WIRE 424 -248 344 -248
WIRE 568 -248 504 -248
WIRE 632 -248 568 -248
WIRE 680 -248 632 -248
WIRE 808 -248 680 -248
WIRE 680 -232 680 -248
WIRE 808 -200 808 -248
WIRE 104 -168 104 -248
WIRE 632 -136 632 -248
WIRE 680 -136 680 -168
WIRE 680 -136 632 -136
WIRE 680 -88 680 -136
WIRE -856 -72 -856 -280
WIRE 168 -56 168 -136
WIRE 584 -56 584 -136
WIRE -1192 -24 -1192 -648
WIRE -920 -24 -1192 -24
WIRE 920 -8 728 -8
WIRE 1080 -8 1000 -8
WIRE -1192 24 -1192 -24
WIRE -1624 120 -1624 -312
WIRE -1192 120 -1192 104
WIRE -1192 120 -1624 120
WIRE -1016 120 -1192 120
WIRE -856 120 -856 24
WIRE -856 120 -1016 120
WIRE -536 120 -536 -376
WIRE -536 120 -856 120
WIRE 168 120 168 24
WIRE 168 120 104 120
WIRE 376 120 168 120
WIRE 584 120 584 24
WIRE 584 120 376 120
WIRE 632 120 632 -136
WIRE 632 120 584 120
WIRE 680 120 680 8
WIRE 680 120 632 120
WIRE 808 120 808 -136
WIRE 808 120 680 120
WIRE -1016 152 -1016 120
WIRE 376 200 376 120
WIRE 472 664 -88 664
WIRE 536 664 472 664
WIRE -1176 776 -1368 776
WIRE -1064 776 -1176 776
WIRE -776 776 -1064 776
WIRE -472 776 -776 776
WIRE -248 776 -312 776
WIRE -184 776 -248 776
WIRE 40 776 -184 776
WIRE 328 776 40 776
WIRE -184 808 -184 776
WIRE -1064 824 -1064 776
WIRE 40 824 40 776
WIRE -184 904 -184 888
WIRE -88 904 -88 664
WIRE -88 904 -184 904
WIRE -776 920 -776 776
WIRE -184 920 -184 904
WIRE 328 920 328 776
WIRE -472 936 -472 776
WIRE -1064 968 -1064 904
WIRE -936 968 -1064 968
WIRE -840 968 -936 968
WIRE 40 968 40 904
WIRE 168 968 40 968
WIRE 264 968 168 968
WIRE -536 984 -616 984
WIRE -1064 1048 -1064 968
WIRE 40 1048 40 968
WIRE -936 1064 -936 968
WIRE -872 1064 -936 1064
WIRE -776 1064 -776 1016
WIRE -776 1064 -808 1064
WIRE 168 1064 168 968
WIRE 232 1064 168 1064
WIRE 328 1064 328 1016
WIRE 328 1064 296 1064
WIRE -472 1080 -472 1032
WIRE 328 1128 328 1064
WIRE -776 1144 -776 1064
WIRE -616 1144 -616 984
WIRE -616 1144 -776 1144
WIRE -280 1144 -344 1144
WIRE -184 1144 -184 1000
WIRE -184 1144 -216 1144
WIRE -1064 1176 -1064 1128
WIRE 40 1176 40 1128
WIRE -184 1192 -184 1144
WIRE -1352 1224 -1384 1224
WIRE -1128 1224 -1352 1224
WIRE -88 1224 -88 1032
WIRE -24 1224 -88 1224
WIRE -472 1240 -472 1160
WIRE -344 1240 -344 1144
WIRE -344 1240 -472 1240
WIRE -248 1240 -344 1240
WIRE 328 1240 328 1208
WIRE 472 1240 328 1240
WIRE 536 1240 472 1240
WIRE -776 1288 -776 1144
WIRE 328 1288 328 1240
WIRE -472 1304 -472 1240
WIRE -1064 1432 -1064 1272
WIRE -1064 1432 -1304 1432
WIRE -904 1432 -1064 1432
WIRE -776 1432 -776 1368
WIRE -776 1432 -904 1432
WIRE -472 1432 -472 1384
WIRE -472 1432 -776 1432
WIRE -184 1432 -184 1288
WIRE -184 1432 -472 1432
WIRE 40 1432 40 1272
WIRE 40 1432 -184 1432
WIRE 328 1432 328 1368
WIRE 328 1432 40 1432
WIRE -904 1512 -904 1432
FLAG -1016 152 0
FLAG -904 -968 VT
FLAG -1112 -1448 VCC
FLAG -824 -424 DB
FLAG 376 200 0
FLAG -1672 456 0
FLAG -1672 376 V_LOGIC
FLAG -1032 600 _INH
FLAG -1032 680 0
FLAG -392 -552 _DRV
FLAG 184 -248 LEFT
FLAG 568 -248 RIGHT
FLAG 104 -680 V_LOAD
FLAG -1352 1224 _INH
FLAG -1176 776 V_LOGIC
FLAG -248 776 VCC
FLAG -904 1512 0
FLAG 472 664 _DRV
FLAG 472 1240 DRV
FLAG 1080 -8 DRV
FLAG 1656 -664 0
FLAG 1352 -968 0
FLAG 1656 -1512 VCC
FLAG 104 -440 Vd
FLAG 8 -584 Vg
FLAG 104 -600 Vs
SYMBOL res -872 -376 R0
SYMATTR InstName R1
SYMATTR Value {R_TRIM}
SYMBOL res 88 -1240 R0
SYMATTR InstName R2
SYMATTR Value {R_ISENSE}
SYMBOL voltage -1624 -408 R0
SYMATTR InstName V1
SYMATTR Value {VCC}
SYMBOL pnp 40 -1000 M180
SYMATTR InstName Q4
SYMATTR Value TIP42C
SYMBOL pnp -600 -376 M180
SYMATTR InstName Q5
SYMATTR Value 2N3906
SYMBOL pnp -920 -520 M180
SYMATTR InstName Q7
SYMATTR Value 2N3906
SYMBOL res -872 -1112 R0
SYMATTR InstName R7
SYMATTR Value 145
SYMBOL res -872 -920 R0
SYMATTR InstName R13
SYMATTR Value 145
SYMBOL res -1064 -1112 R0
SYMATTR Value {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
SYMATTR InstName RT
SYMBOL schottky 56 -968 R90
SYMATTR InstName D2
SYMATTR Value BAT54SHY
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 248 -232 R270
SYMATTR InstName R12
SYMATTR Value {R_SET}
SYMBOL ind 520 -264 R90
SYMATTR InstName L4
SYMATTR Value {L_SET}
SYMBOL voltage -1672 360 R0
SYMATTR InstName V5
SYMATTR Value 3.3
SYMBOL voltage -1032 584 R0
SYMATTR Value PULSE(3.3 0 50n 1n 1n {TON} {TC})
SYMATTR InstName V8
SYMBOL pmos 56 -472 M180
SYMATTR InstName M2
SYMATTR Value RSL020P03
SYMBOL cap -24 -1240 R0
SYMATTR InstName C1
SYMATTR Value 22n
SYMBOL diode 88 -408 R0
SYMATTR InstName D3
SYMATTR Value 1N914
SYMBOL diode 120 -104 R180
SYMATTR InstName D9
SYMATTR Value BZX84C27VLY
SYMBOL schottky -808 1080 M270
SYMATTR InstName D5
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -792 1384 M180
SYMATTR InstName R6
SYMATTR Value 100
SYMBOL res -1080 1144 M180
SYMATTR InstName R10
SYMATTR Value 220
SYMBOL res -1080 920 M180
SYMATTR InstName R11
SYMATTR Value 220
SYMBOL pnp -840 1016 M180
SYMATTR InstName Q11
SYMATTR Value 2N3906
SYMBOL pnp -1128 1272 M180
SYMATTR InstName Q12
SYMATTR Value 2N3906
SYMBOL schottky -280 1128 M90
SYMATTR InstName D7
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -200 792 R0
SYMATTR InstName R15
SYMATTR Value {R_DRVH}
SYMBOL res -488 1064 R0
SYMATTR InstName R16
SYMATTR Value 110
SYMBOL res -488 1288 R0
SYMATTR InstName R17
SYMATTR Value 110
SYMBOL npn -536 936 R0
SYMATTR InstName Q14
SYMATTR Value 2N3904
SYMBOL npn -248 1192 R0
SYMATTR InstName Q15
SYMATTR Value 2N3904
SYMBOL schottky 296 1080 M270
SYMATTR InstName D8
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 312 1384 M180
SYMATTR InstName R18
SYMATTR Value 100
SYMBOL res 24 1144 M180
SYMATTR InstName R19
SYMATTR Value 2k
SYMBOL res 24 920 M180
SYMATTR InstName R22
SYMATTR Value 110
SYMBOL pnp 264 1016 M180
SYMATTR InstName Q16
SYMATTR Value 2N3906
SYMBOL pnp -24 1272 M180
SYMATTR InstName Q17
SYMATTR Value 2N3906
SYMBOL nmos 728 -88 M0
SYMATTR InstName M1
SYMATTR Value RSR025N03
SYMBOL diode 664 -232 R0
SYMATTR InstName D12
SYMATTR Value 1N914
SYMBOL diode 824 -136 R180
SYMATTR InstName D13
SYMATTR Value BZX84C27VLY
SYMBOL zener -1176 -856 R180
SYMATTR InstName D4
SYMATTR Value BZX84C6V2L
SYMBOL res -1208 8 R0
SYMATTR InstName R3
SYMATTR Value 4.7k
SYMBOL pnp -920 24 M180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL pnp -1256 -680 M180
SYMATTR InstName Q9
SYMATTR Value 2N3906
SYMBOL res -664 -440 R90
SYMATTR InstName R4
SYMATTR Value 100
SYMBOL pnp -920 -680 M180
SYMATTR InstName Q1
SYMATTR Value TIP42C
SYMBOL res 1016 -24 R90
SYMATTR InstName R8
SYMATTR Value 1
SYMBOL res -200 -568 R90
SYMATTR InstName R9
SYMATTR Value 0.1
SYMBOL res -200 904 R0
SYMATTR InstName R14
SYMATTR Value {R_DRVL}
SYMBOL res 312 1224 M180
SYMATTR InstName R20
SYMATTR Value 300
SYMBOL cap 152 -200 R0
SYMATTR InstName C3
SYMATTR Value 5n
SYMBOL res 152 -72 R0
SYMATTR InstName R21
SYMATTR Value 25
SYMBOL cap 568 -200 R0
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL res 568 -72 R0
SYMATTR InstName R5
SYMATTR Value 50
SYMBOL res 1640 -1480 R0
SYMATTR InstName R23
SYMATTR Value {R_ISENSE}
SYMBOL pnp 1592 -1096 M180
SYMATTR InstName Q2
SYMATTR Value TIP42C
SYMBOL res 1640 -968 R0
SYMATTR InstName R24
SYMATTR Value {R_SET}
SYMBOL ind 1672 -712 R180
SYMATTR InstName L2
SYMATTR Value {L_SET}
SYMBOL voltage 1352 -1064 R0
SYMATTR InstName V3
SYMATTR Value 19
SYMBOL res -8 -696 R0
SYMATTR InstName R26
SYMATTR Value 300
SYMBOL diode -72 -632 R0
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMATTR Description Zener Diode
SYMATTR Type zener
SYMBOL diode -72 -696 R0
SYMATTR InstName D6
SYMATTR Value 1N4148
SYMATTR Description Zener Diode
SYMATTR Type zener
SYMBOL diode -72 -760 R0
SYMATTR InstName D10
SYMATTR Value 1N4148
SYMATTR Description Zener Diode
SYMATTR Type zener
SYMBOL diode -72 -824 R0
SYMATTR InstName D11
SYMATTR Value 1N4148
SYMATTR Description Zener Diode
SYMATTR Type zener
SYMBOL LED -168 -792 R0
SYMATTR InstName D14
SYMATTR Value STW8B12C
SYMATTR Description Zener Diode
SYMATTR Type zener
SYMBOL ind 88 -1400 R0
SYMATTR InstName L1
SYMATTR Value 10n
SYMBOL diode -72 -888 R0
SYMATTR InstName D15
SYMATTR Value 1N4148
SYMATTR Description Zener Diode
SYMATTR Type zener