Electrical
H-Bridge
Four-switch circuit for bidirectional DC motor control
An H-bridge uses four switches arranged in an H pattern to drive a DC motor in both directions and brake. Top-left and bottom-right closed: forward. Top-right and bottom-left closed: reverse. Same-side switches closed: brake or coast. Both top or both bottom closed simultaneously: shoot-through, a short circuit destroying the FETs. Combined with PWM, an H-bridge enables variable-speed bidirectional control of motors and inductive loads.
- TopologyFour switches in H pattern
- ForwardTop-left and bottom-right closed
- ReverseTop-right and bottom-left closed
- BrakeBoth bottom (or both top) closed
- Shoot-throughSame-leg both closed — short circuit
- SwitchesMOSFETs, BJTs, or IGBTs
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Why H-bridges matter
- Bidirectional motors. Forward and reverse from a single supply.
- Variable speed. PWM control without lossy resistors.
- Robotics. Drive wheels, joints, grippers.
- Automotive. Window motors, seat actuators, fan drives.
- Solenoids. Bi-stable solenoids, latching relays.
- Stepper motor halves. Two H-bridges per stepper.
- Class-D audio. Output stage of full-bridge amplifiers.
Common misconceptions
- Dead time optional. Skipping it causes shoot-through.
- Flyback unnecessary. Inductive kick destroys switches without it.
- Brake is free. Dissipates energy as motor and FET heat.
- PWM frequency arbitrary. Too low audible whine; too high switching losses.
- One ground. High-side switches need bootstrap or isolated drivers.
- Same as relay. Solid-state H-bridge has no contacts but needs heat sinking.
Frequently asked questions
What's an H-bridge?
A circuit with four electronic switches arranged so a load (typically a motor) sits between two half-bridges. By closing diagonal pairs, current flows through the motor in either direction. Closing same-side bottom or top switches shorts the motor windings, providing dynamic braking. The H shape gives the topology its name.
How does it control direction?
Two diagonal switch pairs drive the motor in opposite directions. Closing top-left and bottom-right sends current through the motor one way (say, forward). Closing top-right and bottom-left reverses current and rotation. Both bottom closed shorts the motor terminals through ground, dissipating kinetic energy as heat — a brake.
What is shoot-through and why is it dangerous?
When both switches on the same leg (both top, or both bottom) are simultaneously closed, current flows directly from supply to ground with only switch resistance limiting it. Hundreds of amperes can flow in microseconds, destroying MOSFETs and possibly the supply. Gate drivers add dead time (a brief gap) to prevent it during switching transitions.
How is variable speed achieved?
Pulse width modulation. Rapidly switch one diagonal pair on and off at fixed frequency (typically 10 to 30 kHz). Average voltage applied to the motor is supply voltage times duty cycle. Motor inductance smooths the current. Higher duty cycle means more average voltage and more speed. PWM allows efficient speed control without dropping voltage across linear regulators.
What are flyback diodes for?
Motor windings store inductive energy. When a switch opens, this energy must go somewhere or it spikes voltage to destructive levels. Flyback (freewheeling) diodes across each switch route the inductive current safely back to the supply or ground. MOSFETs include intrinsic body diodes; better designs add fast Schottky diodes for lower loss.
How is current measured?
Sense resistor in the bottom-leg ground return, voltage measured across it. Or Hall-effect current sensor on the supply line. Or measuring drain-source voltage of the bottom MOSFET. Current sensing enables overcurrent protection, torque control, and stall detection. Closed-loop torque control feeds measured current back to a PI loop.
What chips integrate H-bridges?
Many. L298 (classic dual H-bridge for low-power hobby motors). DRV8833, DRV8871, DRV8842 (Texas Instruments integrated drivers). VNH3SP30. Larger automotive packages handle tens of amps. Discrete designs with separate gate drivers and MOSFETs handle hundreds of amps for industrial drives. Choose based on current, voltage, and protection needs.