Lego Rover LEGO ROVER – TEACHER NOTES This project can be run as part of the Mars in the Classroom program but is just as suitable for an after school science club or other small (4-6) group of students. Larger classes with access to several sets of Lego Mindstorms could, of course, do the project ‘en masse’. This would enable different groups to compare results and share in a wider discussion after the project has been completed. A small group of students should be able to finish the practical part of the project in one 1 hour session although 2 hours is recommended to complete the questions and fill out the data sheet. To do this project you will require some materials that are not provided within this pack: - Lego Rover with Mindstorms RCX unit. * PC computer (P200+ recommended) with one serial port connection free. Lego Mindstorms software on CDROM. * Lego RCX remote control * Floppy disc with ROVER1 program. * 5 red and 1 black coloured card circles (20mm diameter) A large table or uncarpeted floor space 2m x 2m (must be lightly coloured!) All the items marked * can be obtained from UCL Geological Sciences for the cost of postage plus a deposit: Dr. Wendy Kirk, Department of Geological Sciences, University College London, Gower Street, London WC1E 6BT. Please contact Dr. Kirk on 020 7679 7900 for more details. This experiment will also soon be available online. The Mars in the Classroom pages are housed at http://www.ucl.ac.uk/GeolSci/MITC. The online rover experiment will follow the same structure as in this pack, allowing students to complete the module without the need to obtain the rover directly. Activity sheet - aims and benefits To obtain accurate calibration values and run through this experiment smoothly, students must be able to work methodically and follow systematic instructions. The module aims: a) To highlight the differences between autonomous rovers and remotely controlled vehicles and to give the pupils an idea of some problems involved in sending robotic vehicles to other planets. b) To explore the concept of calibration – one of the fundamentals of experimental measurements. c) To introduce the ideas of computer programming and provide a stepping stone for further work if required. Lego Rover (Teacher Notes) 1 Handy hints and experiment overview The RCX is an intelligent Lego brick. Using a PC, a simple program can be built up and then downloaded into the RCX via the infrared transmitter tower. When the RCX is connected to sensors (touch, temperature, light etc) and motors, the program can run using the sensors inputs, activating the motors as outputs. All sorts of interesting scientific experiments can be carried out using this system, but this project uses only a simple 2 motor, 4-wheeled rover with one light sensor. It is strongly recommended that you read the ‘Lego RCX Handbook’ that comes with the project and that you play around with the rover and the program before running the experiment in class. Aside from being good fun, this will lead to a good understanding of the system and enable you to deal with the (almost inevitable) problems the students will have with the system. The pupils will calibrate the light sensor by placing the rover over three different coloured areas. They can read the output of the sensor from the RCX itself and then must input this reading into the program. This is the only time they need to access the program but there is no reason why, if time and interest allows, they cannot write their own simple programs or modify the existing one. Once the rover is calibrated they use the rover to find a black circle amongst several red ones as a simulation for a rover searching for a rock of a particular composition on Mars. They then have to repeat the experiment using the hand held controller to guide the rover. The problem here is that, to mimic the 8 minute time lag involved in EarthMars communication, they have to wait ten seconds between button-pressing and have to close their eyes while controlling the rover! This simulates how controllers on Earth do not know exactly how the rover will respond when they send out a command from Earth to a rover on Mars. Finally, the students hold the sensor in their hands as an astronaut would and measure the ‘rocks’ directly. This shows how flexible and powerful human beings are for exploration of the planets compared with remotely controlled rovers (slow, due to time lag) and autonomous robots (faster, but inherently ‘stupid’). Things to do before the project starts - Install the Mindstorms program and complete the 30 to 45 minute tutorial. Unfortunately, this is a prerequisite for using the Mindstorms program. - Once you have the Mindstorms package up and running, load the ROVER1 program from the floppy disc. The ROVER1 program guides the rover in a zigzag search pattern from the lower left to the lower right of a square. - You will need to adjust the wait time in the “turnleft”, “turnrigh” and “goforwd” commands (the yellow ones) to make the rover do accurate 180o turns and cover the required amount of space. The reason these have to be changed is that the rover turns faster or slower depending on the surface it is placed on. - To calibrate the “wait times”, open the commands (right click) and try out a few values (numbers between 8-12 are the norm for a flat, wooden surface). Lego Rover (Teacher Notes) 2 - You will need to download the program to the RCX and run program 5 each time. In “turnleft” and “turnrigh”, the first and third “Wait” commands tell the rover how long to reverse the motor directions to do a 90o turn. The second “Wait” time is how long the rover advances in between successive 90o turns and should be left as it is. In the “goforwd” command the wait time is set to 60. This means the rover advances about 1-2 metres before doubling back. If you want the rover to search a larger area, increase this number as appropriate. Remember to save the program once you have calibrated the movement of the rover! This process shouldn’t take more than 10 minutes once you are at least slightly familiar with the software. Now, when the students run the program the rover should execute accurate 180o turns linked by an appropriate distance. Points at which the students could need help! • • • • • Loading the Mindstorms program and opening the ROVER1 program. Learning about the RCX and understanding how to use it. Inputting the light reading measurements into the program. Downloading the program into slot 5 of the RCX. Making sure they don’t “cheat” when using the remote control. Other issues It is important that the students don’t think they are looking for coloured rocks. The colour of the card circles represents the chemistry of the rocks, not their colour and this should be emphasised throughout the experiment. Thus they should investigate every ‘rock’, not just pick out the black one. You should make sure the students put the black circle in a position where at least some of the red circles are driven over by the rover first. If the black circle is the first to be examined then very little difference between the methods will be discovered. The recommended placement for the circles is shown below Lego Rover (Teacher Notes) 3 If the students like this project and time permits, they can write their own code and even make their own rover. A good idea is to ask them how to get the rover to make a different noise for each different composition of rock (coloured card) it samples, maybe using 4 or 5 coloured circles. Also, ask them how they could get the rover to avoid obstacles automatically (we can send you the touch sensors if required), and whether a random or planned search pattern is better. If you require help, further information or have any feedback about the project, please check out our website, which also has a summary of how to build the rover if you wish to do it yourself (http://www.ucl.ac.uk/GeolSci/MITC). HAPPY ROVING!! Lego Rover (Teacher Notes) 4 LEGO ROVER – STUDENT NOTES In this project you will use a rover-vehicle to analyse different areas of Mars and find an area that is suitable for sampling. Well, actually you will use a Lego rover to search the floor of your classroom for a coloured circle. You must imagine that all the coloured circles are rocks that all appear the same to the naked eye, and that the black circle is a rock suitable for sampling. The colour of the circles doesn’t represent the colour of the rocks, but instead represents their chemical composition. You will have to pretend that only a special sensor can tell the difference between a black and a red circle! You are also going to have to calibrate the sensor that detects what colour the circles are. Calibration simply gauges a measured quantity against a standard reading. For example, if you were to measure the width of the playground in metres by counting how many paces it took for you to walk across it, you would first need to know how many metres long your pace was. By measuring your pace in metres (using a metre rule for example) you are calibrating your measurement of the playground. Getting started (ask your teacher for the RCX help guide if needed) In your group you must start your computer and load up the Lego Mindstorms program. You should open the program called ROVER1 from the program vault. Also, make sure that there are batteries in the RCX (the large yellow block on the back of the Rover), the remote control and in the Lego transmitting tower. Finally, you will need 4 or 5 red circles cut out of card and a single black one. Calibrating the light sensor The rover control program is already set up. It consists of a light sensor watcher which checks to see if the rover has moved into a suitable area, and a basic search program that enables the rover to thoroughly cover an area. All you have to do is input some numbers to make sure the rover stops when it is over a black circle (the ‘rock’ you want to sample). To calibrate the sensor: Place the rover on one of the red circles. Turn on the RCX. Press the “view” button on the RCX several times. You will see a little triangle move from one input/output to another from 1 to 6. The light sensor is attached to sensor input 2 so press the “view” button until the triangle is under sensor input 2. You can now read the value the sensor is measuring from the display on the front of the RCX. What value did the sensor return for the red circle? ………………………………………… Next, place the rover on the black circle and retake the measurement. What value did the sensor return for the black circle? ………………………………………. Now put the rover on the floor of the classroom where it will be used. What value did the sensor return this time? ……….…………………………………………. Lego Rover (Student Notes) 1 Typical results may be 45-55 for the red circle, 34-37 for the black and perhaps 60 for the classroom floor (don’t worry if your results are different unless the value for the black is higher than the red or the floor! If this is the case, then try again or go to see you teacher). Now go back to the computer and look at the ROVER1 program. Open the sensor watcher block (the blue one next to the main program) by clicking on the small button in the top corner. - In the top window of the “light” panel (the right hand side), type in a number that is 2-3 less than the value you measured for the red circle. In the bottom window of the “dark” panel (the left hand side), type in a number that is 2-3 higher than the number you got for the black circle. This should mean that when you set your rover off to explore ‘Mars’, it will continue on its way ignoring red circles, and will stop and beep at a black one! Testing the rover When you have done this, right click on the first block of the program (it should be green and say ROVER1 on it). Then, making sure that the transmitter tower is 10-15cm from the front of the RCX (the end with the darkened plastic ‘window’), press the “download” button. After 10-20 seconds the RCX will beep to tell you the program has been downloaded successfully. The ROVER1 program should always load into program slot 5. Press the program button a few times until the number 5 appears in the display. Put the rover on the floor with a couple of metres space both to the front and left of it, then press “run”. The rover should zigzag up and down the test area until you catch it and stop the program (by pressing “run again”). If it doesn’t turn good 90o corners or goes too far without turning, ask you teacher to check the calibration of the control program. Now, run the program again, but this time put several of the red circles in the path of the rover as it moves. Then, put a black one in the way. If the rover stops and beeps when it reaches the black circle then, “mission accomplished!”, you have tested and calibrated the rover successfully! Lego Rover (Student Notes) 2 LEGO ROVER – ACTIVITY SHEETS Rover/Astronaut comparison You will now use three different methods of getting the sensor to the ‘rocks’. Firstly you will use the ROVER1 program to control the rover automatically. Then you will use the remote control to control the rover manually. Finally you will carry the probe to the ‘rocks’ by hand as would an astronaut. Procedure Set up ‘Mars’ by putting several red circles and one black one on the floor of the classroom (see diagram). 1) ROVER1 controlled rover Run program 5, starting the rover as in the diagram above. Record how long it takes the rover to find the black ‘rock’. Also record if the rover failed to find the ‘rock’ or if other malfunctions occurred. Finally, you should record how many of the red ‘rocks’ were also visited by the rover. Place all your measurements in the datasheet provided. Repeat the experiment three times. When you have done this, put a couple of heavy books down to represent obstacles such as boulders. Repeat the experiments three more times, again writing down how long the rover took to find the correct ‘rock’ and how many red ‘rocks’ it visited. You must write down whether the rover was stopped from reaching the rock due to an obstacle. DO NOT MOVE THE CIRCLES IN BETWEEN EXPERIMENTS, AND MAKE CERTAIN YOU NOTE DOWN WHERE THE OBSTACLES WERE PLACED! Lego Rover (Activity Sheets) 1 2) Remote controlled rover Before you start, open the program LSWATCH and put the same values in the sensor watcher block as you did for ROVER1. Download the program to the RCX as you did before, overwriting the ROVER1 program in slot 5. You must now control the rover using the remote control. Pressing the buttons marked A, B or C controls motors A, B, or C. (note that only motors A and C are used in this rover!). If you run the motors in opposite directions, the rover will turn. Remember that the remote control unit works like a TV remote control, so you may have to move around to keep pointing the controller at the back of the rover as it turns! Practise controlling the rover for a few minutes before you perform the experiment. You should try to get a feel for how long you have to hold down the buttons to get the rover to turn 90o or to travel a certain distance. The big problem in remote controlling a rover on Mars is that it takes eight minutes for a message sent from Earth to reach Mars. Why do you think it takes so long to send or receive messages? ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… Obviously, for this experiment we can’t wait 8 minutes in between each command, so a delay of 10 seconds will be introduced instead. Also, to simulate the effects of not knowing the response to your commands the controller of the rover must keep their eyes shut while controlling the rover! The controller can look at the situation for 10 seconds, then he/she must close their eyes and perform ONE COMMAND ONLY! This command could be something like ‘run motor A and B for a few seconds’ or ‘run either motor A or B to turn the robot’. What the controller is not allowed to do is change the motors that are running without waiting 10 seconds in between. After each ‘command’ the controller can look at the situation for another 10 seconds before they close their eyes and perform another command, etc, etc. Try to visit each circle, starting with the nearest, until you ‘find’ the black one. Remember that the ‘colour’ of the ‘rock’ represents its composition, not what it looks like. You will have to imagine that each ‘rock’ looks the same and only the special sensor on the rover can distinguish between them. No driving straight towards the black circle without investigating the red ones! You will quickly find that the best way to control the rover is to be careful and not drive too far per command. You will also discover how frustrating and slow the process is! Lego Rover (Activity Sheets) 2 When you have had enough practise driving the rover under these difficult conditions, place the rover at the start position and run program 5. This is a simple program that monitors the sensor and beeps when it detects the black ‘rock’. Now, time how long it takes to find the black ‘rock’ INCLUDING all the time spent waiting between commands. Your teacher will check that you are closing your eyes fully and only performing one ‘command’ at a time! Count how many red ‘rocks’ you visit along the way and record the length of time taken to discover the black circle in the data sheet. If you have time, repeat the test three times. Now, as you did in the first part of the project, put some heavy books in the way as obstacles (put them in the same place as they were before, using the sketch you made in part 1). Time how long it takes to discover the black rock whilst avoiding the obstacles (you still have to visit all the nearer red circles remember!). Record the same observations you measured before. You will probably only have time to do each of the remote controlled experiments once. However, if you have more time, try to do them three times to compare with the programmed rover. 3) Astronaut Finally, take the RCX and the light sensor off the rover and run program 5 as you did for part 2). One member of your group should go from ‘rock’ to ‘rock’ and hold the sensor about half a centimetre from it. The RCX will beep when it detects the correct ‘rock’. Record how long it took to discover the black rock and how many of the red rocks you also tested. Repeat the experiment three times. Conclusions Look at the results you got from the first two experiments. Which was quicker at finding the black rock, the ROVER1 controlled rover or the remote controlled rover? ……………………………………………………………………………………………...……… Which method (rover or remote controlled) sampled the greater number of rocks in total (red and black)? ……………………………………………………………………………………………...……… Was the astronaut far worse, worse, better or much better than the rover? ……………………………………………………………………………………………...……… What are the disadvantages of remote controlling a rover? ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… Lego Rover (Activity Sheets) 3 What are the disadvantages of having a programmed rover? ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… Write a paragraph about the advantages and disadvantages of using human beings instead of rovers to explore Mars. ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… ……………………………………………………………………………………………...……… Lego Rover (Activity Sheets) 4 LEGO ROVER – DATA SHEET DATE……………………… NAME……………………… CLASS………………….. GROUP NAME………………………………………… There are spaces to record all you measurements if you repeat each experiment three times. Measurement 1) ROVER1 program 2) Remote controlled 3) Astronaut Time taken to find black ‘rock’ (in seconds) Time taken to find black ‘rock’ with the obstacles present (in seconds) How many red ‘rocks’ were also tested? How many red ‘rocks’ were also tested with the obstacles present? Were there problems? any other Lego Rover (Activity Sheets) 5