Tuesday, April 12, 2011

Transistors

Function

transistors Transistors amplify current, for example they can be used to amplify the small output current from a logic IC 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.
For further information please see the Transistor Circuits page.


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. If you are new to electronics it is best to start by learning how to use NPN transistors. 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!
A Darlington pair is two transistors connected together to give a very high current gain.
In addition to standard (bipolar junction) transistors, there are field-effect transistors which are usually referred to as FETs. They have different circuit symbols and properties and they are not (yet) covered by this page.

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.
The drawings on the right show the leads for some of the most common case styles.
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 sinkPhotograph © 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. For further information please see the Heat sinks page.


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.


Darlington pair

Darlington pair This is two transistors connected together so that the amplified current from the first is amplified further by the second transistor. This gives the Darlington pair a very high current gain such as 10000. Darlington pairs are sold as complete packages containing the two transistors. They have three leads (B, C and E) which are equivalent to the leads of a standard individual transistor. You can make up your own Darlington pair from two transistors.
For example:
  • For TR1 use BC548B with hFE1 = 220.
  • For TR2 use BC639 with hFE2 = 40.
The overall gain of this pair is hFE1 × hFE2 = 220 × 40 = 8800.
The pair's maximum collector current IC(max) is the same as TR2.

Switches

Selecting a Switch

There are three important features to consider when selecting a switch:
  • Contacts (e.g. single pole, double throw)
  • Ratings (maximum voltage and current)
  • Method of Operation (toggle, slide, key etc.)

Switch Contacts

Several terms are used to describe switch contacts:
  • Pole - number of switch contact sets.
  • Throw - number of conducting positions, single or double.
  • Way - number of conducting positions, three or more.
  • Momentary - switch returns to its normal position when released.
  • Open - off position, contacts not conducting.
  • Closed - on position, contacts conducting, there may be several on positions.
For example: the simplest on-off switch has one set of contacts (single pole) and one switching position which conducts (single throw). The switch mechanism has two positions: open (off) and closed (on), but it is called 'single throw' because only one position conducts.

Switch Contact Ratings

Switch contacts are rated with a maximum voltage and current, and there may be different ratings for AC and DC. The AC values are higher because the current falls to zero many times each second and an arc is less likely to form across the switch contacts. For low voltage electronics projects the voltage rating will not matter, but you may need to check the current rating. The maximum current is less for inductive loads (coils and motors) because they cause more sparking at the contacts when switched off.

Standard Switches

Type of Switch Circuit Symbol Example
ON-OFF
Single Pole, Single Throw = SPST A simple on-off switch. This type can be used to switch the power supply to a circuit.
When used with mains electricity this type of switch must be in the live wire, but it is better to use a DPST switch to isolate both live and neutral.
Photograph © 
SPST on-off switch symbol SPST toggle switch, photograph © Rapid Electronics
SPST toggle switch
(ON)-OFF
Push-to-make = SPST Momentary A push-to-make switch returns to its normally open (off) position when you release the button, this is shown by the brackets around ON. This is the standard doorbell switch.
Photograph © 
push-to-make switch symbol Push-to-make switch, photograph © Rapid Electronics
Push-to-make switch
ON-(OFF)
Push-to-break = SPST Momentary A push-to-break switch returns to its normally closed (on) position when you release the button.
Photograph © 
push-to-break switch symbol Push-to-break switch, photograph © Rapid Electronics
Push-to-break switch
ON-ON
Single Pole, Double Throw = SPDT This switch can be on in both positions, switching on a separate device in each case. It is often called a changeover switch. For example, a SPDT switch can be used to switch on a red lamp in one position and a green lamp in the other position.
A SPDT toggle switch may be used as a simple on-off switch by connecting to COM and one of the A or B terminals shown in the diagram. A and B are interchangeable so switches are usually not labelled.
ON-OFF-ON
SPDT Centre Off
A special version of the standard SPDT switch. It has a third switching position in the centre which is off. Momentary (ON)-OFF-(ON) versions are also available where the switch returns to the central off position when released.
Photographs ©
SPDT switch symbol SPDT toggle switch, photograph © Rapid Electronics
SPDT toggle switch SPDT slide switch, photograph © Rapid Electronics
SPDT slide switch
(PCB mounting)

SPDT rocker switch, photograph © Rapid Electronics
SPDT rocker switch
Dual ON-OFF
Double Pole, Single Throw = DPST A pair of on-off switches which operate together (shown by the dotted line in the circuit symbol).
A DPST switch is often used to switch mains electricity because it can isolate both the live and neutral connections.
Photograph © 
DPST switch symbol DPST rocker switch, photograph © Rapid Electronics
DPST rocker switch
Dual ON-ON
Double Pole, Double Throw = DPDT A pair of on-on switches which operate together (shown by the dotted line in the circuit symbol).
A DPDT switch can be wired up as a reversing switch for a motor as shown in the diagram.
ON-OFF-ON
DPDT Centre Off
A special version of the standard SPDT switch. It has a third switching position in the centre which is off. This can be very useful for motor control because you have forward, off and reverse positions. Momentary (ON)-OFF-(ON) versions are also available where the switch returns to the central off position when released.
Photograph ©
DPDT switch symbol DPDT slide switch, photograph © Rapid Electronics
DPDT slide switch
Reversing switch
Wiring for Reversing Switch
Click here for Rapid Electronics  stock a wide range of switches and they have kindly allowed me to use their photographs on this page. The photographs are from their Image Gallery CD-ROM.

Special Switches

Type of Switch Example
Push-Push Switch (e.g. SPST = ON-OFF) This looks like a momentary action push switch but it is a standard on-off switch: push once to switch on, push again to switch off. This is called a latching action.
Photograph © 
Push-push switch, photograph © Rapid Electronics
Microswitch (usually SPDT = ON-ON) Microswitches are designed to switch fully open or closed in response to small movements. They are available with levers and rollers attached.
Photograph ©
Microswitch, photograph © Rapid Electronics
Keyswitch A key operated switch. The example shown is SPST.
Photograph © 
Keyswitch, photograph © Rapid Electronics
Tilt Switch (SPST) Tilt switches contain a conductive liquid and when tilted this bridges the contacts inside, closing the switch. They can be used as a sensor to detect the position of an object. Some tilt switches contain mercury which is poisonous.
Photograph © 
Tilt switch, photograph © Rapid Electronics
Reed Switch (usually SPST) The contacts of a reed switch are closed by bringing a small magnet near the switch. They are used in security circuits, for example to check that doors are closed. Standard reed switches are SPST (simple on-off) but SPDT (changeover) versions are also available.
Warning: reed switches have a glass body which is easily broken! For advice on handling please see the Electronics in Meccano website.
Photograph © 
Reed switches photograph © Rapid Electronics
DIP Switch (DIP = Dual In-line Parallel) This is a set of miniature SPST on-off switches, the example shown has 8 switches. The package is the same size as a standard DIL (Dual In-Line) integrated circuit.
This type of switch is used to set up circuits, e.g. setting the code of a remote control.
Photograph ©
DIP switch, photograph © Rapid Electronics
Multi-pole Switch The picture shows a 6-pole double throw switch, also known as a 6-pole changeover switch. It can be set to have momentary or latching action. Latching action means it behaves as a push-push switch, push once for the first position, push again for the second position etc.
Photograph © 
Multi-pole switch, photograph © Rapid Electronics

Multi-way rotary switch, photograph © Rapid Electronics Multi-way rotary switch
Multi-way switch symbol
1-pole 4-way switch symbol
Click here for Rapid Electronics 

Resistor Colour Code Calculator

Resistor Colour Code Calculator



The Resistor
Colour Code
ColourNumber
Black
0
Brown
1
Red
2
Orange
3
Yellow
4
Green
5
Blue
6
Violet
7
Grey
8
White
9
Resistor Colour Code Calculator The Resistor Colour Code Calculator can be used to identify resistors. It consists of three card discs showing the colours and values, these are fastened together so you can simply turn the discs to select the value or colour code required. Simple but effective!
There are two versions to download and print on A4 white card (two per sheet):
  • Coloured (for a colour printer)
  • Black and White (for a black only printer)
    This version must be coloured manually, it is easiest to do this before cutting out.
To make the calculator, carefully cut out the three discs and fasten them together with a small brass paper fastener. The calculator design is copyright but it may be freely copied for educational purposes.
The Resistor Colour Code Calculator is supplied as a PDF file. To view and print PDF files you need an Acrobat Reader which may be downloaded free for Windows, Mac, RISC OS, or UNIX/Linux computers. If you are not sure which type of computer you have it is probably Windows.
Return to the Resistors page

Resistors

Example:   resistor    Circuit symbol:   resistor symbol

Function

Resistors restrict the flow of electric current, for example a resistor is placed in series with a light-emitting diode (LED) to limit the current passing through the LED.

Connecting and soldering

Resistors may be connected either way round. They are not damaged by heat when soldering.
The Resistor
Colour Code
ColourNumber
Black
0
Brown
1
Red
2
Orange
3
Yellow
4
Green
5
Blue
6
Violet
7
Grey
8
White
9

Resistor values - the resistor colour code

Resistance is measured in ohms, the symbol for ohm is an omega ohm.
1 ohm is quite small so resistor values are often given in kohm and Mohm.
1 kohm = 1000 ohm     1 Mohm = 1000000 ohm. Resistor values are normally shown using coloured bands.
Each colour represents a number as shown in the table.
Most resistors have 4 bands:
  • The first band gives the first digit.
  • The second band gives the second digit.
  • The third band indicates the number of zeros.
  • The fourth band is used to shows the tolerance (precision) of the resistor, this may be ignored for almost all circuits but further details are given below.
resistor This resistor has red (2), violet (7), yellow (4 zeros) and gold bands.
So its value is 270000 ohm = 270 kohm.
On circuit diagrams the ohm is usually omitted and the value is written 270K.
Find out how to make your own Resistor Colour Code Calculator


Small value resistors (less than 10 ohm)

The standard colour code cannot show values of less than 10ohm. To show these small values two special colours are used for the third band: gold which means × 0.1 and silver which means × 0.01. The first and second bands represent the digits as normal. For example:
red, violet, gold bands represent 27 × 0.1 = 2.7 ohm
green, blue, silver bands represent 56 × 0.01 = 0.56 ohm

Tolerance of resistors (fourth band of colour code)

The tolerance of a resistor is shown by the fourth band of the colour code. Tolerance is the precision of the resistor and it is given as a percentage. For example a 390ohm resistor with a tolerance of ±10% will have a value within 10% of 390ohm, between 390 - 39 = 351ohm and 390 + 39 = 429ohm (39 is 10% of 390). A special colour code is used for the fourth band tolerance:
silver ±10%,   gold ±5%,   red ±2%,   brown ±1%.
If no fourth band is shown the tolerance is ±20%.
Tolerance may be ignored for almost all circuits because precise resistor values are rarely required.

Resistor shorthand

Resistor values are often written on circuit diagrams using a code system which avoids using a decimal point because it is easy to miss the small dot. Instead the letters R, K and M are used in place of the decimal point. To read the code: replace the letter with a decimal point, then multiply the value by 1000 if the letter was K, or 1000000 if the letter was M. The letter R means multiply by 1. For example:
    560R means 560 ohm 2K7  means 2.7 kohm = 2700 ohm 39K  means 39 kohm 1M0  means 1.0 Mohm = 1000 kohm

Real resistor values (the E6 and E12 series)

You may have noticed that resistors are not available with every possible value, for example 22kohm and 47kohm are readily available, but 25kohm and 50kohm are not! Why is this? Imagine that you decided to make resistors every 10ohm giving 10, 20, 30, 40, 50 and so on. That seems fine, but what happens when you reach 1000? It would be pointless to make 1000, 1010, 1020, 1030 and so on because for these values 10 is a very small difference, too small to be noticeable in most circuits. In fact it would be difficult to make resistors sufficiently accurate.
To produce a sensible range of resistor values you need to increase the size of the 'step' as the value increases. The standard resistor values are based on this idea and they form a series which follows the same pattern for every multiple of ten.
The E6 series (6 values for each multiple of ten, for resistors with 20% tolerance)
10, 15, 22, 33, 47, 68, ... then it continues 100, 150, 220, 330, 470, 680, 1000 etc.
Notice how the step size increases as the value increases. For this series the step (to the next value) is roughly half the value.
The E12 series (12 values for each multiple of ten, for resistors with 10% tolerance)
10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ... then it continues 100, 120, 150 etc.
Notice how this is the E6 series with an extra value in the gaps.
The E12 series is the one most frequently used for resistors. It allows you to choose a value within 10% of the precise value you need. This is sufficiently accurate for almost all projects and it is sensible because most resistors are only accurate to ±10% (called their 'tolerance'). For example a resistor marked 390ohm could vary by ±10% × 390ohm = ±39ohm, so it could be any value between 351ohm and 429ohm.

Resistors in Series and Parallel

For information on resistors connected in series and parallel please see the Resistance page,

Power Ratings of Resistors

Resistor 5W
Resistor 25W

Electrical energy is converted to heat when current flows through a resistor. Usually the effect is negligible, but if the resistance is low (or the voltage across the resistor high) a large current may pass making the resistor become noticeably warm. The resistor must be able to withstand the heating effect and resistors have power ratings to show this. Power ratings of resistors are rarely quoted in parts lists because for most circuits the standard power ratings of 0.25W or 0.5W are suitable. For the rare cases where a higher power is required it should be clearly specified in the parts list, these will be circuits using low value resistors (less than about 300ohm) or high voltages (more than 15V).
The power, P, developed in a resistor is given by:
P = I² × R
or
P = V² / R
where: P = power developed in the resistor in watts (W)
I  = current through the resistor in amps (A)
R = resistance of the resistor in ohms (ohm)
V = voltage across the resistor in volts (V)

Examples:
  • A 470ohm resistor with 10V across it, needs a power rating P = V²/R = 10²/470 = 0.21W.
    In this case a standard 0.25W resistor would be suitable.
  • A 27ohm resistor with 10V across it, needs a power rating P = V²/R = 10²/27 = 3.7W.
    A high power resistor with a rating of 5W would be suitable.