CHAPTER 22 ■ SOLDERING AND CONNECTING
Putting Together the Line-Following Switch
The line-following switch was the only part of the circuit that wasn’t prototyped on a solderless breadboard.
This is because the switches available with the necessary switching characteristics have thick and widely
spaced terminals that don’t fit in a solderless breadboard.
The purpose of the line-following switch is to connect the motors to the transistors. In different switch
positions, the motors will be hooked to different transistors, if at all.
When the switch is toggled to the center position, both motors are disconnected. This aids debugging
and allows the robot to be placed on a starting line.
When the switch is toggled to the left position, the motors are connected in a straightforward manner,
with the left motor connected to the left transistor and the right motor connected to the right transistor.
This causes the left motor to activate whenever the left sensors detect brighter light.
When the switch is toggled to the right position, the motors are connected in the opposite way, with
the left motor being connected to the right transistor and the right motor connected to the left transistor.
This causes the left motor to activate whenever the right sensors detect brighter light.
The robot follows a dark line or a bright line based on whether the motors connect to the sensors on the
same side or opposite side. Graphic details of this motion will be revealed in a later chapter.
Obtaining the Line-Following Switch
The line-following switch is a DPDT (double-pole double-throw) center-off toggle switch. Some suppliers list
the switch as “on-off-on.”
Don’t purchase a switch for the line-following robot that has parentheses around one or more of the
terms, such as “(on)-off-on” or uses the term mom, such as “mom-off-on”. This indicates a momentary
position returned to the center by a spring. That’s beneficial for some projects, but, for this robot, you want
the switch to stay in position even after your finger is removed.
The meaning of the “center off ” term is obvious. The switch is turned off (no connections are made)
when the switch is in the center position.
“Double pole” means that the switch can control two separate components at the same time. This is
important, since the line-following robot has two motors that need to be controlled through the same switch.
“Double throw” means that each pole can be switched to make two different connections. This is
important, since each motor needs to be connected to either the left transistor or the right transistor.
Table 22-3 lists suppliers of appropriate switches. However, sometimes it’s better to see and feel a switch
in person, before buying. The size, shape, and color of external switches define the look and feel of the robot.
Pick a switch that is consistent with the style of your robot.
Table 22-3. Suppliers of Subminiature DPDT Center-Off Toggle Switches
Supplier Part Number Price
Jameco 21952 $1.95
Jameco 22841 $1.95
Electronix Express 17TOGDDC-M $1.95
Digi-Key EG2414 $3.30
“Subminiature” refers to the approximate size of the switch. Even though it sounds small, you’ll be
surprised at how big subminiature really is.
Don’t buy cheap or smaller (micro-miniature) switches. The plastic melts as you attempt to solder on
the wires. You’re left with a switch that either doesn’t toggle at all or fails intermittently.