can somebody tell me about base resistors with bipolar transistors? Thank you!
potatoface
Posts: 23
Hello . I have a microcontroller that outputs about 40mA max and I want to use it to saturate a 2n2222 bipolar transistor gate. usually people install resistors between the pin and the base. For what reason is this? Is it because we are protecting the pin from excessive current flow, or is it to protect the transistor from excessive current at the base so it doesnt overheat? or is there another reason? My electronics book failed to provide me with a good explanation.
thank you
-joe
1715 459 4535
text capable answers as well.
thank you
-joe
1715 459 4535
text capable answers as well.
Comments
I don't have a quick answer for you, other than I go here when I need some insight and/or a refresher on certain topics:
http://www.electronics-tutorials.ws/transistor/tran_1.html
As far as saturation of the transistor, your talking Apples and Oranges, since the saturation is greatly dependent on the load your placing on the transistor (information we don't have from you).
Also, depending on the hfe (current gain) which is also load dependent 40mA of base current still may not be enough for saturation. Still this is not a good practice, since you will want to give your processor some overhead by not devoting the full 40mA
Lets start with what you are trying to drive with the 2n2222 transistor first and go from there.
The main reason is so the micro works right. Without any resistor in the B-E junction; the B-E junction of the transistor would clamp the micro output to about .6 volts. If the micro output can't go high when it wants to, it will cause all sorts of problems inside the chip. You would be chasing program bugs that aren't really bugs at all.
Al
Just because the specs on the Prop say "40ma" you can't assume that that is all it is going to supply without any external limiting. In fact that spec is from the "ABSOLUTE MAXIMUM RATINGS" not the operating conditions and that parameter is under "Max. allowable current per I/O pin" - so notice it said "allowable". This has nothing to do with normal operating conditions, it's a bit like knowing that the 747 you are flying in "might" be capable of a barrel roll but even if the plane survived it may have to undergo major maintenance but certainly there will be very undesirable side effects nonetheless, it ain't designed for that.
As for the 600mV threshold it's a bit like a minimum operating pressure (voltage) for a one-way water valve (NP junction), once it's open it's open and water will flow (voltage clamped) but if you have too much current for it's delicate structure then it will fail. So always make sure the current is limited, don't ever rely on figures such as Absolute maximum ratings as a guide.
BTW, even if you short the I/O output to ground for instance without current limiting the I/O will still operate normally from the processor's point of view (not necessarily the circuit's) as the output is latched and any read-modify-write instruction reads the state of the outputs from the latch, not the output buffers.
it is current-controlled. So you need a resistor to set the current (below the limit for the pin in question).
Generally old switching transistors like the 2N2222 need about 5 to 10% of the collector current on the
base to saturate fully, more modern super-beta transistors have much more gain at saturation and saturate
better, something like 1% to 2% of load current needed on the base... I'd use a modern device if I had the
choice, much less critical to get right. ZTX450, ZTX851 are my favorites at the moment, the ZTX851 gives
the performance of a MOSFET upto several amps in a tiny e-line package (well, not as fast, but low
on resistance).
Most bipolar transistors have a desultry little section in the datasheet showing saturation parameters for
2 or may be 3 different load currents, so guesswork is involved (the typical performance graphs don't
show manufacturing spread alas).
Ok . this right here is understandable. I have to limit the current and voltage into the bipolar transistor so it doesnt overheat, and also so my prop pins do not burn up. I want the bipolar transistor in saturation regin, and I do have equations that relate the load collector-emitter current and voltage to gain, and that allows you to calculate the Ib and Vb needed when everything else is known.
It's not about voltage, just limit the current. The gain varies depending upon Ice so don't expect high gain for high Ice, use the graphs as a guide. Generally in a switching situation if I had a fairly typical transistor and I wanted to switched 200ma I would put around 5 to 10ma through the base (R= (Vout-0.6)/Ibe where the Prop's Vout droops with the increased current draw). So I would normally use a 470R base resistor, maybe even 1K, and maybe 220R. Just remember that once you have a resistor in the circuit then it's a very easy matter to experiment with the value.
So if IC is 200mA IB should be about 20mA.
And VBE(sat) can be over 1.2V
This suggests that if the Prop is supplying the 20mA the resister needs to be:
Micro_P8X32A_Pin-Source.png (I forgot who did this fine work, sorry?)
He teaches us the Prop pin output resistance, Rpin, is about 28Ω.
(VProp - VBE(sat)) / 20mA = RB
(2.8V - 1.2V) / 20mA = 80Ω
Ok that is a bit harsh, maybe VBE(sat) will be more like 0.9V:
(2.8V - 0.9V) / 20mA = 95Ω or 100Ω for a standard value.
But do experiment with this value somewhat.
BTW, an alternate calculation method for RB
VDD = 3.3V
(VDD - VBE(sat)) / IB - Rpin = RB
(3.3V - 0.9V) / 20mA - 28Ω = 92Ω or 100Ω for a standard value.
Note, 20mA is probably near the maximum one should make a Prop Pin drive.
Duane J
My fairly typical transistor is normally a BC817 or a DDTD digital transistor as there is no difference in price compared to a 2222 and these former devices prove superior. However if you take the 2222 to it's extremes then it might need a lower value resistor, but that would be highly unlikely in my experience in a wide range of circuits to require anything less than 220R.
You suggested operating at 200mA.
The BC817 / BC337 is nearly identical to the 2N2222A bipolar except for a lower power dissipation. All of these suggest a saturation current gain of about 10.
I don't know which DDTD transistor you are referring to but most of these also have a high current saturation current gain of about 10.
Sure, I violate specifications all the time, but I too have a lot of experience designing stuff.
When I go beyond the spec I directly test the parts before use.
However, many on this forum are novices and want to learn how to properly use the parts they have.
I try to teach how the component specifications are your friend. If they stay within the spec things will go well.
If I was to show a better way, with different parts, I would almost always suggest the use of MOSFETs. They are superior to bipolar transistors in almost every way. But, again, Joe was asking about the 2N2222A.
Duane J
Sounds like you are taking offence somehow but I did say "if I had a fairly typical transistor" and I wasn't taking it to the extremes though with a current gain of 10, ye gads! Here is a curve for the 817 which isn't quite saturated at Vce=1V but that gives you an idea, it is nowhere near a gain of 10 though.
Teachable Moment:
Most bipolar transistors can be operated in 2 basic modes.
1. Linear gain region. Often called hfe.
2. Saturation region. Characterized by relatively low VCE and relatively high IB currents. Often 1/10th of the IC current.
Why should we choose one design method or the other when designing circuits with these bipolar transistors?
1. Linear amplifier circuits need good gains to amplify small signals into larger ones. The better circuits use negative feedback networks to limit and linearize the gain response over a wide range of input levels. Generally, the bipolar transistors need to have an hfe substantially higher than the circuit gain over the desired frequency range. The bipolar transistors are not allowed to go into saturation nor cutoff.
A consequence of running in the linear region is higher power dissipation, not so good.
Careful circuit design is needed so the transistor remains stable and doesn't self oscillate or ring.
Oscillations or ringing would be a bad thing and can lead to even higher power dissipation.
Worse yet, this can cause problems in other circuits.
2. Switching transistor circuits attempt to operate the bipolar transistor in the saturation or cutoff region. To do this, higher overdrive IB currents are used to ensure VCE is well into saturation providing relatively low voltages and minimize power dissipation in the transistor.
When in saturation the transistor will not self oscillate.
Better yet. The bipolar switching transistor circuit with relatively low valued RB resistors switch faster resulting in less power dissipation during the transitions.
Duane J
A. A bipolar transistor is a sandwich of PNP or NPN material with the Base being the middle of the sandwich. Being in the middle it certainly cannot handle as much voltage or power as the Emitter/Collector junction. So it needs some protection
B. You microcontroller also needs some protection. Most cannot supply more 20ma at their appropriate voltage without suffering a failure of the i/o pin.
~~~~~~~~~~~
So first.. protect your microcontroller by limiting the current output to below 20ma. In many cases saturation current is far less than that.
Take a look at the absolute maximum ratings for the 2N2222a to see if you are doing something extreme and damaging. It says the emitter-base will tolerate up to 6 volts, so a 5 volt logic or a 3.3 logic is not going to hurt it.
Go down the Vbe(sat) figures and you will see that a 15ma, it will provide 150ma of power at Ic. If you wanted 500ma of power, you would need 50 ma which would damage your microcontroller.
And so...
If you want a bigger boost of power, you require a different BJT. 150ma is more than enough to drive most relay coils
Yes you could drive the one pin of the microcontroller at 40ma, but pins are generally grouped for distribution in banks. If you have a bank of 8 pins wired together than can only tolerate 200ma, you aren't going to be able to use all 8 pins simultaneously to get 320ma out of the microcontroller ---- something will break.
I generally try to not demand more than 5ma of the microcontroller i/o outputs as things just last longer and don't break. There are tiny darlington transistors that will take the 5ma and do very well at providing 1 amp or more of current. But you mentioned the 2n2222a and 'in theory' it will drive about 600ma (probably the 500ma is wiser for long-life use).
But according to the pdf, your 40ma won't provide 500ma at saturation, you need 50ma. You would need to change to another device.
~~~~~~~~~~~~
In other words, your actual ability to saturate the transistor is dependent on how much you expect to load it. And your ability to saturate the 2n2222a is limited by the i/o pin of the microcontroller.
You didn't provide a Load figure, so I can't be sure you have the right transistor.
That VEBO is the reverse voltage that the base emitter junction can safely withstand.
(Notice it is not VBEO)
In normal switching circuits, with the emitter grounded, +5V or +3.3V from the micro will never reverse bias that junction. Actually they can only attempt to forward bias the base emitter junction so RB is required to set and limit base current.
Duane J