A mechanical computer mouse has an ingenious way of translating the movement of a mouse's rubber ball into X- & Y-coordinate movement on your screen. Inside the mouse are two encoder wheels .As you move the mouse around on the desk, it rotates these wheels inside (one wheel being perpendicular to the other, with their drive shafts in contact with the ball). The encoder wheels have slits in them, & on either side of these slits are infrared emitters & infrared detectors. The detectors count the number of light pulses reaching them (through the moving slits in the encoder wheels) from the emitters, & then the on-board chip translates these pulses into X/Y coordinates that it sends to your computer screen On most mice, the emitters are clear plastic with a little dome protruding from them while the detectors are solid black. Find the clear emitters & desolder them from the PCB. You're now the proud possessor of a pair of robot eyeballs Now Breadboarding the Robot`s Circuit Creating Eyestalks Hooking Up the Op Amp Connecting the Motors & Power After you've checked all of the preceding steps to make sure that all components have been properly installed on the board, you're ready to connect the motors & power Freeforming Mousey's Control Circuit Now that we have a light-hungry robot brain, we need to install it in our mouse body so that it can motor around to feed (add your own zombie/Night of the Living Dead sound effects here). Obviously, all of the hook-ups will be the same as on the breadboard, but here we'll want to switch to a lighter-gauge &/or a stranded wire. The 22-guage solid core wire used in most breadboard jumper kits is too stiff for most of the connections we'll need to make inside of our mouse case. It makes it too hard to close the lid & puts unwanted stress on our solder joins. Either try a stranded 22-guage wire or a 24-guage (stranded or solid) wire. We used a 22-guage stranded wired Installing the Battery & Relay 1>Using two-way tape, Velcro tape, or poster putty, install the battery where you want it to go. 2>Before you install the relay, you might as well solder what you can to it while it's still outside of the mouse case. 3>Solder the emitter pin of your NPN transistor (that's the right-most pin looking at the transistor with the flat side facing you) to the top-left coil pin on the relay 4>There are a few more relay hook-ups we can do "out of body." First, solder a short positive (red) wire from the top pin on the right side of the relay to the bottom pin on the right side. 5>Now you're ready to glue the relay in place & solder its remaining connections. 6>Solder the negative wire from the left motor onto the middle pin on the left side. Again, use black wire if you have it. Then solder the negative wire from the right motor onto the right middle pin on the relay Before we move away from the relay/switch/motor area, we have a few more things we need to do. Solder about 2 inches of positive wire to each of the positive motor terminals (if the motor doesn't have wires already). Solder the stripped ends of these two wires together side-by-side. Finally, solder a third positive wire, about 3 inches long, onto the soldered end of the two motor wires you created in steps 1 & 2 . What we're doing here is making the two positive motor wires into one positive wire that we'll attach to the output pin on our control chip. Installing Our LM386 Control Chip Find the spot in your mouse case where you decided to install the LM386. You'll want to position it in dead bug mode (with its pins in the air). It doesn't matter how the chip is oriented. Ours has pins 1 & 8 facing towards the robot's rear. Before you glue in your chip, go ahead & bend Pins 1 & 8 toward each other & solder them together. 2>Glue your LM386 IC in place. 3>Now find the negative wires from the transistor (attached in step 3 of "Installing the Battery & Relay"), the relay (attached in step 4 of "Installing the Battery & Relay"), & the timer cap (attached in step 1 of "Connecting the Switch Components"). Solder all of these negative wires together, side by side. Here we're joining all of the negative wires together on their way to the control circuit & to power. 4>Solder the negative wire from the battery snap onto the 3-wire negative junction you joined previously in step 3. 5>Solder a short piece of negative wire (about 1 inch) to Pin 4 of the 386. Then solder this wire to the uber-negative wire junction created in steps 3 & 4. 6>Solder the positive wire from the relay (attached in step 4 of "Installing the Battery & Relay") to Pin 6 on the chip (our output pin). Solder the motor junction wire to Pin 5 on the IC. Installing the Eyestalks As you install the eyestalks, following the steps listed here, refer to Figure 8.18 for some visual cues. The first thing we want to do is make holes in our mouse top to thread the eyestalks through. The two buttons on most computer mice are separate pieces of plastic that snap onto the mouse's top half & rock a little forward & backward (so that they can engage the actual switches on the PCB underneath). You'll probably want to glue these two pieces onto the rest of the top so that you have a solid upper half. When the glue is dry, mark where you want to sink your eyestalk holes, & drill out just enough of a hole (using your Dremel tool & a drill bit) to feed your eyestalk wires through. We installed our eyestalks about 1/2 inch from the front edge of the mouse case. Thread the eyestalks through the holes so that about 1 3/4 inches of wire & sensor remains outside of the case. On the inside, clip the two positive wires so that they just reach each other on the underside of the top & overlap each other a bit. Solder them together. Run the negative wires along the top of the case & bend them down wherever your IC is located (ours is in the back of the mouse's bottom half). Don't solder them to the IC just yet. We want to keep the two mouse halves unconnected until the end. Cut a short piece of red wire (about 1 inch) & strip the ends. On one end, solder on the 1kW resistor of our sensitivity booster subcircuit. On the other end of the resistor, solder on the anode side of the LED (with its leads splayed out). We want this wire/resistor/LED combo to fit from the middle pole of our toggle switch to the junction of the two positive eyestalk wires we soldered together previously in step 2. Go ahead & connect the sensitivity booster from the middle switch pole to the positive solder join of the eyestalk wires. Our LED/resistor combo is really only in our circuit to add a voltage bias, or in other words, to tweak the sensor output voltage so that it's more in line with what the chip's input is expecting. This will result in the motors turning on & off more gracefully, leading to smoother mouse motion. One cool side benefit to the booster is that it can double as a "power-on" indicator, so we want it showing through the top of the mouse case. Consequently, we're going to have to drill a hole in the top for the dome of the LED to poke through. With the booster circuit in place, you can see where that should be. Gently bend the LED out of the way (so that you don't drill into the top of it!) & sink your hole. Then poke the light up through it. Use a piece of electrical tape to hold the LED in place inside the hole you just cut. Make the FINAL ROBOT CONNECTIONS We almost got bot! All we have to do now is make the final connections between power, the switch, & the control chip, & to install our front whisker. Solder the negative eyestalk wires to Pins 2 & 3 on the LM386. Solder the positive (red) wire from the battery snap to the (normally open) outside pole of the toggle switch. Solder a short red wire (about 1 inch) from the center pole of the switch to Pin 6 of the IC. Connect your bumper plastic to the bumper switch. We simply used a couple of layers of cellophane tape. You want to install it so that it's connected to the left side of the switch front, so that it crosses over the face of the switch & across the little cylinder that's the switch button itself
Friday, March 21, 2008
BUILDING ROBOTS : Mousey robot finishing steps
Posted by NSensation at 4:18 AM
Subscribe to:
Post Comments (Atom)
2 comments:
hey please tell me how to know which is +ve and which is -ve end off the IR emmiters
Nice and such a informative post for me. I will try to make some unique circuit board which can use in robots also. Thanks for share history also.
Printed Circuit Board
Post a Comment