Motors
are one of the most common methods used to move robots around. They
can be connected to gears and wheels and are a perfect way of adding
mobility to your robot. There are many types of motor, and this
tutorial will cover the main ones useful for robotics.
These
are the most common and easy to use motor available. They are
connected to a power supply by two wires. The direction of the motor
shaft rotates can be changed by reversing the polarity (swap the
positive and negative wires) of the motor supply voltage.
Unfortunately motors use quite a bit of current, so you cant just
plug them straight into your processor and expect them to work, the
processor won't be able to supply the motor with enough current. We
need to find a way of turning the motors on and off using the
processor. This can be done by many methods, including transistors,
relays or a motor driver chip. The Robocore contains two motor
driver chips that can control up to 4 DC motors simultaneously.
Connecting motors to the Robocore couldn't be simpler. Just connect
the 2 wires of each motor to one of the motor outputs on the
Robocore and your ready to go. The motor is controlled by 2 output
pins on the processor, lets say pin 1 and pin 2. The motors
direction can be changed by different outputs of the pins. See table
below
Pin 1
Pin 2 Motor Output
|
|
|
On |
Off |
Clockwise |
Off |
On |
Anti-Clockwise |
Off |
Off |
Motor Off |
For
help programming the chip to do this have a look at the motor
programming guide.
|