Transistor CircuitsThis page explains the operation of transistors in simple circuits, particularly their use as switches. Practical matters such as testing, precautions when soldering and identifying leads are covered by the Transistors page.
Switching: Introduction | Use relay? | IC output | Sensors | Inverter
Types of transistorThere 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. This page is mostly about NPN transistors and if you are new to electronics it is best to start by learning how to use these first.
The leads are labelled base (B), collector (C) and emitter (E).
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 currentsThe 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.
Functional model of an NPN transistorThe operation of a transistor is difficult to explain and understand in terms of its internal structure. It is more helpful to use this functional model:
Darlington pairThis is two transistors connected together so that the current amplified by the first is amplified further by the second transistor. The overall current gain is equal to the two individual gains multiplied together:
Darlington pair current gain, hFE = hFE1 × hFE2
This gives the Darlington pair a very high current gain, such as 10000, so that only a tiny base current is required to make the pair switch on.
A Darlington pair behaves like a single transistor with a very high current gain. It has three leads (B, C and E) which are equivalent to the leads of a standard individual transistor. To turn on there must be 0.7V across both the base-emitter junctions which are connected in series inside the Darlington pair, therefore it requires 1.4V to turn on.
Darlington pairs are available as complete packages but you can make up your own from two transistors; TR1 can be a low power type, but normally TR2 will need to be high power. The maximum collector current Ic(max) for the pair is the same as Ic(max) for TR2.
A Darlington pair is sufficiently sensitive to respond to the small current passed by
your skin and it can be used to make a touch-switch as shown in the diagram.
For this circuit which just lights an LED the two transistors can be any general
purpose low power transistors.
resistor protects the transistors if the contacts are linked with a piece of wire.
Using a transistor as a switchWhen a transistor is used as a switch it must be either OFF or fully ON. In the fully ON state the voltage VCE across the transistor is almost zero and the transistor is said to be saturated because it cannot pass any more collector current Ic. The output device switched by the transistor is usually called the 'load'.
The power developed in a switching transistor is very small:
For information about the operation of a transistor please see the
functional model above.
Protection diodeIf the load is a motor, relay or solenoid (or any other device with a coil) a diode must be connected across the load to protect the transistor from the brief high voltage produced when the load is switched off. The diagram shows how a protection diode is connected 'backwards' across the load, in this case a relay coil.
Current flowing through a coil creates a magnetic field which collapses suddenly
when the current is switched off. The sudden collapse of the magnetic field induces a
brief high voltage across the coil which is very likely to damage transistors and ICs.
The protection diode allows the induced voltage to drive a brief current through the coil
(and diode) so the magnetic field dies away quickly rather than instantly. This prevents
the induced voltage becoming high enough to cause damage to transistors and ICs.
When to use a relay
Advantages of relays:
Connecting a transistor to the on/off output from a digital ICMost ICs cannot supply large output currents so it may be necessary to use a transistor to switch the larger current required for output devices such as lamps, motors and relays. The 555 timer IC is unusual because it can supply a relatively large current of up to 200mA which is sufficient for some output devices such as low current lamps, buzzers and many relay coils without needing to use a transistor.
A transistor can also be used to enable an IC connected to a low voltage supply (such as 5V) to switch the current for an output device with a separate higher voltage supply (such as 12V). The two power supplies must be linked, normally this is done by linking their 0V connections. In this case you should use an NPN transistor.
A resistor RB is required to limit the current flowing into the base of the transistor and prevent it being damaged. However, RB must be sufficiently low to ensure that the transistor is thoroughly saturated to prevent it overheating, this is particularly important if the transistor is switching a large current (> 100mA). A safe rule is to make the base current IB about five times larger than the value which should just saturate the transistor.
Choosing a suitable NPN transistor to use with a digital ICThe circuit diagram shows how to connect an NPN transistor, this will switch on the load when the IC output is high. If you need the opposite action, with the load switched on when the IC output is low (0V) please see the circuit for a PNP transistor below.
The procedure below explains how to choose a suitable switching transistor.
Choosing a suitable PNP transistor to use with a digital IC
The circuit diagram shows how to connect a PNP transistor, this will switch on the load when the IC output is low (0V). If you need the opposite action, with the load switched on when the IC output is high please see the circuit for an NPN transistor above.
The procedure for choosing a suitable PNP transistor is exactly the same
as that for an NPN transistor described above.
Using a transistor as a switch with sensors
The 10k fixed resistor protects the transistor from excessive base current (which will destroy it) when the variable resistor is reduced to zero. To make this circuit switch at a suitable brightness you may need to experiment with different values for the fixed resistor, but it must not be less than 1k.
If the transistor is switching a load with a coil, such as a motor or relay, remember to add a protection diode across the load.
The switching action can be inverted, so the LED lights when the LDR is brightly lit, by swapping the LDR and variable resistor. In this case the fixed resistor can be omitted because the LDR resistance cannot be reduced to zero.
Note that the switching action of this circuit is not particularly good because there will be an intermediate brightness when the transistor will be partly on (not saturated). In this state the transistor is in danger of overheating unless it is switching a small current. There is no problem with the small LED current, but the larger current for a lamp, motor or relay is likely to cause overheating.
Other sensors, such as a thermistor, can be used with this circuit, but they may require a different variable resistor. You can calculate an approximate value for the variable resistor (Rv) by using a multimeter to find the minimum and maximum values of the sensor's resistance (Rmin and Rmax):
Variable resistor, Rv = square root of (Rmin × Rmax)
For example an LDR: Rmin = 100, Rmax = 1M, so Rv = square root of (100 × 1M) = 10k.
You can make a much better switching circuit with sensors connected to a suitable
IC (chip). The switching action will be much sharper with no partly on state.
A transistor inverter (NOT gate)Inverters (NOT gates) are available on logic ICs but if you only require one inverter it is usually better to use this circuit. The output signal (voltage) is the inverse of the input signal:
If you are connecting the inverter to a CMOS logic IC input (very high impedance)
you can increase RB to
and RC to 10k,
this will reduce the current used by the inverter.
Next Page: Analogue and Digital Systems | Studying Electronics
Rapid Electronics have kindly allowed me to use their images on this page. Rapid stock a wide range of components, tools and materials for electronics. I am happy to recommend them as a supplier for individuals and education. In my experience their standard delivery really is rapid!
This website does not collect any personal information unless you contact me by email. If you send me an email your email address and any other personal information you supply will be used only to respond to your message. Your personal information will not be given to any third party without your permission.
This website displays advertisements. If you click on these the advertiser may know you came from this site and I may be rewarded. No personal information is passed to advertisers.