* Z:\tmp\asc_dec_bjh7r6w2\16f5343726c2_current_source_new_dec1.asc
* Generated by LTspice 26.0.1 for Windows.
C1 N002 N005 22n
RT N004 VT {300*exp(beta*(1/(TEMP+273.15)-1/(25+273.15)))}
R3 N008 0 4.7k
R5 N014 RIGHT 50
R2 N003 Ve {R_ISENSE}
R4 N010 DB 100
R6 N015 RIGHT 500
Q9 N008 N008 N007 0 2N3906
D9 N015 LEFT BZX84C27VLY
R21 N013 RIGHT 25
.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
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 4220 5156
WIRE -1200 -1488 -1200 -1552
WIRE -1312 -1344 -1312 -1552
WIRE -1200 -1328 -1200 -1408
WIRE -2160 -1264 -2352 -1264
WIRE -1312 -1232 -1312 -1280
WIRE -1200 -1216 -1200 -1248
WIRE -2352 -1200 -2352 -1264
WIRE -1200 -1200 -1200 -1216
WIRE -1376 -1152 -1840 -1152
WIRE -1328 -1152 -1376 -1152
WIRE -1264 -1152 -1328 -1152
WIRE -2352 -1072 -2352 -1120
WIRE -2208 -1072 -2352 -1072
WIRE -2160 -1072 -2208 -1072
WIRE -1376 -1056 -1376 -1152
WIRE -2496 -1024 -2496 -1552
WIRE -2496 -880 -2496 -960
WIRE -2560 -832 -2656 -832
WIRE -2656 -752 -2656 -832
WIRE -2496 -752 -2496 -784
WIRE -2496 -752 -2656 -752
WIRE -2160 -720 -2160 -752
WIRE -2160 -592 -2160 -624
WIRE -2160 -592 -2320 -592
WIRE -1840 -576 -1840 -1152
WIRE -2160 -528 -2160 -592
WIRE -2128 -528 -2160 -528
WIRE -2064 -528 -2128 -528
WIRE -1904 -528 -1984 -528
WIRE -2160 -464 -2160 -528
WIRE -1200 -352 -1200 -448
WIRE -1120 -352 -1200 -352
WIRE -1040 -352 -1120 -352
WIRE -880 -352 -960 -352
WIRE -752 -352 -800 -352
WIRE -736 -352 -752 -352
WIRE -624 -352 -736 -352
WIRE -624 -336 -624 -352
WIRE -1200 -272 -1200 -352
WIRE -2160 -176 -2160 -384
WIRE -1136 -160 -1136 -240
WIRE -720 -160 -720 -240
WIRE -2496 -128 -2496 -752
WIRE -2224 -128 -2496 -128
WIRE -1200 -128 -1200 -208
WIRE -2496 -80 -2496 -128
WIRE -2496 16 -2496 0
WIRE -2496 16 -2928 16
WIRE -2320 16 -2496 16
WIRE -2160 16 -2320 16
WIRE -1840 16 -1840 -480
WIRE -1200 16 -1200 -48
WIRE -1136 16 -1136 -80
WIRE -1136 16 -1200 16
WIRE -1008 16 -1136 16
WIRE -928 16 -1008 16
WIRE -752 16 -752 -352
WIRE -752 16 -928 16
WIRE -720 16 -720 -80
WIRE -720 16 -752 16
WIRE -624 16 -624 -272
WIRE -624 16 -720 16
WIRE -2320 48 -2320 16
WIRE -928 96 -928 16
SYMBOL cap -1328 -1344 R0
SYMATTR InstName C1
SYMATTR Value 22n
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 res -2512 -96 R0
SYMATTR InstName R3
SYMATTR Value 4.7k
SYMBOL res -736 -176 R0
SYMATTR InstName R5
SYMATTR Value 50
SYMBOL res -1216 -1344 R0
SYMATTR InstName R2
SYMATTR Value {R_ISENSE}
SYMBOL res -1968 -544 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 100
SYMBOL res -1216 -144 R0
SYMATTR InstName R6
SYMATTR Value 500
SYMBOL pnp -2560 -784 M180
WINDOW 0 -25 28 Left 2
WINDOW 3 -86 72 Left 2
SYMATTR InstName Q9
SYMATTR Value 2N3906
SYMBOL diode -1184 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D9
SYMATTR Value BZX84C27VLY
SYMBOL res -1152 -176 R0
SYMATTR InstName R21
SYMATTR Value 25
FLAG -2320 48 0
FLAG -2208 -1072 VT
FLAG -2128 -528 DB
FLAG -1120 -352 LEFT
FLAG -736 -352 RIGHT
FLAG -1328 -1152 Vb
FLAG -1200 -1216 Ve