Read an Excerpt
Pointless (Yet Awesome) Projects for the Electronically Inclined
By Mike Rigsby
Chicago Review Press Incorporated Copyright © 2009 Mike Rigsby
All rights reserved.
Moving Eyeball Picture
When you walk into a room, the moving eyeballs follow you.
When your friends watch the eyeballs move, they'll think it's creepy. When you show them the wires and springs on the back side, they'll think you're a genius. Have you ever untangled a garden hose or a balled-up string of holiday lights? The methodical work in untangling — patiently taking one small step at a time — is the approach needed to build this.
How does this work? We make two spring-loaded eyeballs. When resting, the eyeballs look straight ahead. An electric motor attached to each eyeball can turn the eye left or right. A motion sensor on the right causes the motor to turn to the right. A sensor on the left causes them to turn left. Stand in the middle of the picture (no active sensor) and the eyes go to the center.
8½" x 11" thin plywood
(2) 3/4" x 1½" wood, 8½" long
(2) 3/4" x 1½" wood, 9½" long
(2) 1" x 1" x 3/4" wooden block
(2) PIR sensor modules, www.parallax.com, #555-28027
(2) Stainless steel extension springs, 0.25 O.D., 2.5" free length, www.smallparts.com, #ESX-0015-02
(2) Relay, 5 VDC DPDT, www.jameco.com, #139977
(1) Slide switch, DPDT, Radio Shack, #275-403A
(2) NPN switching transistors, Radio Shack, #276-1617
(3) Silicon diodes, 200V 1 amp, Radio Shack, #276-1102
(2) 1K-ohm resistors,¼ watt, Radio Shack, #271-1321
(1) 12" red hookup wire, stranded, 22 gauge, Radio Shack, #278-1218
(1) 12" black hookup wire, stranded, 22 gauge, Radio Shack, #278-1218
(4) Screw eyes, size 216½" (small), hardware store
Cedar balls, hardware store
3/8" wiggle eyes, craft store
Perfboard, 2" x 4", Radio Shack, #276-1395
(2) One-cell AA battery holders, Radio Shack, #270-401
(1) Two-cell AA battery holder, Radio Shack, #270-408
(2) 1.5 to 3V DC metal gearmotors, Radio Shack, #273-258
(4) AA batteries
Braided picture hanging wire
Wire wrap tool (see chapter 5 for tips on wire wrapping)
1/8", 3/16", 1", and 7/8" drill bits
To get started, you'll need to find or print an 8½ × 11 inch photo or drawing whose eyeballs are at least 2 inches apart, measuring from the center of the left eyeball to the center of the right eyeball. You need at least that much room for the motors and springs.
Next, using the templates on page 39, cut and assemble the five wooden pieces as shown below. Drill the 1-inch holes in the side pieces before attaching them to the plywood. Fasten the pieces together using wood screws. This creates the picture frame.
Place the photo on top of the frame, and poke a pushpin through the center of each eye.
Using the pinholes to identify the center points of the eyeholes, drill two 7/8-inch-diameter holes.
Now, lay the picture facedown and place the frame on top of the picture. Be sure that the bottom of the picture is properly lined up with the bottom of the frame. (If you accidentally match the top of the frame with the bottom of the picture, then the eyeholes in the picture will not match the eyeholes in the frame.) Draw an outline of the circles onto the back of the picture using a pencil.
Cut the eyeholes out of the picture, then place the picture on top of the frame to be certain that the eyeholes match. Once everything matches, place the picture aside until you have finished building the mechanics of this device.
Attach hookup wires (22 gauge) to the motors with solder. (If you are unfamiliar with soldering, see chapter 7.) First, solder a 3-inch-long red wire to the right terminal of each motor. Then solder a 3-inch-long black wire to the left side of each motor. The motors don't care about wire color, but the colors will help you keep track of which wire is which.
Use round wood balls for the eyes. Cedar balls, "for use in storage chests, boxes, garment bags, etc." are available in most hardware and home supply stores. Drill a 3/16-inch hole in one end of each ball, then twist a small screw eye into each ball directly opposite the holes you drilled.
Take two wood blocks (1 × 1 × 3/4 inch) and twist a single small screw eye into an end face (a 1 × 3/4 inch face) on each block as shown.
Turn the frame facedown and center a motor beneath one eyehole. Take a pencil and mark the sides of the motor. Repeat with the other eyehole.
Drill a 1/8-inch hole through each of the four pencil marks.
Push one "eyeball" hole onto the gear of a motor. Attach the spring to the "eyeball" eye screw and — at the other end of the spring — screw the wood block into the frame, screwing through the plywood from the front. The spring should be in slight tension, pulled just beyond the "at rest" position.
Twist braided picture-hanging wire around the motor to hold it in place.
Solder the springs to the screw eyes. Repeat the process with the other spring, eyeball, wood block, and motor.
Turn the picture faceup and glue wiggle eyes to the front of the eyeballs. The wiggle eyes are necessary since they serve as a "stop" to keep the eye from turning too far or spinning around. Make sure that when the wiggle eyes turn left or right they will make contact with the edge of the holes in the plywood.
Next, glue — superglue works well — three AA battery holders (one two-cell and two one-cells) to the inside wall of the frame. Place the two one-cells side by side.
Take a piece of Perfboard and glue the two relays, three diodes, two resistors, and two transistors legs up to the board, as shown. It is not a normal practice to glue all the components with their legs sticking up (like dead bugs). I am doing this so that you can see where the wires are attached. The normal practice (placing the component legs through the Perfboard), creates a more secure attachment with no glue, but it complicates the matter of figuring out which component leg is which. Be sure that the band on the diodes faces the top of the board. The flat part of the transistor should face the bottom of the board. The coil of the relays (two legs that are separated from the other six legs) faces the bottom of the board.
Glue the board to the frame just below the motors.
Now it's time to connect the components. This is not difficult, but it is best to take your time. If any connection goes to the wrong place, or is not well made, the project will fail.
Refer to the schematic diagram on the following page to understand where the connections are made. I have identified each connection with a number. In the photographs, the end of the soldering tool (or the wire wrap tool) will be resting on the connection point.
Refer to the following pin diagram for the switch, relays, and transistors.
Connection #1 goes to Pin #2 on Relay B.
The other end of this wire, Connection #2, goes to Pin #1 on Relay B.
Connection #3 (one end of a new wire) goes to Pin #4 on Relay B.
The other end of this wire, Connection #4, goes to Pin #3 on Relay B.
Connection #5 connects the two red wires (one from each motor) with a wire-wrap wire. Solder this connection together.
Wrap this connection in electrical tape so that it will not accidentally come in contact with other connections.
The other end of the wire-wrap wire, Connection #6, should be connected to Pin #8 on Relay B.
Connect the two black motor wires to a wire-wrap wire with solder to make Connection #7. Tape the connection with electrical tape.
Attach the other end of the wire-wrap wire, Connection #8, to Pin #6 on Relay B.
Connect one end of a wire-wrap wire to Pin #2 on Relay B (photo on page 16). This is Connection #9. Connect the other end of this wire to Connection #10, Pin #10 on Relay A.
Connection #11 goes to Pin #28 on Relay A.
Take the other end of the wire-wrap wire and solder it to the red wire from the one-cell AA battery holder to form Connection #12. Wrap this connection in electrical tape after it is soldered.
Take the black wire from the one-cell AA battery holder (from the previous step) and connect it to the red wire from the other one-cell AA holder. Also, connect one end of a wire-wrap wire at this point. Solder them all together, then tape the connection. This is Connection #13.
Solder the other end of the wire-wrap wire to a center terminal on switch 1 (see diagram on page 16) to form Connection #14.
For Connection #15, solder one end of a wire-wrap wire to Pin #15.
Connection #16 goes to the same place as Connection #4 (Pin #3 on Relay B). For Connection #17, take the black wire from the other one-cell AA holder and solder it to the red wire from the two-cell AA holder. Tape this connection.
For Connection #18, take the black wire from the two-cell AA holder and solder it to the switch.
Connect one end of a 10-inch-long piece of wire-wrap wire to the center post of Sensor Module 2 for Connection #19. Connect the other end of this wire to the center post of Sensor Module 1. This will be Connection #20.
Attach one end of a piece of wire-wrap wire to the same place as Connection #20 to make Connection #21.
Connection #22 (the other end of the wire for Connection #21) attaches to the same place as Connection #4 on Relay B (see photo on page 18).
Connect one end of a piece of wire-wrap wire to the switch at Pin #23 to form Connection #23.
The other end of this wire, forming Connection #24, goes to the negative post of Sensor Module 1.
Connection #25 goes to the same place as Connection #24 above. Connection #26 goes to Sensor Module 2, in the same location as in the photo above.
For Connection #27, attach one end of a wire to the cathode (the end with a stripe) of Diode D1 using the wire wrap tool.
Attach the other end of this wire to the same place as Connection #11 (see page 21).
Take one end of a new piece of wire and attach it to the same place as Connection #27 (see page 26) to form Connection #29. Connection #30 goes to Pin #36 on Relay A.
For Connection #31, attach one end of a new piece of wire to the same place as Connection #30.
Connection #32 attaches to the cathode (striped end) of Diode D2.
Connection #33 goes to the same place as Connection #32 (see page 27). Connection #34 goes to Pin #34 of Relay B.
Connection #35 connects to the anode (non-band end) of Diode D1.
Connection #36, the other end of Connection #35 wire, goes to Pin #36 on Relay A.
Connection #37, one end of a piece of wire, goes to Pin #37 of Relay B.
Connection #38, the other end of this piece of wire, goes to the anode (nonstripe end) of Diode D2.
Connection #39 is attached to the same place as Connection #38 in the photo above. The other end of this wire, Connection #40, goes to the cathode (stripe end) of Diode D3.
Connection #41 goes to the same place as Connection #35 (see page 28). Connection #42, the other end of Connection #41, goes to the anode (nonstripe end) of Diode D3.
Connection #43 starts at Transistor Q2, Pin #43.
Connection #44, the other end of Connection #43, goes to the same place as Connection #40, page 30.
Connection #45 starts at Transistor Q1, Pin #45.
Connection #46, the other end of the wire at Connection #45, goes to the same place as Connection #42, page 31.
Connection #47 starts at Transistor Q2, Pin #47.
The other end of this wire, Connection #48, attaches to Transistor Q1, Pin #48.
Connection #49 attaches to the same place as Connection #48 above.
Connection #50, the other end of the wire starting at Connection #49, attaches to the same place as Connection #24, page 26.
Connection #51, a new piece of wire, connects to the base of Transistor Q1, Pin #51.
The other end of this wire, Connection #52, attaches to one end of Resistor R1.
Connection #53 begins at the base of Transistor Q2, Pin 53.
The other end of this piece of wire, Connection #54, attaches to one end of Resistor R2.
Connection #55 starts the end of Resistor R1.
The other end of this wire, Connection #56, attaches to the output of Sensor Module 1. This sensor module is placed on the right-hand side of the frame (as viewed from the back).
Connection #57 attaches to the end of Resistor R2.
Connection #58, the other end of the wire, attaches to the output of Sensor Module 2, as in the photo on page 36. This module is placed on the left-hand side of the frame (as viewed from the back).
Now you are ready for a test of your circuit. Put four AA batteries in the holders and turn the switch on. The switch is on when the black slider is pushed in the direction of all the soldered switch connections. The switch is off when the black slider is pushed in the direction of the two unused pins.
Allow the sensors to "adapt" for about 30 seconds. Place your hand in front of one of the sensors. Hopefully, both eyeballs will move together in the direction of the sensor. If the eyes move the wrong way, it's not too hard to fix. Remove Connection #56 and Connection #58. Place Connection #56 on the pin that used to hold Connection #58, and place Connection #58 on the pin that used to hold Connection #56.
Place a drop of superglue on the white part of the right-hand sensor. Insert the right-hand sensor into the hole on the right side of the frame. The sensor should bond to the frame. Repeat with the left sensor. Add two screw eyes and braided picture-hanging wire. Use double-sided tape to attach the picture to the front.
You've done it. Now it's time to show your friends!
Each sensor module has a setting that you may need to adjust. In the corner, there are three pins, partly covered by a small "jumper." You can pull the jumper straight off with your fingers. The photo below shows the jumper removed.
Place the jumper across the H and middle pin. In this position, the output stays high for a few seconds when someone enters the detection area.
Why, you ask, are there so many parts? To make the motors turn one way or the other, you have to be able to reverse the positive and negative wires to the motor. This is done with the relays. Although the relays don't require much power, the sensors, which you need to detect motion, are major wimps when it comes to having enough power to do anything. You have to take the tiny output signal from the sensor and make it operate a relay. The output from the sensor goes through a resistor to a transistor. The resistor protects the wimpy sensor from burning itself out. The transistor turns on the relays, which operate the motors.
Why does the circuit have Diodes D1 and D2? The relays don't turn off easily and sometimes create enough voltage to destroy a transistor. The diodes allow this unwanted voltage to run around in a circle for a few millionths of a second without harming anything.
When Sensor 1 is active, it turns on Transistor Q1, which energizes Relay A, which allows power through the normally closed contacts of Relay B, which causes the motors to turn. When Sensor 2 is active, it turns on Transistor Q2, which energizes Relays A and B. (Diode D3 allows this to turn on both relays; it prevents Q1 from turning on both relays.) When Relay A is energized, it provides power to Relay B. When Relay B is energized, it changes the direction of power flow to the motors, causing them to go the opposite direction from the flow when Relay A alone is energized.
When neither sensor is active, the relays are at rest and no power goes to the motors, so the spring returns the eyes to the center position.CHAPTER 2
In simple terms, you need to understand three electrical terms: voltage (V), current (I, measured in amps or milliamps), and resistance (R, measured in ohms).
Voltage can be thought of as the "desire" of electrons to move. Consider two islands in a stormy, shark-infested sea. One island is inhabited by humans but is barren. The other island is covered in coconut trees and other edibles. The humans want to get to the food, but they can't. High voltage is like high desire — nothing happens as long as the sea is filled with sharks. Everybody just sits there, but there is potential for something to happen.
Now, let's say the people on the barren island built a narrow, rickety rope bridge between the islands. They will start crossing, though just a few at a time. The movement across the bridge is current (amps). The narrow bridge (wire) has a high resistance (ohms) because it will allow only a few people to cross at a time. If the desire of the humans to get to the food is greater (higher voltage), more of them will crowd and push their way across the bridge (higher current).
Excerpted from Haywired by Mike Rigsby. Copyright © 2009 Mike Rigsby. Excerpted by permission of Chicago Review Press Incorporated.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.