Those who are into robotics know that robots, just as humans do, also need to suddenly change course when they run into an obstacle in their path. Changing course while walking may not be a big deal for humans, but for robots, and especially for those who design them, it is sometimes a serious challenge.
For example, consider a robot that is moving towards an obstacle, which it has to avoid and proceed on a parallel path. A robot with two wheels will need to stop moving as it reaches the obstacle, then pivot on one wheel by a certain angle and move forward until the obstruction no longer bars its way. Then it has to stop again, pivot back on the other wheel by the same angle it had turned earlier and move forward. If the robot is required to go back to its original track, it has to pivot once again. The entire exercise gets more complicated if the robot has more than two wheels; clearly, robotics is not for the faint-hearted.
Most movements in robotics involve DC motors and moving a robot backwards requires the DC motor to run in reverse. This is accomplished by switching the connections of the motor to its power source so that it now connects in a way opposite to its normal manner. Doing this causes the current flow in the motor to reverse, making it rotate in the opposite direction. However, it is impractical to manually disconnect the wires of several motors and reconnect them in a moving robot. That job is best left to H-bridges.
An H-bridge is a circuit that looks very similar to a capital H. It has four switching elements at its corners, with the motor forming the cross bar. The only difference are the top and bottom bars – these are not part of the alphabet H. Traversing clockwise, the four switching elements are called – high-side left, high-side right, low-side right and low-side left. The top bar connects to the positive terminal of the power supply/battery and the lower bar connects to the ground or the negative terminal of the power supply/battery.
You run the motor by turning on a pair of switches. For example, if you turn on the switches high-side left and low-side right, the motor will turn, say, in a clockwise direction. If these switches are turned off and the other pair is switched on, they connect the motor to the supply in reverse and the motor rotates counterclockwise.
While the switches are turned on in pairs, those on the same side must never be turned on simultaneously. For example, if the two switches on the left or the two on the right were to be switched on together, they would create a direct short between the terminals of the power supply/battery, bypassing the motor altogether.
This phenomenon is called shoot through, and if your power supply or battery has no short-circuit protection, it may cause a premature failure of the source including irreparable damage to the switches. Typically, the rating of the switches must match the rating of the motor – powerful motors operate on high currents and the switches must be capable of handling those currents. In practice, the switches are power MOSFETs or IGBTs.