The Ultimate Guide to Transistors (BJT Edition)

Transistors are the components behind all modern electronics. Unlike resistors, capacitors and inductors, they are active components. This means that they ‘add’ to our circuits, considering that they have an adequate power supply. Now, depsite being so important, transistors can be very confusing, since you have to juggle two separate signals. That’s what I’ll be helping you with in this video, understanding transistors. There are many different types of transistors, most notably BJTs and MOSFETs. Just for this video, we will focus on BJTs. Let’s dive in.

What is a BJT?

Like I explained in the intro, we will focus on BJTs. Also known as bipolar junction transistors. There are two types of BJTs, NPN and PNP. Both of them have three pins: collector, emitter and base. You can always tell which one is the emitter since it has the arrow on it. Let’s first begin by explaining why they are called either NPN or PNP. This comes from the way that they are manufactured. Using a process called doping, we can create silicon as one of two junctions: an N-type, and a P-type. You’ll notice that these two types are present in diodes, which have both a PN junction. This is why you will often find diagrams of BJTs as diodes, since this is how they can act. But a BJT can do much more than act as two diodes, since two diodes placed back to back does not have the same effect as the continuous nature of the BJT.

What does a BJT do?

A BJT will amplify its base-emitter current along the collector-emitter path. Let me explain what that means step-by-step. First we will define the base emitter current as the amount of current flowing through the base. You can easily identify this path by the arrow on the symbol. Just remember, input current will always flow in this direction. In NPNs, current will flow towards the emitter. In PNPs, current flow from the emitter towards the base. This base-emitter current will cause a much larger current to flow through the collector-emitter path. You can also determine the direction of this flow by the arrow on the symbol.

To better understand how this all works, let’s draw a parallel to another real-life component. Some people will tell you that a BJT acts like a variable resistor, but that oversimplifies everything. Instead, I encourage you to think of a BJT as a current source. A current source is a component that will maintain a constant current across its pins so long as enough voltage is provided. It’s similiar to a voltage souce, which maintains a constant voltage. A battery is a great example of a voltage source since it maintains its voltage desipite changes in the load. So just remember that a transistor will do its absolute best to maintain a constant collector current flow, and it will drop a varying voltage across the collector-emitter just to keep that same current flowing.

But how much current will flow? Well, you can determine that with the equation Ic = B * Ib. Beta is the gain factor of the transistor. You can find the value of this on the transistor datasheet. You will also likely find it under a different name: Hfe. Taking the 2n3904 for example, we can find it under the ON characteristics section. You’ll find a lot of different values, which means that the value isn’t exactly the most stable, but we will talk about ways to deal with that later. For now, let’s experimentally determine the exact Beta of this 2n3904.

This is what our circuit will look like: we will have the 2n3904 (which is NPN type BJT), a 100k base resistor, a 100 ohm collector resistor, and a 9V supply. Let’s run a quick calculation as to what the base current should be. Remember that the base-emitter junction can be simplified to a diode. So what we have is our 100k resistor in series with this diode. Assuming a typical voltage drop of 0.6v, we should get a current of 84uA. If we take the middle Hfe value of about 100, then we caluclate an estimated output current of 8.4mA.

Now we should do an experiment to prove it, so here are the values that I collected. I measured a base current of 82.5uA and a collector current of 15mA. If we solve for beta, we can see that this particular transistor has a gain of 175 at a collector current of 15mA.

This value is within the datasheet’s range, so the math checks out. And for further proof that this transistor acts like a current source, I’ll remove the resistor and connect the pins directly to the supply rails. And we still measure that same 15mA current, despite changing the load.

Let’s do it again for a PNP, in this case the 2n3906. Take note of the direction of the arrow, we will have to make the current flow in that direction. This time, we will connect the resistors to ground. The base current calculation is still the same, but the conceptual circuit has the diode at the top instead. Here are the results for the PNP version of this test. We got a base current of 82.5uA, a collector current of 20mA, and a gain of 242. The same still holds true in that the current holds even when changing the load. However if we go in the opposite direction and increase the collector resistor up to 100k, then we will find that our once stable current drops down to 88uA. To explain this phenomenon let’s take a look at the operating modes of BJTs.

Operating Modes

BJTs have three useful regions: the active or linear region, saturation, and cut-off. Cut-off is easy, since it just means that the transistor is off. The active region is what the previous experiment just displayed. The transistor will drop whatever voltage necessary in order to keep the current constant. Saturation can be shown at the end of that experiment though with the 100k collector resistor. The base current was trying to keep current, but the resistor simply was too much for the power supply to get over. In other words, saturation occurs whenever the transistor is trying to deliver current, but the impedance is just too high for it to reach. In other, other words, saturation means that the transistor is fully on.

We can detect when we have reached saturation by measuring the collector-emitter voltage. If the voltage drop is less than approximately 0.6v, then we have reached saturation. The 0.6v comes from the base-collector junction, which is also a diode drop like explained at the beginning of the video. In saturation, the transistor becomes closer and closer to a short circuit.

To demonstrate, I’ll use this setup: we will have our function generator connected to the base through a 10k resistor, the collector will have a 1k resistor. The oscilloscope will measure the current through the transistor using a current sensing amplifier. It will also measure the voltage on the base resistor. We will apply a 40Hz triangle wave to the base resistor so that we can experimentally get different base current values. We can calculate that with a 1k resistor and a 9v power source, the max current we can get is 9mA, no matter what the transistor does. As you can see, the ramp wave goes through and applies different currents. At first, the transistor is in the active region and follows along. However, we reach saturation and the current flatlines.

Both saturation and active operation have their places in design. Saturation is useful when you want your transistor to act as a switch, since you aren’t interested in the relation between the base current and the collector current, you only care whether it is on or off. In saturation, you not only satisfy this on or off requirement, but also waste less power through the transistor since it drops very little voltage. The biggest disadvantage with saturation is that it makes the transistor very slow to switch, since you are still driving a large current through the base. You have to pull out the extra charges that you put in.

Active operation is more useful for amplifiers and quickly switching signals as you’ll see later in the video.

Basic BJT Configurations

There are three basic types of BJT configurations: common emitter, common base, and common collector. Let’s start with common collector. The common collector configuration typically has the collector connected to the positive rail for NPNs and the negative rail for PNPs. The emitter has a resistor and the base has the input signal. Here, the output is not determined so much by the base current, but rather the diode drop from the signal on the base. This essentially creates a situation where the output is 0.6v lower than the input. This makes for a good signal buffer since we copy the input signal, but the BJT drives the load. This means that we can keep our weak input signal from having to drive a large load.

Next up is the common emitter. This is a similar setup to the one that we had during the experiment. Here the emitter is tied to the negative rail for NPNs and the positive rail for PNPs. In this case, we can build an actual amplifier because we can take advantage of the current gain like we discussed earlier. This is, of course, if we remain in the active region. If we instead go into saturation, then we have a simple inverting switch, that is either on or off. More on both of these ideas in a bit.

And finally, we have the common base configuration. This isn’t a very common way to use a BJT, but it is still important to know about. In this case, the input signal is applied to the emitter, and we get an output on the collector. A lot of the time, these common base designs are paired in series with a common emitter configuration to form a cascode. These cascodes have the advantages of both types, namely a high input impedance and a large bandwidth. But more on cascodes and the common base configuration in another video.

Basic BJT Circuits

The Switch

Let’s begin with a BJT as a switch, since that is the simplest of all. Let’s say that you want to switch a high voltage load, like three LEDs in series, which would have a voltage drop of about 9 volts, but the source which it comes from is low voltage, such as a 5v microcontroller. How can you toggle the load without damaging the 5v circuitry? Well, what you can do is simply apply a small base current to the transistor, and then we will get the full load flowing from another 12v power source. In this case, we go into saturation, which is advantageous since we have a smaller power loss across the transistor.

Logic Gates

And while switching loads is useful, we can do a lot more with this. You may have heard of logic gates before, such as AND, OR, NOR, and so on. Well, we can create those using these transistors. Here is the simplest BJT logic gate, which is an inverter. When we apply a HIGH signal to the input, the NPN goes into saturation, and has a very low voltage drop. This essentially causes the output to be pulled down to ground, getting us a ‘0’. However, when we put a LOW signal into the NPN, this creates a cut-off situation, and the transistor is off. This means that the collector resistor pulls the output up to the supply rail, giving us a ‘1’. This inverter is of the RTL logic type, and you can expand it further by chaining transistors together to make OR gates, AND gates, and everything else.


While the digital side of transistors is interesting, you can do a lot more with them with an analog perspective. Here is the common emitter circuit that I showed you earlier. This circuit is also known as a class A amplifier, so let me explain why. Remember that ramp wave experiment we conducted earlier in the video? Well, before the transistor reached saturation, we were actively amplifying the input signal in the active region. This is because of that current gain. A higher input voltage will cause a higher base current, which in turn, causes a higher collector current. A higher collector current will drop more voltage through the resistor and we will end up with a proportional signal on the output.

Let’s imagine that we have a very weak and small audio signal, like this sine wave, and we want to drive a speaker so that we can listen to it. Well, we can’t connect it directly, so we will have to amplify it. The first thing that we will do is AC couple the signal to our transistor amplifier by using a capacitor. We do this because we don’t want to amplify any DC from the signal, we just want to keep the AC part of it. But when we look at our output signal, we will see that not much of the signal is actually getting through. We only see tiny dips at the top of the input waveform. Let’s take a look at the base voltage. Here we can see that the voltage is beneath our ground point, and it’s maximum is 0.74v. This shift downward is caused by the connection through the diode, which limits the DC point of our sine wave.

To fix this we need to do what’s called biasing. Ideally, we want to bias the transistor such that the middle of the waveform is in the middle of the voltage supply. So, for a 9V supply, we’d like to set the bias point to 4.5 volts. With our 9v supply, we’d need 2mA flowing through the 2k2 collector resistor to reach our bias point when no signal is applied. We could try to do it like before, with a single base resistor to VCC and determine current by using beta. This technically works, but it isn’t exactly the best in circuit design. You should know that current gain isn’t exactly the most stable figure, and it varies from transistor to transistor, different temperatures, and different currents. Rather, what we want to do is setup the circuit such that it isn’t dependant on beta.

We can start with what is called emitter degeneration. This is when we place a resistor on the emitter of our circuit. Now, we can get a predictable current flowing through the collector, and here’s how. Remember from the previous setion where I showed you an example of a common-collector setup, and how the voltage at the emitter is 0.6 volts lower than the input. The same can be said here. So, this means that the input signal controls the emitter voltage. This same emitter voltage determines the current for the emitter resistor because we have a particular voltage drop across this resisor.

We can find the current draw by using ohm’s law. And since the collector must flow through this path, this is also the current of our collector. The collector current generates an output voltage through that resistor. So, if we make the emitter resistor 470 ohms, then we would need the emitter to have a voltage of 0.94 volts. If we keep in mind the voltage drop of the diode, then we can calculate that we need a voltage of 1.54 volts on the base.

We can create this voltage with a voltage divider on the base. I selected resistor values 22k and 4k7, which give us a calclated voltage of 1.58 volts. This is close enough, and with this setup, we get a real measured voltage of 5V on the output. This setup actually reveals a new equation that we can use. Voltage gain = -Rc/Re, so you’ll notice that beta is not involved. Alright, this should be sufficient. Let’s apply our signal again. And wow, the amplification worked. The input signal was 1V peak to peak, and our output signal is 3.9 volts peak to peak centered around 5V. This gives us a voltage gain of 3.9x. Let’s switch out the transistor for another and see if it remains stable. And look at that, we have the same results across different transistors. The amplification is no longer nearly as dependant on beta.

Let’s connect it to our speaker now. Don’t forget to add another AC coupling capacitor on the output, since we don’t want to waste DC power on the speaker. It works but it is inaudible. The load from the speaker is too much for our current setup. To fix this, I simply reduced all of the resistors by a factor of ten, and it’s still barely audible. As a further improvement, we can bypass our emitter degeneration by using a capacitor. This is good because we retain that stable gain for our DC bias point since DC can’t pass through the capacitor. But for AC, we get that larger beta gain because the capacitor looks like a short to ground. Using this method, we can now hear our sine wave.

Unfortunately, class A amplifiers are not efficient at all, so increasing power output further would be difficult. At the very least, you can still use it as a very simple voltage amplifier.


Before we go any further, we really should expand our understanding of the BJT. Let’s take a look back at our common emitter amplifier again. If we use our equation gain = -Rc/Re with the most basic form of the circuit, the one without the emitter resistor, then we’d find that the transistor would give us infinite gain. Now, this is obviosuly not possible, and you can thank transconductance for that. The idea behind transconductance is that the current through the collector is determined by the base voltage instead of the base current. The equation behind this idea is the Ebers-Moll model, which comes with the equation Ic = Is(exp(Vbe/Vt) - 1), where is Is is the reverse leakage current, and Vt is the thermal voltage for the transistor. You can use another equation kT/q to find it, where k is Boltzmann’s constant, T is the temperature in kelvin, and q is the charge of a single electron. At room temperature, the thermal voltage is 25.67 mV, so that’s what we will use. Now I understand that these equations can be confusing at first, so let’s get to the point.

Using the Ebers-Moll model, we can derive the value of transconductance: gm = Ic/Vt. Now, since this is a conductance value with the unit of Siemans, we can easily convert this into a more useful form. If we invert Siemans, we get ohms. This inverted value is the emitter resistance of all BJTs. It’s value is re = Vt/Ic. Here is how you can imagine the placement of re, its simply like a resistor placed in series with the emitter, so both the base and collector paths have to go through it. Using this, you can see why a grounded emitter follower doesn’t actually have infinite gain, since there is a small resistance there. This also shows you why emitter degeneration is needed. Without it, small changes in our collector current would massively change re, and our gain, causing distortion and instability. Even a small change in the current from 1mA to 2mA will double the gain of the amplifier. To fix this, an emitter resistor of our own is not current dependent, and will keep the gain and current stable through the transistor.

So, the main takeaways from this section should be that, first you can determine the collector current using the base voltage if you wish and second there is always a small emitter resistance, which is unstable. So from this point forward, you can determine whether your anaylsis needs these two properties in order for you properly examine it.

Current Sources & Mirrors

Like I explained much earlier in the video, transistors are like adjustable current sources. The problem is that, by themselves, the adjustable part is hard to predict and it varies with several factors, making it rather unpredictable and unstable. However, with a few extra components we can remove the uncertainty and make a much more stable current source. Let me introduce the basic current mirror. It consists of just two transistors with their bases and emitters tied together. One of the transistors will have its base and collector tied together. The base-collector being tied together essentially reduces the BJT down to a single diode.

Now, the current flowing through this diode will inevitably cause a voltage drop. Since both transistors share bases, they also share the same base voltage. This creates the end effect that the current through path one is roughly mirrored to path two. Now, to turn this into a current source we can simply set the current in path one with a resistor. You can solve for the current by considering the simplified circuit here, just a resistor and a diode. With VCC being 9v, and a 10k resistor, we should get a current of about 840uA. If we measure the current on the mirrored path, with a load of 100 ohms, we get 840uA. Even if we change the load to 1k ohms, we get 830uA. So it’s relatively stable. And this circuit will work so long as you don’t force the mirror transistor into saturation. Either way, this is a big improvement over the single transistor current source.

A potential alternative to the current mirror is what is commonly referred to as a current limiter. It uses two transistors and three resistors. The first transistor, Q1, is there to pass current through our load. R1 simply allows Q1 to turn on and let the load pass through. However, we have negative feedback in the sense resistor. This resistor will drop voltage proportionally to the amount of current flowing through the load. This resistor forms our negative feedback portion of the circuit. When the current is high enough to drop at least 0.6v through the diode drop of the base, then Q2 starts conducting. This will starve current from Q1, which causes it to conduct less, which results in less current for the load. R2 is there simply to protect the base of Q2 and prevent too much current flowing through the base. This whole circuit results in a constant current through the output so long as the load is large enough.

Now we just have to decide on the values of the parts. R1 and R2 should both be somewhat large in order to reduce power losses, so I chose R1 to be 10k and R2 to be 1k. Now, Rsense is where we get to choose the current limit. Now remember, the current is determined by ohm’s law, and V is stuck 0.6v because of the diode. Let’s say that we want to drive an LED at 10mA, so we can use ohm’s law so solve for resistance. We can calculate a value of 60 ohms. Now, I don’t have a 60 ohm resistor, so I chose a close value of 56 ohms. Now if we place our LED and measure the current, we get a value of 11mA. This is really good, and we can even change the supply voltage and still get that same current flowing.

Darlington Pair

You may come to a point where you may need more gain from your transistor. In that case, you should take a look at the darlington transistor. It’s simply made up of two single transistors together in order to form one larger virtual transistor.

What happens here is that we essentially have a BJT that drives the next BJT. In fact, we get a new overall current gain for this pair. The current gain of the darlington pair is simply the product of the two that make it up. So, if we use two 2n3904s and assume gains of 100, then we’d get a current gain of 10k from the inital signal. This means we don’t have to load down the input stage so much when driving the transistor, since we would need far less current than a single transistor by itself.

It’s also worth mentioning here another transistor pair called the sziklai pair. It has the same end result as the darlington in that the current gains are multiplied together. The big difference here is that the two transistors are of opposite types, one is an NPN and the other is a PNP. The pair acts like the first transistor. For example, I used a sziklai pair in my linear power supply video. Instead of passing current through the LM317, I instead routed it through a sziklai pair. It is a PNP type pair because the first transistor is a PNP. Meanwhile, the 2n3055 NPN transistor did the heavy lifting.

Well, this video should provide a good starting point and reference to BJT circuits. This is a confusing subject, so don’t worry if you don’t have it completely down yet. My work with transistors isn’t done either, we still have to cover MOSFETs, so stay tuned for that video. Anyways, if you’ve enjoyed the video and learned something new, please consider subscribing so that you can see my other videos. Also, visit my buymeacoffee page. With your support, I can continue getting new parts and circuit boards to keep making these videos. I’d also like to thank Mr. devNull and Cognisent for being long-time channel supporters. You’ve really helped me keep making these videos. Thanks for watching, have a good one!