Pages: [1]   Go Down
Author Topic: Help with transistor and resistor selection for LED array  (Read 1203 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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




* LED_circuit.jpg (108.32 KB, 1025x655 - viewed 32 times.)
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34207
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5517
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt_theory.html
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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)?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt_theory.html


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!
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5517
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Thankyou!

Karma points are given via the little green '+' over on the left. smiley
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Thankyou!

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


Will do, i think i need to make a couple more posts smiley Thanks again
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Done, thanks for your help
Logged

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Arduino Uno R3
Mac OSX Lion


Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5517
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you put 50mA thru your LEDs they will die an early death.

Not if they're 50mA LEDs.

(which was the way I read it...)
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

IF Typical (mA)   20
IF Max Continuous (mA) 50


Max Continuous does not read as bieng a 50mA LED to me.  No more than 40mA Max per Arduino pin reads as normal operation.
Vf usually changes at the higher current flow too.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: