CHAPTER 22 ■ SOLDERING AND CONNECTING
You can test the arrangement by hooking a multimeter to either center wire and testing the continuity
to the red and white wires while toggling the switch. Does the green wire connect to the white wire, off, and
then red wire? Does the yellow wire connect to the red wire, off, and then the white wire?
- Shrink the tubing in place using a hair dryer or heat gun.
- Crimp Molex terminals onto all four of the switch wires.
- Insert the terminals into the Molex KK four-pin housing.
Facing the windows in the housing with the wires pointed downward, I choose to connect the wires
in the following left-to-right order: white wire (right motor), yellow wire (right transistor), green wire
(left transistor), and red wire (left motor). It doesn’t matter so long as you’re consistent with those
connections on your line-following circuit board.
The switch is complete.
Putting Together the Tube LED Circuit
The headlights and left/right brightness-indicator LEDs light up when the robot’s power switch is turned on.
So, there isn’t really a need for a power indicator light. However, the plastic tube connecting the motors gave
me an idea.
There is diverse assortment of colors of mini M&M candy tubes available. Sandwich has a yellow tube.
By tossing a couple of red LEDs in the center of the tube, it’s dull yellow when power is off but glows red
whenever power is on (see Figure 22-25). It looks magnificent!
Figure 22-24. Finished switch with transistor outputs in center, left, and right motors connected to diagonally
opposite terminals