Please try this.
- Let R2 be 1 kilo ohms
- Place a zener of reverse voltage of say 2.7 V between base and the ground and make sure it is biased properly when MCU is driving it.
- Change emitter resistor(R1) to 14 ohms
- Now we have a constant 2.7 V applied across the base whenever the zener is driven (reverse voltage)
- Assuming base drop of 0.7 V, we will have 2 V across this emitter resistor all the time.
- It corresponds to a current of 2 V / 14 ohms which is roughly 142 mA.
- Note that this is independent of positive voltage (10 V to 20 V)
- Please find a darlington transistor for high ß
- Depending of MCU voltage you can choose zener voltage and do similar math again to choose new emitter resistor value
- No. Doesn't work with V+ floating.
- R3 can be your load (LEDs for example)
Zener and R1 together act as negative feedback for this system and hence when current tries to increase, the emitter voltage will increase which tends to decrease the applied base emitter voltage for the transistor there by reducing the gain a little and the nice the collector current accordingly.
Will upload the circuit soon