Introduction
GPIO pins on Arduino can source with a maximum current of 40 mA (16 mA on Raspberry).
So called MOFSET can be used in applications requiring more current (Metal-Oxide-Semiconductor Field effect Transistor)
MOFSET types
There are two classes of MOSFETS.
Depletion Mode, and enhancement mode.
Each class is available as n-channel or p-channel, tallying up to four types of MOSFETs in total!

Depletion Mode:
- Depletion mode tends to be referred to as a normally closed switch
- It states that when there’s no voltage applied at the gate, channel conductance is at its maximum
- When voltage is applied at the gate, The conductivity of the device decreases
Enhancement Mode:
- Enhancement mode tends to be referred to as a normally open switch, where for conductance to occur, voltage is needed to pass-through
- When there’s no voltage applied at the gate, there’s no conductance
- When voltage is applied at the gate, the conductivity of the device increases
N-Channel MOSFET:
- The drain and the source are doped with n+ impurity while the substrate is in p-type
- The current flows through the P-channel MOSFET
- When a positive voltage is applied on the gate, the electrons from the n+ source and the drain region are attracted towards it, forming an electron reach channel
P-Channel MOSFET:
- Unlike the N-channel, the drain and the source are doped with p+ impurity while the substrate is in n-type
- The current flows through the P-channel MOSFET
- When a negative voltage is appleid on the gate, the electrons underneath the sulfur oxide respond to the flow of current and get pushed downwards into the substrate

Resistors

The combination of the gate, oxide layer, and the body connection of a MOSFET act as a small capacitor that begins charging when voltage is present at the gate.
The initial current is very high. It slows down as the capacitor charges. That initial current rush, also known as in-rush current, can be a problem. Even though it is a short time, there is a significant current surge that can damage an I/O pin.
A current limiting resistor between the pin and gate prevents excessive I/O pin current draw.
When using a MOSFET connected directly to a microcontroller output pin, the MOSFET gate should be pulled either high or low as needed using an external resistor to prevent floating gate logic and unwanted output from the MOSFET during MCU startups and resets.
Gate-Source Threshold Voltage – Vgs(th)(min) and Vgs(th)(max)
Gate voltage at or below the minimum threshold value turns the MOSFET off.
Common minimum gate voltages for 5 V logic may fall between 0.5 V and 1 V.
Gate voltages above the maximum threshold value turn the MOSFET on.
Gate threshold voltages between the minimum and maximum could turn the MOSFET on or off and must be avoided.

Drain-Source ON Resistance – Rds(on)
When turned on, there is resistance between the drain and source that decreases as the gate-source voltage or Vgs increases.
Choose a MOSFET whose lowest Rds(on) values occur at or near the ideal logic high voltage value and do not decrease substantially with higher Vgs values.

IRF520 MOSFET
The IRF520 is a Power Mosfet with a 9.2-ampere collector current and 100-volt breakdown voltage. This MOSFET has a low gate threshold voltage of 4 volts and hence is commonly used with microcontrollers like the Arduino for switching high current loads.


IRFZ44R MOFSET

