Introduction: DIY MOSFET Motor Controller

Picture of DIY MOSFET Motor Controller

This is a simple to build motor controller. It is handy for many projects using a motor controlled by a micro-controller. It can be used as an Electronic Speed Controller (ESC) and has forward and reverse control. It can be used in robotics, remote control projects, portable vehicles and most things motorized. It also uses very little parts. All of this is made into a tiny package to fit in your DIY projects.

This circuit is based off of a Driving Bigger Loads circuit in one of my books. That circuit only used one MOSFET and a diode. It is meant for a micro-controller to control a motors speed. To be able to go in reverse I just added a DPDT relay and another MOSFET, diode pair to control the polarity switch. I hope you enjoy this instructable.

Step 1: Tools and Materials

Picture of Tools and Materials

This Motor driver is very simple. Because of it's simplicity it uses very little parts.


  • Perfboard - use any perfboard that you have or like
  • Thin Wire - I used a 24 gauge solid core wire
  • 2x Power MOSFETS - I used the IRF510 but any equivalent such as the NTE2382 will do
  • DPDT 30v Relay - the one in the pincture above is incorrect
  • 2x Rectifier Diodes
  • Pin Strip - use a kind that you can snap off little increments from


  • Soldering Iron + Solder
  • Hot Glue Gun + Hot Glue
  • Wire strippers/cutters - make sure they can be used as pliers
  • DREMEL - use any tool you like for cutting the perfboard

Step 2: Assemble the Pieces

Picture of Assemble the Pieces

Place all of the components onto the perfboard. Place them so that you can easily solder the circuit to the schematics diagram shown above and still fit neatly onto the board. For the pin strip just snap off a 2 pin increment and a 4 pin increment (You do not have to do the 2 pin increment if you wish to solder the motor directly to the circuit). Cut the 2 pin increment shorter on both sides and using you wire strippers bend the long end of your 4 pin increment at a 90 degree angle. If your wire strippers do not have this function just use an extra set of pliers.

Step 3: Solder the Components

Picture of Solder the Components

After placing all of the components onto the perfboard. Solder the circuit to the schematics diagram shown above. You can use any soldering iron and solder that you prefer. Use the part leads to connect two close leads and jumper wires to connect far ones. For the jumper wires use your wire strippers to cut and strip the ends of a small piece of wire. Use them to solder two distant leads together. For the perfboard I found the ones with copper work best for this compact circuit soldering but bare perfboard is cheaper. Also in this step you can also solder the motor strait to the board or use the 2 pin increment as I did. My finished circuit is shown above.

Step 4: Cut Out the Circuit

Picture of Cut Out the Circuit

For you to use this in small systems such and controllers or robotics the next thing to do is to cut out the circuit. I cut to the size of the circuit I made but you can cut it to any size that you want or for different functions. Just make sure that you keep the circuit functional. Cut the perfboard from the bottom so that you can cut below the control and power pins. Use the DREMEL or any small saw to cut it out. I found the DREMEL to be the easiest tool to cut the perfboard but use any means you please for doing the job. In the end make sure that the control and power pins are able to be pluged into a breadboard or other circuit.

Step 5: Tidy It Up

Picture of Tidy It Up

Now just add the finishing touches and tidy it up. Shorten the remaining wires that stick out. Use the wire strippers to cut off the protruding wires. You can also use the pliers end of the wire strippers to bend the wire back and forth until it breaks off the end. Make sure not to break any solder joints using this method. After that plug in the hot glue gun. To make sure this circuit does not short circuit use the hot glue gun in a zigzag pattern to cover the circuit. The finished product should look like the image above. This should then keep the circuit from short circuiting and to further insulate and protect the circuit.

Step 6: Use It

Picture of Use It

Now it is time to use your new motor controller. If you have designed and built it like I have than this should be easier and you can just follow the layout above. If you have placed your pieces differently or soldered the circuit together differently than just look at the schematics layout above. Either way make sure you look at the schematics diagram above.

Setup With a Micro-controller:

  • Plug or connect your motor to the motor pins on your motor controller.
  • Insert the motor controller into a breadboard.
  • Using two colored wires connect the Vin to your micro-controllers Vin pin And the GND to the GND pin.
  • Using two more colored wires connect the speed and reverse to two digital pins of your choice.
  • Now just program away.


  • Make sure that you do not exceed 30 volts at Vin.
  • Do not mix up the pins.
  • If you decide to go over 15 volts connect the Vin and GND directly to the source and connect the Ground to the Micro-controllers GND.
  • When working with more power try attaching a heat sink to the MOSFETs.
  • Only use DC two wire motors.

Thank you for reading my instructable.


Abhi909 (author)2016-01-31

great project

can i place your project on my website.

i'm working on a website which is related to electrical projects.

i also mention your name.

plz reply

zeropt (author)Abhi9092016-02-26

Sorry I couldn't reply sooner. Yes you can put this on your website but please do not post my name. Thank you and your web page sounds like a great project.

NorbertoB3 (author)zeropt2017-05-31

i am looking forward to taking this design and coding my own rc vehicle one day, i will be looking in my tacle box for some mosfets and that box thingy, i have a few of those from salvaged hardware...

AndyM6 (author)zeropt2016-04-10

hey zerop. Great, great instructable, but could you tell me what relay you are using?

please answer, its important to me Thank you!

jstone33065 (author)2016-09-28

can you set up the forward and reverse on this circuit with 2 momentary buttons to activate the forward and reverse with a simple press and release of the momentary..i need a constant back and forth motion triggered by momentary buttons if possible

ArkyaC (author)2016-05-17

What is the safe current limit for this circuit? Will it be able to work with a stepper motor that draws a max current of 2 amps?

supernoodle2014 (author)ArkyaC2016-07-24

I am not curtain but I believe that 2-3 amps would be the max for this without a heat sink on the MOSFETs.

Also stepper motors require a different kind of driver then this.

anuj1993 (author)2016-02-29

Hey, nice work.

I was wondering if you could help me with a motor controller for 36V -30amps PMDC motor of around 600W rating

Shaye M (author)2015-11-21

Awesome compact design, could anyone help me modify a few of the components to fit a m42sp-6p Mitsumi stepper motor? Anything simple and cheap, but not so cheap as to hinder the motors potential output. I have found a few other projects in instructables, but none that fit my needs. This one uses a blank board and then the different components which makes quite a bit of sense to me comparatively to the other projects I found. Thanks in advance!??

rpetrič (author)2015-08-19

is this only for dc or you can also control ac brushmotor?

Atomic3xplosion (author)rpetrič2015-10-14

this is only DC

DylanD581 (author)2015-08-29

Very nice Instructable, well documented. Would you able to give me a link as to where you bought the relays? Congratulations to your award in the Soldering Contest; we were both runner ups!

3eprabu (author)2015-08-12

Guys need some help here . Im using a irf830 power mosfet to control a dc light , but for some reason i can't control the mosfet via the gate . The light turns on automatically without even supplying signal to the gate . I connected the source terminal to the negative of the battery , one side of the light is connected to the battery and the other is connected to the drain of the mosfet . I tried the same connection using a transistor and it worked fine . totally confused . need some help PLZ

zeropt (author)3eprabu2015-08-12

I had some trouble at first also. Try connecting the Source to ground and the drain to the negative lead on your motor.

3eprabu (author)zeropt2015-08-13

Yes i tried , the motor starts automatically when the negative terminal of the motor is connected to the drain and the positive terminal is connected to the power supply . i cant controll the gate . any suggestion?

rpetrič (author)3eprabu2015-08-19

try putinng resistor on gate to determine working point of mosfet :)

Lolman4000 (author)2015-08-18

This is exactly the thing I need!! thanks! I'll see about making it...

mannmade (author)2015-08-08

Good job. The fun is just begun.

david_r_baker (author)2015-08-07

I like the compact, modular build you have put together.

I have built similar circuits in the past. Q2 should connect straight to ground, not via Q1. At low motor speeds, the relay is likely to drop out when it should be energized. It wont be an issue at higher speeds.


zeropt (author)david_r_baker2015-08-08

Yeah I noticed that Q2 had to be connected to ground after I did the whole project. It still ended up working for my project with 12 volts.

rybitski (author)david_r_baker2015-08-08

I completely agree about the ground for Q2. Awesome project!

Clutch2bone (author)2015-08-07

Looks nice, I was looking for this type of thing for a robot I am working on right now.

You can also use H-bridges like L239D or make one :)

the motors on this bot are simple small DC units so it's not going to work with H-bridges. These are on a tank style chassis and are integrated into the unit so I cannot modify it either. Still love this controller :)

nqtronix (author)Clutch2bone2015-08-08

But exactly for thoses motors h-briges are used. You might have stepper motors in mind, but they do require a dual h-brige a least.

Konstantin Dimitrov (author)2015-08-07

THIS IS INTERESTING !!! Finally something simple to make and to use in my robots :)

cuyler1 (author)2015-08-07

in your bill of materials you forgot to list micro controller. what type? program?

I dont think that this controller need micro controller, cause it works like H-bridge(it is not H-bridge)

jgh59 (author)2015-08-07

Very simple design - I like it. You list two diodes in the materials list but I only see one in the schematic and one in the photos - am I missing something? I can think of many uses for this, thanks so very much.

tisaconundrum (author)2015-08-07

I'd like to see this working with a motor. Post a video?

About This Instructable




More by zeropt:Processing Maze Game using ArraysDIY MOSFET Motor ControllerRechargeable Handheld Capacitor Flashlight
Add instructable to: