DIY MOSFET Motor Controller




Introduction: 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

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

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

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

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

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

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.

Soldering Challenge

Runner Up in the
Soldering Challenge



    • Creative Misuse Contest

      Creative Misuse Contest
    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest

    30 Discussions

    how much current can it handle and volts?

    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

    3 replies

    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.

    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...

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

    please answer, its important to me Thank you!

    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


    2 years ago

    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?

    1 reply

    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.

    Hey, nice work.

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

    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!??

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

    1 reply

    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!

    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

    3 replies

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

    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?

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

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

    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.


    1 reply

    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.