Controlling DC motor speed with Arduino is a classic and useful project for students, hobbyists, and engineers alike. This guide explains how to interface a DC motor with Arduino using a powerful MOSFET (75NF75). Whether you are working on science projects, final year projects, or industrial automation, this method offers efficient control.
Before diving into the wiring and code, here's a breakdown of all the components used in this project:
| Component | Function | Price / link |
|---|---|---|
| Arduino UNO | The brain of the project — it sends PWM signals to the MOSFET to control the motor's speed | Rs 1,200 |
| 75NF75 MOSFET | A high-power N-channel MOSFET used to switch and control the current flowing to the motor efficiently | Available on order — message us on WhatsApp |
| DC Gear Motor 12V | The load we'll control — you can use any brushed DC motor depending on your application | Rs 165 |
| Power Supply (12V DC Adapter or Battery) | Powers the DC motor — make sure your supply can handle the motor's current requirements | Rs 275 |
| Flyback Diode 1N4007 | Protects the MOSFET and Arduino from voltage spikes caused by the inductive motor load | Available on order — message us on WhatsApp |
| 1kΩ Resistor | Series gate resistor — limits the inrush current into the MOSFET gate and protects the Arduino pin | Available on order — message us on WhatsApp |
| 10kΩ Resistor | Gate-to-source pull-down resistor — keeps the MOSFET OFF when the Arduino pin is floating (for example, during reset or upload) | Available on order — message us on WhatsApp |
| Jumper Wires & Breadboard | For prototyping and making reliable temporary connections | Wires Rs 180, MB102 Rs 250 |


The wiring is simple and easy to understand:
| Connection | Where it goes |
|---|---|
| Arduino PWM pin D9 | 1kΩ resistor → MOSFET Gate |
| MOSFET Source | GND (negative terminal of the power source) |
| MOSFET Drain | One terminal of the DC motor |
| DC motor other terminal | +12V power supply |
| Flyback diode | In parallel with the motor terminals — cathode to +12V, anode to the Drain side |
| 10kΩ resistor | Between the MOSFET Gate and GND (pull-down) |
| Arduino GND | Common GND with the 12V power supply |
The motor supply and the Arduino must share a common GND — without it, the MOSFET gate has no reference voltage and the motor will not switch properly.





Here's a basic code to control the speed using the PWM signal:
int motorPin = 9; // PWM pin connected to MOSFET Gate
void setup() {
pinMode(motorPin, OUTPUT);
}
void loop() {
// Increase speed gradually
for (int speed = 0; speed <= 255; speed++) {
analogWrite(motorPin, speed);
delay(20);
}
// Decrease speed gradually
for (int speed = 255; speed >= 0; speed--) {
analogWrite(motorPin, speed);
delay(20);
}
}This code uses analogWrite() to generate PWM signals, effectively controlling the speed of the DC motor.
The Arduino doesn't directly drive the motor because it can't handle high current. Instead, it sends PWM signals to the MOSFET. The MOSFET works like a switch or valve — the wider the valve (duty cycle of PWM), the more current flows to the motor, thus controlling speed.
This method is highly efficient and keeps the Arduino safe from overload. The 75NF75 is perfect because of its high current and voltage capacity, making it ideal for final year projects, automation systems, and engineering projects.
For a complete robot that uses this same motor control, see our obstacle-avoidance robot car guide — it drives four DC gear motors with an L298N, the same pattern as this MOSFET circuit.
Never skip the diode. It absorbs harmful back EMF from the motor.
MOSFETs can get hot. If driving large motors, use a heat sink. The 75NF75 driven from the Arduino's 5V gate is only partly on, so it runs warmer than its datasheet rating suggests — for larger motors, use a heat sink or a logic-level MOSFET.
Avoid powering motors from the Arduino board; always use a separate power supply. And remember: the motor supply and the Arduino must share a common GND, or the MOSFET will not switch.
This project is perfect for:
If you're in Lahore and looking for engineering project help near Hall Road, visit QKZee Technologies for the best engineering service in Lahore.
Learning how to control a DC motor with Arduino using the 75NF75 MOSFET is an essential step in mastering embedded systems. It's simple, effective, and opens up tons of opportunities in automation and robotics.
This project is highly recommended by QKZee Technologies for students looking to learn real-world applications. It's budget-friendly, easy to assemble, and perfect for beginner to intermediate engineers.
For a motor driver that also gives you direction control (forward and reverse), see our L293D motor shield guide — a MOSFET controls speed in one direction; an H-bridge like the L293D adds reverse.
The Arduino UNO R3 DIP (Rs 1,200), DC gear motor 12V (Rs 165), 12V 2A adapter (Rs 275), MB102 breadboard (Rs 250) and jumper wires (Rs 180) are available at QKZEE Technologies, Shop 20, 1st Floor, Al-Khalil Center, Hall Road, Lahore, and online at qkzeetech.com with delivery all over Pakistan — see the links above. The 75NF75 MOSFET, 1N4007 diode, 1kΩ resistor and 10kΩ resistor are available on order — message us on WhatsApp and we will arrange them for you.
If the motor does not spin, or the MOSFET gets hot immediately, message us — tell us the voltage at the Gate (D9), whether the Arduino GND and the 12V supply GND are joined, and whether the flyback diode is fitted with its cathode to +12V, and we will help you find the fault.
Chat on WhatsApp Visit our YouTube Channel
Why does the motor not spin even though the code uploaded?
Check the common GND first — the Arduino GND and the 12V supply GND must be joined. Then check the Gate voltage: D9 should read 5V when the code sets speed to 255. If D9 is 0V, the code or the pin is wrong.
Why does the MOSFET get hot?
The 75NF75 driven from the Arduino's 5V gate is only partly on, so it dissipates more heat than its datasheet rating suggests. Fit a heat sink, and for larger motors use a logic-level MOSFET or a gate driver. Also check the flyback diode is fitted — without it, back-EMF spikes heat and damage the MOSFET.
Why does the motor spin at full speed and never slow down?
The MOSFET is probably stuck ON — check the 10kΩ pull-down resistor is between Gate and GND. If the Gate floats (no pull-down), the MOSFET can turn on by itself. Also check you used a PWM pin (D9) — D2–D4 and D7–D8 cannot do PWM.
Can I control the motor speed with a potentiometer?
Yes — read the potentiometer on A0 with analogRead, map the 0–1023 reading to 0–255 with the map() function, and analogWrite the result to D9. The wiring stays the same; only the code changes.
Can I reverse the motor with this circuit?
No — a single MOSFET switches the motor in one direction only. For forward and reverse you need an H-bridge (two MOSFETs per direction) or a motor driver like the L298N or L293D.
Can I use a 9V battery instead of a 12V adapter?
Yes for a small motor, but a 9V battery cannot supply much current — the motor will be weak and the battery will run down fast. A 12V adapter is better for anything bigger than a toy motor.
A 75NF75 MOSFET with an Arduino is one of the best first motor-control projects: one PWM pin, one gate resistor, one pull-down, one diode, and the motor obeys. Remember the three things that trip everyone up — the Arduino GND and the 12V supply GND must be joined, the flyback diode's cathode goes to +12V, and the 10kΩ pull-down keeps the Gate from floating. That is the whole project, and it works.