Tip:
Highlight text to annotate it
X
In this tutorial I'm going to go over the basics of a popular transistor and show you
how you can use it to control different gadgets.
What is a transistor?
A transistor is a device that allows you to use small changes in voltage to switch things
on and off.
They are kind of like a valve in your plumbing system but instead of controlling the flow
of water,
you're controlling the flow of electric current.
To make things as simple as possible I'm only going to talk about the easiest type of transistor
to work with: The N-channel MOSFET.
Basically they work like this:
When the transistor is off, no current can flow. So it's as if one of the power wires on your gadget
has been disconnected
so obviously the gadget will stay off.
When the transistor is on current can flow and it's like both of the power wires on your
gadget are connected now so the gadget will activate.
So where can you get an N-channel MOSFET?
Well there are many different types of N-channel MOSFETs but they all work in pretty much
the same way.
You can get an N-channel FET from Radio Shack
or you can scavenge them from from old computer hardware.
They usually look like this.
Google the part number on the transistor to double check exactly what you're working with.
Here I have an IRFZ44.
Anything else you need?
Well in addition to the transistor, you're going to need a couple of other things. You're going to
need the gadget that you want to switch on and off. And I'm going to use a car's headlight as an example here.
You're going to need an external voltage supply that your gadget would normally require. And in
this case it would be the car's twelve volt battery.
And finally you will need some sort of signal that is either 0 volts or 5 volts.
Basically a digital logic signal...
and I'll give you a few examples later.
Okay so you've got all that? Let's talk about how you connect the transistor.
N-channel MOSFETs always have 3 pins called Gate, Drain, and Source.
I know the names are kind of funny sounding but you will have to memorize them.
Gate
Drain, and Source.
Drain is the pin that current will drain into. Source is the pin that current will flow out of.
And Gate is the pin that will turn the transistor on and off, kind of like how a water gate valve
will control the flow of water.
Connect up the transistor like this:
The source is connected to your circuit ground.
Connect the negative side of your load to the drain of your transistor.
Connect the positive side of your load to the positive terminal of your external power supply.
Now whether the transistor is off or on will depend on whether the gate is at 0 volts or 5 volts.
Here is the equivalent circuit when the gate is at 0V.
The transistor stays off, so no current can flow, so the headlights stays off.
Here is the equivalent circuit when the gate is at 5V. The transistor turns on and
starts acting like a very low resistance current path
so current can flow.
Current will flow from the power supply through to your load, into the drain of the transistor,
and then out from the source of your transistor into ground. So when the transistor is on, your gadget
will turn on too.
Now let's talk a little more about the signaling voltages that are going to the gate.
There are a lot of different ways to do it and that's why transistors are so much fun.
Here is an example with a little mercury vibration switch to turn on the transistor.
When you hit the switch, the gates receives five volts so the transistor turns on.
Here's an example with a computer's parallel port pins.
When the parallel port outputs a 1 (which would be five volts)
The transistor turns on.
And here's another example with a 6 volt solar cell.
When the light shines on solar cell,
the gate receives at least five volts, so the transistor turns on.
And there are hundreds of other ways you could switch the transistor on so basically you
can control anything with anything.
Now I would like to clarify something for safety's sake.
Over here on the gate side, you want to keep the signaling voltages less than
fifteen volts.
0-5V is fine, 0-12V is fine
but if you try to signal things with a 0 to 30V signal you will blow something up.
However on the Drain side of things you have a lot more freedom in the voltages you can use.
The only limitation is what the transistor can handle.
This IRFZ44 is rated for up to 60V so it can switch 12V loads, 50V loads, whatever I want all the way up to 60V DC.
So I could switch LEDs on and off. I could switch a string of low voltage christmas lights
on or off.
If you add a diode over here you can switch a motor on and off, or switch a solenoid on and off, or switch a
relay on and off.
And once you have a relay being switched
you can switch light bulbs on and off, you can switch toaster ovens on and off and you can switch your refrigerator
on and off.
Basically if you can get a system
that puts out a 0 to 5V signal, you can attach a transistor to it and you'll be able
to switch any gadget on and off.
Now remember, I just showed you the basics of one type of transistor. There are many kinds of
transistors out there with many different operating modes. If you are interested in learning
about other kinds of transistors,
google "NPN transistor tutorial" "PNP transistor tutorial" "P channel MOSFET tutorial"
and "JFET tutorial."
That should be enough to give you a headache.
But for now, you know how to use an N-channel MOSFET and that is all you need to turn any
DC powered device on or off.