Monday, 1 October 2012

How do you use PNP transistors


So last post dealt with NPN transistors and now I show how to deal with the PNP Transistor.

How do you use NPN Transistors

PNP transistors are in essence exactly the same as an NPN transistor but they work in a complementary or mirrored fashion.  So rather than applying 0.7V to the base terminal to get the transistor to conduct in this case we need to apply (at the base terminal) 0.7V less than the voltage at the emitter.  The diagram below shows how a PNP transistor is used:


PNP transistors are used where the circuit needs to control a part of the circuit connected to the 0V side or where 'high side' control is required.  PNP transistors are again used as a current amplifying device or as a switch.  Unlike NPN transistors these devices are 'active low' and that means they start to turn on when the voltage at the base is reduced.  They were popular in the early days of electronics because they had a lower noise characteristic and they could switch on and off more quickly. Early electronics design engineers used them in radio circuits and high speed switching circuits.  They aren't quite so popular these days as NPN transistors have improved and there is not such an appreciable difference between them.  Below is the wikipedia entry for transistors covering all the aspects in detail:

http://en.wikipedia.org/wiki/PNP_transistor#PNP

Many electronics engineers I know struggle to use PNP transistors because during their training PNP transistors were not covered properly.  I know this was the case for me and it's part of the reason I write these blog posts, it's my effort to try to redress the balance.  NPN transistors were covered very clearly and we were taught that PNP transistors were the same only in reverse.  Technically this is true although I didn't find this obvious at all.  I think a better description is that PNP transistor operation is the 'mirror' of NPN transistor operation.

How do you use a PNP transistor? 

Well....in my opinion it isn't the same process as designing a circuit with the NPN Transistor!  So here we go: to use the transistor connect the emitter to the supply voltage and the collector to the low side of the circuit or the '0V' rail.  Next to turn the transistor on and cause current to flow through the transistor we need to apply 0.7V less than what is present at the emitter.  Check out the circuits below:

Left : PNP Transistor Circuit with Voltmeters, Right: PNP Transistor Circuit with Ammeters

As with the NPN transistor we can see that the current flowing at the base is less than the current flowing at the emitter so we have current amplification as before.  The amount of 'gain' or amplification is again dependent on the transistor's Hfe parameter.  The datasheet for the BC558 transistor is below.  I chose this transistor as it is the PNP compliment of the BC548 NPN transistor I posted about previously.  All of the resistor values are also the same to be consistent.  



If we look at the circuit closely and compare it with the NPN version we can see that the circuit isn't the reverse of the NPN transistor but the mirror or complement.  This is why the BC558 transistor is called the BC548 complement.  




Just for completeness let's calculate the Hfe from the measurements in the circuit above.

Hfe = Ic / Ib

Hfe = 2.532*10^-3 / 0.013*10^-3

Hfe = 194.77 - lets round this up to 195 

If we now look at the datasheet for the BC558A we can see the manufacturer specifies an Hfe of 110 to 220.  Yet again we are within specification!

So what parameters do we need to know to be able to use a PNP transistor.  They are pretty much the same as the NPN transistor but they are quoted with a minus sign to denote that it must be less than the supply voltage.

VCEO - Collector Emitter Voltage - Maximum Voltage you can place at the emitter
VCBO - Base Collector Voltage - Maximum Voltage you can place at the collector
VEBO - Base Emitter Voltage - Maximum Voltage you can place at the base

Ic - Collector Current - Maximum current you can cause to flow through the transistor from the supply

Pc - Power dissipation - Amount of power the transistor will dissipate when fully on

How do we use a PNP transistor as a switch?

Let use a PNP transistor to control an LED.  Lets set the supply voltage to 12V and then use a control voltage to turn the transistor ON and OFF.  Here is the circuit:
The resistor on the base is a current limiting resistor to prevent too much current being applied to the base terminal.  When the base voltage is set at 12V the LED is not on.  Check out the video below to see the circuit simulation in action:

Hope this video makes sense to everyone.  It shows very clearly that you can have very precise control of when an LED or relay was activated if you were to use a PNP transistor as a switch.  It's a lot easier to reduce a voltage precisely from high to low than it is from 0V to high.

How do you use a PNP transistor to Amplify?

In the previous post I made a Class A amplifier using an NPN transistor.  Here is the complimentary circuit using a PNP transistor.  It's not a practical circuit by any means but it does show the principle of a PNP transistor as an Amplifier.  In practice most amplifiers are made up of a combination of NPN and PNP transistors.  This is a topic for another post though!

Here is the circuit for the PNP Class A Amplifier:


As can be seen the circuits component values are exactly the same as the previous NPN circuit only everything has been 'mirrored'.  The transistor has been 'biased' ON using the voltage divider of R1 and R2.  The gain of the circuit is set with R3 and R4 at a gain of 6.  We are using a 1kHz 0.5V AC for our input signal.

Here is a video simulation of the circuit in action:


That's all for now!  If anyone would like more posts on transistor usage please let me know in the comments section,

Cheers

Alex