Mechanical Engineering And Computer Science - Calibrating A Roverbot
chalkboard

GRADES 9 - 12
CALIBRATING A ROVERBOT

OBJECTIVES:

You will learn how to program a LegoTM Mindstorms robot. You'll gather data on how far the robot travels during given times and learn how to tell the robot to go an exact distance.

STEPS TO FOLLOW:

Part I. Initializing the Robotics Software: Install the Lego Mindstorms software on your computer. Attach the IR (Infrared)Tower to the USB port of the computer. Download the RCX 2.0 firmware to your brick.

The login automatically starts up a tour of the Lego Mindstorms Robotics kit. This tour has some rather loud volume which may be a problem for your neighbors.

From the main menu of the robotics software, choose Training Missions and take the first 4 training missions: This is the RCX, Setting up your robot, Programming basics, and Using other commands. Note that you and your partner will be required to build a Roverbot. (Instructions are in the Construtopedia that comes with the kit.) You will call up a demo program already written and learn to download it to your robot.

Build a Roverbot from the Lego instructions using the wheel sets.

Part II Calibrating the Roverbot: One very simple task we could assign ourselves is to program the Roverbot to travel a given distance. Since our independent variable is time, (that is, we tell the motors how long to run), how do we determine the time required to go a given distance?

Write a program to send the Roverbot forward for some number of seconds. (Choose any reasonable number for now.) Download the program to the Roverbot and test it. Make sure that when the Roverbot stops at the end of the given time, it brakes and doesn't coast.

Fill in the table below using regularly spaced time values by doing the following:

Modify your program to run the amount of time you want and then measure how far the robot travels in that time. Measure distance to the nearest quarter of an inch. You'll have to change the program and download it for each entry in the table. Decide the range of values for time which seems reasonable.

Trial
Time [seconds]
Distance [inches]
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

six Can you find a relationship between time and distance? Put your data into EXCEL, graph it and analyze it.

Here's a sample of what someone else's data looked like:

Trial
Time [seconds]
Distance [inches]
1. 0.5 2.75
2. 1. 5.75
3. 1.5 8.75
4. 2. 11.5
5. 2.5 14.25
6. 3. 17

Graph the data in EXCEL. Does it look like there is a linear relationship between time and data? What would the equation of that line be?

Write the equation of the line here (fill in the blank) :

Distance= (_________________)*time

MATERIALS:

  • LegoTM Mindstorms Robotics Invention System
  • PC computer with USB port and spreadsheet software (such as EXCEL)
  • Yardstick
  • LegoTMRotation Sensor (Optional Purchase)
  • seven Use your equation to predict how far your robot will go in the following amounts of time. Compute your predictions and record the actual distances.

    Time [seconds]
    Predicted Distance [inches]
    Actual Distance [inches]
    5
    7
    10

    eight Roverbot Competition: Program your Roverbot to go as close to 30 inches as you can get it. Test and compare the group's Roverbots to see how everyone is doing.

    nine Part III Add a Rotation Sensor to the Roverbot: By knowing the circumference of the large wheels, we should then be able to calculate how many rotations they make in a given inch traveled:

    Calculations:

    Circumference of large wheels = _______________ inches

    Rotations = ____________ * inches traveled

    Inches traveled = ___________ * Rotations

    Connect a rotation sensor to one of the axles of the large Roverbot wheels.

    Calibrate the rotation sensor to determine how the rotation count relates to the distance traveled by your Roverbot.

    You can put a command in your program to display the rotation count in the RCX window. You will probably have to devise some sort of table like we made earlier to verify your calibration. Use the Help command in the Programming software to see how to program with a sensor. Be sure to reset your rotation sensor at the beginning of your program. Also you need to know that the rotation count increases by 16 for every full rotation of the axle. Record your findings on a piece of notebook paper.

    Once you have determined how the rotation sensor reading is related to the distance traveled, try out the remote control that comes with the your Mindstorms kit. You can send a message from the remote control to the Roverbot. The message can only be 1, 2 or 3.

    Write a program to do the following: Rest until a message is received from the remote control. Then travel for a number of rotations equal to 10 times the message number. (That is, rotation count on the sensor).

    Record your results:

    Message Number [seconds]
    Rotation Count In Window [inches]
    Distance Traveled [inches]
    1
    2
    3

    Previous Page General Info | SWE Home | Regions/MALs | JOIN SWE | Search Page | Next Page

    This page maintained by: iac-webmaster

    Headquarters: 230 E Ohio Street Suite 400 - Chicago, IL 60611-3265
    o: (312) 644-0828 - f: (312) 644-8557 - e: hq@swe.org