Page 129 - The Definitive Guide to Building Java Robots
P. 129

Preston_5564C04.fm  Page 110  Wednesday, October 5, 2005  7:22 AM



                 110    CHAPTER 4  ■  SENSORS

































                        Figure 4-1. Some breadboard circuits

                            The circuit on the left in Figure 4-1 was connected with 22 AWG hook-up wire. The circuit
                        itself is a Sharp IR detector module, purchased from Radio Shack, which uses two modulated
                        IR LEDs.
                            The circuit on the right in the figure was standalone and did not require any hook-up
                        except for the five-volt DC battery. It consisted of one IR LED, one IR phototransistor, and a
                        transistor circuit.
                            In the previous chapter, I used servos for some motion. Early on, before I started making
                        my own connectors, the servo connectors came in quite handy, but they were expensive
                        compared with wire and connectors. To make your own, you’ll need the following (pictured in
                        Figure 4-2 from left to right, clockwise):
                            • Female .100” header: The same hook-up as a servo.

                            • Make .100” header: The pins you’ll need to connect to the Parallax Board of Education.
                            • 22 AWG hook-up wire (different colors): Fits the pins nicely, and as far as wire, it costs
                              the least.

                            • .100” header socket: Comes in many different size combinations.
                            •  Crimper (not shown): Necessary for crimping the wires to the headers.
   124   125   126   127   128   129   130   131   132   133   134