Go Down

### Topic: Super Bright Red Led - BC547B Transistor, but which Resistors? (Read 5234 times)previous topic - next topic

#### WilliamK Govinda

##### Sep 05, 2012, 03:57 pm
Guys, hope someone could help me with the math, as I can't figure this out just yet.

I plan on using a BC547B NPN transistor to switch On/Off a Super Bright Red Led. But I need to know the resistor for the LED and the resistor for the Transistor. I plan on using a Shift Register (74HC595) to drive 16 Leds from the Arduino.

So, the 74HC595, each output pin goes to one BC547B Transistor base via a Resistor, and so on ... I can draw this if required, but you could also check this page out instead.

http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-transistors-and-associated-resistors.aspx

I see he did reply about such question, but the transistor and led I'm using may be a bit different from what I see...

Thanks for any help.

Best Regards, WilliamK

#1
##### Sep 05, 2012, 04:51 pm
Making some assumptions:
5V supply
LED has Vf of 2V
10mA LED current flow desired

BC547B: Vce Saturation (Max) @ Ib, Ic:  300mV @ 5mA, 100mA

Transistor has Vce of 0.3V
Transistor has Vbe of 0.7V
8mA Transistor base current as 74HC595 is only spec'ed for 8mA at 5V output

Then 5V-LED-resistor-collector-emitter-gnd:
(5V - 2V - 0.3V)/0.01 = 270 ohm resistor

74HC595-resistor-base-gnd:
(5V -0.7)/.008 = 538 ohm. Try 560.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### WilliamK Govinda

#2
##### Sep 05, 2012, 04:54 pm
Thanks bud, and yes, its 5V, sorry I forgot to mention. ;-)

I also wonder if I could use 2 of those LEDs in series with the 5V supply?

#3
##### Sep 05, 2012, 05:02 pm
Yes, if their Vf is low enough.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#4
##### Sep 05, 2012, 05:03 pm
(5V-Vf-Vf-Vce)/current = resistor
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### WilliamK Govinda

#5
##### Sep 05, 2012, 05:08 pm
Perfect! I'm learning, thanks!

One thing, how can I know the details of a LED? I bought in bulk, all I know is that they are super bright red leds. (I think they are 5mm, I could measure)

They look just like this one:

http://www.ebay.com/itm/100-Pcs-5mm-Red-Superbright-diffused-LED-Light-lamp-2-Pins-5000-6000-Mcd-/180967282597?pt=LH_DefaultDomain_0&hash=item2a227d97a5

#### WilliamK Govinda

#6
##### Sep 05, 2012, 05:09 pm
Oops, actually they were called "5mm Red Ultra Bright" (I copied this from the purchase I made)

So they are like this:

FORWARD VOLTAGE: 2.3 VOLT
FORWARD CURRENT: 20 MA

#7
##### Sep 05, 2012, 05:16 pm
Connect one from 5V to Gnd with 270 ohm resistor, measure the voltage across - now you know Vf.
Most LEDs are spec'ed for 20mA continuous.
High brightness LEDs, like 5000mCD kind, are blindingly bright.
270 should yield around 10mA. Measure the voltage across the resistor & confirm: V/R = I.
Or put multimeter in mA mode and wire in series from resistor to gnd.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### WilliamK Govinda

#8
##### Sep 05, 2012, 06:16 pm
One thing I'm wondering is to just do a matrix of leds instead of using the shift c595 ic. Any ideas on that?

For 16 leds using the C595, I would need two x C595, a resistor + transistor + resistor for each led.

Now, for a 4 x 4 Led Matrix (total of 16 leds) connecting directly to each pin on the arduino, I would have 4 pins for the row and 4 pins for the column. Now, wouldn't I use less ICs? I know that I will need to use a timer to handle the leds, just like SparkFun did on the 4x4 Button SPI product.

Anyway, just brainstorming out loud ... ;-)

#9
##### Sep 05, 2012, 06:32 pm
Sure, 4x4: 4 pins with resistors to drive anodes, ULN2003 to sink cathodes.
Do it all from a shift register if you want. Use TPIC6B595 and 4 pullup resistors.
0 on Anodes - don't pull low, allow resistor to soure current,
1 on Cathode column to turn on.

Write blink without delay type code, every 5mS output next set of anodes and next cathode.
Rest of the time, do whatever you're gonna be doing.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### WilliamK Govinda

#10
##### Sep 05, 2012, 06:34 pm
Oh, thanxs!

I got some ULN2803A here, would those work too?

#### WilliamK Govinda

#11
##### Sep 05, 2012, 06:39 pm
But I guess using a 4x4 matrix will present less light brightness compared to the other solution, right?

#12
##### Sep 05, 2012, 09:29 pm
ULN2803 will work great (8 drivers vs 7).
If you were running the original at 20mA, and now you are multiplexing so each column sees 1/4 of that, then maybe yes.
If you were running original at 5mA because your wife was complaining it was too bright and shielding her eyes every time you powered up, then perhaps you could inrease the current some in multiplex mode to get back to the same perceived blindingly bright level.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### WilliamK Govinda

#13
##### Sep 05, 2012, 09:51 pm
I need it to be as bright as possible, since a plexy will go on top of the LEDs. ;-)

#14
##### Sep 05, 2012, 09:53 pm
In that case, run the 16 LEDs from 2 TPIC6B595 and crank up the current to eye blistering level
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up

Please enter a valid email to subscribe