Transistor Circuits

Next Page: Capacitance

Also See: Transistors

This page explains the operation of transistors in simple circuits, mainly their use as switches. Practical matters such as testing, precautions when soldering and identifying leads are covered by the transistors page.

Types of transistor

There are two types of standard (bipolar junction) 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 beginners should initially focus on this type.

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.

NPN and PNP transistor symbols

Transistor circuit symbols

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 covered by this page.

Rapid Electronics: transistors


Transistor currents

The diagram shows the two current paths through a transistor.

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.

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). It is a good way to test a transistor and confirm it is working.

A transistor amplifies current and can be used as a switch, as explained on this page.

With suitable resistors (and capacitors for AC) a transistor can amplify voltage such as an audio signal but this is not yet covered by this website.

transistor currents

Common Emitter Mode

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 transistor

The 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.

Functional model of NPN transistor

Additional notes:

Using a transistor as a switch

When a transistor is used as a switch it must be either OFF or fully ON. It must never be partly on (with significant resistance between C and E) because in this state the transistor is liable to overheat and be destroyed.

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 device switched by the transistor is called the load.

When choosing a transistor to use as a switch you need to consider its maximum collector current Ic(max) and its minimum current gain hFE(min). Transistor voltage ratings may be ignored for supply voltages less than 15V.

transistor and load

Transistor technical data

Most suppliers provide data for transistors they sell, for example Rapid Electronics.

Power developed in a switching transistor should be very small

Power developed in a transistor appears as heat and the transistor will be destroyed if it becomes too hot. This should not be a problem for a transistor being used as a switch if it has been chosen and set up correctly because the power developed inside it will be very small.

Power (heat) developed in transistor:
Power = Ic × VCE

Would a relay be better than a transistor switch?

Transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). Relays are suitable for all these situations but note that a low power transistor may still be needed to switch the current for the relay's coil. For more information, including the advantages and disadvantages, please see the relays page.

Protection diode for loads with a coil such as relays and motors

If the transistor is switching a load with a coil such, as a motor or relay, 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.

A signal diode such as the 1N4148 is suitable for this.

Protection diode for a relay

Why is the protection diode needed?

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.

Relay photographs © Rapid Electronics

Rapid Electronics: relays

Connecting a transistor to a digital IC's on/off output

Most ICs cannot supply large output currents so it may be necessary to use a transistor to switch the larger current required for devices such as lamps, motors and relays. The 555 timer IC is unusual in being able to supply a relatively large current of up to 200mA, sufficient for many relays and other loads without needing a transistor.

A base resistor limits the current flowing into the base of the transistor to prevent it being damaged but it must also allow sufficient base current to flow to ensure that the transistor is fully saturated when switched on.

A transistor that is not fully saturated when switched on is likely to overheat and be destroyed, especially if the transistor is switching a large current (> 100mA).

The next section explains how to choose a transistor and base resistor to ensure full saturation.

Switching a load with a different supply voltage

A transistor can be used to enable an IC connected to a low voltage supply (such as 5V) to switch the current for a load with a separate DC supply (such as 12V).

The two power supplies must be linked. Usually their 0V connections are linked and an NPN transistor is used on the IC output. However, if a PNP transistor is used on the IC output the positive (+) connections of the supplies should be linked instead.

Choosing a transistor and base resistor for a digital IC output

Follow this step-by-step guide to choose a suitable transistor to connect to the on/off output of a digital IC (logic gate, counter, PIC, microcontroller etc.) to switch a load such as a lamp, motor or relay. Transistor data is available from most suppliers, for example see Rapid Electronics.

1. Choose the right type of transistor, NPN or PNP

Do you want the load to switch on when the IC output is high? Or when it is or low?

NPN and PNP transistors are connected differently as shown in the diagrams below but the calculations and properties required are the same for both types of transistor.

NPN transistor switch

NPN transistor switch
load switched on when IC output is high

PNP transistor switch

PNP transistor switch
load switched on when IC output is low

2. Find out the supply voltage(s) and load properties.

In order to work out the transistor properties required you need to know these values:

Note: avoid confusing IC (integrated circuit) with Ic (collector current).

3. Work out the transistor properties required

Choose a transistor of the right type (NPN or PNP from step 1) to meet these requirements:

4. Work out a value for the base resistor RB

The base resistor (RB) must allow sufficient current to flow to ensure the transistor is fully saturated when switched on and it is good to make the base current (IB) about five times the value which just saturates the transistor. Use the formula below to find a suitable resistance for RB and choose the nearest standard value.

RB = 0.2 × RL × hFE   (see note)

Note: Where the IC and load have different supply voltages, for example 5V for the IC but 12V for the load use the formula below for RB:

RB =  Vc × hFE    where Vc is the
IC supply voltage
5 × Ic

5. Check if you need a protection diode

If the load being switched on and off 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. Note that the diode is connected 'backwards' as shown in the diagrams above.


The output from a 4000 series CMOS IC is required to operate a relay with a 100ohm coil, switching it on when the IC output is high. The supply voltage is 6V for both the IC and load. The IC can supply a maximum current of 5mA.

Rapid Electronics: transistors

Using a transistor as a switch with sensors

The diagrams below show how to connect an LDR (light sensor) to a transistor to make a light-sensitive circuit switch on an LED. There are two versions, one switches on in darkness, the other in bright light. The variable resistor adjusts the sensitivity. Any general purpose low power transistor can be used to switch an LED.

If the transistor is switching a load with a coil (such as a motor or relay) instead of an LED you must include a protection diode across the load.

If the variable resistor is between +Vs and the base you must add a fixed value resistor of at least 1kohm (10kohm in the example below) to protect the transistor when the variable resistor is reduced to zero, otherwise excessive base current will destroy the transistor .

transistor and LDR circuit 1

LED lights when the LDR is dark

transistor and LDR circuit 2

LED lights when the LDR is bright

Note that the switching action of these simple circuits 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 these circuits, but they may require a different variable resistor. You can work out 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) and then using this formula:

Variable resistor value:
Rv = square root of (Rmin × Rmax)

For example an LDR: Rmin = 100ohm, Rmax = 1Mohm, so Rv = square root of (100 × 1M) = 10kohm.

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 may be better to use this simple transistor circuit. The output signal (voltage) is the inverse of the input signal:

Any general purpose low power NPN transistor can be used. For general use suitable resistor values are RB = 10kohm and RC = 1kohm. With these values the inverter output can be connected to a device with an input impedance (resistance) of at least 10kohm such as a logic IC or a 555 timer (trigger and reset inputs).

If you are connecting the inverter to a CMOS logic IC input (very high impedance) you can increase RB to 100kohm and RC to 10kohm, this will reduce the current used by the inverter.

transistor inverter circuit

Darlington pair

A Darlington pair is two transistors connected together so that the current amplified by the first is amplified further by the second transistor.

The pair behaves like a single transistor with a very high current gain so that only a tiny base current is required to make the pair switch on.

The Darlington pair current gain (hFE) is equal to the two individual gains (hFE1 and hFE2) multiplied together - this gives the pair a very high current gain, such as 10000.

Darlington pair current gain:
hFE = hFE1 × hFE2

Note that to turn on a Darlington pair there must be 0.7V across both the base-emitter junctions which are connected in series so 1.4V is required to turn on.

Rapid Electronics: Darlington transistors

Darlington pair

Darlington transistors

Darlington pairs are available as a 'darlington transistor' package with three leads (BC and E) equivalent to those of a standard transistor.

You can also make your own Darlington pair from two ordinary transistors. TR1 can be a low power type but TR2 may need to be high power. The maximum collector current Ic(max) for the pair is the same as Ic(max) for TR2.

Touch-switch Circuit

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.

The 100kohm resistor protects the transistors if the contacts are linked with a piece of wire.

touch switch circuit

Touch switch circuit

Rapid Electronics have kindly allowed me to use their images on this website and I am very grateful for their support. They stock a wide range of components, tools and materials for electronics and I am happy to recommend them as a supplier.

Next Page: Capacitance | Study