# Hands-on ActivityRobotic Perimeter

### Quick Look

Time Required: 45 minutes

Expendable Cost/Group: US \$0.00

This activity requires use of non-expendable (reusable) LEGO MINDSTORMS robot kits and software; see the Materials List for details.

Group Size: 4

Activity Dependency: None

Subject Areas: Measurement, Number and Operations, Science and Technology

### Summary

Students learn and practice how to find the perimeter of a polygonal shape. Using a ruler, they measure model rooms made of construction paper walls. They learn about other tools, such as a robot, that can help them take measurements. Using a robot built from a LEGO® MINDSTORMS® kit that has been programmed to move along a wall and output the length of that wall, students record measurements and compare the perimeter value found with the robot to the perimeter found using a ruler. In both cases, students sketch maps to the scale of the model room and label the measured lengths. A concluding discussion explores the ways in which using a robot may be advantageous or disadvantageous, and real-world applications.

### Engineering Connection

Mechanical engineers, computer scientists, electrical engineers and other scientists often work together to create robots that use sensors to explore and send back measurements of a spaces that either due to concerns related to safety or efficiency, are not practical to manually measure or map. In addition, the trade-off between accuracy and error is a real concern that scientists grapple with no matter the experiment or tool being used.

### Learning Objectives

After this activity, students should be able to:

• Find the perimeter of a given a shape or area.
• Identify and describe possible sources of error, such as machine and human error.
• Explain the pros and cons of using a robot (or other forms of technology) to collect data or measurements, and decide for a given situation whether it is advantageous.

### Educational Standards Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards. All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org). In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

###### Common Core State Standards - Math
• Solve real world and mathematical problems involving perimeters of polygons, including finding the perimeter given the side lengths, finding an unknown side length, and exhibiting rectangles with the same perimeter and different areas or with the same area and different perimeters. (Grade 3) More Details

Do you agree with this alignment?

• Generate measurement data by measuring lengths using rulers marked with halves and fourths of an inch. Show the data by making a line plot, where the horizontal scale is marked off in appropriate units— whole numbers, halves, or quarters. (Grade 3) More Details

Do you agree with this alignment?

• Apply the area and perimeter formulas for rectangles in real world and mathematical problems. (Grade 4) More Details

Do you agree with this alignment?

• Represent and interpret data. (Grade 5) More Details

Do you agree with this alignment?

###### International Technology and Engineering Educators Association - Technology
• Explain how various relationships can exist between technology and engineering and other content areas. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Examine information to assess the trade-offs of using product or system. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Design solutions by safely using tools, materials, and skills. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Interpret the accuracy of information collected. (Grades 6 - 8) More Details

Do you agree with this alignment?

###### New York - Math
• Solve real world and mathematical problems involving perimeters of polygons, including finding the perimeter given the side lengths, finding an unknown side length, and exhibiting rectangles with the same perimeter and different areas or with the same area and different perimeters. (Grade 3) More Details

Do you agree with this alignment?

• Generate measurement data by measuring lengths using rulers marked with halves and fourths of an inch. Show the data by making a line plot, where the horizontal scale is marked off in appropriate units— whole numbers, halves, or quarters. (Grade 3) More Details

Do you agree with this alignment?

• Apply the area and perimeter formulas for rectangles in real world and mathematical problems. (Grade 4) More Details

Do you agree with this alignment?

• Represent and interpret data. (Grade 5) More Details

Do you agree with this alignment?

Suggest an alignment not listed above

### Materials List

Each group needs:

### Pre-Req Knowledge

Students must be comfortable measuring lengths with rulers, know how to add, and draw space representations to scale on grids. It is recommended, but not required, that the teacher has familiarity with LEGO MINDSTORMS NXT robots. If the teacher is new to using this technology, it is strongly recommend that the teacher spend time playing with the robots and conducting this activity on his or her own, before implementing with students.

### Introduction/Motivation

For many situations, you need to know the size of an object or a room. Can you think of any? For example, we may want to make sure our furniture fits into the rooms of a new house, or find out whether or not large items fit into a car, or whether a new computer fits on a desk. One way to describe the size of something is to find its perimeter. The perimeter of an object is the distance around it. To find the perimeter, we measure each side of the object or space and add up our measurements. (Show some props, such as some small objects that can be measured, to better convey the message. Will this stack of books fit in this backpack?)

If we want to measure the sides of a small object or room it seems easy enough to grab a ruler or measuring tape and quickly find the measurements ourselves. However, in some situations, engineers and scientists want to make measurements of a space that is not safe to measure themselves, or may be too big or time-consuming to measure with a measuring tape. In these cases, they use other tools. One thing they may choose to design and build to help them with this task is a robot! Robots use sensors to get information about the space they are in, and they use programs to carry out tasks and use the information they find. One kind of robot engineers have created is a mapping robot. This a robot wanders around an area without bumping into obstacles and sends back a map showing what it has "seen," including the size of the space. If the robot is in a building or room, it could even measure the length of each wall, for example. How might this kind of robot be useful to other people and scientists? (Discuss this with students.)

Imagine you are an archaeologist who has just discovered a hidden underground tomb! You want to explore it and figure out how big the rooms are, but it is very old and the caverns may collapse at any moment. Rather than risk lives, it is a good idea to send in a robot that can send back measurements and a map.

Today we too will be using robots to help us measure small model rooms. How do robots make measurements? They use sensors to help them gather information about the world. Without these sensors robots would have no clue about what is going on around them and no way to learn new kinds of information. Without sensors, our robot might bump into walls, go the wrong way, and have no way to tell you anything at all, much less any important data about how big a room is!

Our robot uses an ultrasonic sensor attached to its front. An ultrasonic sensor is able to determine how far away objects are by sending out a sound wave and measuring the amount of time it takes for the sound to bounce off an obstacle, such as a wall, and return back to the sensor. Have you ever heard your voice echo? That's an example of a sound wave bouncing off an obstacle! We cannot hear the sound signal that the robot uses, however, because it is at a frequency too high for humans to hear, which is why it is called ultrasonic. We can use the information from the sensor, which is the distance between it and an object, to keep the robot from running into walls. How might we use the sensors information to do this? (Discuss this with students.) It uses a second ultrasonic sensor at its side to help it notice if a wall ends or turns away even when no walls are blocking its front. It also has rotation sensors in its wheels that tell it how many degrees the wheels have turned, and using all that information, it is able to figure out how far it has moved. The robot moves along next to a wall, using the ultrasonic sensors to avoid bumping into walls and to stop in case a wall endes, and it uses the rotation sensors within the motors to figure out how far it has moved. With all these sensor clues, our smart robot can tell how long each wall is.

### Procedure

Background

In order to complete this activity, the teacher should be familiar with use of the LEGO MINDSTORMS NXT kit and creating programs using the LEGO MINDSTORMS NXT software. See more information at http://mindstorms.lego.com.

Before the Activity

1. Prepare one robot per group of students using the following instructions:
• Assemble the "Five-Minute Robot," following the instructions at http://www.nxtprograms.com/five_minute_bot/steps.html
• Assemble just the radar portion from the radar instructions at http://www.nxtprograms.com/radar/steps.html (only steps 7 and 8), or simply find another way to attach the ultrasonic sensor to the front of the robot, facing forward. (Note: The radar's ability to rotate is not used in this activity, but by using this design it is easy to change the program to accommodate any future expansions of this activity.)
• Assemble the two pieces, as well as the extra ultrasonic sensor as shown Figures 1 and 2.
• The robot stops if either the side ultrasonic sensor is too far from a wall (>4 inches) or if the front-facing ultra-sonic sensor is blocked by a wall (<4 inches).
• Otherwise, it moves forward.
• Have the robot find and display the distance it has traveled to the NXT screen whenever it stops. To find the distance, use the number of rotations one of its wheels makes, found by using the rotation sensor block for one of the robot's motors. Then find the distance it has traveled by using the equation:

number of wheel rotations X wheel circumference = distance

Find the circumference of the wheel before using this equation; your use of inches or centimeters determines what units will be used for the distance displayed.

• After displaying the distance traveled, wait for a button push and set the distance to 0 again before proceeding.
• If the robot stopped because the ultrasonic sensor on the side was too far from the wall, have the robot turn left 90 degrees after displaying the distance it traveled.
• Otherwise, turn right 90 degrees after displaying distance traveled.
• The robot might need to be repositioned before it can proceed, so have it wait for a button press again.
• Put these instructions in a loop so that the robot continuously checks for the described actions and acts accordingly.
• NOTE: A program called Perimeter Finder is included in the attachments as an example; if this program is used, make sure to correctly import the Circumference block, which is also included. To correctly import this, in the MINDSTORMS software go to Tools > Block Import and Export Wizard... > Browse, and select the Circumference block from wherever you saved it.
1. Prepare some model "rooms" for the students to measure. Use heavy construction paper, cardstock or cardboard and glue or tape. Make sure the room is large enough to fit the robot and provide the robot with enough space to turn and maneuver. Also, make sure the walls are higher than the forward-facing ultrasonic sensor, and note that for the particular program described, it assumed only 90 degree angles. If you want to support more complex shapes, modify the program accordingly, and make use of the front-facing sensor's ability to rotate to find the correct amount to turn.

With the Students

1. Have students measure each side of the model room using their rulers and record the measurements.
2. Hand out the Mapping Perimeter! Worksheet and have students draw to scale the shape of the model room as seen from above, labeling each side with their measurements.
3. Give each student group a robot to use and explain how to use it:
• The robot must begin with its side-facing sensor pointed toward a wall.
• Position the robot a few inches (2-3) away from the side of the wall, but parallel to the wall.
• Press the orange button to run the program.
• The robot moves along the wall and stops as soon as it thinks the wall has ended.
• Record the measurement shown on its screen; this is how long the robot has measured the wall to be in the units put in the program.
• Whenever you are done noting a measurement, press the orange button again and the robot decides whether it should turn left or right.
• Is it positioned correctly this time? If not, reposition the robot and press the orange button again so it continues on its way and measures the next wall.
• Sometimes the measurement of a wall length may take a few tries, especially if the robot was not positioned just right at the beginning or if the wall is a bit strange and confuses the sensor. Don't be afraid to cancel the program, and run it again to retry measuring a wall.
• If you had to make multiple attempts to measure a wall, make note of this and be prepared to explain why, as well as why you think the robot may have been acting unexpectedly.
1. Have students draw another to scale drawing on a grid, this time using the measurements found by the robot, making sure to label each of the sides with the measurements.
2. Compare the two drawings and the measurements. How do they look?
3. Lead a class discussion: Are the measurements the same? If not, why? What are some possible explanations for any differences?
• The sensors are not able to measure exactly and have some error ±3cm or more.
• The robot may not have accounted for its own length when measuring, but just measured how far it moved.
• The robot was moving along the inside of the wall, and could not travel as far as the actual length of the wall.
• The robot was confused by some other obstacles.
• The robot was not positioned correctly and so had to stop abruptly.

How different are the measurements?

Have a discussion about machine error on the part of the robot, as well as possible human error on the part of scientists and in this case, of the students, perhaps in positioning the robot or of the teacher in the design of the walls, program, or robot. Any of these factors might contribute to the differences between the measurements.

• Have students subtract the measurements found for corresponding walls and discuss how big the differences really are.
• (If students know percentages and division.) Discuss and find percent error.

Did you ever have to measure with the robot multiple times? Why is that?

What other difficulties did you encounter?

Now that we know the weaknesses and strengths of this robot, how else and in what other situations might it be useful to use this kind of robot?

### Vocabulary/Definitions

error: The difference between the approximate value (approximate meaning it is close to, but may not be the same, as the exact value) and exact value.

perimeter: The size of something as given by the distance around it.

scale (drawing): A drawing that shows a real object with accurate (meaning that they correctly match actual measurements and/or proportions) sizes except they have all been reduced or enlarged by a certain amount (called the scale).

ultrasonic sensor : A sensor that sends out a sound wave at a high frequency, inaudible to humans, and measures the amount of time it takes for the sound wave to bounce off an object and return to the sensor in order to determine the distance between the sensor and object.

### Assessment

Pre-Activity Assessment

Baseline Survey: Have students complete the Perimeter Pre-Assessment Survey. Collect and grade this pre-assessment to determine how comfortable students are with the concept of perimeter and how skilled they are with calculating the perimeter of various polygons.

Activity-Embedded Assessment

Worksheet: Have students complete the Mapping Perimeter! Worksheet as they go through the activity. This worksheet asks them to draw to-scale maps of the model room based on ruler and robot measurements, and answer comprehension questions.

Post-Activity Assessment

Survey Again: Have sudents complete the Perimeter Post-Assessment Survey. Collect and grade this post-assessment to determine how comfortable students have become with the concept of perimeter and calculating perimeter. Compare scores to the pre-assessment survey scores to determine whether students improved their abilities to calculate the perimeters of various shapes.

### Troubleshooting Tips

Make sure all the motors and sensors are correctly connected to the ports specified in the program.

### Activity Extensions

Extend the activity and program to measure rooms of shapes that have angles other than 90 degrees.

### Activity Scaling

• For lower grades, find the perimeter and focus on real-world robot examples in the discussion, rather than on error.
• For upper grades, discuss percent error, and the design and programming of the robot, as well as the mathematics used to find the distance. Ask students to design and program the robot for a slightly modified task or the same task with a modified design and extra features.

### Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

### More Curriculum Like This

Upper Elementary Lesson
How Does an Ultrasonic Sensor Work?

Students learn about how ultrasonic sensors work, reinforcing the connection between this sensor and how humans, bats and dolphins estimate distance. They learn the echolocation process—sound waves transmitted, bounced back and received, with the time difference used to calculate the distance of obj...

Middle School Activity

Students learn about the three components of biosensors—a special type of sensor—and their functions and importance. With this understanding, students identify various organs in the human body that behave as sensors, such as the pancreas. Using LEGO® MINDSTORMS® robots, provided rbt robot programs a...

Upper Elementary Activity
Ultrasonic Sensor Robot Design Project: Don't Bump into Me!

Students' understanding of how robotic ultrasonic sensors work is reinforced in a design challenge involving LEGO® MINDSTORMS® EV3 robots and ultrasonic sensors. Student groups program their robots to move freely without bumping into obstacles (toy LEGO people).

Middle School Activity
Beating the Motion Sensor

In this activity, students explore material properties as they relate to motion detection, and use that knowledge to make design judgments about what types of motion detectors to use in specific applications.

### References

Five-Minute Bot Instructions: http://www.nxtprograms.com/five_minute_bot/steps.html

© 2013 by Regents of the University of Colorado; original © 2011 Polytechnic Institute of New York University

Rezwana Uddin

### Supporting Program

AMPS GK-12 Program, Polytechnic Institute of New York University

### Acknowledgements

This activity was developed by the Applying Mechatronics to Promote Science (AMPS) Program funded by National Science Foundation GK-12 grant no. 0741714. However, these contents do not necessarily represent the policies of the NSF, and you should not assume endorsement by the federal government.