Go Down

Topic: What resistor value at the transistor base? (Read 7264 times) previous topic - next topic

polymorph

Actually, the 2N2222 datasheet specifies that Ib = Ic/10 when used as a switch.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Southpark

Actually, the 2N2222 datasheet specifies that Ib = Ic/10 when used as a switch.
That condition is just part of their own testing condition right? Ib doesn't have to be around Ic/10 when used as a switch.

Wawa

Hfe is not used for switching.
For switching applications it is important to get the lowest possible Vce.
That could be less than 0.1volt for this transistor.
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.
Look at the P2N222A datasheet from On Semiconductors.
Figure 4 shows a saturation graph with a range of base/collector currents.
Leo..

NCC1966

OK, I got the idea now!

There is so many different parameters in the datasheets and so many different formulas to be used that the solution is to make a bunch of calculations (that will result in a bunch of different resistor values) and then try with each one of them to see what is the correct. The good choice will be one that will work and causing less heat. Of course a couple transistors will burn in the process. I got it now!

LoL!

 :smiley-yell:

My hope was to avoid such empiricism.

 :P

pwillard

The empiricism with "switching" exists because some fail to make it obvious that a "full on" saturated transistor is not going to be  "more on" than "full on".  You can certainly TRY to drive a transistor MORE ON...  but after a point... you will gain nothing but more current onto the base pin than is needed.

Much of the information in the data sheet is far more useful when operating the transistor in analog/linear mode as a controlled amplifier.

NCC1966

#20
Jul 08, 2016, 07:02 pm Last Edit: Jul 08, 2016, 07:08 pm by NCC1966
Sorry for the sarcasm, but it's really very confusing for some is a newby (like me)!

 :)

For this base resistor calculations for instances, I have had several different responses with several different values for the resistor!

What really scares me is that we are talking about a single coupling to light a few LEDs. I can't imagine how hard is to design something more elaborated!

 :smiley-eek:
 
But getting to the point now... since the resistor to be used at the transistor base is very arguable and can be subject to several variables I imagine that the solution for my case will be to pick a bunch of different resistors and start with the bigger value I have (say 100K for the sake of transistor safety). Probably it won't work and the LEDs won't light. Then I go replacing it by smaller values and testing until it suddenly work (LEDs lighted) and then it will be the right one for the circuit. Does it sound like a good plan?

Thanks!

MarkT

For completeness think about this point.  In normal, linear, amplication using a BJT the base-collector
junction is reverse biased (for NPN that means collector more +ve than the base), so that there is
an electric field across this junction pulling electrons directly across from the base.  Most electrons
injected into the base region are immediately pulled to the collector by this field, leaving a tiny fraction
to leave by the base electrode.

When a transistor saturates the base-collector junction is forward-baised, the the electrons in the
base are not attracted to the collector at all, they are repelled. They get there solely by thermal diffusion,
which is why the effective gain is far far less.   It only works because the degree of doping is highly different,
emitter >> base >> collector (typically emitter is 10000 times more heavily doped than the collector, that's
why the emitter is not the same as the collector).

Large old designs of power BJT's have a saturation gain of 3 to 5(!), small signal transistors about 10 to 30,
some of the more modern devices manage 50 ('superbeta' devices).
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

pwillard

#22
Jul 08, 2016, 07:42 pm Last Edit: Jul 08, 2016, 07:43 pm by pwillard
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).





NCC1966

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

Southpark

#24
Jul 08, 2016, 11:45 pm Last Edit: Jul 09, 2016, 12:00 am by Southpark
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.

Wawa

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

pwillard

Quote
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.
<sigh> 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.

NCC1966

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!

 :D

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

 :smiley-yell:

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!

 :)

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!

Wawa

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

raschemmel

#29
Jul 10, 2016, 02:06 am Last Edit: Jul 10, 2016, 02:26 am by raschemmel
Quote
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)

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

Go Up