I want to build a simple circuit, to control a chain of LEDs via an external PWM signal but limit their current. Unfortunatly I'm not aware of all the effects that the transistor would introduce to this circuit. If someone could point out any simple enhancements to compensate for effects I haven't taken in account for I would be very gratful.
There is a current I1 flowing trough the LEDs and the collector, which I want to be constant. V2 is a uC GPIO output pin with an Von of 3.3V (which I assume is close to constant) and Voff of 0V. The current from V2, to which I refer as I2, will be split into I3 (transistor Base) and I4 (R2). I therefor know, Vsense = Rsense * (I1+I2).
Now there is Vbe, which I don't know if I should assume it as constant. First it is dependant of Ice, second it may vary between production lots, I don't know, how signifficant this effect is.
Two resistors also seem too simple, but if it works.. Or should I better put in a diode instead of R2 and adjust Usense + Ube = Vdiode
.
My goal is to get a few improvments or related circuits that get around issues like frequency dependency, change of parameters over temperature, production lot related variance etc.
Please, for the sake of simplicity, assume all the parts in this schematic a capable of handling the resulting theremal dissapation.
simulate this circuit – Schematic created using CircuitLab