Robot Building for Beginners, Third Edition

(Marvins-Underground-K-12) #1
CHAPTER 18 ■ ADDING GEARHEAD MOTORS

Testing the Motors


Upon powering up the circuit, one motor should spin depending on which sensors see more brightness.
By moving your hand across the front of the sensors, the circuit should alternate between lighting up one set
of LEDs and motor, and then the other set of LEDs and motor.
Only one motor should be enabled at a time unless the brightness is extremely balanced or unless
you move your hand very quickly in front of the sensors. The robot makes tight turns with only one motor
enabled, with one rotating wheel pivoting around the stationary wheel.


Completing the Electronics


Congratulations, you’ve finished prototyping all of the electronics necessary for the line-following robot!
Admittedly, there is one piece missing. Currently the left motor engages when the left side is brighter and
the right motor engages when the right side is brighter. When the robot’s board is finally built, a line-following
switch will be added that can swap the motor connections to the opposite sides. In doing so, the robot can
either pivot toward brightness or pivot away from brightness. Thus, it can follow either dark lines or light lines.
You can also toggle the line-following switch into the center position to disconnect the motors. In
this state, you can place the robot on the starting line without it running away. This also keeps the robot
stationary, but alive, during debugging.
Unfortunately, I could not locate an appropriately sized DPDT-center-off switch to prototype on a
solderless breadboard. But, other than the switch, your breadboard now contains all of the components in
the final configuration, ready to be soldered together.
Now that the motors are ready, it’s time to add some wheels.

Free download pdf