How To Use MOSFET – Beginner’s Tutorial

by Oscar

Let’s talk about the basics of MOSFET and how to use them. This tutorial is written primarily for non-academic hobbyists, so I will try to simplify the concept and focus more on the practical side of things.


However if you are into how MOSFET work, I will share some useful academic articles and resources at the end of this post. MOSFET has some advantage and disadvantage over BJT, so choose carefully base on your application.

You can buy MOSFET’s for Arduino Projects on Amazon:

What is MOSFET?

MOSFET stands for metal-oxide semiconductor field-effect transistor. It is a special type of field-effect transistor (FET).

Unlike BJT which is ‘current controlled’, the MOSFET is a voltage controlled device. The MOSFET has “gate“, “Drain” and “Source”  terminals instead of a “base”, “collector”, and “emitter” terminals in a bipolar transistor. By applying voltage at the gate, it generates an electrical field to control the current flow through the channel between drain and source, and there is no current flow from the gate into the MOSFET.


A MOSFET may be thought of as a variable resistor, where the Gate-Source voltage difference can control the Drain-Source Resistance. When there is no applying voltage between the Gate-Source , the Drain-Source resistance is very high, which is almost like a open circuit, so no current may flow through the Drain-Source. When Gate-Source potential difference is applied, the Drain-Source resistance is reduced, and there will be current flowing through Drain-Source, which is now a closed circuit.

In a nutshell, a FET is controlled by the Gate-Source voltage applied (which regulates the electrical field across a channel), like pinching or opening a straw and stopping or allowing current flowing. Because of this property, FETs are great for large current flow, and the MOSFET is commonly used as a switch.

Okay, let me summarize the differences between BJT and MOSFET.

  • Unlike bipolar transistors, MOSFET is voltage controlled. While BJT is current controlled, the base resistor needs to be carefully calculated according to the amount of current being switched. Not so with a MOSFET. Just apply enough voltage to the gate and the switch operates.
  • Because they are voltage controlled, MOSFET have a very high input impedance, so just about anything can drive them.
  • MOSFET has high input impedence.

How to use MOSFET as a switch?

To use a MOSFET as a switch, you have to have its gate voltage (Vgs) higher than the source. If you connect the gate to the source (Vgs=0) it is turned off.

For example we have a IRFZ44N which is a “standard” MOSFET and only turns on when Vgs=10V – 20V. But usually we try not to push it too hard so 10V-15V is common for Vgs for this type of MOSFET.

However if you want to drive this from an Arduino which is running at 5V, you will need a “logic-level” MOSFET that can be turned on at 5V (Vgs = 5V). For example, the ST STP55NF06L. You should also have a resistor in series with the Arduino output to limit the current, since the gate is highly capacitive and can draw a big instantaneous current when you try to turn it on. Around 220 ohms is a good value.

This page shows some detail explanation how a MOSFET works as a switch. This page shows some advanced usage of MOSFET.

Types of MOSFET

MOSFETs come in four different types. There are three main categories we need to know.

  • N-Channel (NMOS) or P-Channel (PMOS)
  • Enhancement or Depletion mode
  • Logic-Level or Normal MOSFET


N-Channel – For an N-Channel MOSFET, the source is connected to ground. To turn the MOSFET on, we need to raise the voltage on the gate. To turn it off we need to connect the gate to ground.

P-Channel – The source is connected to the power rail (Vcc). In order to allow current to flow the Gate needs to be pulled to ground. To turn it off the gate needs to be pulled to Vcc.

Depletion Mode – It requires the Gate-Source voltage ( Vgs ) applied to switch the device “OFF”.

Enhancement Mode – The transistor requires a Gate-Source voltage ( Vgs ) applied to switch the device “ON”.

Despite the variety, the most commonly used type is N-channel enhancement mode.

There are also Logic-Level and Normal MOSFET, but the only difference is the Gate-Source potential level required to drive the MOSFET.

How does it work in theory?

I will try to explain it in the simplest way I can, for more detail or if you are in doubt, check the references and links I provide at the bottom of the post.

MOSFET is a voltage controlled field effect transistor that differs from a JFET. The Gate electrode is electrically insulated from the main semiconductor by a thin layer of insulating material (glass, seriously!). This insulated metal gate is like a plate of a capacitor which has an extremely high input resistance (as high as almost infinite!). Because of the isolation of the Gate there is no current flow into the MOSFET from Gate.

When voltage is applied at the gate, it changes the width of the Drain-Source channel along which charge carriers flow (electron or hole). The wider the channel, the better the device conducts.

The MOSFET are used differently compared to the conventional junction FET.

  • The infinite high input impedance makes MOSFETs useful for power amplifiers. The devices are also well suited to high-speed switching applications. Some integrated circuits contain tiny MOSFETs and are used in computers.
  • Because the oxide layer is so thin, the MOSFET can be damaged by built up electrostatic charges. In weak-signal radio-frequency  work, MOSFET devices do not generally perform as well as other types of FET.


Where to put the load to a MOSFET? Source or Drain?

Because load  has resistance, which is basically a resitor. For N-channel MOSFET the reason we usually put the load at the Drain side is because of the Source is usually connected to GND. 

If load is connected at the source side, the Vgs will needs to be higher in order to switch the MOSFET, or there will be insufficient current flow between source and drain than expected.

Heat Sink connected to the Drain?

Typically the heat sink on the back of a MOSFET is connected to the Drain! If you mount multiple MOSFETs on a heat sink, they must be electrically isolated from the heat sink! It’s good practice to isolate regardless in case the heat sink is bolted to a grounding frame.

What is the Body Diode For?

MOSFETs also have an internal diode which may allow current to flow unintentionally. The body diode will also limit switching speed. You don’t have to worry about it if you are operating under 1Mhz.

More Technical Resources and Academic information about MOSFET (Updating)

Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.


Mohd Hussain 3rd August 2022 - 4:07 am

Lesson is very easy and very nice for understanding .

Ashkan 7th March 2020 - 10:19 am

I have never read such a good article regarding MOSFETs.

Matt 2nd April 2019 - 7:12 am

Thanks for the article – well done.

I would like a Mosfet to act like a Latching relay. It will be switching 220V AC and acting as a light switch. Powered from a battery operated Arduino. So current should only be drawn when latching on or off, not when energised. Is a Mosfet capable of this – thanks in advance.

Tony Olivieri 20th September 2018 - 8:22 pm

I’m a novice with MOFSETs. struggling to determine if a circuit I’m working on is feasible. I’m designing a board that uses an ESP-32 micro controller (3.3v). I’m using a DC-DC converter that takes 4 to 32V in and outputs 3.3v. The VIN to the DC-DC will be 24Vdc. This board will have a USB interface for programming. If I plug in the USB, I want the 24V source to the DC-DC blocked and want to switch the VIN to the DC-DC to the 5V USB. The DC-DC converter can supply 1.5A continuous. The actual load should never exceed 0.9A I’m not sure if I should use a P or N channel MOFSET or if 24V dc can be used. I’m also working to avoid any through-hole mounts, preferring SMD. Any feedback or recommendations for an appropriate MOFSET is appreciated.

James Brown 2nd August 2018 - 1:24 am

Great web site. Thanks.
I need to drive a relay that draws 200 mA at 12V with a MOSFET. I plan to use the Fairchild BS170.
My question is do I need to install a kickback diode across the relay coils or does the internal diode take care of that?

J J 4th October 2018 - 10:51 am

Yes you need a diode across the relay coil, if there is none. If there already is an internal diode in the relay, you’re ok.
Just remember the polarity of the relay coil (and its diode): check the schematics twice – “Is it top view or solder view”?
Don’t rely on any internal Body Diode in the MOSFET for this.

Dan Fischer 14th June 2018 - 4:18 pm

Thanks for the great tutorial but it is still over my head! I am a model railroader and have a situation where I want current to freely flow in one direction but be blocked from flowing the other direction. Am running 15v at the most and it is D.C. Should I be looking at mosfets or diodes ( or something else). A toggle switch would work but need something more automatic so I don’t have to flip a switch. Thanks

larry 15th July 2018 - 8:45 am

you’d want a diode for that

Søren 17th August 2018 - 12:09 pm

A schottky diode I think.

Armand Iskandarsyah 30th May 2018 - 1:58 pm

Hi, this information is helpful for me. I want to ask. “When the load is connected at the source side, the Vgs will needs to be higher in order to switch the MOSFET”. How much voltage do I need to turn on the MOSFET.
In example, I have 12V DC with irf n channel type logic level mosfet and the load connected on the source side. How much voltage on the gate to turn on the MOSFET?
Thank you.

ITBrian 20th June 2018 - 8:53 pm

Check out the link above “This page shows some advanced usage of MOSFET.”
Go to the section labeled “THE BASE” It explains the process for finding the correct Vgs to avoid overheating and damaging the MOSFET.

Brian Tozer 2nd February 2018 - 1:41 pm

Thanks for such an informative article. Reading it tells me the mosfets I was recommended to buy last week will not operate with an arduino – so there are 10 going into a spares drawer!

As these are to allow me to couple multiple leds into 1 arduino output – 10 leds to pin 10, 10 leds to pin 11 etc. You mention that they will switch quickly, does that mean I could still make the leds turn on/off in microseconds, to simulate the flicker of a fluorescent tube starting before coming to full brightness?

many thanks once again.

Mariel 19th January 2018 - 1:17 pm

This was excellent, thank you.

Peter 28th September 2017 - 4:38 pm

Hi. Excellent tutorial. I accept that it is v.difficult to keep the Blog up to date as time goes by, so I would just like to point out a broken link from it.
Since Fairchild seem to have become part of On (?) the page for the ‘Understanding Modern Power MOSFETs’ is now 404.

rimakus 7th June 2017 - 2:41 pm

Why 220 ohm resistor specifically for protecting ardruino pin controlling MOSFET gate? would this cause more lag in opening the gate? Maybe 30-100 ohm would suffice?

Billy_Bob 16th August 2017 - 8:28 pm

The reason you want around 220ohms is because the Arduino can only source about 20mA or .02A. So, R = V/I. R = 5V / 0.02A = 250R. So actually, 220Ohms would be a little low, but that is still only 0.0227A

tony 19th February 2017 - 9:31 pm

i want to repair heater speed control from a peugeot its only running at full speed ,its not the resister type looks digital.
i think its got a mosfit on a large heat sink. am i right . tony

jonathan 20th July 2017 - 4:18 am

What type of mosfet ideally good to control voltage? I have e-bike ,then i wanna try to repair and control the speed of motor it is operated by 24vdc,how and what should i do?

Nazrul Islam 23rd January 2017 - 3:54 pm

hello I need the information that silica sol or colloidal silica and mosfet with water what will be make would this intimate the volt and charge time delay pls. inform

bob 15th January 2017 - 9:05 pm

Actually it’s the VGS(th) Gate Threshold Voltage of 2.0 to 4.0v on the IRFZ44N not the Vgs=10V – 20V for switching you should be looking at.

Jim 21st January 2017 - 5:22 am

Yes, this is very misleading. You are confusing Vgs with Vgs(th).

hernan 19th November 2016 - 4:24 am

hi OSCAR, thank you for this great discussion you’ve made.
it really helps me a lot about understanding how MOSFET works…

keep up the good work.

Harish NR 2nd November 2016 - 5:02 pm

This is the components failure in variableDC power supply 0-32v &0-2A

When I switched on source turn little bit preset ,our DC source. O/p shows around 50v
And another problem DC voltage is ok, but current option not working please guid me which components failure & how to solve the problem
Kindly reply ASAP

Inoace 15th September 2016 - 5:41 pm

I think the ones with body diodes cannot be used in class AB amplifiers right?

Reza 14th July 2016 - 7:03 am

I found Circuit on web, where use some 11N65C3 NChannel mosfet for RGB Led Color organ with music.

But, I Don’t found this Mosfet. So nnow which Mosfet I should use for 5M RGB LED Strip.

Chakri 11th July 2016 - 10:43 am

I want to know what series of MOSFET to be used for building a power sensing robot.could u help me??

Tomas 5th June 2016 - 8:46 pm

I want a 12v control voltage to switch off a 5v supply. P-channel depletion seems to be the dogs bollox, but the devices I find require negative current to switch on in this configuration.

gerrit 17th April 2016 - 3:26 pm

Gooday. Please can you assist me. I have parrel 10 IRFe50 mosfets on my power supply I’m busy building but when I put power dc on they don’t go on they not even gettig hot. My design is a 12v to 220v inverter. Can you maybe tell me how excact to connect them in parralel to switc on.

Jency 22nd March 2016 - 7:10 am

The mosfet control the voltage in dual way so using mosfet is the good experience.

Sparklini 16th March 2016 - 10:54 pm

This was very usefull. Really liked how you explained the difference between transitors and mosfet!

I kept adding gate resistances because they were getting hot not realizing that was the problem to begin with.

Thanks for writing this up.

Peter 16th December 2015 - 2:15 pm

Hi Oscar
I’ve never used a mosfet yet so no experience of using these devices and limited knowledge of anything electronic. I found your information very informative, but can you help me understand what the impedance does? I’m not sure I know what that means.
You suggest using 220 resistor when using with a 5v rail. but the device is voltage driven with infinite impedance. so i think this means the current draw will be 0 A. what purpose is the resistor?


Sean 23rd December 2015 - 1:05 pm


the resistor is to stop “in-rush current” you are correct that there is an enormous impedance when the device is “on” but during startup the impedance is capacitive (where the impedance can be worked out as 1/2*PI*Frequency*capacity), you can see with a large capacity resistance you end up with a very small impedance. Take that impedance and put it into ohms law “I=V/R” and you can see that current will be very large hence put a resistor there!

Hope that helps.

S.Ramesh 11th December 2015 - 3:30 am

Hi Oscar,
Very good summary for the MOSFET, easy to understand and also easy to explain other’s who needed.

H900 11th October 2015 - 10:36 am

Hi Oscar MY DEAR Friend!!!
I was wondering why as example of transistor to pilot the power MOSFET you are proposing STP55NF06L, which is quite expansive and it’s a power MOSFET itself. Is there a specific reason to not using a very cheap low power MOS, instead? We only need to provide 10 or 12 volt on the MOSFET gate, no current is needed.
Please correct me if I’m wrong.


moonstone 7th September 2015 - 9:11 pm

Hi Oscar,
This tutorial made my understanding of MOSFET vivider.
Thank you for your time and effort.

phu dinh 15th August 2015 - 4:13 am

Hi Oscar!!
Very good education and easy to understand but hard to remember them.
So for” the most commonly used type is N-channel MOSFET enhancement mode” you see the arrow go inside circle: from “Starter” of arrow ~(Source) to the “Header” of arrow~(gate); two of parallel line || just like “Capacitor” means no current please but only Voltage apply in Gate to control; also cause almost no current ampere ~(“The transistor requires a Gate-Source voltage ( Vgs ) applied to switch the device “ON”.”). so Gate of “N-channel” MOSFET ~negative ~ground to Gate and Source, then the last connector is the power rail (+)~ Drain and Loader. easy to remember that since how about other??? you guest similar same thing.

Jim 16th June 2015 - 3:46 am

Nicely done, without clouding the issue. Makes it a good jumping off point for a more definitive study of MOSFETs.

Wang007 15th January 2015 - 2:24 pm

The best explanation about MOSFET I have ever read!

Adamson 17th October 2014 - 8:33 pm

I have a challenge with an electrolux washer W4180H.The motor is supplied via a motor control unit (MTU) which takes an upnut voltage of single phase and outputs three phase to drive the motor at 190volts AC.The variable speeds are controlled by the MCU.
The machine has been giving me error E32(motor) too hot just after operating for about 8 minutes.When I physically check the motor the temperature is normal.
I opened the MCU to check the status of the MOSFETS (K15N60) there are six of them.I removed them from the board and used an analog multimeter.One of them was giving me a deflection between Drain and source even when I interchanged the probes.Kindly help.I am not good at testing mosfets.


seymourfroggs 17th September 2014 - 4:46 am

Para 4, second last word. Should be CLOSED, shouldn’t it?

But my question is, for a n-FET (its an IRF630), how do I find what voltage range allows the right current regulation?

I understand about the Gate emf needing to reach (in my case) about 4.5 v before D – S flow occurs.
But how do I control DS current?

I know what the DS voltage is, and the Built-In resistance. To give a clear example, if Main Voltage is 15 V, and R is 2 ohm, I would get 7.5 A max.
How do I control it for, say, 3 A and then for 6 A (brief pulses only)? How do I find the Vgs in each case?

Peter 9th June 2014 - 12:09 pm

Does not distinguish between P and N channel operation until half way through page.
” By applying voltage at the gate, it generates an electrical field to control the current flow through the channel between drain and source…” does not say whether this is for N or P mosfet. Have to read several paragraphs down to realise that this is only true for one of them.

Olen 28th May 2014 - 2:02 pm

Very nice post. I absolutely love this website.

Continue the good work!