https://www.modmypi.com/blog/whats-the-difference-between-dc-servo-stepper-motors ***For basic info on how motors work see
http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/mothow.html ***
Do recipe 11.5, using option 1.
In this recipe the goal is to tie a DC motor in a H-bridge
circuit that will allow us to change is rotation direction
from within a Python program. Here is an illustration of an
H-bridge:
When switches S1 and S4 are closed and S2 and S3 are open,
terminal A is positive and B is negative and the motor will
rotate. If S1 and S4 are open but S2 and S3 are closed, then
terminal A is negative and B is positive and the motor will
rotate in the opposite direction.
An H-bridge can be built using several transistors.
Instead, we use the Texas Instruments L293D H-Bridge chip
which actually contains 2 H-bridges on each side of the chip
(allowing it to control 2 DC motors which we will make use
of with the raspirobot). This illustration explains the
wiring in Figure 11-8 used in recipe 11.5, option 1:
(from instructables.com)A source of 5V is connected to pin 16 and pin 5 is connected to ground. Pin 8 is connected to the power supply for the motor. Pins 1, 2, 3, 6, and 7 are used to control one motor and pins 9, 10, 11, 14, and 15 are used to control another. (In this recipe we only use one motor so we do not make use of these last 5 pins.)
L293D chip datasheet
https://github.com/simonmonk/raspirobotboard2 ***if you picked up a RaspiRobot V2 expansion board or in
https://github.com/simonmonk/raspirobotboard3 ***if you picked up a RaspiRobot V3 expansion board.