# Help with 2N2222 voltages and current

#### JDR04

Joined May 5, 2011
356
Hi Folks, I've attached a datasheet for the 2N2222.

I have 4.5Vdc comming out of a LM339 comparator output and plan to use this on the BASE of the 2N2222 transistor so I can use it as a switch.

My problem is after looking at the datasheet, I can't figure out what are the voltages and currents needed at the BASE and COLLECTOR pin of the tranny in question. I know I need to these facts so I can work out what resistor to use on the BASE and COLLECTOR pins. The datasheet has so much information I do not know what it is I need to look for?

JDR04

#### Attachments

• 55.5 KB Views: 176

#### jimkeith

Joined Oct 26, 2011
540
Hi JDR,
The LM339 has an open collector output, so you have to provide a pull-up resistor that connects to the positive supply voltage. The LM339 can easy sink up to about 5mA, so you can calculate the minimum resistance value, but you can probably go much lower in current than that.

On the 2N2222, you must first determine what your collector current is--then divide that by a factor of 10 or 20 (depending if you live in US or UK--differing conventions LOL). This calculates how much base current you need to fully turn on the transistor without wasting excess battery power--then calculate the proper value of the pull-up resistor.

e.g. your transistor collector must drive a 10mA LED
Ic = 10mA
Ib = 10mA ÷ 20 = 0.5mA
Rpu = 12V ÷ 0.5mA = 24K (for Vcc = 12V)

Tie LM339 output to transistor base

#### JDR04

Joined May 5, 2011
356
Hi jimkeith, sorry for the late reply but I was out on the road for a few days.

Thanks very much for the info and I have read it over a few times as I'm a newbie to all this stuff. Just to make sure I understand you properly, I have put in my ownd words what I plan to do on your info;

LM339 pull up resistor to 9Vdc will be 1K8 if calculated at 5mA.

If transistor collector is to drive my load at 10mA and my supply voltage is 9V dc then I will calculate the collector resistor as;

9Vdc/0.010mA = +- 900 ohm. For collector resistor?

0.010mA/10 (UK) =0.001?????? for BASE????

Dont understand how you work out the final amperage for the base of the transistor. I'm almost sure 0.001 mA is nowhere near correct? What did I miss please??

Thanks for your time - JDR04

#### Yako

Joined Nov 24, 2011
245
Can we ask what the project is?

This might encourage other members to offer some of their time to help you amigo.

#### Yako

Joined Nov 24, 2011
245
On the 2N2222, you must first determine what your collector current is--then divide that by a factor of 10 or 20 (depending if you live in US or UK--differing conventions LOL)
I would assume at absolute worst βeta would be 50 for a 2N2222, but it does depend on IC & IB of course.

But I would have thought that 1mA of IB would easily allow for 50mA of IC.

#### Audioguru

Joined Dec 20, 2007
11,251
If your 2N2222 transistor has a load then it doesn't need a collector resistor. We guessed that your load uses 10mA. When the circuit is powered from 9V how much current does your load use?

The base current is simply 1/10th the collector current when an American transistor is used as a switch.

Joined Dec 26, 2010
2,148
Hi jimkeith, sorry for the late reply but I was out on the road for a few days.

Thanks very much for the info and I have read it over a few times as I'm a newbie to all this stuff. Just to make sure I understand you properly, I have put in my ownd words what I plan to do on your info;

LM339 pull up resistor to 9Vdc will be 1K8 if calculated at 5mA.

If transistor collector is to drive my load at 10mA and my supply voltage is 9V dc then I will calculate the collector resistor as;

9Vdc/0.010mA = +- 900 ohm. For collector resistor?

0.010mA/10 (UK) =0.001?????? for BASE????

Dont understand how you work out the final amperage for the base of the transistor. I'm almost sure 0.001 mA is nowhere near correct? What did I miss please??

Thanks for your time - JDR04
You seem to be confusing amps and milliamps. 9V/10mA = 900Ω, or 9V/0.01A = 900Ω (1000mA = 1A)

If the collector current is 10mA, then if you use the more pessimistic (USA) assumption of a gain of 10, the minumum base current required for reliable saturation will be 10mA/10 = 1mA. This would fall to 0.5mA if you assumed a gain of 20.

@Yako: Typically a lower gain is assumed for saturated operation. A conventional value of 10 is often used, particularly in the USA. On this side of the pond a larger value of 20 is sometimes assumed, particularly in non-critical applications where disaster is unlikely to occur if less than perfect saturation is achieved.

#### Yako

Joined Nov 24, 2011
245
The base current is simply 1/10th the collector current when an American transistor is used as a switch.
Do you call this mode of operation saturation?

#### Audioguru

Joined Dec 20, 2007
11,251
I would assume at absolute worst βeta would be 50 for a 2N2222, but it does depend on IC & IB of course.

But I would have thought that 1mA of IB would easily allow for 50mA of IC.
No.
Beta is used when the transistor is used as a linear amplifier when it has plenty of collector to emitter voltage. Its beta is spec'd when it has 10V from collector to emitter.
It is saturated when it is a switch. The datasheet spec's its saturation voltage loss (max voltage created between collector and emitter when it is saturated) only when its base current is 1/10th its collector current.

But every transistor is different. A few might switch when their base current is 1/50th the collector current. If the base current is 1/10th the collector current then all passing transistors will switch very well.

#### SgtWookie

Joined Jul 17, 2007
22,210
It would really help a lot if we knew how much current your load requires when supplied with 9v.

LM339 pull up resistor to 9Vdc will be 1K8 if calculated at 5mA.
Yes, 9v/5mA=1.8k, or 1k8.

The LM339's output voltage really starts to get excessive if you try to sink more than about 5mA current with its' output; so for your application, 5mA is really about the practical limit; that means 1.8k/1k8 Ohms is the smallest resistance value you can use between your 9v supply and the 339's output. The pullup resistor will also be your base resistor. So, 5mA * 10 = 50mA = the most collector current you'll be able to have and keep the transistor in saturation - this is just a quick rough approximation; see below.

If transistor collector is to drive my load at 10mA and my supply voltage is 9V dc then I will calculate the collector resistor as;

9Vdc/0.010mA = +- 900 ohm. For collector resistor?

Let's say it is a green LED that has a Vf (forward voltage) of 3v at 10mA current; and you're powering it with 9v.
You would need to subtract the 3v from the supply voltage first, and then divide the remainder by the desired current:
Rlimit >= (9v-3v)/10mA = 6/0.01 = 600 Ohms. That is not a standard value of resistance. 620 Ohms happens to be a standard value. Or, if you preferred, you could use two 300 Ohm resistors in series, or two 1.2k Ohm resistors in parallel to get 600 Ohms.

0.010mA/10 (UK) =0.001?????? for BASE????
In your case, the pull-up resistor will also be the base resistor.

Dont understand how you work out the final amperage for the base of the transistor. I'm almost sure 0.001 mA is nowhere near correct? What did I miss please??
Actually, for a 10mA collector load, you need 1mA base current.
You confused yourself when you wrote 0.010mA - you were thinking Amperes (0.010A) but wrote mA on the end instead.

Back to calculating the base resistor - it's done like this:
Rbase = (Vin - Vbe) / (Ic / 10)

where:
Vin = the voltage on the other side of the resistor from the base; in your case this will be 9v.
Vbe = typically 0.7v for a light load on a transistor; this increases quite a bit as the transistor reaches 1/2 it's rated current.
Ic = desired collector current

Substituting:
Rbase = (9v - 0.7v) / (10mA / 10) = 8.3v / 0.001A = 8k3 Ohms.
8k3 is not a standard value of resistance, but 8k2 Ohms is.

Did that help?

#### JDR04

Joined May 5, 2011
356
Guys, thanks to all of you for your generous input on is.

As a newbie it's all very interesting so as soon as I have digested it all I'll let you know what happens next.

I'd like you guys to know that the general encouragement and generous help I have received from this forum has prompted me to start a course in electronics.

Thanks so much - JDR04

#### wayneh

Joined Sep 9, 2010
16,128
...generous help I have received from this forum has prompted me to start a course in electronics.
Awesome. Thanks for letting us know, and best of luck. There are a lot of smart people in the field, but no reason you can't be one of them.