so the last video we were looking at
this five volt signal coming in here
that you know it's switching between
zero and five volts but it doesn't it's
not able to drive a whole lot of current
in fact it was able to drive less than a
milli amp and we're trying to turn an
LED on it requires 20 milliamps and I
mentioned that we could use these little
guys here these transistors and the
transistors would work as you know
basically a you know a current amplifier
or or a switch and in this video I want
to talk about how that how that's
actually going to work so if we go and
look at this is basically a picture here
that I've drawn of a transistor and and
hopefully it looks like the ones we were
just looking at and there are basically
a couple different types of transistors
and just just to be clear about what
we're talking about here the types of
transistors we're going to be talking
about is kind of the most generic sort
and that's a bipolar bipolar Junction
transistor so a bipolar Junction
transistor and should be another s in
there and this is kind of the most
common sort of transistor or usually if
someone you know you'll you might even
see this referred to as just a bipolar
transistor or even just a transistor if
someone just says transistor and they
don't specify they're probably talking
about a bipolar Junction transistor and
it's in it and they often look like this
they could come in different sorts of
packages but this is this is the sort
that I have and there are two types I
guess of transistor there's that you
might come across there's NPN and
there's PNP and in this video I'm
actually not going to really talk about
PNP at all other than just to mention
that it is it's another type of
transistor that exists I find that in in
the work that I do I'm using NPN
transistors probably I don't know almost
99% of the time it's it's not that often
that I find myself using a PNP
transistor particularly in digital
electronics they you know we do use them
from time to time and perhaps I'll make
another video that talks about the
differences here but rather than confuse
it with all the differences
I'm just going to focus on one type of
transistor which is the most common that
you'll come across which is the bipolar
NPN transistor and this is what it might
look like and it's got three leads here
to connect to the circuit which is a
little bit unusual if you're used to
looking at things like resistors or
capacitors or even inductors certainly
batteries all of these things have two
leads which which kind of makes sense
when you put them into a circuit you can
put them in in series you could put them
in in parallel three leads is a little
bit different but hopefully hopefully
it'll start to make sense and just so
when we're talking about this the the
leads have each have different names and
so just so we know what they are there's
an emitter a base and a collector and
this is this is how they're laid out in
this particular transistor that I have
that the transistors that I'm using each
grab one here and take a look it's a 2n
3904 so 2n 3904 and that's just one type
of bipolar NPN transistor there are
there are lots of other types that are
very very similar to what I'm what I'm
describing this has particular
attributes that you can you can look up
in the datasheet but but both basically
this there's the number of different
transistors that are very similar to the
one I'm talking about and so the three
leads are the emitter let me make that a
little clearer my handwriting is not
that great here let's see emitter base
and collector so emitter base and
collector those are the three leads and
if we look at the circuit schematic for
this transistor what we're going to see
is the way that it's drawn is it's
usually drawn like this and there's a
little arrow on this guy and these are
the three leads coming off and sometimes
you'll see a drawn with a circle around
it sometimes that circle won't be there
that's just a matter of preference
really and this lead over here is the
base this guy up here is the collector
and this guy down here is the emitter
and so this is the circuit diagram for
for a an NPN transistor and the way it
works is basically the transistor allows
a current to flow in basically in this
direction and I'm going to use sort of
conventional current flow so this we're
going to say this is our positive
voltage up here this is our negative
voltage here and so current is flowing
in this direction of course we know that
electrons actually flow from negative to
positive but in conventional current
flow we talked about it going this in
this direction and so current will flow
in this direction from the collector to
the emitter and the way we talked about
that is we actually call this the
collector current collector current and
sometimes you'll see that abbreviated as
I sub C so a current of the collector
and so this collector current will flow
based on whether there is another
current flowing from the base to the
emitter so there's another current
flowing over here from the base to the
emitter so the base is slightly more
positive than than the emitter in this
case and so this we call the base
current base current and that will
sometimes be abbreviated is I sub B
current of the base and so the way that
the transistor works is that it
basically will automatically adjust the
collector current based on the base
current and so what you'll see is you'll
see that the collector current
what the transistor is trying to do is
it's trying to make sure that the
collector current is equal to the base
current times times some value and it's
usually a pretty large value usually
like a hundred to two hundred 100 is
pretty common so times 100 so this
transistor is going to say if there's
some sort of base current flowing here
then I'm going to take that I'm going to
multiply it by 100 and I'm going to try
to make the collector current equal to
that so another way to look at this kind
of a neat little sort of analogy here is
you can almost think of the transistor
if I if I kind of zoom in on what's
going on inside that transistor is I
have the base here and the base comes in
and there's actually you have to you
have to make sure that the base the
current flowing from the base to the
emitter is is flowing in that direction
because there's a effectively a diode
inside the transistor so this is the
base up here and this down here is going
to be our emitter and so you're going to
have current flowing in this direction
and you could actually put a little
ammeter in here so this is this is going
to be like a little meter that's going
to register how much current is flowing
so this is going to look at our our base
current I sub B over here and based on
what that little meter reads we're going
to have effectively what is a variable
resistor that allows the transistor the
transistor you can almost think of the
transistor as a variable resistor
because it has the ability to adjust how
much current flows through it by sort of
adjusting this variable resistor and
then of course there's another little
measure over here of amperage and this
guy is the is going to be our collector
and so you can almost think of there
being a little guy inside the transistor
who has got his hand on this on this
variable resistor and he's looking at
he's looking at the base current and
he's thinking to himself
I want to look at this base card and
then I want to adjust this variable
resistor so that when I look at the
collector current then the collector
current is equal to the base current
times 100 and this of course over here
is measuring the collector current I sub
C so this little guy is inside the
transistor he's got his hand on this
variable resistor and he can he can move
this up and down too to adjust the
resistance between the collector and the
emitter you can almost think of it as
adjusting the resistance between the
collector and emitter to allow a current
to flow from the collector to the
emitter but he's looking at both of
these ammeters he's looking to see okay
I want to see how much current is
flowing from the base to the emitter and
whatever that is I'm going to adjust
this thing to see if I can get the
current flowing over here from the
collector to the emitter to be a hundred
times what I see over here so this guy
is kind of looking at both of these
meters and he wants he wants to make
sure so he's sort of like thinking to
himself this is a little thought bubble
here he's thinking to himself okay I
want to make sure that this is a hundred
times what this says and he's going to
adjust this up and down to do that and
and that is basically what a transistor
does you can almost think of it of as a
variable resistor that is controlled by
this other current over here