H-Bridges – the Basics

Download PDF


You can learn how to build h-bridges from many on- and off-line resources. After all these circuits are not terribly complicated. Some of those resources are good, some are not so much. However when I’ve started working with them, I’ve realized that many of my experiences were not documented and some of the things I’ve learned seemed to be missing from those descriptions. So I decided to write down what I’ve learned and try to organize that description into an easy to understand yet comprehensive structure.

This work started off as a three-part series I’ve written, while developing the µModule H-bridge. While the current material is based on those articles, it corrects many errors and is expanded and updated greatly.

My intention is to cover more ground than most articles I’ve seen on the subject. While I don’t expect the you, dear reader, to be familiar with h-bridges or motors controllers in general, I do build upon basic electrical circuit understanding. So if you don’t know what a resistor, an inductor or a capacitor is, if you don’t understand at least the basics of time- and frequency-domain circuit analysis, you’re not reading the right article. You probably won’t be able to follow the discussion. But if you’re interested in motor control background information, if you want to understand the reasons behind design decisions, if you want to gain deeper knowledge not just in the h-bridges, but in what goes on before and after them, you have found your place.

My plan is to eventually expand these articles to cover not just h-bridges but control circuits and electromechanical systems as well.

The Basics

In general an H-bridge is a rather simple circuit, containing four switching element, with the load at the center, in an H-like configuration:


The switching elements (Q1..Q4) are usually bi-polar or FET transistors, in some high-voltage applications IGBTs. Integrated solutions also exist but whether the switching elements are integrated with their control circuits or not is not relevant for the most part for this discussion. The diodes (D1..D4) are called catch diodes and are usually of a Schottky type.

The top-end of the bridge is connected to a power supply (battery for example) and the bottom-end is grounded.

In general all four switching elements can be turned on and off independently, though there are some obvious restrictions.

Though the load can in theory be anything you want, by far the most pervasive application if H-bridges is with a brushed DC or bipolar stepper motor (steppers need two H-bridges per motor) load. In the following I will concentrate on applications as a brushed DC motor driver.

Static Operation

The basic operating mode of an H-bridge is fairly simple: if Q1 and Q4 are turned on, the left lead of the motor will be connected to the power supply, while the right lead is connected to ground. Current starts flowing through the motor which energizes the motor in (let’s say) the forward direction and the motor shaft starts spinning.


If Q2 and Q3 are turned on, the reverse will happen, the motor gets energized in the reverse direction, and the shaft will start spinning backwards.


In a bridge, you should never ever close both Q1 and Q2 (or Q3 and Q4) at the same time. If you did that, you just have created a really low-resistance path between power and GND, effectively short-circuiting your power supply. This condition is called ‘shoot-through’ and is an almost guaranteed way to quickly destroy your bridge, or something else in your circuit.


Because of this restriction from the four possible states the side-A switches could be in only three make sense:

Q1 Q2
open open
close open
open close

Similarly for side-B:

Q3 Q4
open open
close open
open close

Altogether this allows for 9 different states for the full bridge to be in:

Q1 Q2 Q3 Q4
close open open open
close open open close
close open close open
open close open open
open close open close
open close close open
open open open open
open open open close
open open close open

We will get into much more detail in a minute, but before we do, let’s spend a few minutes understanding the basics of our load, the DC motor.

Motor model

While modeling DC motors is a complicated topic, one that you can read on extensively here, for this article, let’s just start with a very simple model! This model will not be useable for control applications, where you try to electrically compensate for the effects of mechanical components. The main assumption in the model introduced here is that the mechanical time-constants in your system are much higher than the electrical ones, in other words we can consider the shaft speed to be constant for our analysis. That’s true in almost all cases, but you’ll need to read other articles to understand why. For now, you’ll have to take my word for it.

A DC motor is an energy conversion device: it takes electrical energy and turns it into mechanical energy. When operated as a generator, it does the opposite: converts mechanical energy into electrical.

In this very simple motor model, the mechanical parameters are completely ignored. On the electrical side, the motor basically contains a number of inductors, that move in a magnetic field. The inductors themselves of course have an inductance, and some internal resistance. Their movement in the field will generate a voltage – called generator voltage and denoted by Vg – across the inductors. From this description, the following model can be drawn:


In fact in many cases, the internal resistance of the inductors can be disregarded, and an even simpler model, an ideal inductor in series with a voltage source can be used:


In both cases, all the elements are in series, so the share the same current, but the voltage across them of course is different.

The generator voltage (Vg) depends only on the speed by which the inductors move in the field, in other words on the rotational speed of the motor.

The force (or torque in a rotational system, like a DC motor) these electromagnets – inductors – exert is proportional to the current flowing through them.

Drive modes

Previously we’ve only considered static operation, when nothing was changing. If less than full-speed operation is intended the switches are controlled in a PWM fashion. A PWM signal has two phases, the ‘on-time’ and the ‘off-time’ as I’m calling them in the diagram below:


It is a periodic signal, with a constant frequency. The information content – that is used to change the operating parameters of the bridge – is the ratio between the on-time and the off-time. The various drive modes differ in how the switches are set during the on-time and the off-time.

If we want the motor to do anything interesting, we will have to connect it to the power supply in at least one of the phases. Let’s say it is the ‘on-time’. We have two choices: either we turn on Q1 and Q4 or we turn on Q2 and Q3.

But what about the off-time? We have nine states to chose from. These are:

Q1 Q2 Q3 Q4
close open open open
close open open close
close open close open
open close open open
open close open close
open close close open
open open open open
open open open close
open open close open

If you look back at our motor model, you’ll see that it’s basically an inductive load. Inductors have the property that you can’t change the current flowing through them instantaneously. So, whenever the bridge changes state with the motor current being non-zero, the new state has to make sure that the current can continue to flow in some way. The catch diodes are usually not used for this purpose, because (as you will see later) they would heat up too much. There are of course exceptions, but those are just that: exceptions.

Now, during the on-time the motor inductor is connected between the power supply and GND. Consequently the current will start rising through the inductor. It is very unlikely that by the time the on-time is over, and we’re ready to switch the bridge into its off-time state, the current would be 0. So its best to choose a state for the off-time where we can provide a path for the inductor-current to flow. In order to do that, we’ll have to close one switch each on both sides of the motor, and that prunes out our possible off-time states quite a bit:

Q1 Q2 Q3 Q4
close open open close
close open close open
open close open close
open close close open

If we combine those four choices with the two possible on-time states, we get eight possible configurations. In two of them however both the on-time and the off-time states are the same, and those are not terribly interesting: the bridge operates in a static way. That leaves us with six meaningful mappings, that I’ll summarize below:

Mapping 1 Q1 Q2 Q3 Q4
on-time state close open open close
off-time state close open close open


Mapping 2 Q1 Q2 Q3 Q4
on-time state close open open close
off-time state open close open close


Mapping 3 Q1 Q2 Q3 Q4
on-time state close open open close
off-time state open close close open


Mapping 4 Q1 Q2 Q3 Q4
on-time state open close close open
off-time state close open open close


Mapping 5 Q1 Q2 Q3 Q4
on-time state open close close open
off-time state close open close open


Mapping 6 Q1 Q2 Q3 Q4
on-time state open close close open
off-time state open close open close

You can find some interesting symmetries in the tables.

For example mapping 3 and 4 change both sides. However if we swap side-A and side-B in mapping 3, we get mapping 4, and vice versa. We call these mappings the ‘lock anti-phase drive’.

The other four mappings (1, 2, 5 and 6) only change the state of one side of the bridge. Mapping 1 and 5 are however mirrors of each other the same way as 3 and 4 were: by swapping side-A and side-B we can transform one into the other. The same holds true for mapping 2 and 6. We call this type of operation the ‘phase-magnitude drive’.

In future parts of the article, I’ll talk in detail about both drive modes.

This simple categorization of drive modes works for most cases but not for all. There are some more esoteric drive modes that can be beneficial under certain rear circumstances.

Catch diodes

If you look through the mappings above, you’ll see that both in the on-time and in the off-time one switching element is on on each side of the bridge. We did that in order to provide a continuous path for the motor current to flow. But if that’s true, what’s the purpose of these diodes? Can we leave them out? The answer is resounding no, and the reason is the following: it is impossible in any real circuit to turn on or off the high- and low-side switches at exactly the same time. They are either a bit early or a bit late. In one case, both the high- and low-side switch would be on for a short while, in the other both would be off momentarily.

If both are on, you created a shoot-through condition that is very very bad. We want to avoid short-circuiting the supply – even momentarily – by any means. So all practical bridge designs are biased in the other way, making sure that the two switches are never on at the same time, but as a consequence they will be both off for a short while during switching.

Now, when both switches are off on one side, the motor current has nowhere to flow. That’s bad in a different way: the motor voltage will jump as high as it needs to create a path for the current to flow. That voltage jump will probably kill one of the switches and the current path is created through the damaged switch. That’s not a nice way for the bridge to go, so some protection is necessary. The role of the catch-diodes is to provide a path for the current during these short switching periods without the motor voltage needing to rise too high. In some implementations, the intrinsic diodes of the MOSFET switches are used as catch diodes, in others, for example when BJTs are used as switching elements, the diodes must be provided externally.

The other thing to discuss is why not to use the diodes to conduct the off-time current? The main question that determines the answer is heat dissipation. Which one runs cooler: the diode or the switch?

In most bridge setups, the current changes relatively little during the on- and off-time compared to the average current flowing though the motor, so for the following discussion I will pretend the current is constant.

The difference between a diode and the switch (independent of switch technology) is that while your switching elements (when they’re closed) have a relatively constant and low resistance, a conducting diode has a relatively constant voltage drop on it. This means that the power dissipated on the switch is proportional to the square of the current:

Pswitch = Vswitch * I = Rswitch * I2

while the power on the diode scales linearly:

Pdiode = Vf * I (where Vf is the forward voltage drop of the diode)

From this you see that as long as the current is lower than Vf/Rswitch, you’re better off using the switches to conduct the off-time current. For most diodes Vf is in the range of 0.2 to 1V, while Rswitch is normally way lower than 1Ω, usually lower than 100mΩ. It’s also much easier to lower Rswitch than Vf if you get into trouble with heat dissipation, not to mention that Vf usually goes somewhat higher with the current. You can find MOSFETs with an on-resistance of lower than 10mΩ without too much trouble. Even integrated H-bridges contain FETs with an on-resistance of less than 25mΩ these days. If we take that bridge for example, it’s internal diode has a 0.8V forward voltage drop and a 23mΩ on-resistance (these are typical values). With those numbers you’ll see that the cross-over point is at 35A, which is over the rated 30A current limit for that part. This is typical except for extremely high-current applications: you operate the bridge under the cross-over point, where it’s more beneficial to use the switches to conduct the off-time current.


In this article we went through the basic construction of an H-bridge and created a catalog of the useful operating modes. We’ve identified two main categories: phase-magnitude drive and lock-anti-phase drive. In future parts of the series I’ll look in detail at both of those drive modes.

We’ve also briefly discussed the role of the catch diodes, why they are essential and why they’re not used to conduct more current than absolutely necessary.

If you feel the discussion here was fairly high level and maybe elementary, don’t worry, there’s plenty of detail to come.

27 thoughts on “H-Bridges – the Basics

  1. Nice summary!! Thanks:) I’m studying for a mechatronics exam and it was great to have such a lovely and well written discussion… Thanks again!

  2. Very well written material. Thank you!

    Just one thing: I think you wanted to write “close” (= turn on) in this sentence:
    “In a bridge, you should never ever open both Q1 and Q2 (or Q3 and Q4) at the same time.”

  3. Hello!
    Thanks for your great articles!

    I have one question and probably you can help me :)

    I’m designing servo motor contoroller. Motor rated 6V and 3A max when stall. I used H-bridge in simpliest mode, where high-side fet on one side is opened and low-side fet on other side is controled by pwm signal. Also i’m measuring bemf to determine motor speed. This is done by closing all fets and measuring voltage on motor after transient process finishes. It all worked well, but then i decided that measuring current would be really nice for some features. Controller is really small so using current sensing resistor would be not great. I know that motor current I=(U-E)/R where U is applied voltage and E is bemf. R is constant motor rotor resistance. So i decided that I can measure current by calculation. I know E and R is constant, so the question was in determining applied U. At first i thought thats it is simple task and U can be calclated as supply voltage multiplied by pwm factor(0 to 1). But experiment gave me some strange result:
    Blue line represents lineary changing pwm signal from 0% to 100%. Green line represents motor speed measured by encoder (bemf calculation gave same result). I also made a check with constant voltage suply(different voltages, no pwm) and that gave me absolutely linear result, as expected.

    So in my case i can say that aplying 3V constant or 6V 50% pwm gives absolutely different behavour of the motor.
    My guess is that motor may be in discontinious mode. PWM frequency is high – 20khz, but motor is coreless so L is probably really low. I don’t have L-meter unfoutunatly to measure exact L value.

    I also tryed what you call Sign-Magnitude Drive, but current consumption greatly increased.

    Can you suggest anithing? Is there any way to calclulate current or should i use current sensing resistor?

    Thank you!
    And sorry for my english :)

    • Alex,

      You ask a few questions, some of which needs a little more thinking, but let me see what I can answer for you right away…

      When you do back-EMF sensing by periodically shutting down the PWM, you are collapsing the motor current. So at that low frequency you are operating the motor in discontinuous current mode. Closing all four FETs to do that is not a very good idea, leave one of them open. That way the collapsing current (you call it transient) has a well defined path to go through. What you do is essentially operate the motor at a very low frequency asynchronous sign-magnitude drive mode. On top of that, you apply a much higher PWM frequency during the on-time, which can be though of as a reduction of Vbat: when you change your PWM frequency, you are adjusting Vbat for this low-speed switching, that operates at a fixed duty-cycle.

      Now, as far as current sensing, you can’t (reliably) use the generator voltage to estimate the current. The problem is that R isn’t really constant: this is the resistance of the (copper) wires inside the motor, and that is very temperature dependent. As you put load on the motor, the wires will get hot and you won’t know anything about their resistance.

      Your last (and main) question is about the non-linear relationship between the motor speed and the PWM duty cycle. I’ll have to think a little harder about it, but here’s my initial reaction: if you read The article about sign-magnitude drive more specifically, the chapter called ‘Reality Check’, you’ll see that I made the simplifying assumption that the motor current is more or less constant. However you drive the motor in async. sign-magnitude mode, and – if you have no load on the motor – you are likely operating that as well in discontinuous current mode. In that case, the equations get more complex and that can easily be the reason for the non-linear relationship that you see. When you replace the fast PWM with a constant voltage source, you force the current to be continuous at least when you don’t measure the back-EMF voltage.

      Finally, if your current consumption changes significantly when you change to sign-magnitude drive, than there must be something wrong with the circuit. My first guess would be shoot-through.

      Hope this helps,

  4. In the drive modes section:

    You have written, If we want the motor to do anything interesting, we will have to connect it to the power supply in at least one of the phases. Let’s say it is the ‘on-time’. We have two choices: either we turn on Q1 and Q4 or we turn on A2 and Q3.

    It should have been Q2 rather than A2. This is nothing but would be nice to correct !!

    I have to say this is such a brilliant article as even a layman can understand.

    Kudos to your effort in educating others !!


  5. hi i have problem i used 4 IRL 520N fett to build h bridge but the problem is that the motor got weary slow i used an 9.6V battery what can the problem be.

    • You gave me very little information to go on.

      If the motor doesn’t spin fast through the bridge but it does if you connect it directly to the battery, and you have the right PWM driving signal (full scale on one direction or the other) driving the bridge, then there must be some highly resistive component in the path. This could happen if at least one of the FETs don’t close fully – which could happen especially on the high-side if your drive circuitry can’t provide a high-enough Vgs – in your case around +15V. Another possibility is that you create shoot-through in the bridge, effectively shunting your motor out.

      Hope this helps somewhat,
      Andras Tantos

  6. This provides a good systematic overview, but I believe there is a serious error in your analysis. The actual transistor portion of a FET can only conduct current in one direction – from drain to source (electrons from source to drain – which is why those terminals are so named).

    Any current flow from source to drain in the module, whether the transistor portion is on or off, is through the diode, and so will have the diode’s voltage drop and the resulting I*V dissipation. In different PWM switching schemes, during the “off” time, this may happen in either one or two modules, but it will always happen in at least one.

    I have just spent some time reviewing various sources for any indication that there can be reverse current flow through the transistor itself (with its low on-resistance), and I can find none.

    • Actually, FETs (when turned on) can conduct current in both directions with the same low channel resistance. MOSFETs have an intrinsic diode between their drain and source that results in them conducting current in the reverse direction even when they’re off. The physical principle behind MOSFET operation is channel inversion which only depends on the electrical field under the gate and not on the direction of the current flow in the channel. In some texts the source is defined as the terminal which the lower (for n-channel) terminal, and by that definition of course current flows from drain to source. Notice how this definition has nothing to do with construction. Any actual device can conduct in both directions, only this definition swaps the naming of the pins depending on the current.

  7. Hello,

    Great write up, thank you very much!

    I have a question about the effect of the catch-diodes. I understand their function in giving the motor current a path to flow during the switching period. I want to understand the current path during that period. It flows to the power rails and through the battery right? If so I have 2 concerns. 1. If I have a LiPo battery, I think it would be sensitive to voltage spikes and/or have protection circuitry that wouldn’t allow this current to flow(putting us back where we started). 2. During this time, the voltage on the rails is possibly higher than it would normally be right? So anything connected to those rails has to be tolerant of higher voltages right?

    Thank you for what you’ve written so far and thanks for any additional info you can provide.

  8. i am working on a hybrid stepper motor in simulimk and i have to control the speed of the motor in closed loop ,i have made a h bridge for it can you kindly help me related how i can connect this h bridge with stepper motor in simulink

  9. its well said :)

    I have some question hope u will help out

    Iam in middle of my project and i am in need of a h bridge drive of high current rating,tried some circuits some produce single direction drive some burns my FET can you suggest me A FET with high current rating. my motor is 12v dc with 10 AMP max current. and while using FET it require some Biasing right ?? how i can do that.

    Thanks in advance

  10. Hello,

    Great article! But i still have a doubt: How can i guarantee that the both high an low end switches will be off instead of on during the transient state?. I was thinking in putting a NOT gate on the low end switch(Q2) and the original signal directly on the Q1, this will be okay when i switch Q1 from high to low, but when i switch Q1 from low to high they will be momentarily ON at the same time. How to avoid this kind of situation? Or the change in a NOT gate is so quick that we can disconsider it?

    Sorry about my english, hope that the question is well formed.

    Thanks in advance

  11. Can I have the same PWM signal connected to Q1 and Q4 (while Q2 and Q3 are off) at the same time? Lets say 15kHz. I know sending the PWM to Q1 while Q4 is on all the time is a better way to do it but I just want to know if the first way is OK.
    Thanks for all the info!
    By the way I’m planning to use a IRL3803 at 12V and 1/2 HP motor.

    • Not at all. If you did that, then, during the off period, none of the FETs would be on, while the motor winding would still have current going through it. That current will produce a voltage on the motor terminal high enough to find a path. That in turn most likely will be a destructive path through one (or more) of the FETs. In short: don’t do it.

      Andras Tantos

    • I have plans to write up a few more articles on the subject of higher level control. Finding the time to do so proves harder and harder though, so I can’t put a timeline on it.

  12. I am working with an inverted pendulum project. And I am using a mbed development board for control the behaviour. A H-bridge circuit made of TIP3055 and TIP2955 is used for the motor drive since the motor needs somewhat higher ampere rate. But in this design I think that I will have to use another driver circuit (like L298 motor driver IC ) since above transistors needs higher base currents and as they are in terms of amperes. So I just want to design that intermediate circuit by my own self without using L298 H-bridge driver IC directly. So is there any way to know what type of transistors should I use for that? I can easily find the schematic of L298 by referring its’ datasheet but I have no idea about what are transformer types used in it… plz help.. Thank you!

    • It seems the (large-signal) current-gain (hfe) of these transistors is somewhere between 20 and 100 depending on the load current and process variation. The maximum output current is 10A. You didn’t say what your output current is, but even with those, the base-current should be no higher then 500mA. How to generate that? You can create a Darlington pair out of each transistor, for example by using a second TIP3055/2955. Or, it seems you can use the L298 as the drive-stage: it has 4 push-pull outputs, each capable of 2A of (DC) peak current and a combined power dissipation of the four channels of 4A. You have to put in the proper current-limiting resistors on the output, but it should work.


Leave a Reply

Your email address will not be published. Required fields are marked *