# trouble with PNP transistor switch

Discussion in 'The Projects Forum' started by sl33k3r, Mar 16, 2013.

1. ### sl33k3r Thread Starter New Member

Apr 25, 2012
9
1
I have a TIP42 to be used as a light switch. Emitter to 12v+ and collector to 12v+ on light(s). I use a resistor to try to flip the switch and I get close to 12 volts. I figure I'm OK. Hook a light to it and nothing happens except the transistor gets hot.

There are multiple lights at different locations and therefore many different grounds but only one 12+ wire so the PNP is correct to use.

I have the datasheet, but I see so many different ways to figure correct resistors out there I don't know which one to trust.

Can I get a suggestion to help me out?

File size:
22 KB
Views:
129
2. ### tindel Well-Known Member

Sep 16, 2012
659
224
First, your selected transistor is only rated for 6A at the collector - so at 10A you are likely to destroy the transistor, so I would suggest using a different transistor or to run 4 in parallel, as they won't share current equally.

But for the sake of argument, assume that a single transistor will source 10A...

A BJT is a current amplifier. Therefore, the current through the collector is proportional to the base current per the following equation: Ic = beta*Ib where Ic = the collector current, Ib = the base current, and beta (also known as hFE) = the gain.

So given you need 10A at the collector for your load you have to decide how much base current you need to get 10A. The datasheet says that the gain of the transistor can be as low as 15. That means you need 10 = 15 * Ib or 667mA in your base to know that you will drive the transistor at all times.

To calculate your base resistor use ohms law to see that the resistance is the voltage drop divided by your base resistance (roughly) or 36 ohms. (12-(-12))/667mA = 36ohms, or more accurately (12-(-12)-0.7)/667mA = 35 ohms. The 0.7V comes from the base to emitter voltage drop on the transistor when forward biased.

3. ### sl33k3r Thread Starter New Member

Apr 25, 2012
9
1
Thank you for the explanation. It appears much clearer now. The 10A load was high, I know. I was tired, thinking of multiple projects and picked an easy number but as you point out...I cannot use 10A loads with this transistor by itself. I even uploaded the incorrect schematic. Please forgive my lack of forethought.

The true number is 5A (MAX). So, according to your wonderful explanation and using BJT TIP42, to find the proper base resistor:

Ic = beta(hFE)*Ib
5 = 15 * Ib
Ib = 333mA

(12-(-12)-0.7)/333mA = 70 ohms

Corrected simple schematic has been attached.

Where did you find the 0.7v drop on the datasheet?

BTW, upon checking the packaging, I see the hFE is marked as 20.

Ic = beta(hFE)*Ib
5 = 20 * Ib
Ib = 250mA

(12-(-12)-0.7)/250mA = 92.3 ohms

I am sure the datasheet is the preferred resource for specifications, but if hFE was 20 on the package, shouldn't I use 20?

Now, if BJTs are current amplifier transistors. What would be a good component to use as a switch. I don't really need an amplifier.

File size:
42 KB
Views:
89
4. ### tindel Well-Known Member

Sep 16, 2012
659
224
I got the 0.7 from the 'standard' voltage drop of a p-n junction. There is a graph on the datasheet however of Vbe,sat which says at 5A, you'll actually have about 1.3V across you Vbe. This is probably due to temperature.

Even if a part is labeled (or even tested) at 20 hFE this can vary wildely due to various parameters. Temperature can change this significantly. BJT's also have a lot of part-to-part variation which can cause hFE to vary significantly. The datasheet lists 15 as a guaranteed minimum at 3A, so I figured that would be a good start.

BJT's are current amplifiers, but what I believe you are wanting to do is use this amplification to your advantage to create a switch.

Finally, I'm a bit confused by your schematic - I think I know what you're doing, but I'm not sure. Are you trying to switch your positive rail into your load? If you are, I don't think a pnp transistor will work in this configuration because I don't think it will sink the base current (maybe someone else can correct me if this part can sink current). However, you could take the regulator out of the circuit and just tie that physical switch to the -12V rail. Or you could just use a switch in place of the transistor too.

Also note that with a 5V regulator in the circuit it also changes the second equation that I described earlier, based on ohms law. See if you can figure it out.

5. ### sl33k3r Thread Starter New Member

Apr 25, 2012
9
1
Thank you for your help...really. You are correct, I am trying to switch positive rail into the load. I cannot access the ground cables easily to use the NPN transistor. What is it that you mean by "I don't think it will sink the base current"? The transistor is rated for more than I am trying to draw through it.

I did figure the voltage difference (Must have done so after my post):

Ic = beta(hFE)*Ib
5 = 15 * Ib (w/hFE from datasheet)
Ib = 333mA

(5-(-5)-0.7)/333mA = 27.9 ohms

I updated my schematic (Yet again).

Also, if a BJT isn't the right component, what might be?

File size:
37.7 KB
Views:
42
6. ### crutschow Expert

Mar 14, 2008
23,099
6,850
But not good enough. You didn't read the compete spec. It shows a minimum gain of 15 at 3A with a Vce of 4V. Obviously that's not what you want for a switch.

If you look at the collector-emitter saturation voltage spec in the next line you will see that a forced beta of 10 is used for that (600mA base current with 6A of collector current). A beta of 10 is what's typically used for a transistor switch to insure good saturation and minimum collector-emitter voltage. So for 5A collector current, the base current should be 500mA.

A more efficient switch would be a power P-MOSFET (source to +12V) since it doesn't require any gate current to turn on so you save the 500mA base current of a BJT. Just connect the gate to ground to turn it on and to +12V to turn it off (it can be through a resistor if desired).

7. ### tindel Well-Known Member

Sep 16, 2012
659
224
crutschow - You're right, a gain of 10 is more appropriate... Like I said - 15 was a good start! And it would probably got the job done!

sl33k3r - What I meant by 'I don't think it will sink the base current' is that I don't think current can go IN the OUT pin (sink). I think current can only go OUT the OUT pin (source) on that regulator. I've never used it as a sinking device anyway.

You derived ohms law a bit wrong when you made your last calculation

(using 500mA, as crutschow points out)
(12-(-12)-5-0.7)/.5=36.6ohms.

Why not just use a mechanical switch? You don't have any control that I can see anyway.

A P-channel FET would be best for this application if you insist on using a transistor.

There's probably a 5V Solid State Relay that will do the job too.

8. ### crutschow Expert

Mar 14, 2008
23,099
6,850
Perhaps with an average device, but not for a worst-case device at the lower limit of the gain spec.

9. ### sl33k3r Thread Starter New Member

Apr 25, 2012
9
1
Thank you both for all of your help.

Why I don't do things a certain way is because I am learning. I have always learned better by knowing what NOT to do and why. If I never find out why not to do something I will continue to do it. I have always been inquisitive. Knowing why not to do something can be more fun! Smoking and popping transistors is interesting to boot! (Wear eye protection and stand back when turning on the power!)

Back to the formula:
(12-(-12)-5-0.7)/.5=36.6ohms.

12 is emitter voltage?
-12 is collector voltage?
5 is base voltage (when different than emitter or collector)?
0.7 is drop-off voltage
0.5 is base current

Like I stated in my first post, I see formulas all over the place but I don't see where the numbers in the formulas come from.

Thank you, once again.