Home Arduino Projects Arduino MOSFET Project

Arduino MOSFET Project

by Nikodem Bartnik

If you’ve been working with the Arduino, you probably know how often it is required to use a motor with it, especially in robotic projects. In one of our previous tutorial, we learned how to control small motors with a transistor, but what if you want to control a much bigger one? The answer for your need is a MOSFET. According to Wikipedia, a MOSFET is:

A type of field-effect transistor (FET). It has an insulated gate, whose voltage determines the conductivity of the device. This ability to change conductivity with the amount of applied voltage can be used for amplifying or switching electronic signals.

In other words, a MOSFET is just a type of transistor that has a Gate instead of a Base (as compared to the bipolar transistor) and this Gate is isolated so it is much safer to use with the Arduino. There is more behind the MOSFET which we won’t cover in this session. We are going to use the IRF44N MOSFET, a really cheap and popular field effect transistor.

Arduino Mosfet

Here is the list of parts we will need for this project:

You can use any other transistor, just check out its pinout and datasheet to make sure that it can be used with the rating needed for this project.

If you have all of the components that we need, you can connect them together using the schematic below.

To power this circuit, we need an external power supply of 12V but a 9V should be ok as well. You can connect it to Arduino with the DC jack.

It is very useful to use cables with crocodile clips to connect jumpers to the motor, they will hold safely and help you avoid soldering.

We can use the analogWrite function to control the motor speed with a PWN signal.

If you use a relay to control your motor, you would not be able to control it with the PWM signal. Relays responses will be too slow for such applications.

The code will increase the motor speed, will slow it down and do that over and over again. Here is the code:

As you can hear, when it is not moving it makes odd sounds. That’s because of the current that flows through the motor coils.

And here we go! Don’t hesitate to drop a comment below in case you need further information about this project.

Feel free the check other projects here.

You might also like:

Related Posts

3 comments

Mark Anderson March 28, 2018 - 11:42 pm

Fritzing pictorials ARE NOT schematics! A pet peeve on the maker community is that misunderstanding.

Too many of my electrical engineering students see articles like this, which are otherwise helpful, but leave thinking they know what a real schematic looks like. The pictorial may me ok for a novice with a simple circuit but it fails with larger more complete ones.

Btw you did not label the fet pins. Gate to pwm, source to griund, drain to motor (load).

Andreea March 29, 2018 - 12:13 pm

We thought schematic might be too complex for beginners. So we decided to use Fritzing pictorials which turn out to work like a charm. I am still looking for a name that could describe it better than “schematics”
Thanks Mark!

Mark Anderson March 30, 2018 - 2:22 am

No problem. The term though is ‘pictorial’ for what Fritzing produces…

Leave a Comment