Electrical – Calculating base resistor – PN2222

circuit analysistransistors

circuit diamgram

I've been continuing to play with small circuits and Im trying to sort out how to calculate the resistor for the base of this transistor. The transistor is a pn2222 (https://www.fairchildsemi.com/datasheets/PN/PN2222.pdf). Its my understanding that the resistor for the LED should be calculated much in the same way I would without the transistor. In this case, I know the LED drops 2.48 volts and draws 46mA. So my resistor for the LED is 54 ohms and I used a 47 ohm resistor.

I've tried many different formulas to try and figure out what the base resistor should be used and I can't seem to get it right. From my reading this is important because too much current could open the transistor too far and block the current coming from the collector through to the emitter.

I tried using this formula…

R = Voltage x hfe / LED current
R = 4.3 x 35 / .05

That gave me 3010 and when I use a 3k resistor I only get about 30 milliamps of current to the LED. Shouldn't I get the full 46 as I see when the LED and resistor are plugged directly into the power source?

Also – in the above circuit I subtracted .7 volts from voltage since that just seems to be what everyone was doing. In reality, when I check the voltage drop from collector to emitter and base to emitter I see .8v and .6 v respectively. Shouldn't this be factored in? What about the voltage drop of the LED?

Im lost.

Update – Thanks for all the comments. Im really new to this space and still learning so it's been very helpful. I've moved the LED and it's series resistor to the collector leg of the transistor. The more I think about this, the more I see that Im dealing with two parallel circuits on the same power supply as I've drawn out.

circuit diamgram2

If this is the case, I can see how having the LED as part of circuit 2 would impact the power required to drive the transistor. Having it in it's own leg on the collector means that I can deal with it separately. I've also measured the voltage drop from base to emitter and verified that it's right around .7 volts which seems to match the value everyone else has been using for transistor voltage drop. At this point Im just trying to sort out the math for driving the transistor to saturation. What Im not confused about is which spec on the sheet I should be looking at in order to figure this out. For instance, the spec sheet lists saturation values for for collector-base as well as base-emitter. Im getting the feeling that Im getting too far ahead of myself here. Just by moving to this new configuration and having a 3k ohm resistor on the base it seems to work, Im just trying to prove out why that works now. Thanks!

Best Answer

Let's say the model for your LED is \$V_{fwd}=1.56\:\textrm{V}+20\:\Omega\cdot I\$ and the schematic is as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

Then I compute:

$$I_B=\frac{5\:\textrm{V}-V_{LED}-V_{BE}}{R_2+\left(\beta+1\right)\cdot R_1}\approx 150\:\mu\textrm{A}$$

From that (and \$\beta\approx 200\$) I would get that \$V_B\approx 4.5\:\textrm{V}\$ and \$V_E\$ about \$800\:\textrm{mV}\$ less, or about \$V_E\approx 3.7\:\textrm{V}\$. The LED drop isn't yet certain but let's say it's another \$2.4\:\textrm{V}\$ for now. This means \$1.3\:\textrm{V}\$ across \$R_1=47\:\Omega\$. Or about \$28\:\textrm{mA}\$.

Which isn't far from what you got. Given that lower current and the assumed model I laid out at the top, I'd refine my estimate of \$V_{LED}\approx 2.1\:\textrm{V}\$. This would add another \$300\:\textrm{mV}\$ across \$R_1\$ and add another \$6\:\textrm{mA}\$ to make it \$34\:\textrm{mA}\$. Putting that back in, I'd then get \$V_{LED}=2.2\:\textrm{V}\$, losing \$100\:\textrm{mV}\$ across \$R_1\$, dropping the current to \$32\:\textrm{mA}\$ as a still further refinement. (I could do that several times more to nail it down.) But my model was just made up from your single set of values for it in your question and I've no idea if it is very accurate. The main point here is that you should NOT be surprised.

But the above circuit isn't the way most people try and do this. And it's not how you'll see web sites laying it out, either.