O'Reilly logo

Raspberry Pi Cookbook for Python Programmers by Tim Cox

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using advanced motor control

The previous driving circuits are not suitable for driving motors in more than one direction (as they only switch the motor on or off). However, using a circuit named an H-bridge, you can switch and control the motor's direction too. The switch combinations are shown in the following diagram:

Using advanced motor control

The direction of the motor can be controlled by different switch combinations

Using a different combination of switching, we can change the direction of the motor by switching the positive and negative supply to the motor (SW1 and SW4 activate the motor, and SW2 and SW3 reverse the motor). However, not only do we need four switching ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required