* SPICE netlist
Q2 N005 N005 N007 0 2N3904
D1 0 N007 BZX84C6V2L
R1 VCC N005 4.7k
R2 VCC N001 0.45
R3 N006 N009 {R_SET}
V1 VCC 0 {VCC}
Q3 DB N005 N008 0 2N3904
R4 N008 0 4.7k
Q4 0 NC_01 NC_02 0 TIP42C
Q7 N003 N003 DB 0 2N3906
Q6 N003 N003 DB 0 2N3904
R7 VCC VT 145
R13 VT DB 5k
RT VCC VT {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
Q1 PB PB N002 0 TIP42C
S1 N004 PC V_SW 0 LDSW
V2 V_SW 0 PULSE(0 1 50n 1n 1n 1000n 2000n)
D2 PC NC_03 BAT54SHY
L1 N004 N006 {L_SET}
L2 N001 PE 1p
L3 N009 0 {L_SET/2048}
C1 DB 0 100n
Q8 PC PB PE 0 TIP42C
R6 PB 0 2k
Q5 N002 DB VCC 0 2N3906
.tran 2u
;.step temp 0 50 2
.param R_SET=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 2
.temp 25
;.step param L_SET list 2u 3u 4u
.param L_SET=1p

* LTspice schematic (.asc)
Version 4
SHEET 1 1616 1424
WIRE -632 -712 -808 -712
WIRE -472 -712 -632 -712
WIRE -136 -712 -472 -712
WIRE 104 -712 -136 -712
WIRE 584 -712 104 -712
WIRE 584 -664 584 -712
WIRE -136 -600 -136 -712
WIRE -136 -600 -328 -600
WIRE 104 -600 104 -712
WIRE 584 -568 584 -584
WIRE 40 -552 24 -552
WIRE -328 -536 -328 -600
WIRE -136 -536 -136 -600
WIRE 584 -456 584 -488
WIRE -328 -408 -328 -456
WIRE -184 -408 -328 -408
WIRE -136 -408 -136 -456
WIRE -136 -408 -184 -408
WIRE 104 -392 104 -504
WIRE 584 -392 584 -456
WIRE -136 -344 -136 -408
WIRE 264 -344 168 -344
WIRE 408 -344 264 -344
WIRE 520 -344 408 -344
WIRE 104 -264 104 -296
WIRE 264 -264 264 -344
WIRE 264 -264 104 -264
WIRE -136 -248 -136 -264
WIRE -56 -248 -136 -248
WIRE 584 -248 584 -296
WIRE -136 -216 -136 -248
WIRE 104 -184 104 -264
WIRE 408 -184 408 -344
WIRE 584 -184 584 -248
WIRE 584 -184 536 -184
WIRE -200 -168 -296 -168
WIRE -296 -88 -296 -168
WIRE -136 -88 -136 -120
WIRE -136 -88 -296 -88
WIRE -136 -56 -136 -88
WIRE -296 -8 -296 -88
WIRE -200 -8 -296 -8
WIRE -136 72 -136 40
WIRE -56 72 -56 -248
WIRE -56 72 -136 72
WIRE 696 88 632 88
WIRE 808 88 696 88
WIRE 584 120 584 -184
WIRE 808 120 808 88
WIRE -472 136 -472 -712
WIRE -136 136 -136 72
WIRE -104 136 -136 136
WIRE -8 136 -104 136
WIRE 24 136 24 -552
WIRE 24 136 -8 136
WIRE 632 136 632 88
WIRE -808 168 -808 -712
WIRE 632 232 632 184
WIRE 680 232 632 232
WIRE 808 232 808 200
WIRE 808 232 680 232
WIRE 584 264 584 200
WIRE -472 280 -472 216
WIRE -264 280 -472 280
WIRE 680 280 680 232
WIRE -472 312 -472 280
WIRE -136 312 -136 136
WIRE -264 360 -264 280
WIRE -264 360 -408 360
WIRE -200 360 -264 360
WIRE 584 424 584 344
WIRE -472 488 -472 408
WIRE -8 488 -8 136
WIRE -136 504 -136 408
WIRE 104 552 104 -184
WIRE 584 584 584 504
WIRE -808 680 -808 248
WIRE -536 680 -808 680
WIRE -472 680 -472 552
WIRE -472 680 -536 680
WIRE -136 680 -136 584
WIRE -136 680 -472 680
WIRE -8 680 -8 552
WIRE -8 680 -136 680
WIRE 104 680 104 632
WIRE 104 680 -8 680
WIRE 280 680 104 680
WIRE 584 680 584 664
WIRE 584 680 280 680
WIRE -536 712 -536 680
FLAG -536 712 0
FLAG 584 -456 PE
FLAG 584 -248 PC
FLAG -184 -408 VT
FLAG -632 -712 VCC
FLAG 104 -184 PB
FLAG -104 136 DB
FLAG 680 280 0
FLAG 696 88 V_SW
SYMBOL npn -408 312 M0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL zener -456 552 R180
SYMATTR InstName D1
SYMATTR Value BZX84C6V2L
SYMBOL res -488 120 R0
SYMATTR InstName R1
SYMATTR Value 4.7k
SYMBOL res 568 -680 R0
SYMATTR InstName R2
SYMATTR Value 0.45
SYMBOL res 568 408 R0
SYMATTR InstName R3
SYMATTR Value {R_SET}
SYMBOL voltage -808 152 R0
SYMATTR InstName V1
SYMATTR Value {VCC}
SYMBOL npn -200 312 R0
SYMATTR InstName Q3
SYMATTR Value 2N3904
SYMBOL res -152 488 R0
SYMATTR InstName R4
SYMATTR Value 4.7k
SYMBOL pnp 216 680 M180
SYMATTR InstName Q4
SYMATTR Value TIP42C
SYMBOL pnp -200 -120 M180
SYMATTR InstName Q7
SYMATTR Value 2N3906
SYMBOL npn -200 -56 R0
SYMATTR InstName Q6
SYMATTR Value 2N3904
SYMBOL res -152 -552 R0
SYMATTR InstName R7
SYMATTR Value 145
SYMBOL res -152 -360 R0
SYMATTR InstName R13
SYMATTR Value 5k
SYMBOL res -344 -552 R0
SYMATTR Value {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
SYMATTR InstName RT
SYMBOL pnp 168 -296 R180
SYMATTR InstName Q1
SYMATTR Value TIP42C
SYMBOL sw 584 216 R180
SYMATTR InstName S1
SYMATTR Value LDSW
SYMBOL voltage 808 104 R0
SYMATTR Value PULSE(0 1 50n 1n 1n 1000n 2000n)
SYMATTR InstName V2
SYMBOL schottky 536 -200 R90
SYMATTR InstName D2
SYMATTR Value BAT54SHY
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL ind 568 248 R0
SYMATTR InstName L1
SYMATTR Value {L_SET}
SYMBOL ind 568 -584 R0
SYMATTR InstName L2
SYMATTR Value 1p
SYMBOL ind 568 568 R0
SYMATTR InstName L3
SYMATTR Value {L_SET/2048}
SYMBOL cap -24 488 R0
SYMATTR InstName C1
SYMATTR Value 100n
SYMBOL pnp 520 -296 M180
SYMATTR InstName Q8
SYMATTR Value TIP42C
SYMBOL res 88 536 R0
SYMATTR InstName R6
SYMATTR Value 2k
SYMBOL pnp 40 -504 M180
SYMATTR InstName Q5
SYMATTR Value 2N3906