Transistor Explained- How Transistors Work

Learn about transistors- one of the most important devices ever to be invented. We’re going to learn how they work in detail in this article.


Learn about transistors- one of the most important devices ever to be invented. We’re going to learn how they work in detail in this article.

Scroll to the bottom to watch the YouTube tutorial.

What is a Transistor


Transistors come in many shapes and sizes. There are two mains types, the bipolar and field effect. We’re going to mostly focus on the bipolar version in this article. Transistors are small electronic components with two main functions. It can act as a switch to control circuits, and they can also amplify signals.

Small, low power transistors are enclosed in a resin case to help protect the internal parts. But higher power transistors will have a partly metal case which is used to help remove the heat generated, as this will damage the components over time. We usually find these metal body transistors attached to a heat sink which helps remove the unwanted heat.


For example, inside this DC bench power supply, we have some mosfet transistors which are attached to large heat sinks. Without the heatsink the components quickly reach 45 degrees Celsius (or 113°F) with a current of just 1.2 Amps. They will become much hotter as the current increases. But for electronic circuits with small currents, we can just use the resin body transistors which do not require a heat sink.

Part Number

On the body of the transistor, we find some text, this will tell us the part number which we can use to find the manufacturers datasheet. Each transistor is rated to handle a certain voltage and current, so it’s important to check these sheets.

3 Pins

Now with a transistor we have 3 pins labelled E, B and C. This stands for the emitter, thee base and collector. Typically, with these resin body type transistors with the flat edge, the left pin is the emitter, the middle is the base and the right side is the collector. However, not all transistors use this configuration so do check the manufacturers datasheet.

Why Do We Use Transistors?

We know that if we connect a light bulb to a battery, it will illuminate. We can install a switch into the circuit and control the light by interrupting the power supply. But, this requires a human to manually control the switch. So, how can we automate this? For that we use a transistor. This transistor is blocking the flow of current, so the light is off. But, if we provide a small voltage to the base pin in the middle, it causes the transistor to start allowing current to flow in the main circuit, so the light turns on. We can then place a switch on the controlling pin to operate it remotely, or we can place a sensor on this to automate the control.

Typically, we need to apply at least 0.6 – 0.7 volts to the base pin for the transistor to turn on. For example, this simple transistor circuit has a red LED with a 9 volt power supply across the main circuit. The base pin is connected to the DC bench power supply. The circuit diagram looks like this.

When the supply voltage to the base pin is 0.5 Volts the transistor is off so the LED is also off. At 0.6 Volts the transistor is on, but not fully, the LED is dim because the transistor is not yet letting the full current flow through the main circuit. Then at 0.7 volts the LED is brighter because the transistor is letting almost the full current through, and at 0.8 volts the LED is at full brightness, the transistor is fully open.

So, what’s happening is we’re using a small voltage and current to control a larger voltage and current.

We saw that a small change to the voltage on the base pin, causes a large change on the main circuit. Therefore, if we input a signal to the base pin, the transistor acts as an amplifier. We could connect a microphone which varies the voltage signal on the base pin, and this will amplify a speaker in the main circuit to form a very basic amplifier.

Typically, there is a very small current in the base pin, perhaps just 1 milliamps, or even less. The collector has a much higher current for example 100 milliamps. The ratio between these two in known as the current gain and uses the symbol beta (β). We can find the ratio in the manufacture’s datasheet.

In this example the collector current is 100 milliamps and the base current is 1milliamps so the ratio is 100 divided by 1 which gives us 100. We can rearrange this formula to find the currents also.

NPN and PNP Transistors

We have two main types of bipolar transistors, the NPN and the PNP type. The two transistors look nearly identical so we need to check the part number to tell which is which.

With a NPN transistor, we have the main circuit and the control circuit. Both are connected to the positive of the battery. The main circuit is off, until we press the switch on the control circuit. We can see that current is flowing through both wires to the transistor. We can remove the main circuit and the control circuit LED will still turn on when the switch is pressed as the current is returning to the battery, through the transistor.


In this simplified example when the switch is pressed, there are 5 milliamps flowing into the base pin. There are 20 milliamps flowing into the collector pin and 25 milliamps flowing out of the emitter. The current therefore combines in the transistor.

With a PNP transistor, we again have the main circuit and the control circuit. But now, the emitter is connected to the positive of the battery. The main circuit is off, until we press the switch on the control circuit. We can see with this type, that some of the current flows out of the base pin and returns to the battery, the rest of the current flows through the transistor and through the main LED and back to the battery. If we remove the main circuit, the control circuit led will still turn on.

In this example, when the switch is pressed, there are 25 milliamps flowing into the emitter, 20 milliamps flowing out of the collector and 5 milliamps flowing out of the base. The current therefore divides in the transistor.

Transistors are shown on electrical drawings with symbols like these. The arrow is placed on the emitter lead. The arrow points in the direction of conventional current so that we know how to connect them into our circuits.

How Does a Transistor Work

To understand how a transistor works, we want you to first imagine water flowing through a pipe. It flows freely through the pipe, until we block it with a disc. Now, if we connect a smaller pipe into the main one and place a swing gate within this small pipe- We can move the disc using a pulley. The further the swing gate opens; the more water is allowed to flow in the main pipe. The swing gate is a little heavy, so a small amount of water won’t be enough to open it. A certain amount of water is required to force the gate to open. The more water we have flowing in this small pipe, the further the valve opens and allows more and more water to flow in the main pipe. This is essentially how a NPN transistor works.

You might already know that when we design electronic circuits, we use conventional current. So in this NPN transistor circuit we assume that the current flows from the batteries positive, into both the collector and base pins and then out of the emitter pin. We always use this direction to design our circuits.

However, that’s not what’s actually occurring. In reality the electrons are flowing from the negative to the positive of a battery. This was proved by Joseph Thompson who carried out some experiments to discover the electron and also prove they flowed in the opposite direction. So, in reality, electrons flow from the negative into the emitter and then out of the collector and the base pins. We call this electron flow.

Remember, we always design circuits using the conventional current method. But, scientists and engineers know that electron flow is how it actually works.

By the way we have also covered how a battery works in detail in our previous article, do check that out HERE.

Ok, so we know that electricity is the flow of electrons through a wire. The copper wire is the conductor and the rubber is the insulator. Electrons can flow easily through the copper but they can’t flow through the rubber insulator.

If we look at the basic model of an atom for a metal conductor, we have the nucleus at the centre and this is surrounded by a number of orbital shells which hold the electrons. Each shell holds a maximum number of electrons, and an electron needs to have a certain amount of energy to be accepted into each shell. The electrons located furthest away from the nucleus hold the most energy. The outer most shell is known as the valance shell, a conductor has between 1 and 3 electrons in its valance shell. The electrons are held in place by the nucleus, but there is another shell known as the conduction band. If an electron can reach this, then it can break free from the atom and move to other atoms. With a metal atom such as copper, the valance shell and the conduction band overlap, so it’s very easy for the electrons to move.

With an insulator, the outer most shell is packed. There’s very little, to no room, for an electron to join. The nucleus has a tight grip on the electrons and the conduction band is far away, so the electrons can’t reach this to escape. Therefore, electricity cannot flow through this material.

However, there’s another material known as a semiconductor. Silicon is an example of a semiconductor. With this material, there’s one too many electrons in the valance shell for it to be a conductor, so it acts as an insulator. But, as the conduction band is quite close, if we provide some external energy, some electrons will gain enough energy to make the jump into the conduction band and become free. Therefore, this material can act as both an insulator and a conductor. 

Pure silicon has almost no free electrons, so what engineers do is dope the silicon with a small amount of another material, which changes its electrical properties. We call this P-Type and N-type doping. We combine these materials to form the P-N junction. We can sandwich these together to form a NPN or PNP transistor.

Inside the transistor we have the collector pin and the emitter pin. Between these, in a NPN transistor, we have two layers of N type material and one layer of P type.  The base wire is connected to the P type layer. In a PNP transistor this is just configured the opposite way. The entire thing is enclosed in a resin to protect the internal materials.

Let’s imagine the silicon hasn’t been doped yet, so it’s just pure silicon inside. Each silicon atom is surrounded by 4 other silicone atoms. Each atom wants, 8 electrons in its valance shell. But, the silicon atoms only have 4 electrons in their valance shell. So, they sneakily share an electron with their neighbouring atom, to get the 8 they desire. This is known as covalent bonding. When we add in the N-type material such as phosphorus, it will take the position of some of the silicon atoms.  The phosphorus atoms have 5 electrons in their valance shell. So, as the silicon atoms are sharing electrons to get their desired 8, they don’t need this extra one, which means there’s now extra electrons in the material and these are free to move around.

With P-type doping, we add in a material such as aluminium, or alu-min-um, this atom has only 3 electrons in its valance shell. It therefore can’t provide it’s four neighbours with an electron to share, so one of them will have to go without. This means a hole has been created where an electron can sit and occupy.

We now have two doped pieces of silicon, one with too many electrons and one with not enough electrons. The two materials join to form a PN Junction, at this junction we get what’s known as a depletion region. In this region, some of the excess electrons from the n-type side will move over to occupy the hole in the p-type side. This migration will form a barrier with a build-up of electrons and holes, on opposite sides. 

The electrons are negatively charged and the holes are therefore considered positively charged. So this build-up causes a slightly negatively charged region and a slightly positively charged region. This creates an electric field and prevents more electrons moving across. The potential difference across this region is typically around 0.7 Volts.

When we connect a voltage source across the two ends, with the positive connected to the P-type material, this will create a forward bias and the electrons will begin to flow. The voltage source has to be greater than the 0.7 volt barrier, otherwise the electrons can’t make the jump.

When we reverse the power supply so the positive is connected to the N-type material, the electrons held in the barrier will be pulled back towards the positive terminal and the holes will be pulled back towards the negative terminal. This has caused a reverse bias.

In a NPN transistor, we have two layers of N-type material, so we have two junctions and therefore two barriers. So, no current can flow through it ordinarily.

The emitter N-type material is heavily doped, so there are a lot of excess electrons here. The base P-type is lightly doped so there are a few holes here. The collector N-type is moderately doped, so there are a few excess electrons here.

If we connected a battery across the base and the emitter, with the positive connected to the P-type layer, this will create a forward bias. The forward bias causes the barrier to collapse as long as the voltage is at least 0.7 volts. So, the barrier diminishes and the electrons rush across to fill the space within the P-type material. Some of these electrons will occupy a hole, and will be pulled towards the positive terminal of the battery. The P-type layer is thin and was lightly doped on purpose, so that there is a low chance of electrons falling into a hole. The rest will remain free to move around the material. Therefore, only a small current will flow out of the base pin leaving an excess of electrons now in the P-type material.

If we then connect another battery between the emitter and the collector, with the positive connected to the collector. The negatively charged electrons within the collector will be drawn to the positive terminal which causes a reverse bias. If you remember with the reverse bias, the electrons and holes of the barrier are pulled back across.

So, the electrons on the P-type side of the barrier are pulled across to the N-type side and the holes on the N-type side are pulled back to the P-type. There are already an excess number of electrons in the P type material, so they will move to occupy these holes and some of them will be pulled across, because the voltage of this battery is greater, so the attraction is much higher. As these electrons are pulled across, they flow into the battery so a current develops across the reverse bias junction.

A higher voltage on the base pin fully opens the transistor which means more current and more electrons moving into the P-type layer and therefore more electrons are pulled across the reverse bias. We also see more electrons flowing in the emitter side of the transistor, compared to the collector side.


  1. Thank you for the in-depth presentations, you are a master.

    I’m (76) trying to absorb enough knowledge to convert a cheap Harbor Freight bug zapper to an IR actuated rodent tazer I can put in tomato, pepper and flower growing containers. The bug zappers are only 4Kv but enough to send them somewhere else.


Please enter your comment!
Please enter your name here