
click to enlarge
With the help of a couple of transistors and resistors the LED current can be checked. Here T1 forms a current source for the LED and R1 is used for biasing the base of T1.
Resistor R2 is dimensioned in such a way that a potential difference of at least 0.6V is formed across it, if the current starts rising beyond the tolerable limit. Due to this T2 starts conducting, bringing down the base current of T1 which in turn stops the excess flow of current through the LEDs, or in other words the value of R2 is selected such that at normal conditions the potential drop across R2 is just under 0.6 volts.
The value of R2 is calculated as under:
R2=0.6/I(led)
here I(led)= maximum tolerable LED current.
Calculating R1 is also very easy,
R1=( V(b)-0.6 ).Hfe / I(led),
here V(b)=source voltage to R1,
Hfe=forward current gain of T1 used.