The Basic MOSFET H-Bridge
Here is a basic mosfet h-bridge. Q1 and Q2 are P-Channel mosfets, while Q3 and Q4 are N-Channel mosfets. (Other configurations are possible, but are out of the scope of this article.)

Figure 3.1: Basic Mosfet H-Bridge

Symbols
The circuit is the same as the simple h-bridge discussed on page 2, but with the switches replaced by Mosfets, which are like electronic switches.
You will notice that there are diodes placed across the mosfets. Usually mosfets have internal diodes, but it is a good idea to add external diodes, just to be safe. These diodes should be high speed schotky diodes, with an appropriate current rating. When motors rapidly change direction, the back EMF generated inside the motor can damage mosfets. These diodes are in place to absorb the back EMF, and to keep the mosfets safe. Do not ignore these diodes, as they are necessary to keep your H-Bridge from being destroyed.
When choosing mosfets, it is important that they will be able to handle the maximum current required by your motors. This is the stall current. If the mosfets you chose are insufficient, it can cause your motor driver to go up in smoke if your motors approach stall.
Choosing the correct mosfet can be tricky, especially when higher currents are involved. You need to take thermal and power limits into account. Chuck McManis does an excellent job of describing it on his website: http://www.mcmanis.com/chuck/robotics/projects/esc2/FET-power.html
One point that needs to be hammered across is that it is of the utmost importance that Q1 and Q3 (or Q2 and Q4) must NEVER be on at the same time. Not even for a split second. It will cause bad things to happen!!!
An Easier Way to Control It
So now that we have a basic h-bridge circuit, how do we use it?
It is possible to take all four input lines and control them from a micro controller, but for a variety of reasons this is not a good idea. If you are controlling each mosfet separately, you need to take care not to accidentally switch on the wrong combination of mosfets at the same time. Further, if your micro controller locks up for some reason or another, random signals may appear on the output pins, causing bad combinations of mosfets to activate which can lead to shoot-through.
I like to use the following simple circuit so that I don’t have to worry about accidentally turning on the wrong mosfets, as well for some other reasons to be discussed below.

Figure 3.2: Simple Interface Circuit
This circuit ties together the input of Q1 to that of Q3, and the input of Q2 to that of Q4. As a result, both Q1 and Q3 or Q2 and Q4 will never be on at the same time, since the N-Mos and P-Mos devices are active for opposite polarity signals (I.e. if ground is applied, the P-Mos will be active while the N-Mos will be off)
The addition of the 2 and gates allows for a PWM signal to control speed. It is set up such that the PWM signal will only be applied to the N-Channel (Q3 and Q4). The reason for this is because for similar N and P channel mosfets, the N channel mosfet will usually have a smaller gate capacitance, and will turn on and off quicker than the P channel mosfet. It is more efficient to leave one mosfet active, while toggling the other with a PWM signal.
To have the motor always on at full speed, set the PWM input to a steady 1. For the And gates, a high speed chip such as the 74F08 is desirable. If you are not concerned with speed control, you can get rid of the AND gates and tie the gate of Q1 to the gate of Q3 and the gate of Q2 to the gate of Q4 directly.
Turning either A or B high will cause the motor to rotate in one direction or the other. If they are both high or both low at the same time, then the motor will actively bake. If you do not need active braking in the circuit, you can connect wire B to wire A via an inverter, so that B will always be the opposite of A. You then only need to toggle A for direction control, and the PWM line for speed.
When changing the speed of the motor, it is good idea to ramp it, as sudden changes can cause a lot of back EMF and noise to be produced. Ramping means to slowly increase the speed, by slowly changing the duty cycle of the PWM signal. Slow is a relative term, and often a ramp time of half a second is more than enough for small motors. This will depend on your motors and robot, as you will need to consider the rotational inertia of the motor, and how much current will be drawn for rapid changes in motor speed.
When changing direction of a motor it is a good idea to turn the motor off for one, two, or ten, or more milliseconds before turning it on again in the other direction. This will allow time for the back EMF to dissipate in the circuit, and will prevent any associated problems.
- Introduction
- H-Bridge Basics
- The Ideal MOSFET H-Bridge
- MOSFET Imperfections
- Power Supplies, Noise and Cooling
- Design Considerations and Conclusion
#1 by Rodrigo at January 19th, 2009
You say LM293 and LM298. I think you mean L293 and L298. Regards.
#2 by Roko at January 19th, 2009
Good catch, thanks!
Updated..
#3 by Frank at April 6th, 2009
The mosfets I want to use have their heatsink connected to drain. Is it wise to connect them together on a heatsink ? I want to use irf9450 (P) and irf620 (N) but put them all on the same heatsink. Will this produce smoke or am I safe?
#4 by Roko at April 6th, 2009
Frank;
Since all the drains are connected to heat sink pad on the FETs, connecting them all directly to the same external heat sink would cause you to short out your left and right legs if the heat sink is electrically conductive.
There are available special heat sink insulators available for this purpose:
http://en.wikipedia.org/wiki/Mica_insulator
#5 by Romeu at April 10th, 2009
hey!
Thanks a lot for all this informations about H-bridge! I’m trying to make one but it’s not easy when we dont know a lot of things… Now i hope it will be a bit better:)
Good luck in your hobbies!
#6 by nhaan at April 14th, 2009
thanks for your informations.
Can i use a 12-220V transformer instead of a motor in full h-bridge to make a inverter? I use PWM method with a micro controller.
#7 by djallel at May 20th, 2009
hi guys,
i’m working in a project whitch contient an H-bridge for driving my DC motor with I load =10A.and i have my battery voltage =6V.
so in the first step i used 4 N channel mosfets to build my H bridge with PWM input toin crease mu current load to 10A.
the problem i didn’t find a good idea to wire my H bridge with the microcontroller (it’s power supply is 3V) .
i tried some H-bridge driver can be work in this project but i didn’t.
can some one help me.
thanx.
#8 by Roko at May 20th, 2009
Using 4 N channel Fets is a good idea, as it is cheaper and N channel fets tend to have a lower RDS On resistance, the challenge is that you need to switch the upper N-channel fets with a voltage higher than your bridge supply voltage.
I’ve used the MC33883 bridge driver from Freescale successfully. It requires a 5.5 volt supply, so you could power it directly for your battery, but the I/O will work with 3 volt inputs, so you should be able to wire up your micro directly to the bridge driver I/O and a common ground.
#9 by djallel at June 3rd, 2009
Hi;
Thank you very mush for your replay,
Regarding your suggestion,is a good idea but the problem that i haven’t Pins enought in my microcontroller there is just 2 Pins (one for hight mosfets and another for the down mosfets ).
I found some H-bridge driver like L99H01 with voltage supply of 6V and operate logic supply between 3 to 5.3.
But I have a doubt about voltage supply will decrease during use.
Thank you again.
#10 by vpunk at July 17th, 2009
Thanks for this very practical and informative guide! You’ve answered all the questions I had and some I hadn’t even considered. Keep up the good work!
#11 by Matt at July 20th, 2009
Hey, this is a damn good article. As an ee, I really appreciate the analysis. I have looked at some websites out there, riddled with foolishness like paralleled BJT’s
. I have spent a lot of time recently studying mosfets and h-bridges, so I know what I’m talking about when I say excellent Job!
I’ll be looking forward to upcoming posts.
#12 by aditya at July 28th, 2009
i’cant see the picture! i only see a black line… please send the picture to my e-mail. i need their picture to help me to understand how H-bridge work!thx..
#13 by Hugh at August 2nd, 2009
Very nicely written article. It is informative and understandable! Thank you so much
#14 by sam at August 5th, 2009
Thank you for this great article. I’m building my first H-bridge now
#15 by Jose at October 12th, 2009
I’m think you might be confused names of the operating areas. The triode/linear region for a fet is where you WANT to be for switching this area is similar to a BJT’s saturation reagion (this is where i think the confusion started). Now the fets saturation region is typically used for amplification NOT SWITCHING this is similar to the BJT’s active region.
#16 by Roko at October 14th, 2009
Thanks for the note! It’s been a while since I wrote this, so I’ll check it over and correct that when I get a chance.
#17 by ashish at November 5th, 2009
heyy all,
im making a solar boat.. the solar panel can deliver a max 12 v. can u help me to make a motor driver circuit which can drive a 12 v , 5A motor ..plz give me the details
#18 by ashish at November 5th, 2009
itz realy urgent and important for me…plz send me the circuit layout on a pcb….my email id is ashishr_singh@yahoo.co.in
#19 by Omer Malik at November 7th, 2009
can some one tell that waht are the chances of burnout in L298/293. I have heard that they are quite often burnt and dont prove to be reliable
#20 by Omer Malik at November 9th, 2009
……. i am using pitman motor.
#21 by Roko at November 9th, 2009
Omer, the chances of burning out an L298/L293 depends a lot on your motor an application. Smaller motors that they are designed for will run well, and won’t burn them out. However, larger motors that draw a lot of current are what often causes problem. To reliably use them, you will need to ensure that your motor’s stall current is lower than the maximum rated current for the chip, and that you are properly cooling the chip with a large heat sink.
#22 by Guy at November 13th, 2009
Hi,
I was just reading through this design and was curious as to whether this design requires that motor supply voltage be at the same voltage as the output of the micro ? Otherwise if say the motor supply was 12 V and the micro outputs 5 V, wouldn’t there still be a negative potential across the p-channel Vgs? hence not turning it off when we want it to. Or perhaps I am misunderstanding something?
Cheers
#23 by Roko at November 14th, 2009
Hi Guy,
You are correct that by itself a 5 volt MCU would have trouble switching a 12v bridge. To get around this, a mosfet driver should be used to translate the low current 5v signal to a higher current signal capable of sourcing 12v to the fets.
I briefly mention this on page 4, but when I get a chance I’ll elaborate upon this in the article. Thanks for the note!
#24 by Guy at November 15th, 2009
Thanks man,
Its just a small area of confusion.
#25 by Guy at November 15th, 2009
So should I some how amplify the signals from the micro to the Mosfets to match that of the load?
Would that work?
#26 by XTL at November 16th, 2009
“Turning either A or B high will cause the motor to rotate in one direction or the other. If they are both high or both low at the same time, then the motor will actively bake.”
#27 by Martin Kynde at December 2nd, 2009
Hallo
I am studying electronics. The interface circuit would not work! Q1 and Q4 has to work together, and Q2 and Q3, else the motor would not turn in any direction. Just swap Q1 with Q2 on figure 3.2, then it would work
#28 by Roko at December 2nd, 2009
Hi Martin,
I believe you’re confusing the operation of P and N channel FETs. As the paragraph below figure 3.2 states, the P and N channel fets are activated by opposite polarities.
Thus, the interface circuit is correctly set up to provide a high signal to Q4, and a low signal to Q1 to switch them both on, while ensuring that the others are off.
#29 by Martin Kynde at December 13th, 2009
Hallo Roko
I think you have right. Sorry for the confusing
#30 by John Essen at January 12th, 2010
A clearly written article on this subject, it answered all my questions.
Thanks Roko
#31 by genotio at January 19th, 2010
Note that you can put 2 or more mosfets in paralell. Rdson will be smaller, but driver will be more loaded.
#32 by arash at January 24th, 2010
hello
my friend
please help me
please send pdf or shematic file circuit driver dc motor 24 v for automatic door(left or right fasrt speed and low speed by pwm and countering rpm by shaft encoder ) by mosfet and L99H01 chip or masfet and ir 2102 chip
thank you
please send now
i am a waiting
#33 by tuan anh at March 16th, 2010
Hi, thanks much for your good explanation of H-bridge. I just want u to explain more about operation of the 4 high-speed Schotky diodes. As u said, we use them to prevent back EMF (electro-magnetic field – right?), in other words, to prevent back current flow. Could u make it clear about how the back current flows inside the circuit?