Wires, Motors, Gears & Batteries: The Wall Hugging Mouse Before You Begin In order to understand and work with robots, it helps to start with a simple, nonprogrammed system consisting of a battery, a motor that drives some sort of output device (e.g., wheels), and wires that connect the battery to the motor. There are many battery-operated kits and models on the market that can be assembled by beginner students in a fairly short time. One that we have found particularly useful for educational purposes is a fun, cleverly designed vehicle called the Wall Hugging Mouse (manufactured by Tamiya Inc. and available through many mail order catalogs or in hobby stores). The Mouse provides students with the opportunity to build a vehicle and study how the battery, motors, switches, gears, and wiring work together to make the Mouse follow a wall on its left. Although the system is simple and easy to understand, its operation is both entertaining and instructive. As an added benefit, the Mouse has a transparent cover, so its inner parts are still visible after it has been assembled. How the Wall Hugging Mouse Works The Wall Hugging Mouse consists of two battery-operated motors, each of which is connected to its own wheel. Pressing and releasing a wire "whisker" on the Mouse's left side controls a switch (see diagrams on the next page). When the whisker is released, as in the diagram on the top, a circuit is completed with Motor A. Motor A turns on and causes Wheel A to turn. Wheel B remains stationary, so the Mouse turns in a circle to the left. When the whisker is pressed, as in the diagram on the bottom, the switch attached to it breaks the circuit with Motor A and completes a circuit with Motor B, causing Wheel B to turn. This causes the Mouse to turn to the right. Because of the way the whisker switch works, only one motor can be on at a time. When one motor is on, it causes the attached wheel to turn. When one wheel is turning and the other is not, the Mouse turns in the direction that is the opposite of the wheel that is turning. In other words, when only the right-hand wheel turns, the Mouse circles to the left. When only the left-hand wheel turns, the Mouse circles to the right. If you place the Mouse in an open area where there is nothing to press against its whisker, it will simply turn in a circle to the left. If you tape the whisker to the Mouse’s body, the whisker will stay pressed and the Mouse will turn in a circle to the right. In short, a pressed whisker produces a right turn; a released whisker produces a left turn. If you position the Mouse so that there is a wall (or other surface) on its left that will press against the whisker, the Mouse will follow along the wall with a jiggling motion. The Mouse "jiggles" because it starts out with the whisker released and so turns left toward the wall (with Motor A on, B off) until the whisker reaches the wall. When the wall presses against the whisker, the motors switch (A off, B on) and the Mouse starts to turn right, away from the wall. As soon as it has turned far enough that the whisker is released again, the motors switch again (B off, A on), producing a left turn. The Mouse now turns back to the wall, causing the whisker to be pressed again. As it repeats this process over and over, the Mouse jiggles its way along the wall on its left. 2-1 2-2 Using the Wall Hugging Mouse in a Classroom Activity Building the Mouse: The Wall Hugging Mouse comes in a kit containing all of the parts except the battery (it operates on one C battery). It does not require soldering, and so is a safe classroom activity. Tools that are helpful for assembling the Mouse are small "hobby size" screwdrivers (both flat-head and Phillips-head), wire-strippers, and a small hammer. You may want to have all of your students work in small groups to build Mice. Because the parts are small, a good group size is 2 to 3 students per Mouse kit. (Note that the Mouse kits can be taken apart to be reassembled at a later time by other groups, although they are not really designed for repeated use. The kits include a number of small parts which may get lost or damaged with multiple uses.) We suggest that you build one in advance so you are familiar with the parts and instructions and will feel comfortable guiding your students as they work in small groups. Alternatively, you could pre-build one or two Mice and introduce and study them as a whole-class activity. If you choose to do this as a whole-class activity, it is important for all of the students to have ample opportunity to try out and observe the Mouse operating in various situations and to examine how it works. Many students enjoy building the Mouse, so you may want to invite a group of interested students to build several of them with you during after-school time or other free time. If the students are not experienced with building kits or models of this sort, an adult should work with them to make sure they are following the instructions carefully and completely. Here, as in other activities, parent or other volunteers who enjoy mechanical and electrical hobbies may be a great help in getting students started with building. However, it's important that volunteers play the role of facilitators and coaches, rather than doing the work for the students . The building instructions that accompany the Mouse are primarily pictorial diagrams. They are accurate and complete, but they must be followed very carefully and in the correct order. Common errors that novice builders make include not studying the diagrams carefully enough to distinguish similar-looking parts (e.g., screws of different sizes); performing the steps in the wrong order; reversing or otherwise altering the orientation of various parts during assembly; leaving out a piece or skipping a step; and not following the wiring diagram carefully. The latter mistake can often be turned into a learning opportunity, since it sometimes results in the Mouse working but running backwards. Students can then be asked to figure out why and how to fix it. If the students finish building the Mouse but it doesn't run, there are several things to check. If it doesn't seem to be getting any power, check that the battery is fresh and securely placed in the battery compartment and that all of the wiring contacts are securely wrapped. If the motors come on but the wheels don't turn, check that the gears are engaging. If one side works but the other does not, check the wiring to make sure that the connections are correct and secure. If the whisker doesn't work properly, examine it carefully to make sure that it is aligned as indicated in the building diagram. The switch should move back and forth when the whisker is pressed and it should make an audible click. 2-3 Understanding the Mouse in Action: Once you have one or more functioning Mice, have your students run the Mouse in several situations, observing what it does. Allow them to observe it spontaneously, but make sure that they eventually see what the Mouse does when it is placed in an open area, when it has a wall on its left, and when it has a wall on its right. Other interesting situations are trying to get it to go around a box in both directions or inside a sturdy box lid (such as the lid from a Mindstorms™ kit). Encourage your students first to give a complete and accurate description of the Mouse's behavior under various circumstances (e.g., if they say it is turning, ask them to specify in which direction). Next ask them to figure out how the Mouse performs various actions. For example, when it turns in a certain direction, what makes it turn that way? Have them observe what the whisker does and try to explain it. After the students have had a chance to observe and describe the Mouse's behavior against a wall or around a box, you may want to introduce another strategy for analyzing its behavior. Hold the Mouse up in the air and turn it on using the on/off switch. Ask students to describe what happens (the right wheel turns and the left one does not). Now press the whisker and have them describe it again. Encourage students to think about why this happens. They might want to try taping the whisker in the "pressed" position. Try to get them to make a prediction about what it will do when it's turned on, then try it. If you have an extra Mouse that has not yet been assembled, you might want to invite students to look carefully at how the whisker switch works. The Mouse illustrates what we might call "mechanical logic." The whisker is a primitive kind of sensor that "detects" something that presses against it. The mechanical design causes the whisker to operate a simple switch, changing circuits. In more complicated systems, sensors detect some kind of energy in the world and convert it to numerical values that can be inputs to digital electronic programs. These programs, in turn, control the robot's circuitry. In subsequent activities in which students work with the Mindstorms Robotics Invention System, this is precisely the kind of system they will be using. Because the electronic circuitry in these more complicated systems is usually not directly visible or manipulable but only accessible through a programming interface, it helps students to become familiar first with a simple system like the Wall Hugging Mouse, in which they can directly observe and manipulate the circuitry. More about Motors Much of the output behavior produced by a robot or another electrical/mechanical device depends on the operation of motors, and understanding how to control the motors is often the key to getting the device to perform the desired output behaviors. Motors work by spinning very rapidly. The motors students will work with in this curriculum have a small stem (axel) that turns when the motor is on. Output devices, such as a wheel, are attached to the motors, either directly or by a series of connected gears and axels. In all of the systems students will use in this series, the power supply for the motors is provided by batteries. There are only a few things that can be done to affect the operation of motors: • they can be turned on or off • they can be set to spin forward (clockwise) or backward (counter-clockwise) • the speed at which they spin can be faster or slower 2-4 Students can get a good feel for how the Mouse's behavior changes as a function of what the motors are doing. One of the first things they observe is that when one motor is on and the other is off, the Mouse will move in a circle rather than a straight line. (This observation will serve them well later on, when they have to figure out how to program vehicles using the Mindstorms system.) We also suggest having the students figure out how to make the Mouse run backwards. (Some groups may have achieved this inadvertently, while they were putting the Mouse together.) Aside from the amusement value when they succeed in creating a backwards Mouse, this provides a good problem-solving challenge and gets the students to think about how the whole system works in the Mouse. The solution to the problem of getting the Mouse to run backwards lies in changing the way the wires are connected to the batteries and motors. Different groups of students may discover different solutions, including reversing the connections between the two motors and the battery or putting the battery in backwards (i.e., reversing the +/polarity). Changing the way the motor is connected to the battery changes whether it spins clockwise or counter-clockwise; this, in turn, changes whether each wheel turns forward or backwards. (If your students have previously studied electricity and circuits, this provides a good opportunity to make links to what they learned before.) By the time your students have finished their Mouse explorations, they should be able to trace the whole path of connections that control its behaviorfrom the on/off switch, to the battery, to the "whisker switch," to the motors, to the gears, to the axels, to the wheels. They should also be able to make a reasonable prediction about what would happen if you modify the Mouse in some way, such as pressing the whisker, switching the wires, removing the battery, and so forth. Looking Ahead From this point on, students will be working with the Lego Mindstorms™ Robotics Invention System, a versatile robotics kit that can be used to build and program many different robots. Insights that your students have gained from working the Wall Hugging Mouse will help them reason about and solve more advanced problems as they move to this more sophisticated system. The next activity provides a transition from the “mechanical logic” of the Mouse to a system that uses digital programming to operate and control a vehicle. Students will then continue to learn programming concepts that will enable them to write successively more powerful and flexible programs. They will also add different kinds of sensors, allowing them to create true robots that can obtain and respond to inputs from the environment and behave autonomously, under the control of programs written by students using the Robotics Invention System software. 2-5