An H-bridge is a circuit of four solid-state switches (usually MOSFETs or BJTs) arranged in an "H" shape that allows you to reverse the voltage polarity across a load, enabling bidirectional control of DC motors. What it changes in a real circuit: It transforms a fixed-polarity, unidirectional DC power supply into a reversible, four-quadrant drive capable of forward, reverse, braking, and coasting. What people commonly confuse it with: Beginners often confuse an H-bridge with a half-bridge (which only switches one side of the load, typically used for stepper motors or multi-phase AC) or a motor shield (which is a complete plug-and-play PCB containing an H-bridge IC, logic level shifters, and screw terminals).

Think of it like a double-pole, double-throw (DPDT) relay wired as a polarity-reversing switch, but executed silently with solid-state silicon at 20 kHz PWM frequencies. By closing the top-left and bottom-right switches, current flows one way; by closing the top-right and bottom-left, current flows the opposite way.

The Core Mechanics: Polarity Reversal and Shoot-Through

To understand the topology, label the four switches Q1 (top-left), Q2 (top-right), Q3 (bottom-left), and Q4 (bottom-right). The load (your motor) sits in the middle crossbar of the "H".

  • Forward: Q1 and Q4 close. Current flows from VCC through Q1, across the motor, and down through Q4 to GND.
  • Reverse: Q2 and Q3 close. Current flows from VCC through Q2, across the motor in the opposite direction, and down through Q3 to GND.
  • Brake: Q1 and Q3 close (or Q2 and Q4). The motor terminals are shorted together, causing the back-EMF to rapidly dissipate the kinetic energy as heat in the windings, stopping the motor fast.
  • Coast: All four switches open. The motor spins down naturally due to friction.
Warning: The Shoot-Through Hazard

If Q1 and Q3 close at the exact same time, you create a dead short from VCC directly to GND, bypassing the motor entirely. This is called "shoot-through" and will instantly vaporize your silicon or trip your power supply's overcurrent protection. Modern H-bridge ICs include hardware "dead-time" insertion—a microsecond-scale delay that ensures one switch fully opens before the opposite switch closes.

Worked Numeric Example: Sizing for a 12V Linear Actuator

Let's size an H-bridge for a 12V nominal DC linear actuator with a measured stall current of 2.5A. We will evaluate a modern MOSFET-based driver like the TI DRV8871.

Target Load: 12V DC Actuator | Stall Current ($I_{stall}$): 2.5A | Bridge $R_{DS(on)}$: 0.30Ω (High-side + Low-side combined)

When the actuator binds and hits stall current, the H-bridge must survive the thermal load. The internal resistance of the MOSFETs ($R_{DS(on)}$) acts as a series resistor.

  1. Voltage Drop: $V_{drop} = I \times R = 2.5A \times 0.30\Omega = 0.75V$. The motor actually sees 11.25V at stall.
  2. Power Dissipation: $P = I^2 \times R = (2.5)^2 \times 0.30 = 6.25 \times 0.30 = 1.875W$. The IC must dissipate nearly 2 watts of heat.
  3. Thermal Rise: The DRV8871 in an HTSSOP package with an exposed thermal pad on a standard 2-layer PCB has a junction-to-ambient thermal resistance ($\theta_{JA}$) of roughly 40°C/W.
  4. Junction Temperature: $\Delta T = 1.875W \times 40°C/W = 75°C$. Add a 25°C room ambient, and the silicon junction sits at 100°C.

While 100°C is below the typical 150°C absolute maximum rating, it is dangerously hot for an enclosed 3D-printed robotics chassis. The bench fix: Pour a solid copper ground plane directly under the IC's thermal pad and use multiple thermal vias to pull heat to the bottom layer, dropping the effective $\theta_{JA}$ to ~25°C/W and keeping the junction at a safer 72°C.

Where You Meet This in Practice

You will rarely build an H-bridge from discrete transistors unless you are pushing hundreds of amps. In 95% of maker and commercial applications, you will use an integrated H-bridge driver IC. Here is where they show up on the bench:

  • Differential Drive Robots: Two independent H-bridges driving left and right wheels (like a Roomba) to execute tank turns.
  • Linear Actuators and Winches: Extending and retracting 12V/24V hydraulic or screw-driven actuators for automated hatches or camera sliders.
  • Peltier (TEC) Temperature Controllers: Reversing polarity across a Thermoelectric Cooler switches it from heating to cooling mode without moving parts.
  • Active Braking in Servos: Shorting the motor windings to hold a robotic arm joint rigidly in place against gravity.

Decision Tree: Selecting Your H-Bridge Driver IC

Do not default to the ancient L298N module you found in a starter kit; its bipolar junction transistor (BJT) design drops 2V to 3V across the bridge, wasting massive amounts of power as heat. Use this decision matrix to pick a modern MOSFET-based driver.

If Your Load Is... And Your Logic Is... Then Pick This IC / Module Why It Wins
< 1.2A continuous, dual motor 3.3V or 5V MCU TB6612FNG (Toshiba) Extremely low quiescent current, 0.5Ω $R_{DS(on)}$, fits on a breadboard.
1A to 3.6A continuous, single motor 3.3V or 5V MCU (PWM + DIR) DRV8871 (Texas Instruments) Simple 2-pin control interface, built-in current limiting, robust HTSSOP package.
5A to 30A heavy actuators/winches 5V MCU (needs logic level shifting) BTS7960 / IBT-2 Module (Infineon) Massive current handling, half-bridge architecture combined to form a full bridge, requires heavy gauge wire.
> 40A (E-bikes, large traction) Isolated Gate Driver required Discrete MOSFETs + IR2110 / IR2184 ICs cannot handle this; you need custom busbars, discrete N-ch MOSFETs, and isolated bootstrapping.
Default Pick for 90% of Hobbyist Builds: If you are building a standard 12V robotics project or automated actuator drawing under 3A, buy the TI DRV8871. It eliminates the need for complex charge-pump wiring, handles 3.3V logic from an ESP32 natively, and costs around $2.50 in single quantities.

Critical Protection: Dead-Time and Flyback Routing

When you turn off an inductive load like a DC motor, the collapsing magnetic field generates a massive reverse voltage spike (back-EMF). If this spike exceeds the breakdown voltage of your MOSFETs, the IC will fail catastrophically—often shorting VCC to the motor pin and frying your microcontroller.

Internal Body Diodes vs. External Schottky:
Every MOSFET has an intrinsic "body diode" that naturally routes this flyback energy back to the VCC rail. For small motors (under 2A) and low PWM frequencies (under 5 kHz), the body diodes in a modern IC like the DRV8871 are sufficient. However, if you are driving a highly inductive load (like a large 24V winch motor) at 20 kHz PWM, the reverse recovery time of the silicon body diodes is too slow. You must solder external Schottky diodes (like the SS34) across the motor terminals or from the motor pins to VCC/GND to clamp the spike before it rings.

Decoupling Capacitors:
Always place a bulk electrolytic capacitor (e.g., 100µF to 470µF, rated for 1.5x your max voltage) directly across the VCC and GND pins of the H-bridge. This acts as a local energy reservoir. When the motor demands a sudden spike of stall current, the capacitor supplies it locally, preventing the voltage rail from sagging and browning out your ESP32 or Arduino.

Frequently Asked Questions

Can I use an H-bridge to control the speed of a motor?

Not directly with DC voltage. An H-bridge only controls direction and state (forward, reverse, brake, coast). To control speed, your microcontroller must feed a Pulse Width Modulation (PWM) signal into the enable or input pins of the H-bridge, rapidly switching the full voltage on and off. The motor's mechanical inertia smooths this into an effective lower average speed.

Why does my H-bridge get hot even when the motor is lightly loaded?

If your H-bridge is hot but the motor is barely working, check your PWM frequency. Switching MOSFETs incurs "switching losses" every time they transition between fully on and fully off. If you are running a 50 kHz PWM signal on an older driver IC, the switching losses will dwarf the conduction losses. Drop your PWM frequency to 1 kHz - 5 kHz for standard brushed DC motors to minimize IC heating.

Do I need a heatsink on my H-bridge IC?

Rarely on modern SMD parts. Instead of a physical aluminum heatsink, modern ICs use an exposed thermal pad on the bottom of the chip. You manage heat by designing a solid copper pour on your PCB directly under the IC and stitching it to inner ground layers with thermal vias. If you are using a breakout board like the BTS7960 IBT-2 module, bolt a small finned heatsink to the top of the metal tab using thermal paste.