Robot Building for Beginners, Third Edition

(Marvins-Underground-K-12) #1
CHAPTER 27 ■ ENCORE

A word of warning with pushbuttons and switches: there’s a moment during the physical transition
between on and off when the switch fluctuates, turning on and off very quickly before settling. If a chip is
watching a switch, it’s a good idea to use capacitors or some sort of a delay to hide the indeterminate phase,
otherwise the robot or device may think the user pressed the button a bunch of times. Switch filtering
techniques are called “debouncing” the switch.


DIP Switches


You may recall from the comparator chip that DIP stands for dual inline package. Although not guaranteed,
DIP usually implies a standard width and pin spacing.
There are groups of tiny switches available in the standard DIP size (see Figure 27-9), making them
perfect for breadboards. DIP switches act like normal switches, connecting and disconnecting wires.


Figure 27-9. Collection of various DIP switches


Because of their small size, DIP switches are difficult to toggle without a tiny screwdriver. Also, the
internal switch wiring is a bit delicate. So, they can’t handle really large currents or voltages and they may
break if switched too often or too aggressively.
DIP switches are excellent for making your robot configurable. I try to load as much intelligence as
possible into the programming of my robots, but sometimes, especially on the day of a competition, a robot
likes to play dumb. With configurable DIP switches, you can manually select certain settings or patterns to
coach the robot to victory.
Think of DIP switches as the on/off equivalent of trimpots: Sometimes you need to perform a tweak or
two on the track under ambient conditions.


Jumpers and Shorting Blocks


To save money, jumpers and shorting blocks often replace DIP switches for the purpose of configuration on
mass-produced circuit boards.

Free download pdf