To reliably switch a DC motor with a MOSFET, you need a logic-level N-channel device (like the IRLZ44N) rated for at least 2.5 times the motor's continuous current to survive stall conditions, paired with a fast-recovery or Schottky flyback diode placed directly across the motor terminals. Standard MOSFETs (like the IRF520) will overheat and fail when driven by 3.3V or 5V microcontrollers because they never fully enter the saturation region. Below is the exact framework for matching your motor type to the right drive topology, sizing the silicon, and wiring it without releasing the magic smoke.
Matching Motor Types to MOSFET Drive Topologies
Not all motors are driven the same way. Selecting the right MOSFET topology depends entirely on the motor's internal winding structure and your load profile. A common mistake on the bench is treating stepper motors and servos as interchangeable; they are fundamentally different. Steppers are open-loop, multi-phase synchronous machines that require precise sequential coil energization, while hobby servos are closed-loop DC motors with an integrated gearbox and potentiometer feedback that only require a standard PWM signal wire.
| Motor Type | Torque Curve Profile | MOSFET Control Needs | Typical Cost (Driver) |
|---|---|---|---|
| Brushed DC | High starting torque, drops linearly with speed. | 1x N-channel MOSFET (low-side switch) for unidirectional; 4x for H-bridge (bidirectional). | $0.50 - $2.00 |
| BLDC (Brushless DC) | Flat torque curve across a wide speed range. | 6x MOSFETs in a 3-phase inverter bridge. Requires a dedicated gate driver IC and rotor position feedback (Hall sensors or sensorless back-EMF). | $5.00 - $15.00 |
| Stepper (Bipolar) | Maximum torque at zero speed (holding torque), drops sharply at high RPM. | 8x MOSFETs (two full H-bridges) or a dedicated chopper driver IC (like the TMC2209) that handles the microstepping PWM internally. | $3.00 - $10.00 |
Which motor fits your load? If your application requires high starting torque under heavy physical loads (like a winch or a conveyor belt), a brushed DC gearmotor or a stepper is ideal. If you need high RPM and high efficiency with a flat torque profile (like a drone propeller or a cooling fan), a BLDC is mandatory. For precision positioning without an encoder, use a stepper. For simple angular positioning with built-in feedback, use an RC-style servo (which only needs a 5V GPIO PWM pin, not a power MOSFET).
Sizing Your MOSFET: Rules of Thumb and Worked Examples
The most frequent cause of MOSFET failure in motor control is sizing the component based on the motor's continuous current draw while ignoring the stall current. When a motor jams, it becomes a dead short across your power supply, drawing maximum current until something melts.
Worked Load Example: 12V DC Gearmotor
Let's size a low-side switch for a 12V DC gearmotor driven by an ESP32 (3.3V logic) via a 5V gate driver optocoupler.
- Motor Continuous Current: 4A
- Motor Stall Current: 15A
- Gate Drive Voltage ($V_{GS}$): 5V
The Bad Choice: IRF520
The IRF520 is a standard-level MOSFET. Its datasheet shows an $R_{DS(on)}$ of 0.27Ω at 10V. At 5V, it barely turns on, acting as a resistor. At 4A, it will dissipate massive heat and likely catch fire.
The Good Choice: IRLZ44N (Logic-Level)
The "L" in IRLZ44N indicates logic-level. At $V_{GS} = 5V$, its $R_{DS(on)}$ is guaranteed at 25mΩ (0.025Ω). Its continuous $I_D$ is 47A (well over our 2.5x rule of 10A).
Thermal Math at Stall:
Power dissipation ($P$) = $I^2 \times R_{DS(on)}$
At a 15A stall: $P = 15^2 \times 0.025 = 5.625W$.
A bare TO-220 package has a junction-to-ambient thermal resistance of ~62°C/W. A 5.6W dissipation will cause a 348°C temperature rise, instantly destroying the silicon. Solution: You must either add a small extruded aluminum heatsink to the TO-220 tab, or implement software overcurrent protection that cuts the PWM if the stall persists for more than 200 milliseconds. For high-reliability high-current loads, bypass discrete MOSFETs entirely and use an integrated half-bridge module like the BTS7960 (rated for 43A continuous with built-in thermal shutdown).
Wiring, Terminals, and Failure Signatures
Proper MOSFET selection means nothing if the terminal wiring or flyback protection is flawed. For a standard N-channel low-side switch, the wiring is as follows:
- Gate (G): Connects to your microcontroller PWM pin (often via a 100Ω series resistor to dampen high-frequency ringing and a 10kΩ pull-down resistor to GND to keep the motor off during MCU boot).
- Drain (D): Connects to the negative terminal of the motor.
- Source (S): Connects to the system Ground (GND).
- Flyback Diode: A Schottky diode (like the 1N5819 for low power, or a 10A10 for high power) must be placed in parallel with the motor. The Cathode (striped end) connects to the motor's positive V+ supply, and the Anode connects to the Drain. This clamps the inductive voltage spike when the MOSFET turns off.
Diagnosing Failure Signatures
When your motor drive circuit misbehaves, the physical symptoms will tell you exactly what went wrong on the bench:
- Audible Hum or Buzzing: If the motor whines loudly, your PWM frequency is likely set below the human hearing threshold (e.g., 500Hz). Push your microcontroller's PWM timer to at least 20kHz. Alternatively, a buzz can indicate the gate voltage is too low, causing the MOSFET to rapidly oscillate in the linear region due to Miller capacitance feedback.
- Sudden Overheat (No Smoke): The MOSFET tab is too hot to touch, but the motor runs. This is the classic signature of using a standard MOSFET (IRF series) with a 3.3V or 5V logic signal. The device is operating in the ohmic/linear region, acting as a variable resistor rather than a closed switch. Measure $V_{GS}$ with a multimeter; if it's under the threshold voltage ($V_{GS(th)}$) listed in the datasheet, you need a logic-level part or a dedicated gate driver IC.
- Stall and Magic Smoke: The motor jams, and the MOSFET instantly splits open or vents smoke. This is almost always a missing, backward, or undersized flyback diode. When the MOSFET switches off, the motor's inductive field collapses, generating a voltage spike of hundreds of volts that exceeds the MOSFET's $V_{DSS}$ (Drain-Source breakdown voltage), causing avalanche failure.
MOSFET Motor Control FAQ
Can I use an IRF520 module for 5V Arduino motor control?
No. The IRF520 is a standard-level MOSFET that requires 10V on the gate to fully turn on and achieve its rated low $R_{DS(on)}$. At 5V, it barely conducts, resulting in massive voltage drops and severe overheating even at low currents (1-2A). Always use a logic-level MOSFET (identifiable by the "L" in the part number, like IRLZ44N, or explicitly stated as logic-level in the datasheet) when driving directly from a 5V or 3.3V microcontroller.
Why does my MOSFET get hot even when the motor is running lightly?
If the load is light but the MOSFET is hot, the gate is not being driven hard enough. Check your gate drive circuit. If you are driving the gate directly from an ESP32 (3.3V), many 5V logic-level MOSFETs still have a relatively high $R_{DS(on)}$ at 3.3V. Use a dedicated gate driver IC (like the TC4427) or a simple BJT level-shifter to push the gate voltage up to your main supply rail (e.g., 12V) to ensure the MOSFET is fully saturated.
Do I need a flyback diode if I am using PWM?
Yes, it is absolutely mandatory. PWM is actually harder on the circuit than simple on/off switching because you are repeatedly collapsing the motor's magnetic field hundreds or thousands of times per second. Every single "off" cycle generates an inductive kickback spike. Without a flyback diode (or a snubber network), these continuous spikes will rapidly degrade and eventually puncture the MOSFET's silicon die. Use a fast-recovery or Schottky diode rated for at least the motor's continuous current.
How do I control a BLDC motor with a single MOSFET?
You cannot. A Brushless DC (BLDC) motor has three distinct stator windings that must be energized in a specific rotating sequence to turn the rotor. This requires a 3-phase inverter bridge consisting of at least six MOSFETs (three half-bridges), driven by a specialized gate driver IC that manages the high-side and low-side switching dead-times to prevent shoot-through. For single-MOSFET control, you are strictly limited to brushed DC motors.






