* Z:\home\khalils\Downloads\files\data\raw_asc\bce44e418160_current_source.asc
* Generated by LTspice 26.0.1 for Windows.
V1 N001 0 0
Q1 N005 N002 N001 0 BC857B
Q2 IN- N005 N004 0 BC857B
R1 N005 N002 200
R2 N002 0 82k
R3 N001 N004 470
R4 IN- 0 10k
Q3 IN+ N005 N003 0 BC857B
R5 N001 N003 470
R6 IN+ 0 5k
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
* Zero-gain amplifier : https://wiki.analog.com/university/courses/electronics/text/chapter-11\nKeeps Vce(Q1) at a constant voltage, so Ic(Q3) is constant as well, albeit very small
.dc V1 10 15 0.1
* Zero gain amplifier (R1 and Q1) stabilize power supply variations.
* Widlar current source permits smaller resistors
* V(R1) should be Vt (=26mV) around set point
* Increase R2 to make it work at higher voltages
* R4 can be a thermistor
* Add a comparator here
* Great advantage of this circuit is that no reference voltage is needed.\nFrom 10V to 15 of supply voltage, the difference between IN- and IN+ remains constant.
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2584 680
WIRE 320 -160 -16 -160
WIRE 688 -160 320 -160
WIRE 1056 -160 688 -160
WIRE 688 -96 688 -160
WIRE 1056 -96 1056 -160
WIRE -16 32 -16 -160
WIRE 320 32 320 -160
WIRE 256 80 192 80
WIRE 688 96 688 -16
WIRE 1056 96 1056 -16
WIRE 320 144 320 128
WIRE 624 144 320 144
WIRE 992 144 624 144
WIRE 320 176 320 144
WIRE 1056 240 1056 192
WIRE 1456 240 1056 240
WIRE 1680 240 1456 240
WIRE 192 288 192 80
WIRE 320 288 320 256
WIRE 320 288 192 288
WIRE 688 288 688 192
WIRE 1456 288 688 288
WIRE 1680 288 1456 288
WIRE 688 304 688 288
WIRE 1056 304 1056 240
WIRE 320 320 320 288
WIRE 688 464 688 384
WIRE 1056 464 1056 384
WIRE 320 576 320 400
FLAG 320 576 0
FLAG -16 112 0
FLAG 1056 464 0
FLAG 688 464 0
FLAG 1456 240 IN-
FLAG 1456 288 IN+
SYMBOL voltage -16 16 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL pnp 256 128 M180
SYMATTR InstName Q1
SYMATTR Value BC857B
SYMBOL pnp 992 192 M180
SYMATTR InstName Q2
SYMATTR Value BC857B
SYMBOL res 304 160 R0
SYMATTR InstName R1
SYMATTR Value 200
SYMBOL res 304 304 R0
SYMATTR InstName R2
SYMATTR Value 82k
SYMBOL res 1040 -112 R0
SYMATTR InstName R3
SYMATTR Value 470
SYMBOL res 1040 288 R0
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL pnp 624 192 M180
SYMATTR InstName Q3
SYMATTR Value BC857B
SYMBOL res 672 -112 R0
SYMATTR InstName R5
SYMATTR Value 470
SYMBOL res 672 288 R0
SYMATTR InstName R6
SYMATTR Value 5k
TEXT -16 -232 Left 2 ;Zero-gain amplifier : https://wiki.analog.com/university/courses/electronics/text/chapter-11\nKeeps Vce(Q1) at a constant voltage, so Ic(Q3) is constant as well, albeit very small
TEXT -48 600 Left 2 !.dc V1 10 15 0.1
TEXT -584 224 Left 2 ;Zero gain amplifier (R1 and Q1) stabilize power supply variations.
TEXT 1136 -64 Left 2 ;Widlar current source permits smaller resistors
TEXT -264 328 Left 2 ;V(R1) should be Vt (=26mV) around set point
TEXT -224 392 Left 2 ;Increase R2 to make it work at higher voltages
TEXT 1136 336 Left 2 ;R4 can be a thermistor
TEXT 1680 264 Left 2 ;Add a comparator here
TEXT 1552 384 Left 2 ;Great advantage of this circuit is that no reference voltage is needed.\nFrom 10V to 15 of supply voltage, the difference between IN- and IN+ remains constant.