High Power MOSFET Motor Driver

It comes as no surprise that heavier robots and vehicles require bigger motors. Bigger motors generally require more voltage and current. In the case of my latest project, I needed enough power to propel not only the heavy duty chassis but my weight as well.

This H-Bridge is designed to handle the 12+ amps that my segway project will require. Since it uses through-hole components and single-sided copper clad, it takes up more real estate than most drivers with SMD components.

The motors I chose for this are 280 watt, 24 Volt electric scooter motors. In free-running mode (No load applied to the shaft), these motors draw around 1.5 Amps. During normal operation, they are rated to draw in the neighborhood of 10-12 amps. This far exceeds the rated current of my favorite motor controller, the L298. The compact L298 dual motor driver is only rated to 2 amps, which is surprising based on the size of the heat sink.

Bigger motors require bigger motor drivers. The compact L298 is the perfect driver for smaller applications pulling less than 2 Amps. Anything more than that, you will want a FET-driven motor driver.

There are some good high current motor drivers available from sources like Trossen Robotics or Pololu. However, these usually cost upwards of $45 and I was needing to keep the cost of this project down to a minimum. In addition, another goal of this project was to build as many of the modules from scratch wherever possible.

As for the design of the motor driver, I took inspiration from jip’sYet another FET-based H-bridge. In fact, this circuit is essentially the same with exception of the added diodes. I had all but given up on making my own motor driver until I happened upon this design.

The circuit is a classic H-bridge and requires 2 P-Channel MOSFETS and 2 N-Channel MOSFETS per motor. The “H” configuration allows the motors to be driven forward and backwards.

This board layout is designed to be etched using the toner transfer method. The traces are wide and they all can be etched on a single-sided copper clad board. There are about 5 jumper wires required.

The great thing about this circuit is it eliminates the risk of shoot-through by requiring one input to be LOW while the opposing input is HIGH. This design also allows the P-channel FETs to be fully on since the PWM signal is applied to transistors outside the N-Channel gates. Also known as low-side switching.

The Eagle schematic and board files are available for download at the bottom of this post.

The P-Channel FETs

P-Channel FETs are triggered by pulling the gate down to ground. The 10K pull-up resistor ensures the gate is in the off state when not being triggered.

The gates of the P-Channel FETs are connected to the collector of an NPN transistor. The base of the transistor is then connected to the “B” microcontroller output pin. When the NPN transistor is triggered, current is allowed to travel to ground through microcontroller pin “A” when it is in the LOW state.

This voltage drop pulls the P-channel gate low which in turn triggers it. This is only allowed to happen when “B” is HIGH and “A” is LOW.

The N-Channel FETs

N-Channel FETs are triggered by pulling the gate up to certain voltage. The gate is controlled by the actions of a pair of transistors. Essentially, the transistor closest to the gate of the FET is normally ON. This acts as a voltage divider, robbing the FET gate of all of it’s voltage. When this transistor is turned off, the full voltage is applied to the FET gate, opening it fully. This transistor is controlled by another transistor that is normally OFF and connected to the “B” microcontroller output pin. When this transistor is turned on, it robs the current going to the base of the transistor closest to the MOSFET gate, turning it OFF.

And finally, there is a transistor that acts as a final switch for the whole circuit. The base of this transistor is connected to the ENABLE output of the microcontroller. It is through this output that the PWM signal is applied.

Flyback Diodes

Flyback diodes (also known as snubber diodes) provide an outlet for “backed up” voltage from an inductive load like a motor. One great thing about FETS is they already come equipped with their own flyback diodes. However, it’s not a bad idea to add your own to ensure the voltage is released as fast as possible. Schottky diodes are great choices for this appllication since they are generally fast switching and can be triggered at lower currents.

PWM (Pulse Width Modulation)

Motor speed is controlled by applying a PWM signal to a transistor on the low-side of the h-bridge. This transistor essentially forms an “AND-Gate” with the transistors controlling the N-Channel FET’s gate. Only when these transistors are on together will the load be allowed to travel through the H-bridge. This low-side switching allows the P-Channel FET’s to stay engaged eliminating the issue with switching speed often found with these.

For more on controlling the motor driver, see the next part in this series. Also, feel free to ask any questions in the forums or comments below.

40 thoughts on “High Power MOSFET Motor Driver”

I haven’t tested at exactly 31kHz, but I’d say it should be just fine. I run mine at 15.625 kHz and it does great. See controlling the MOSFET motor driver for my timer settings using an Atmega328P.

When I first began programming it, I had my timer set incorrectly and was running it at 62kHz and it was working but I was getting some erratic behavior. I couldn’t determine if it was the frequency or other bugs in my program.

I’d say 31 kHz should be a good frequency to use though. Let me know how it works for you.

I have just fried this h-bridge with frequency of 31 kHz. The motor was spinning very very little with no torque at all, then something began to stink. Perhaps those resistors are of too high value, so then the gates of FETs are charged and discharged too slow and we have dynamic shoot-through at this frequency. When I touched the FETs I burned myself xD they were hot as frying pan.

Sorry to hear about that! Do the FET’s heat up immediately? Have you tried setting the enable pins to a constant 5V or 100% duty cycle? If they don’t heat up when constantly on then it may be related to frequency. Which FETS get hot? The P-Channels shouldn’t be impacted by the PWM since only the N-Channels turn off and on. Also, how does it perform without direction changes?

Unfortunately I don’t know if they heated up immediately because I was on my computer, sending signals to Arduino to change between duty cycles (from 130 to 240), because at first I though that motor didn’t spin due to usual problems with such high frequency (using Arduino Motor Shield R3 and 31 kHz frequency motor starts to move at as high as 120/255, so I though the case here is similar), but then it stopped to move at all, something started to stink and when I touched the N-FET it was very hot (P-FET was warm if I remember correctly), so I immediately disconnected the power. Later, after writing comment here, I realized that I put a fuse into the circuit (250V, 1.25A) and it prevented FETs (I hope, haven’t tested them since) from burning out. I tried setting the enable pins to full duty cycle before testing other duty cycles and it was working alright. I only tested PWM with direction changes because I was going to use this h-bridge for a bell swinging, so I used modified program that swings a motor to test this h-bridge. I did test free spin in one and other direction, but without using PWM. I was hoping I could do something to this design to allow higher frequencies, like changing those resistors that charge FET gates with lower value (maybe 330 ohm?).

It’s definitely worth testing lower resistors. If you had success using a full duty cycle then it may be related to frequency. I have only tested using 15.6khz and my FET’s don’t even get warm. Another thing you might want to test is adding a delay when changing directions to allow time for the FET’s to discharge.

I haven’t used an IR2112 before but from what I can tell it is a MOSFET gate driver, so it is essentially turning the MOSFET on and off. You should be able to drive as much current through your MOSFETs as they are rated for. I couldn’t read the labels on your circuit very well but it looks like you are using BUZ11 FETs which can more than handle the 9-11 Amps you need. Here is a link to a circuit similar to yours. Notice how the IR2112 is connected to the gates of the FETs. Hope this helps!

Thank you for your reply sir. yes buz11 FET are well rated but ir2112 limits the current to 1A. the circuit in the link also limits the current. i have the exact motors as shown in this article, i will try simulating your circuit today.
now because i have a 12 v battery and 24 v motors, i am not sure what to do. replace battery or motor or none.

The motors will work with a 12V battery. You may need to use a larger capacity battery like 12ah or better. I have 2 12V 7ah batteries that I plan on wiring in parallel in order to increase the current.

As for the cost of this project, I would estimate to be below $25 USD for all of the parts. The highest cost items are the MOSFETS and their heat sinks. The Sabertooth 2 X 25 looks to be a very nice motor controller with a “regenerative” battery charging feature. But the cost is around $125 USD before shipping. If you are needing something simple and inexpensive than you may want to build your own. But if you need a motor driver that is proven and has lots of features, I would choose something like the Sabertooth.

There are quite a few MOSFETS from International Rectifier that will work for your current needs. This page does a good job of listing them out along with voltage and amperage ratings. A couple of ideas off the top of my head are: IRF640’s for the P-Channel and IRF540’s for the N-Channel. If you need logic-level MOSFETS, look for part numbers beginning with “IRL”. Good Luck!

i am making a project on automated wheel chair controlled by the arduino controller. is this circuit compatible for a weight of 65kg,, if not are there’s better options available awaiting a prompt reply…

i am making a project on automated wheel chair controlled by the arduino controller. is this circuit compatible for a weight of 65kg,, if not are there’s better options available.Awaiting a prompt reply…

It really depends on how much current your motors will be drawing…especially if they are stalled. There are many FETS out there that can handle the current from a wheelchair motor. Here is a link to another project that uses a FET h-bridge in an electric mower. I imagine the weight will be similar for this project

I haven’t had a chance to complete my project yet and have only bench tested the motor driver. I also have 250W motors and they run just fine using a forwards, backwards routine and stalling out. However, I haven’t been able to test it out using real-world situations like hills, curbs, etc. Hopefully I can find some time to work on it next month!

No, I was definitely checking for that and they remained cool. Not even warm. Of course, I haven’t tried it with fast switching forwards and backwards. I made sure to build in a small delay before changing directions in my testing.

I would hesitate to use it at 48V since many of the components are not rated for that (ie transistors, capacitors, resistors. In addition, the traces of the copper clad may not be thick enough to handle that kind of current. The concept should be the same at 12, 24, 48v but you would want to beef it up with better components and very thick/wide copper traces.

Hi!
I was very busy and couldn’t do much on my project since my last post, but I’m planning on using this design soon (lower resistor values were relatively successful in testing, the FET’s only got warm and didn’t burn up anymore). What I’m interested in now is
1. which diodes do you recommend? They probably need to be fast enough for high frequency PWM, but I cant find a schottky diode that could withstand such high current (maybe its me being a noob)
2. I wish to add some kind of protection between my Arduino and the driver. Do you have any suggestions?
Thanks!

Glad the lower resistance worked out! I’ve had to take a break from my projects here recently too. Ready to get going again though. As for Schottky diodes, I have had good luck with 1N5817’s. They can handle up to 25A for short periods. I used 1N5822’s in a power supply. They can handle 80A for short bursts. They are bigger than the 5817’s so I’m not sure how they will fit in the schematic. You could probably use them in the upright position just fine.

As for protection, it may be overdoing it but you could add another set of npn transistors with the base connected to the Arduino and the emitter connected to base resistor of the motor driver inputs…You could use higher base resistor values on those new transistors. Seems good in theory but I’d definitely breadboard that first!

Bear in mind that when you’re talking about “NPN” or “PNP” you’re referring to transistors while “N-Channel” and “P-Channel” refer to mosfets.

While they may perform similar functions, (power) mosfets are usually better ( specially with voltages of 12V and above ) than transistors because their power dissipation is minuscule in comparison.

I have a few IRFZ44N ( very cheap and i recommend them ). For the high side, I often use IRF9z34n but they don’t perform as nice as their N counterparts.

You might as well get away with a 4 N channel mosfet H bridge, which is likely to perform better than a 2N + 2P one because N channel mosfets are usually better at switching than the P mosfets. You will either need a mosfet driver or use a higher voltage for switching the high side mosfets.

Hi, I’ve seen packages like that in the Eagle library. I’ll have to give that a try when I’m able to. I believe the heat sink is connected to the source pin on the N-channels so it seems like it shouldn’t be too difficult. At least that’s how it seems initially, anyway! I’m also limited on the board size since I’m using the free version of Eagle.

Hi Erik Kringen
Thanked very wonderful work on this
i am making a Graduation project on automated wheel chair .I use four DC motors in the chair
Each Motor 24 V , 4 A and 80 W
also i used arduino for control
Is this a good circuit for this work . for speed and Direction control
Please can u help me

hello, I am a beginner in both arduino and pcb building. I almost have this board done. This looks like an awesome design. Thank you for the info. I am building an arduino controlled Segway for my electronics project this semester. Do you have the wiring diagram up on this site for the imu and arduino? I would like to see it if you wouldn’t mind. I have the 6dof cheaper digital imu. which one are you using? Are your test programs set up for the digital or analog imu? Again thank you for this project I am having a lot of fun building it. I etched the pcb with peroxide, table salt, and vinegar. Just used a paint pen to draw the traces. I did draw them a bit thicker where high power is transferred and made sure that I bought 3oz/ft board. It took a whole day to etch but it turned out great.