in this video we're gonna focus on BJT transistors and how they act as electronic switches but let's start with the basics so this is the symbol of an NPN transistor my drawing is not perfect but will make the best of it this is the base here we have the collector and that is the emitter of the NPN transistor beta describes the ratio between the collector current and the base current so if we send a small current of let's say 1 milliamp to the base of the NPN transistor by the way this is the flow of conventional current electron flow is in the other direction now let's say that beta is a hundred then the collector current will be a hundred times greater than the base current and this is how the transistor acts as a switch when a small current is applied to the base of the transistor a larger current can flow from the collector to the emitter of the transistor so you could use a small current to activate a circuit with a logic right now the emitter current is the sum of the base current and the collector current so it's 1 plus 100 it's going to be 101 milliamps now let's work on an example problem so you can see this in action so first we're going to draw a chemical battery and then we're gonna have a switch we'll call that switch s1 this is the positive terminal of the battery and a shorter side is the negative terminal of the battery and let's use a 6 volt battery and then we're gonna add a current limiting resistor which we'll call our 1 and we'll give r1 a value of 10 kilo ohms we're going to connect our one to the base of the transistor so here we have the base the collector and the emitter and then we're going to attach a resistor actually first let's put a light-emitting diode and we're going to use a green light emitting diode and then let's add a resistor here which we'll call r2 so r2 we're going to give it a value of 1k or one Cologne and let's put a multimeter across the collector and the emitter so what will be the voltage that the multimeter reads in this circuit feel free to pause the video and calculate the voltage we're going to set the emitter to ground now in this circuit conventional current will flow once the switch is closed it will flow through r1 through the base of the transistor to the emitter and then back to the battery that small current will be used to activate a larger current that will flow through the LED through the collector and then to the emitter and then back to the battery and so that's another way in which a BJT transistor can act as an electronic switch you could use a switch to control a small current flow into the base of the transistor which will activate a larger current flow into the collector of the transistor but let's calculate the voltage at Point C in order to do that we need to calculate the currents flown in each branch now before we solve this let's increase our one to 500 kilohms let me write this over here so that's going to be a much better value and beta let's say that beta for the transistor is 200 so with this information go ahead and calculate the base and collector currents as well as the voltage that the multimeter will read in order to do this we need to be familiar with something called kerkoff's of voltage law which states that the sum of the voltages in a closed loop must add a zero so we're going to do is we're going to set the ground to a potential of zero volts traveling in this direction the battery provides energy to the circuit so it's going to increase the voltage going in that direction so the voltage or rather the electric potential at this point will be 6 volts and once the switch is closed the electric potential here will also be 6 volts now the voltage across the base and the emitter of the NPN transistor that's going to be 0.6 volts it can vary between point six and point seven volts but to keep things simple we're going to go with point six volts so the base is point 6 volts higher than the emitter so this is point six so now that we know the electric potentials across r1 we can calculate the current flowing through it keep in mind conventional current flows from a high potential towards a low potential and we could use Ohm's law V is equal to IR you rearranged in that equation will help us to calculate the current the current flowing in a resistor is equal to the voltage across the resistor divided by the resistance of the resistor now the voltage across R 1 is the electric potential difference between those two points we can call this point a and then the other point B so the voltage is going to be 6 minus point 6 so we have a voltage of 5 point 4 volts across r1 and r1 is 500 kilo ohms now when you divide the voltage in volts by the resistance in ohms you get the current in amps but when you divide volts by kilo ohms this will give you the current in milliamps so five point four divided by five hundred will give us a current of point zero one zero eight milliamps so now that we know the base current IB how can we use this to calculate I see what would you say once you know the base current you could use beta to calculate the collector current keep in mind the collector current is equal to beta times the base current so it's going to be 200 times point zero one zero eight so the current that is flowing through r2 through the LED and to the collector that is the collector current that is equal to let's put it here to point sixteen milliamps it's just beta times the base current so now that we know the collector current we can calculate the voltages around r2 and the LED so anywhere along this line the electric potential will be six now that we know the current flowing through r2 we can calculate the potential on the other side so let's call this point D and point e the voltage across a resistor is equal to the current flowing through it times the resistance and the voltage is basically the potential difference so it's going to be the potential difference at Point D minus the potential difference at Point E and that's going to equal IR rearranging the equation ve is going to equal VD plus actually minus IR VD is higher than ve because current will always flow from a high potential to a low potential so to get ve when you subtract VD by IR so the potential at D is 6 the current flowing through the through r2 is 2.16 milliamps times the resistance of 1 Cologne so 1 milliamp times 1 kilo ohm equals 1 volt so 1 kilo ohm times two point 16 milliamps is 2 point 16 volts 6 minus 2 point 16 volts gives us a potential of 3 point 8 4 volts at Point E now in order to calculate the potential at Point C we need to know what the voltage drop across the green LED is what would you say the voltage drop is the voltage drop of a typical green LED is around 2 to 2 point 4 volts so 2 point 2 would be a nice average so the potential at C is going to be lower than a potential at E because the LED is absorbing energy from the circuit and so it's going to cause a drop in the voltage as you go from E to C M plus the current is flowing in that direction so 3 point 8 4 minus 2 point 2 gives us a potential at Point C of 1 point 6 4 volts so if you were to connect the multimeter between the collector and the emitter you would read a voltage of something around 1 point 6 volts so that's also VCE the collector emitter voltage it's approximately 1 point 6 4 votes so now you know how to solve a simple transistor circuit and now you see how a transistor can be used as an electronic switch we could use a small current to drive a larger current in another circuit and that's how most transistors work as switches now transistors can also act as inverters let me illustrate so first let's draw a circuit on the left we have the input and on the right we have the output so let's say this is r1 and this is r2 so r1 we're gonna give it a value of 50 kilo ohms and r2 that's going to be one cologne now let's say the voltage here is nine volts so we're going to apply a pulse let's say the pulse has a voltage of five volts so let's also make a table that describes the voltages at the input and the voltage at the output when the voltage at the input is 5 volts what is the voltage at the output and when the voltage at the input is zero volts was the voltage at the output so let's understand what's happening when we apply an input voltage of 5 volts current is going to flow through r1 through the base of the transistor and to the emitter and that is going to activate the transistor on the other side so current will begin to flow from the collector to the emitter and so what happens is let's use a 10 kilo ohm resistor instead of a 50 kilo meter because we want to drive the transistor to saturation and so when that happens VCE will be approximately zero volts it might be like Oh point zero one or point one volts but for all practical purposes is going to be close to zero but when you have a significant amount of current flowing through the base you can basically drive a large current through the collector and VCE can approach zero when this transistor goes into saturation a typical beta value for an NPN transistor can vary between 100 and 300 and notice the ratio between r1 and r2 and that it's it's 10 so beta is not going to be anywhere near 100 for this particular circuit if you were to calculate the relative currents and so when are when the ratio between r1 and r2 is much less than beta it will be very easy to drive the transistor to saturation which means when that current the base current flows to this part of the transistor VCE is going to go to zero and so the output would have read zero so what you need to take away from this is this when the input is 5 volts and if the current that's flown to the base is large enough to drive the transistor to saturation the output voltage will be zero volts now when the input is zero there's not going to be any current flowing to the base of the transistor so if there's no current then there's not going to be any current flowing due the collector and the emitter of the transistor which means that there's no current flowing through r2 if there is no current flowing through r2 there's no voltage drop so the voltage at Point C will be the same as the voltage of the source it's going to be nine volts because there's no current flowing through r2 so that's the output will be whatever the collector supply voltage is VCC so notice how the transistor can serve as an inverter when the input is high the output is low and when the input is low the output is high so you can rewrite the table like this when the input is low the output is high and when the output when the input is high the output is low and so that's a basic inverter circuit so that's how you could use the NPN transistor as an inverter for digital circuits so that's basically it for this video now you know how to use the BJT transistor as an electronic switch and also how to use it as an inverter now for those of you whom want more videos on electronics science projects and other interesting stuff feel free to take a look at the videos that I'm going to post in the description section below thanks for watching