# Help with transistor and resistor selection for LED array

Hi All,

1/ How awesome is Arduino! After very little electronics but lots of programming for 10 years I have just come back and the power of this tool is amazing…

Anyhow, my theory is a bit off. I was wondering if any body could help me make a decision here. I am building a shift light for my motorbike and i need the LEDs to be quite bright and noticeable in the sun.

The LEDS I was going to use are LED1-4 (R1-R4 is 510ohm);

IF Typical (mA) 20
VF Typical (V) 2.1
IV Typical (mcd) 10000
IF Max Continuous (mA) 50

I am not sure on what to use for T1, i was thinking the BC337, but I can’t seem to figure out what I would need for R5.

Any ideas or even other suggestions would be welcomed.

Cheers
Oliver

The LED current will be:-
voltage across resistor 12 - 2.1 = 9.9V
510R resistor will cause 9.9 / 512 = 19.33mA to flow.

So the transistor has to take 4 * 19.33 = 77.3mA
Assuming a transistor gain of 20 means 3.86mA needs to flow through the base.
Therefore R5 needs to be
5 - 0.7 = 4.3 / 3.86 = 1K
If the real gain of the transistor is greater than 20 then it doesn't matter because the transistor will still be saturated.

R5 is there for two reasons:

a) Stop more than 40mA from coming out of the Arduino pin.
b) Allow enough current to saturate the transistor.

For (a), any value from 150 ohms and upwards will do.

For (b) ... a BC337 will multiply the current going through the base by about 50. You need 200mA so you need to allow more than 4mA through. For this, R5 needs to be less than about 1K.

Me? I'd use a 470 Ohm resistor, although 220, 330, 680, etc. will work just as well.

PS: BJT H

Grumpy_Mike:
The LED current will be:-
voltage across resistor 12 - 2.1 = 9.9V
510R resistor will cause 9.9 / 512 = 19.33mA to flow.

So the transistor has to take 4 * 19.33 = 77.3mA
Assuming a transistor gain of 20 means 3.86mA needs to flow through the base.
Therefore R5 needs to be
5 - 0.7 = 4.3 / 3.86 = 1K
If the real gain of the transistor is greater than 20 then it doesn't matter because the transistor will still be saturated.

Thank you so much for the quick reply. I appreciate your help.

So, for the sake of the argument if i used 240 ohm on the resistors it would be

9.9/240 =41.25ma

4 * 41.25 = 165ma

41.25/20 for the gain = 2.0625

5-0.7 =4.3 /2.0625 = 2.08k (2k or 2k2)?

fungus:
R5 is there for two reasons:

a) Stop more than 40mA from coming out of the Arduino pin.
b) Allow enough current to saturate the transistor.

For (a), any value from 150 ohms and upwards will do.

For (b) ... a BC337 will multiply the current going through the base by about 50. You need 200mA so you need to allow more than 4mA through. For this, R5 needs to be less than about 1K.

Me? I'd use a 470 Ohm resistor, although 220, 330, 680, etc. will work just as well.

PS: BJT H

Thank you for that. That also makes sense. and the above equations should match given the gain of 20 is assumed instead of the 50. Thankyou!

ohiggins:
...given the gain of 20 is assumed instead of the 50.

Gain depends on voltages, currents, etc. 20 is quite conservative.

ohiggins:
Thankyou!

Karma points are given via the little green '+' over on the left. fungus:

ohiggins:
…given the gain of 20 is assumed instead of the 50.

Gain depends on voltages, currents, etc. 20 is quite conservative.

ohiggins:
Thankyou!

Karma points are given via the little green ‘+’ over on the left. Will do, i think i need to make a couple more posts Thanks again

Use this link, will be very helpful next time. mixania:
Use this link, will be very helpful next time. http://ledcalculator.net/

Ooo thanks for that it is interesting, it gives me a series configuration instead of a parallel one...

If you put 50mA thru your LEDs they will die an early death.
I would design for 20mA max:
IF Typical (mA) 20

Read their datasheet - you may find that at elevated currents their lifespan is degraded because they will be running hot.
If you have 12V source, then put 4 in series instead, maube even 5 if you are using that many.
Resistor will be (12V - 0.7 - 4 x (2.1V)/20mA = 145, 150 ohm.
Vce of the transistor may also be lower, from 0.7V maybe as low as 0.3V.