N-Channel MOSFET PWM Motor Speed Control
A 12 V DC motor switched on the low side by a power N-channel MOSFET, driven by a 490 Hz square wave at 50 % duty, with a flyback diode, gate resistor and…
Learn how a MOSFET switch works, with circuits you can try
Learn how diodes work, with circuits you can try
Want to build your own circuit? Start a new circuit in the circuit simulator
Teaching with circuits?
Create a classroom, give your students a circuit to build, and review what they submit. Try it free with one classroom and up to 5 students.
Try the free classroom demoHow it works
The classic low-side motor driver: the motor sits between the battery's + and the MOSFET's drain, the source goes to ground, and a diode across the motor (cathode to +) carries the motor's current each time the MOSFET turns off. A 490 Hz square wave drives the gate through 220 Ω, and 10 kΩ from gate to source keeps the MOSFET off when nothing drives it. The MOSFET uses the Power preset (IRF540N-like, 44 mΩ when on); the default Small signal part has about 1.3 Ω and would leave the motor standing.
At 50 % duty the motor gets about half the battery and settles near 680 rpm against its 25 % load. Change the duty by changing the source, or set the motor's Load to 0 % and watch it speed up. With NGSpice on, the lab runs ten PWM periods from rest, so the motor only starts to turn there (about 57 rpm at the end).
Built after the Carnegie Mellon IDeATe exercise on unipolar drivers (an IRF540 MOSFET switching a motor with a flyback diode) and Electronics Tutorials' MOSFET as a switch (power MOSFET motor control with PWM).
What's inside
- 1× Battery
- 1× Power Source
- 2× Resistor (220 Ω, 10 kΩ)
- 1× Diode
- 1× Transistor
- 1× DC Motor