[Solved] H-bridge: what is it and how does it work?
I'm reading a tutorial on how to control a DC motor with a Raspberry Pi. Materials required for the project include an L293D integrated circuit.
Finding out what the L293D is for, I found that it is used to control up to 2 motors by using H-bridges.
Could someone explain to me how an H bridge works?
An H-bridge is an electrical circuit that allows you to control the direction of rotation of a DC motor using 4 switches arranged in an H-shape. Hence its name.
By opening and closing the switches, the H bridge manages to change the polarity of the motor terminals and therefore the direction of rotation.
For example, in the graph below if switches S1 and S4 are closed and S2 and S3 are kept open, the current flow will turn the motor in one direction, say clockwise (yellow arrow). But if S2 and S3 are closed and S1 and S4 remain open, this time the rotation will be in the opposite direction (green arrow).
Stopping the motor is achieved by closing S1 and S3 and keeping S2 and S4 open.