Page 264 - Robot Builder's Bonanza
P. 264
MOTOR CONTROL BY SWITCH 233
SIMPLE ON/OFF SWITCH CONTROL
Press switch A very basic single- pole single- throw (SPST) switch can control whether a
to activate motor
motor is on or off. Most robots use two motors, so having two switches
lets you independently control each motor.
• To make the robot go forward, turn both switches on at the same time.
• To make the robot turn one direction or another, turn one switch on
while leaving the other off.
• And, of course, to stop the robot, turn both switches off.
CONTROLLING DIRECTION USING SWITCHES
By using a double- pole, double- throw (DPDT) switch (read more about these in Chapter 31,
“Common Electronic Components for Robotics”), you can control the direction of your
motors— push the switch forward to have the motor spin one way; pull the switch back and
the motor spins the other way.
G Even if you don’t plan on controlling your robot using switches, it’s still handy to review the
material that follows so that you understand how DPDT switches handle the reversal of the
motor. The same basic technique of polarity reversal is used in all the other approaches.
Again, for the typical robot that uses two motors and two wheels, you use a pair of DPDT
switches to control both motors. One switch operates the left motor, and the other switch
operates the right motor. And if your DPDT switches have a center- off position, the same
switches can be used to turn the motors off when you want to stop your robot.
See Figure 22- 2 for an example of how to connect two DPDT switches from a battery pack
to the pair of motors on your robot. Put the batteries and switches in a project box. Use two sets
of wire pairs (four wires total) to connect your switch control panel to the motors on the bot.
Bottom
view
DPDT Right
+ - switch motor
Bottom
view
6 volt Left
battery pack DPDT motor
switch
Figure 22- 2 How to wire a double-
pole, double- throw switch to control the
direction of a DC motor. Use two switches
Forward Reverse Movement
of to manually control the direction of two
Off contacts motors. A switch with a center- off position
Switch side view allows you to stop the motors.
22-chapter-22.indd 233 4/21/11 11:50 AM