What resistor value at the transistor base?

This is why using the Hfe value from the datasheet is misleading. You actually want worst cast (lowest gain) value.

Why I don't even do the math any more is simple.

  1. I use a small subset of NPN small signal transistors from my parts bin that I have had for years (2N4400, 2N3904, 2N2222).

  2. With 5V logic and a typical load current (from 30 to say like 200ma), I have used a 1000 Ohm resistor for the base resistor and it has served me well with all three transistors. Why 1000 ohms? Because I also have a bunch of those too.

Am I treating this like exact science? I could... but I don't. I don't need to be so pedantic.

Now... when moving to 3.3V, does this rule of thumb still apply? Nope. You will need to determine the proper base current using 3.3V in your equations. But once figured... you can pretty much use any off the shelf small signal transistor of the type I mentioned above... keeping in mind you don't want to exceed max collector current.

In my case... I just reach for a 680 Ohm resistor for the base... and bam done. Works the way I want (Most of the time).

Cool, so 1K is a good point to start with! 8)

NCC1966:
Cool, so 1K is a good point to start with! 8)

Not necessarily. It depends on the situation. For example..... if you have a 5V source, and the voltage difference between the source and the transistor base is say 4.4 V (after taking account of a diode voltage drop), then a 1 kilo-Ohm resistor would give you maybe 4.4 milliAmp of base current. But just say you need 20 milliAmp base current....... a 1 kilo-Ohm resistor won't allow it. The resistor would need to be smaller... like 220 Ohm.

If you want to use a 1 kilo-Ohm resistor, then the voltage source would need to output a voltage much higher than 5V if 20 milliAmp base current is needed........ but since you're trying to drive the transistor with maybe 5V from an arduino output..... then better to stick with 5V (arduino digital pin output) and a small resistor.... like 220 Ohm.

Next problem.
One LED on a 12volt supply.
Very inefficient. You waste 80% of the battery.
Several LEDs can be connected in series with one current limiting resistor.

Common red/green LEDs have a Vf (forward, or working voltage) of 1.8-2.2volt.
Up to five of these LEDs can be connected in series on your 12volt supply.
If you just connect two in series, you already halve battery consumption.
Blue/white/power LEDs have a Vf of ~3.3volt. Only three of these can be connected in series.
You ofcourse have to re-calculate the current limiting resistor.
That could take another 10 posts.
Leo..

Not necessarily. It depends on the situation. For example..... if you have a 5V source, and the voltage difference between the source and the transistor base is say 4.4 V (after taking account of a diode voltage drop), then a 1 kilo-Ohm resistor would give you maybe 4.4 milliAmp of base current. But just say you need 20 milliAmp base current....... a 1 kilo-Ohm resistor won't allow it. The resistor would need to be smaller... like 220 Ohm.

If you want to use a 1 kilo-Ohm resistor, then the voltage source would need to output a voltage much higher than 5V if 20 milliAmp base current is needed........ but since you're trying to drive the transistor with maybe 5V from an arduino output..... then better to stick with 5V (arduino digital pin output) and a small resistor.... like 220 Ohm.

This answer is misleading and I'm not sure anything I can say will help. 5mA at the base is WAY more than is actually need to "turn on" in a 5V scenario as it is. The 220 Ohm recommendation is overkill and not warranted unless you have an extremely low gain, high power BJT and if that was the case... you would be best served by adding an additional driver transistor ahead of it.

But, this issue of base resistor seems to forever a point of debate. I'll just keep doing what I have successfully done for 40 years.

Southpark:
Not necessarily. It depends on the situation. For example..... if you have a 5V source, and the voltage difference between the source and the transistor base is say 4.4 V (after taking account of a diode voltage drop), then a 1 kilo-Ohm resistor would give you maybe 4.4 milliAmp of base current. But just say you need 20 milliAmp base current....... a 1 kilo-Ohm resistor won't allow it. The resistor would need to be smaller... like 220 Ohm.

If you want to use a 1 kilo-Ohm resistor, then the voltage source would need to output a voltage much higher than 5V if 20 milliAmp base current is needed........ but since you're trying to drive the transistor with maybe 5V from an arduino output..... then better to stick with 5V (arduino digital pin output) and a small resistor.... like 220 Ohm.

Well, so 1K is indeed a good start and you just confirmed it!

:smiley:

The point is that I couldn't find any definitive answer to my question, but a lot of "it depends"! LOL!

:stuck_out_tongue_closed_eyes:

So, my idea is to START with a 1K resistor and see what happens. If it doesn't work I replace it with a smaller value. Did it work? Nope... then replace with a smaller value. Did it work? Yes!!!! Keep with it!

From my point of view this what I got from this thread... that there is not a technical reliable way of determine a resistor value for a transistor base. It's just empiric since the opinions are SO controversial!

:o

Please don't get me wrong. I just though (in my ignorance) that electronics was a more exact science!

:slight_smile:

I appreciate all the responses because it was thanks of them that I got the point. I consider my question as answered.

Keep the good work friends!

Bla, bla, bla.
Just use a 1k base resistor (small transistor, 5volt Arduino) if collector currents are lower than 100mA.
Relay, some LEDs etc.
Use a lower value base resistor if collector currents are above 100mA. Then it's wise to calculate the value.
Use ~1:20 for small transistors, ~1:10 for power transistors, and ~1:250 for darlingtons.
Leo..

Determine the DC voltage (Vemitter) that you are expecting at the emitter (for however many LEDS you plan to use, and knowing the operating current of the LEDs).

Then know decide on what voltage you're going to apply (on the source side of the base resistor)... eg, Vinput.

Look up the specs for 2N2222. If the continuous base current information says don't go over 20 mA (or whatever the value will be), then Vinput = Ibase*Rbase + 0.6 + Vemitter.

So Rbase = (Vinput - Vemitter - 0.6)/Ibase; where Ibase could be 20 mA.

There is no such parameter as Vemitter.
see datasheet

Do you see a parameter called "Vemitter"

Common small signal transistor parameters are:
VEBO for the open collector configuration used by the OP
VCEO

(no Vemitter) Did you just make that up ?
It actually doesn't make any sense since the emitter is connected to GND so "Vemitter" (if such a parameter were to exist) would be 0 V all the time.
How could it not if it's grounded ?
I can only surmise you meant VEB (base to emitter voltage)

Sorry for the sarcasm, but it's really very confusing for some is a newby (like me)!

Why don't you just do what everyone else does (most people who know anyway) and divide the desired collector current by the typical DC current gain (100) to calculate the required base current.
For leds, if you wanted 20 mA per led through each transistor,

0.020 A/50 = 0.000400A (200 uA).
You could get that with 5V - 1.3 V = 9250

Anything less than 9.1 k would probably work.
However , for most applications , using the 2n2222, driven from a 5V arduino signal, the most common value of base resistor used is 1 k ohm . As pointed out by Pwillard, this is more than enough.

raschemmel:
(no Vemitter)

My meaning of Vemitter means 'voltage at the emitter', obviously.

I'm amazed that this thread has gone for so long. As has been mentioned a number of times now, the correct way to drive the transistor into saturation for switching is to provide Ic/10 or at the very least, Ic/20 to the base.
For Ic = 200mA, you need 10mA to 20mA into the base to fully turn the transistor on, resulting in the lowest Vce(sat).

Driving with 5V, about 4.4V is across the base resistor, so it's value should be between 4.4/0.02 and 4.4/0.01. (220Ω and 440Ω.)

There's no need for any other fancy calculations.

Southpark:
My meaning of Vemitter means 'voltage at the emitter', obviously.

As Raschemmel said, emitter is grounded, then "Vemitter" is 0V

Why don't you just do what everyone else does (most people who know anyway) and divide the desired collector current by the typical DC current gain (100) to calculate the required base current.

I have to disagree about that. We are in the switching mode, the gain is irrelevant here and this part of the datasheet gives the answer (which has been given several times in this thread :wink: ) :

Ib=Ic/10

You're right Alnath. It should be Ib= Ic/10.

I'm surprised that Vbe(sat) is so high. (Didn't read the datasheet earlier.)
So if it's about 1.5V at Ic = 200mA that leaves 3.5V across the base resistor. 3.5/0.02 = 175Ω. A 180Ω or 220Ω resistor would do the job nicely. Ib = 19.4mA if Rb is 180Ω. With 220Ω, the base current would be 15.9mA, Ic/12.6. Still quite acceptable.
(All assuming a collector current of 200mA.)

I just added this since the original question was "What resistor value at the transistor base?", not "How much current should be 'force-fed' into the transistor base?"

How much do the LEDs draw ?

raschemmel:
How much do the LEDs draw ?

Good point. I picked up on a reference to 200mA along the way.

So it's 400mA.

40mA into the base. Vbe nearer to 2V. 3V across the base resistor. 3/0.04 = 75Ω.
My bad. :frowning:
(But at least I showed the method.)

And a 1K resistor definitely wouldn't cut it. :smiley:

Edit: But, of course, an Arduino can't supply that current directly. It either needs to be pulled down to 20mA to 30mA, or a driver transistor used.

Personally, I'd throw the (ancient) 2N2222 in the bin and use a MOSFET, or at the very least, set the LEDs up in series strings.

alnath:
As Raschemmel said, emitter is grounded, then "Vemitter" is 0V

For the common emitter configuration .... which is what the OP is using...and which is the usual configuration for connecting a load...the voltage at the emitter is zero Volt. For an emitter follower configuration, the emitter voltage will not be zero Volt.

One of my previous posts in this thread already mentioned Vemitter is zero Volt. I wrote that before raschemmel asked about 'Vemitter'.

I wrote "Reason...... Ve is grounded at 0 V". I meant 'emitter' is grounded.... 0V. Page 1 of this thread.

Wawa recommends IB = C/30 which would be 400/30 = 13.3 mA base current.
RB = (5V-1.5V)/0.0133 A = 263 (260) ohm.

(OldSteve, where are you getting the ohm symbol from ?)

For the common emitter configuration .... which is what the OP is using...and which is the usual configuration for connecting a load...the voltage at the emitter is zero Volt. For an emitter follower configuration, the emitter voltage will not be zero Volt.

It's more like an OPEN COLLECTOR than COMMON EMITTER.
Transistor Configurations
The load is NOT across the collector and emitter as in common emitter.
The load is BETWEEN Vcc and the collector as in an OPEN COLLECTOR configuration so the emitter is grounded and the voltage on the emitter is 0V.

What is the voltage on the emitter ?

It's 0V , is it not ?

raschemmel:
Wawa recommends IB = C/30 which would be 400/30 = 13.3 mA base current.
RB = (5V-1.5V)/0.0133 A = 263 (260) ohm.

No, he said the same as me - Ic/10 to Ic/20 :-

Wawa:
In general, for small transistors like the 2N2222, the base current should be >= 1/20 of the collector current.

Wawa:
1:10 is used if you want to switch close to the transistor's maximum collector current.
For lower currents, 1:20 should be enough.

Wawa:
Use ~1:20 for small transistors, ~1:10 for power transistors, and ~1:250 for darlingtons.

I think that in this application, at 400mA, it doesn't really qualify as "small signal", so between 1:10 and 1:20 IMHO

raschemmel:
(OldSteve, where are you getting the ohm symbol from ?)

That's another of my little secrets. :wink:

Just between you and me, from the Windows "Character Map". (A standard Windows accessory.)

Edit: And it is most definitely a 'common-emitter' configuration. The load can be either between the collector and ground or the collector and Vcc.

Just between you and me, from the Windows "Character Map". (A standard Windows accessory.)

Ω Ω Ω Ω Ω Ω

(I'm glad that only took me 30 years to learn that...)

raschemmel:
Ω Ω Ω Ω Ω Ω

(I'm glad that only took me 30 years to learn that...)

:smiley:
We're never too old too learn.
or
Better late than never.