How an H-Bridge Works: Four Switches, Two Directions

How an H-bridge reverses a DC motor with four switches, plus brake, coast, shoot-through and how to read a driver datasheet.

Reference
RE-4091
Published
Read
7 min

About the author · Editorial & verification standards

Instructor demonstrating a teach pendant to two trainees in hi-vis vests beside a fenced robot cell

An H-bridge is a circuit of four switches arranged in an H around a motor, and closing different diagonal pairs sends current through the motor in one direction or the other. That is how a microcontroller reverses a DC motor from a single supply, and how most motor driver chips and modules work inside.

Key takeaways

  • An H-bridge has four switches, two on the supply side (high side) and two on the ground side (low side), with the motor in the middle.
  • Closing the top-left and bottom-right switches drives the motor one way, and the top-right and bottom-left drives it the other way.
  • Closing both low-side switches (or both high-side) shorts the motor terminals, which brakes it, while opening all four lets it coast.
  • Closing the high and low switch on the same side at once makes a short circuit called shoot-through, and driver chips are built to prevent it.

Four Switches in a Square

An H-bridge is four switches, usually transistors, arranged so that the motor sits on the crossbar of the letter H. Call the switches A and B on the left and right high side (connected to the supply), and C and D on the left and right low side (connected to ground). The motor connects between the midpoint of the left pair and the midpoint of the right pair.

MOTOR DRIVER & H-BRIDGE POWER ISOLATION SCHEMATICMCU Logic (3.3/5V)PWM + DIR / IN1-IN2H-Bridge Driver ICQ1–Q4 MOSFETs + FlybackDC / Stepper ActuatorInductive Load + Back-EMFBuck Regulator 5VLogic Supply + Star GNDVMOT Power Bus (12-24V)Bulk Cap 470uF + FuseCurrent Sense / ThermalVref Limit + Shutdown
Figure: H-Bridge motor driver stage showing PWM/DIR control, bulk capacitance on VMOT, flyback diodes, and star ground.

A single transistor can only switch a load on and off. It cannot reverse it. The H arrangement lets either end of the motor connect to the supply or to ground, so voltage across the motor can have either polarity. Motor types, and why direction control differs for each, are compared in servo vs DC motor vs stepper.

Forward and Reverse

Forward and reverse are just the two diagonal switch pairs. Using the names above, with a high-side switch on the left (A), right (B) and a low-side switch on the left (C), right (D):

A (top left)B (top right)C (bottom left)D (bottom right)Motor result
OnOffOffOnCurrent flows left to right, motor turns one way
OffOnOnOffCurrent flows right to left, motor turns the other way
OffOffOffOffCoast, motor free-spins
OffOffOnOnBrake, both terminals tied to ground

Speed control comes from rapidly switching one of the conducting switches on and off (PWM), so the average voltage across the motor changes. The wiring and pin logic for a common module are shown in Arduino DC motor speed and direction control with L298N.

Braking and Coasting

Coasting means all four switches are off, so the motor is disconnected and slows only through friction. Braking means the two motor terminals are shorted together through the low-side (or high-side) switches. A spinning motor acts as a generator, and a shorted generator resists turning, so the motor stops faster. Many driver chips offer both, and the input truth table in the datasheet tells you which pin combination does which.

Brake action pushes current through the motor and the switches, so it is not free of stress. Keep sudden reversals and hard brakes within the driver’s current rating, and let the motor slow before a full reverse on larger motors.

Shoot-Through and Dead Time

Shoot-through is the fault where a high-side and a low-side switch on the same side of the bridge are both on, creating a short circuit directly across the supply. Real transistors do not turn off instantly, so if you flip a side from high to low with no pause, both can conduct briefly. Dead time is a short deliberate delay, where both switches on that side are off, before the opposite one turns on.

Ready-made driver chips and modules handle this internally, or accept direction inputs that cannot request both switches together. If you build a bridge from discrete parts, you must generate the dead time yourself, and that is a main reason to prefer a chip. Motor loads also create voltage spikes when switched, which is why the bridge has diodes, either separate or built into the MOSFETs, to carry current back to the supply.

Reading a Driver Datasheet

A driver datasheet tells you what the H-bridge can safely do, so read it before wiring. Look for these items:

  • Motor supply voltage range and logic voltage range.
  • Continuous and peak current per channel, and whether the figure needs a heatsink.
  • The truth table, which maps input pin states to forward, reverse, brake and coast.
  • Voltage drop or on-resistance, which shows how much supply is lost inside the chip.
  • PWM frequency limits and thermal shutdown behaviour.

Two common choices appear in the parts list: the older L298N motor driver, and the newer DRV8833 motor driver. Their differences in loss and size are in L298N vs TB6612FNG.

Common Wiring Errors

  • Not joining the microcontroller ground to the driver ground, so control signals have no reference.
  • Supplying the motor from the same thin wire or regulator as the logic.
  • Powering the module outside its supply range, or assuming a module’s onboard regulator can supply the board at any voltage.
  • Leaving enable pins floating, or mixing up input pins and enable pins.
  • Exceeding the current rating when the motor stalls.

Complete working circuits using a driver module are in the line follower robot with Arduino and the Bluetooth robot car with HC-05 and Arduino.

How to check this yourself

  1. Open your driver datasheet and find the input truth table. Write down which input combinations give forward, reverse, brake and coast.
  2. Power the driver with the motor disconnected and a multimeter on the output terminals.
  3. Set each input combination in turn from your board, and note the output voltage and polarity.
  4. Connect a small motor, repeat the sequence, and confirm that direction, brake and coast match the table.
  5. Compare the voltage at the motor terminals with the supply to see the driver’s loss at your current.

Common mistakes

  • Believing that brake and coast are the same thing.
  • Reversing a large motor at full speed without slowing it first.
  • Building a bridge from discrete parts without dead time.
  • Assuming a module’s rated current is available without a heatsink or good airflow.

Quick checklist

  • Identify the four switches and the diagonal pairs in your driver.
  • Read the truth table before connecting the motor.
  • Join logic ground and motor ground.
  • Stay within the current rating of the driver at stall.
  • Prefer a driver chip over a discrete bridge unless you need to learn how it works.

Frequently asked questions

Why is it called an H-bridge?

It is named after the shape of the circuit diagram. Two switches stand on each side like the vertical bars of the letter H, and the motor connects across the middle like the crossbar. The four switches let either motor terminal connect to the supply or ground.

What is the difference between brake and coast in an H-bridge?

In coast, all four switches are off and the motor spins down freely. In brake, the motor terminals are connected together through two same-side switches, so the motor’s own generated voltage opposes its motion and it stops faster. Check your driver’s truth table for the pin pattern.

Can I make an H-bridge with four transistors myself?

Yes, and it is a good learning exercise, but it is easy to damage parts. You need the right device type on each side, gate drive for the high-side switches, flyback protection and dead time to avoid shoot-through. For a working robot, a driver module is simpler and safer.

About the author and how this is kept accurate

Written, checked and maintained by Jignesh Panchal of Jaadu Digital. Figures in worked examples come from the stated assumptions, not from a bench test of our own. Read the editorial standard, follow the author on LinkedIn, or send a correction. Last reviewed: November 2026.

Pass it onWhatsAppLinkedIn

Keep reading

Continue learning

Free: the final-year project pack

A shortlist with BOMs, a report outline that matches the usual chapter scheme, a costing sheet and 40 viva questions. Built for the February–April submission season.

The Build Note

One short email when something is worth your bench time.

A new build sheet, a part price that moved, or a mistake worth avoiding. No daily drip, no recycled news.

One short email when a build or a price is worth your time. Unsubscribe in one click.