Robotics 10

 

NPN vs PNP

 

Transistor Terminology

Teacher note: give presentation using powerpoint

A transistor has three legs: a collector, an emitter and a base. Below is the symbols for an NPN and a PNP transistor.

NPN transistor

 

PNP transistor

 

Transistors as switches

The easiest way to understand transistors is to think of them as switches. You can switch a big current (between the collector and emitter) with a much smaller current (in the base). Lets look at an example:

NPN transistor as a switch (on)

 

NPN transistor as a switch (off)

Transistors is also handy to convert between different voltages (5V and 12V in the example above.)

While an NPN transistor conducts when a current flows into the base, a PNP transistor will conduct when no current flows into the base and stop conducting when a current flows into the base.

PNP transistor as a switch (on)

PNP transistor as a switch (off)

Transistors

Function

transistors Transistors amplify current, for example they can be used to amplify the small output current from a logic chip so that it can operate a lamp, relay or other high current device. In many circuits a resistor is used to convert the changing current to a changing voltage, so the transistor is being used to amplify voltage.

A transistor may be used as a switch (either fully on with maximum current, or fully off with no current) and as an amplifier (always partly on).

The amount of current amplification is called the current gain, symbol hFE.


Types of transistor

NPN and PNP transistor symbols
Transistor circuit symbols
There are two types of standard transistors, NPN and PNP, with different circuit symbols. The letters refer to the layers of semiconductor material used to make the transistor. Most transistors used today are NPN because this is the easiest type to make from silicon.

The leads are labelled base (B), collector (C) and emitter (E).
These terms refer to the internal operation of a transistor but they are not much help in understanding how a transistor is used, so just treat them as labels!


Transistor currents

transistor currents The diagram shows the two current paths through a transistor. You can build this circuit with two standard 5mm red LEDs and any general purpose low power NPN transistor (BC108, BC182 or BC548 for example).

The small base current controls the larger collector current.

When the switch is closed a small current flows into the base (B) of the transistor. It is just enough to make LED B glow dimly. The transistor amplifies this small current to allow a larger current to flow through from its collector (C) to its emitter (E). This collector current is large enough to make LED C light brightly.

When the switch is open no base current flows, so the transistor switches off the collector current. Both LEDs are off.

A transistor amplifies current and can be used as a switch.

This arrangement where the emitter (E) is in the controlling circuit (base current) and in the controlled circuit (collector current) is called common emitter mode. It is the most widely used arrangement for transistors so it is the one to learn first.


The last bit is what confuses a number of people. Let's say you have a 9V battery connected to a 100 ohm resistor and then connected to and NPN transistor and finally to ground. Let's further assume that the beta (Hfe) of the transistor is 250. This is shown below in figure 3.


Figure 3) A simple circuit with a 9V battery and a resistor

What is the maximum current that can flow through the transistor? If we replace the transistor with a piece of wire, then using Ohm's law we can calculate the current flow to be:
I = V/R

I = 9 volts/100 ohms

I = 9/100 or .09 Amps (90 mA).

Now when the current is present, if it has a current of 2mA flowing into the base the maximum current the transistor will conduct is 2mA * Hfe, substituting in 250 for Hfe gives us 2 mA * 250 for a total of 500 mA.

And yet we know that if the transistor was a wire the most we would see is 90mA. So the actual answer is this "The amount of current that flows through the transistor is the lesser of the available current (90mA) and Ibe*Hfe. 500mA "

Generally if you apply enough base current that the maximum current possible will always flow, then the transistor is operating like a switch (rather than operating like an amplifier). In this mode, the transistor is said to be saturated.


Transistor leads
Transistor leads for some common case styles.

Connecting

Transistors have three leads which must be connected the correct way round. Please take care with this because a wrongly connected transistor may be damaged instantly when you switch on.

If you are lucky the orientation of the transistor will be clear from the PCB or stripboard layout diagram, otherwise you will need to refer to a supplier's catalogue to identify the leads.

Please note that transistor lead diagrams show the view from below with the leads towards you. This is the opposite of IC (chip) pin diagrams which show the view from above.

Please see below for a table showing the case styles of some common transistors.


Crocodile clip, photograph © Rapid Electronics
Crocodile clip
Photograph © Rapid Electronics.

Soldering

Transistors can be damaged by heat when soldering so if you are not an expert it is wise to use a heat sink clipped to the lead between the joint and the transistor body. A standard crocodile clip can be used as a heat sink.

Do not confuse this temporary heat sink with the permanent heat sink (described below) which may be required for a power transistor to prevent it overheating during operation.


Heat sink
Heat sink

Photograph © Rapid Electronics

Heat sinks

Waste heat is produced in transistors due to the current flowing through them. Heat sinks are needed for power transistors because they pass large currents. If you find that a transistor is becoming too hot to touch it certainly needs a heat sink! The heat sink helps to dissipate (remove) the heat by transferring it to the surrounding air.


Testing a transistor

Transistors can be damaged by heat when soldering or by misuse in a circuit. If you suspect that a transistor may be damaged there are two easy ways to test it:

testing a transistor
Testing an NPN transistor

1. Testing with a multimeter

Use a multimeter or a simple tester (battery, resistor and LED) to check each pair of leads for conduction. Set a digital multimeter to diode test and an analogue multimeter to a low resistance range.

Test each pair of leads both ways (six tests in total):

  • The base-emitter (BE) junction should behave like a diode and conduct one way only.
  • The base-collector (BC) junction should behave like a diode and conduct one way only.
  • The collector-emitter (CE) should not conduct either way.
The diagram shows how the junctions behave in an NPN transistor. The diodes are reversed in a PNP transistor but the same test procedure can be used.

testing a transistor
A simple switching circuit
to test an NPN transistor

2. Testing in a simple switching circuit

Connect the transistor into the circuit shown on the right which uses the transistor as a switch. The supply voltage is not critical, anything between 5 and 12V is suitable. This circuit can be quickly built on breadboard for example. Take care to include the 10kohm resistor in the base connection or you will destroy the transistor as you test it!

If the transistor is OK the LED should light when the switch is pressed and not light when the switch is released.

To test a PNP transistor use the same circuit but reverse the LED and the supply voltage.

Some multimeters have a 'transistor test' function which provides a known base current and measures the collector current so as to display the transistor's DC current gain hFE.


Transistor codes

There are three main series of transistor codes used in the UK:
  • Codes beginning with B (or A), for example BC108, BC478
    The first letter B is for silicon, A is for germanium (rarely used now). The second letter indicates the type; for example C means low power audio frequency; D means high power audio frequency; F means low power high frequency. The rest of the code identifies the particular transistor. There is no obvious logic to the numbering system. Sometimes a letter is added to the end (eg BC108C) to identify a special version of the main type, for example a higher current gain or a different case style. If a project specifies a higher gain version (BC108C) it must be used, but if the general code is given (BC108) any transistor with that code is suitable.
  • Codes beginning with TIP, for example TIP31A
    TIP refers to the manufacturer: Texas Instruments Power transistor. The letter at the end identifies versions with different voltage ratings.
  • Codes beginning with 2N, for example 2N3053
    The initial '2N' identifies the part as a transistor and the rest of the code identifies the particular transistor. There is no obvious logic to the numbering system.

Choosing a transistor

Most projects will specify a particular transistor, but if necessary you can usually substitute an equivalent transistor from the wide range available. The most important properties to look for are the maximum collector current IC and the current gain hFE. To make selection easier most suppliers group their transistors in categories determined either by their typical use or maximum power rating.

To make a final choice you will need to consult the tables of technical data which are normally provided in catalogues. They contain a great deal of useful information but they can be difficult to understand if you are not familiar with the abbreviations used. The table below shows the most important technical data for some popular transistors, tables in catalogues and reference books will usually show additional information but this is unlikely to be useful unless you are experienced. The quantities shown in the table are explained below.

NPN transistors
Code Structure Case
style
IC
max.
VCE
max.
hFE
min.
Ptot
max.
Category
(typical use)
Possible
substitutes
BC107 NPN TO18 100mA 45V 110 300mW Audio, low power BC182 BC547
BC108 NPN TO18 100mA 20V 110 300mW General purpose, low power BC108C BC183 BC548
BC108C NPN TO18 100mA 20V 420 600mW General purpose, low power  
BC109 NPN TO18 200mA 20V 200 300mW Audio (low noise), low power BC184 BC549
BC182 NPN TO92C 100mA 50V 100 350mW General purpose, low power BC107 BC182L
BC182L NPN TO92A 100mA 50V 100 350mW General purpose, low power BC107 BC182
BC547B NPN TO92C 100mA 45V 200 500mW Audio, low power BC107B
BC548B NPN TO92C 100mA 30V 220 500mW General purpose, low power BC108B
BC549B NPN TO92C 100mA 30V 240 625mW Audio (low noise), low power BC109
2N3053 NPN TO39 700mA 40V 50 500mW General purpose, low power BFY51
BFY51 NPN TO39 1A 30V 40 800mW General purpose, medium power BC639
BC639 NPN TO92A 1A 80V 40 800mW General purpose, medium power BFY51
TIP29A NPN TO220 1A 60V 40 30W General purpose, high power  
TIP31A NPN TO220 3A 60V 10 40W General purpose, high power TIP31C TIP41A
TIP31C NPN TO220 3A 100V 10 40W General purpose, high power TIP31A TIP41A
TIP41A NPN TO220 6A 60V 15 65W General purpose, high power  
2N3055 NPN TO3 15A 60V 20 117W General purpose, high power  
Please note: the data in this table was compiled from several sources which are not entirely consistent! Most of the discrepancies are minor, but please consult information from your supplier if you require precise data.
PNP transistors
Code Structure Case
style
IC
max.
VCE
max.
hFE
min.
Ptot
max.
Category
(typical use)
Possible
substitutes
BC177 PNP TO18 100mA 45V 125 300mW Audio, low power BC477
BC178 PNP TO18 200mA 25V 120 600mW General purpose, low power BC478
BC179 PNP TO18 200mA 20V 180 600mW Audio (low noise), low power  
BC477 PNP TO18 150mA 80V 125 360mW Audio, low power BC177
BC478 PNP TO18 150mA 40V 125 360mW General purpose, low power BC178
TIP32A PNP TO220 3A 60V 25 40W General purpose, high power TIP32C
TIP32C PNP TO220 3A 100V 10 40W General purpose, high power TIP32A
Please note: the data in this table was compiled from several sources which are not entirely consistent! Most of the discrepancies are minor, but please consult information from your supplier if you require precise data.

Structure This shows the type of transistor, NPN or PNP. The polarities of the two types are different, so if you are looking for a substitute it must be the same type.
Case style There is a diagram showing the leads for some of the most common case styles in the Connecting section above. This information is also available in suppliers' catalogues.
IC max. Maximum collector current.
VCE max. Maximum voltage across the collector-emitter junction.
You can ignore this rating in low voltage circuits.
hFE This is the current gain (strictly the DC current gain). The guaranteed minimum value is given because the actual value varies from transistor to transistor - even for those of the same type! Note that current gain is just a number so it has no units.
The gain is often quoted at a particular collector current IC which is usually in the middle of the transistor's range, for example '100@20mA' means the gain is at least 100 at 20mA. Sometimes minimum and maximum values are given. Since the gain is roughly constant for various currents but it varies from transistor to transistor this detail is only really of interest to experts.
Why hFE? It is one of a whole series of parameters for transistors, each with their own symbol. There are too many to explain here.
Ptot max. Maximum total power which can be developed in the transistor, note that a heat sink will be required to achieve the maximum rating. This rating is important for transistors operating as amplifiers, the power is roughly IC × VCE. For transistors operating as switches the maximum collector current (IC max.) is more important.
Category This shows the typical use for the transistor, it is a good starting point when looking for a substitute. Catalogues may have separate tables for different categories.
Possible substitutes These are transistors with similar electrical properties which will be suitable substitutes in most circuits. However, they may have a different case style so you will need to take care when placing them on the circuit board.