An H-bridge is an integrated circuit used in robotics and many other applications to apply an adjustable amount of power to a load, typically a DC motor. It is a rather simple circuit comprised of transistors set up in an H-like configuration with the load at the center, hence the name H-bridge. Each transistor is paired with a flyback diode that prevents damage to the transistor during reverse biasing. The number of transistors and diodes in an H-bridge depends on the type of motor it is controlling, either single-phase or three-phase. Although simple, the H-bridge plays a crucial role in motor control as it allows us to drive a motor bidirectionally.
The H-bridge for single-phase motors uses four transistors to control the direction of the current flowing through the motor. To make the motor spin either forwards or backwards only two transistors can be turned on at a time. The transistors used in an H-bridge are usually bi-polar or FET transistors such as MOSFETs and IGBTs. The switching elements can be turned on and off independently but there are only a few specific configurations that will run the motor effectively without short circuiting it.
If transistors Q1 and Q4 are turned on as shown in the image, the motor will spin counterclockwise. Conversely, if transistors Q3 and Q2 are turned on the motor will spin clockwise. Since one transistor on each side of the bridge is always on there will always be a continuous path for current to flow through the motor.
So, then what is the purpose of the diodes in an H-bridge? It is impossible to ensure that when switching between the Q1 and Q4 configuration to the Q2 and Q3 configuration that the transistors will turn on and off at exactly the same time. This poses an issue because if two transistors on the same side of the H-bridge are turned on we risk short circuiting the supply. The diodes play an important role by giving the current a place to flow when the transistors are switched off.
H-bridges for three-phase motors, such as brushless DC motors, work similarly to H-bridges for single phase motors but instead have an additional pair of transistors. With the six transistors current can be controlled in any direction in the three motor coils. For more information on this process see three-phase brushless motors.