Circuits guide series
Use MOSFETs to drive large(ish) loads
MOSFET transistors are the building block of modern electronics. Between 1960 and 2018, to drive high-power electronics, 13 sextillion (1.3×1022) MOSFETs have been manufactured. Apart from using them to do calculations in CPUs, they are excellent for driving large electrical loads.
Many typical Arduino applications involve driving devices that require more power than what the Arduino itself can provide through its pins. DC motors, lights and solenoids are example devices that need lots of power to operate. This power translates to higher voltages, higher currents, or both at the same time.
As the Arduino cannot provide the required power, we use specialized devices like relays and transistors. These devices are used as interfaces between low-power controller circuits, like the Arduino, to higher power controller circuits, like electric motors, LED strip lights, sirens, strobe lights, etc.
In thisarticle I will discuss the MOSFET device.
What is a MOSFET
The acronym "MOSFET" stands for Metal–Oxide–Semiconductor Field-Effect Transistor.
Yes: it is a type of transistor, but instead of only having three terminals, like a typical field-effect transistor (Base, Collector, Emitter) it has four: source (S), gate (G), drain (D), and body (B).
In most cases though, the B and the S are connected together (shorted) so we end up with MOSFET packages that expose only three terminals: source (S), gate (G), and drain (D).
Practically, a MOSFET has an advantage over a "normal" transistor or relay because it requires very little current to operate it (turn it on or off). Less than 1mA at the gate will do the job. This is much less to the current needed by the common field-effect transistor 2N2222 (around 5mA).
Despite the tiny control current, a MOSFET can deliver very high currents, at least 10A and up to 60A for a common device like the IRLB8721PbF.
Another advantage of a MOSFET over a relay is its switching speed. It can turn on and off within nanoseconds. The IRLB8721PbF, for example, can switch on within around 100nsecs, which makes it a great option if you want to drive a power LED or motor using pulse-width modulation.
And the really nice thing is that you can use a MOSFET almost as a drop-in replacement for a normal field-effect transistor.
Example use of a MOSFET
Here is an example of use:
In this schematic, a MOSFET transistor is used to turn on the connected motor. Because the motor contains a coil, a diode is connected in parallel to protect from reverse voltages (see relevant article). You should use the same setup for any load that contains a coil, like a relay, solenoid or motor. If instead of a motor you used a high-power LED, you can omit the diode.
The gate of the MOSFET is connected to one of the Arduino's GPIOs. This could be a 5V or a 3.3V Arduino. There is also a pull-down resistor that connects the gate to ground. This resistor is used in the case that the transistor's source pin is "floating". This can happen, for example, if the Arduino is turn off, or the source pin is not connected to anything and therefore its voltage is undefined.
In summary, a MOSFET transistor is an excellent choice for controlling a relatively large load using 3.3V or 5V logic, such as Arduinos, and Raspberry Pis.
The Tech Explorations Subscription program
Subscribe and access all of our video courses immediately.
With a catalog of 25+ premium video courses (and growing), this subscription gives you an amazing resource to boost your learning.
Jump to another article
1. Pull-up & pull-down resistors
2. What is a bypass/decoupling capacitor?
3. What is the purpose of the diodes in a keypad circuit?
4. Logic level shifting
5. Why should you use a diode in a relay driver circuit?
6. Why use a voltage divider with a photoresistor?
7. Optoisolator: a simple way to electrically separate parts of a circuit
8. Use MOSFETs to drive large(ish) loads
New to the Arduino?
Arduino Step by Step Getting Started is our most popular course for beginners.
This course is packed with high-quality video, mini-projects, and everything you need to learn Arduino from the ground up. We'll help you get started and at every step with top-notch instruction and our super-helpful course discussion space.
Done with the basics? Looking for more advanced topics?
Arduino Step by Step Getting Serious is our comprehensive Arduino course for people ready to go to the next level.
Learn about Wi-Fi, BLE and radio, motors (servo, DC and stepper motors with various controllers), LCD, OLED and TFT screens with buttons and touch interfaces, control large loads like relays and lights, and much much MUCH more.