Pages: [1]   Go Down
 Author Topic: 2N2222 base resistor  (Read 2218 times) 0 Members and 1 Guest are viewing this topic.
Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 57
Outta Steam
 « on: October 07, 2011, 12:58:49 pm » Bigger Smaller Reset

Dummy question for you guys.

I'm switching a parallel array of 10 leds (3.2v, 20mA with each led ballasted with a 82R resistor) with a 2N2222 transistor.  The led supply is 5V as is the base voltage (from an Arduino digital pin).

How do I calculate the value of base resistor will I need for the transistor?  I've tried many methods suggested to me but always end up with a different value each time!  The latest formula I used was  RB = 0.2 x RL x hFE with values of 8.2R for RL and 300 for hFE.  That gave me a value of 492R.  Does that sound right?  I have seen values of as high as 100K being used with this transistor, so have I used the right formula and values?

Bernie
 Logged

Montreal
Offline
Edison Member
Karma: 18
Posts: 2227
 « Reply #1 on: October 07, 2011, 01:20:08 pm » Bigger Smaller Reset

Rb = Vr / ( Ic / hfe ) = Vr x hfe / Ic
where Ic is collector current or sum current of all your leds (200 mA)
hfe - 40, worst case scenario Ic = 500 mA, V = 10V
Vr - Voltage across resistor, V output - Vbe = 5 - 0.7 = 4.3

Rb = 4.3 x 40 / 0.2 =  860 Ohm
 Logged

Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 57
Outta Steam
 « Reply #2 on: October 07, 2011, 01:37:15 pm » Bigger Smaller Reset

Many thanks Magician!

I can see now I was using the wrong hFE figure (amongst other things).  I was using the figure of 300 as quoted in the catalogue, rather than 40 for the worst case scenario taken from the data sheet.  That'll teach me  .

Bernie
 Logged

Montreal
Offline
Edison Member
Karma: 18
Posts: 2227
 « Reply #3 on: October 07, 2011, 01:45:07 pm » Bigger Smaller Reset

You are welcome. To get more accurate results, be aware that Vout isn't exactly 5V, as it also drop down when more current drain out from output, to 4.4 or even 4 V. So Vr = 3.7 / 3.3V  instead of 4.3
 Logged

0
Offline
Tesla Member
Karma: 76
Posts: 6842
Arduino rocks
 « Reply #4 on: October 07, 2011, 02:34:00 pm » Bigger Smaller Reset

I think its worth an extra safety factor to ensure the transistor is driven into full saturation - make the base current say twice the calculated value for worst-case hfe...

If a transistor is still on the borderline of linear region and saturation it's Vce could be higher and less predictable.  A factor of two or so will probably cover the obscure effects you haven't allowed for like logic high drooping under load, lower than nominal 5V supply, hfe depending on Vce, or whatever.
 Logged

Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 57
Outta Steam
 « Reply #5 on: October 07, 2011, 05:45:13 pm » Bigger Smaller Reset

Thanks again for the help people.

I think I'll take on board both your comments and start off with a 500R resistor.  That'll give me base current around 7-8mA which should be ample.  Besides, it just so happens I've got a whole load of 500R resistors lying around!!

Bernie
 Logged

Manchester (England England)
Offline
Brattain Member
Karma: 296
Posts: 26023
Solder is electric glue
 « Reply #6 on: October 08, 2011, 08:18:15 am » Bigger Smaller Reset

Are you sure 500R is an unusual value, a value of 510R is more standard.
 Logged

Gloucestershire, UK
Offline
Jr. Member
Karma: 0
Posts: 57
Outta Steam
 « Reply #7 on: October 08, 2011, 02:52:50 pm » Bigger Smaller Reset

I knew that!!

Slight shlip of the mind!  Yes of course you're right I did mean 510R, my brain hasn't woken up in a while

Bernie
 Logged

Offline
Newbie
Karma: 0
Posts: 34
 « Reply #8 on: March 26, 2013, 04:44:42 am » Bigger Smaller Reset