44
NXT LEGO Robotics: A Problem Solving Approach to Intregrating Robotics into the Classroom LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum. Page 1 of 44 OVERVIEW This curriculum is intended to teach engineering skills through the use of LEGO NXT robots and NXT-G, the associated native programming language. Whether you are a teacher looking to introduce engineering concepts to your students or a rookie FIRST LEGO League coach trying to stay afloat, the ideas presented in this curriculum can help. This is not intended to be a walkthrough of how to build a winning robot or provide all of the answers. More than anything, this curriculum attempts to instill a creative problem solving approach to tangible problems, illustrate the facets of an engineering mindset, and illuminate connections between the oft times abstract world of mathematics and the physical reality of robotics. Throughout this curriculum, we model problem solving based thinking as we help surmount common obstacles in robot building and programming. The problem solving explained within is not intended to be passed on directly to students or team members. Instead, it is included to help you, the instructor or coach, understand the variables at hand and help facilitate the learning through directed questions and experimentation. Discovering and overcoming academic obstacles within an education-focused framework is vital to learning. Giving someone all of the answers without the process of guided self-discovery robs all opportunity to learn new, applicable skills required for present and future problem solving. This curriculum does not intend to answer all questions regarding NXT and NXT- G (and no curriculum could), but rather it attempts to create a problem solving framework that will help you teach yourself and students how to use engineering skills to overcome tests and challenges. This curriculum only tries to teach what would be considered the basics of robot building and programming through a series of tests and challenges. The idea is to teach the basics of robotics skills (straight movement, turning, sensor use, etc.) and present various challenges that require students to apply these skills in unique and innovative ways to solve them. All the while, the robotics instruction will be weaved with mathematics and logic. The capabilities of the NXT are so vast (for what is really a toy) that learning about the NXT will only open up new avenues to pursue and master, and therein lies the beauty of it. With this in mind, you will see that this curriculum only presents one method to introduce robotics. While this framework has been proven to work, it is not the final word. The best part about LEGO robotics is this ever-present multitude of solutions. As you move through the curriculum, do not be afraid to change, omit, or add to it. This is what keeps it fresh and exciting for teachers and students alike. However, if you do come up with a great idea, please share! Let’s get started. MATERIALS Your materials will depend on your teaching methodology preferences. In this section, a list of required and suggested material will be listed. The use of some of the materials will not become clear until we introduce the applicable skill. The following list will document the necessary supplies you will need for each group. Groups should not

NXT Curriculum - Arizona FIRST LEGO League

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NXT Curriculum - Arizona FIRST LEGO League

NXT LEGO Robotics: A Problem Solving Approach to Intregrating Robotics into the Classroom

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 1 of 44

OVERVIEW This curriculum is intended to teach

engineering skills through the use of LEGO NXT robots and NXT-G, the associated native programming language. Whether you are a teacher looking to introduce engineering concepts to your students or a rookie FIRST LEGO League coach trying to stay afloat, the ideas presented in this curriculum can help. This is not intended to be a walkthrough of how to build a winning robot or provide all of the answers. More than anything, this curriculum attempts to instill a creative problem solving approach to tangible problems, illustrate the facets of an engineering mindset, and illuminate connections between the oft times abstract world of mathematics and the physical reality of robotics.

Throughout this curriculum, we model problem solving based thinking as we help surmount common obstacles in robot building and programming. The problem solving explained within is not intended to be passed on directly to students or team members. Instead, it is included to help you, the instructor or coach, understand the variables at hand and help facilitate the learning through directed questions and experimentation. Discovering and overcoming academic obstacles within an education-focused framework is vital to learning. Giving someone all of the answers without the process of guided self-discovery robs all opportunity to learn new, applicable skills required for present and future problem solving.

This curriculum does not intend to answer all questions regarding NXT and NXT-G (and no curriculum could), but rather it attempts to create a problem solving

framework that will help you teach yourself and students how to use engineering skills to overcome tests and challenges. This curriculum only tries to teach what would be considered the basics of robot building and programming through a series of tests and challenges. The idea is to teach the basics of robotics skills (straight movement, turning, sensor use, etc.) and present various challenges that require students to apply these skills in unique and innovative ways to solve them. All the while, the robotics instruction will be weaved with mathematics and logic.

The capabilities of the NXT are so vast (for what is really a toy) that learning about the NXT will only open up new avenues to pursue and master, and therein lies the beauty of it. With this in mind, you will see that this curriculum only presents one method to introduce robotics. While this framework has been proven to work, it is not the final word. The best part about LEGO robotics is this ever-present multitude of solutions. As you move through the curriculum, do not be afraid to change, omit, or add to it. This is what keeps it fresh and exciting for teachers and students alike. However, if you do come up with a great idea, please share!

Let’s get started.

MATERIALS Your materials will depend on your

teaching methodology preferences. In this section, a list of required and suggested material will be listed. The use of some of the materials will not become clear until we introduce the applicable skill. The following list will document the necessary supplies you will need for each group. Groups should not

Page 2: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 2 of 44

be larger than three to four students. With higher numbers, contact time for each student is greatly reduced. Required Materials (per group) 1. LEGO Mindstorms NXT retail (8547) or

education kit (9797) 2. Computer with LEGO Mindstorms NXT-G

installed

Before moving on, the difference between the retail and education NXT kits should be presented. Both will be suitable for a school program or FLL team and for the most part they are functionally similar, but there are some distinctions you should be made aware of.

Components Retail NXT 2.0

kit (8547) Education NXT

kit (9797)

Rechargeable Battery

Not included Included

Light/Color Sensor

Color Sensor Light Sensor

NXT-G Software Retail version

included

Not included (Purchased separately)

Sound Sensor Not included Included

Tires Flat tires and

treads included Balloon tires

only

To make things even more confusing,

there are two different versions of the software—the retail version and the education version. The retail version comes bundled with the retail kit, and only the educational version can be purchased as a standalone product. Both have the same capabilities as far as programming is concerned, but they have slightly different additional capabilities. However, none of the differences are so great that one is paramount to the other. The retail software includes a basic remote control component that will allow real-time control via a

Bluetooth connection and RoboCenter, which shows how to build four different robots. (A third party real time remote control application with more capabilities can be downloaded for free.) Instead of this, the educational software includes a data logging program that allows you to use the NXT sensors to gather data for different experiments and Robot Education, which presents the basics of robotics construction and programming. Either software will do the trick, so purchase the one you believe would be the greatest benefit to you. In my experience, the data logging feature would be the only one of these additional capabilities that I could foresee a use for. Optional Materials (per group) 1. Education Resource kit (9648 or 9695).

This contains extra components to add to the building possibilities including different types of connectors and wheels. (If you are an FLL coach, and you ordered the kits during FLL registration, this kit will be included.)

2. Meter stick or metric tape measure 3. Wheelie jig 4. Adding machine tape 5. Fabric or flexible ruler 6. Turning jig 7. Graph paper 8. Calculator 9. Protractor

You will also need a dedicated area to

run your robots. It is best to use a smooth flat surface like a linoleum tile floor. The goal is to have a surface that has a relatively low and consistent coefficient of friction. Surfaces with higher or inconsistent friction like carpets can negatively affect the consistency of your robot’s movement. For example, carpets would tend to grab elements that slide over their surface. The

Page 3: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 3 of 44

robot you will have the students build as part of this curriculum will have pieces that slide instead of back wheels. Additionally, some carpets have a grain, which changes the force of friction depending on the direction of movement. If you do not have a tile floor, I recommend purchasing 8’ by 4’ sheets of white tileboard. This can be bought at Lowe’s or Home Depot for about $12. They provide a portable, smooth surface that can be easily stored. They are an 1/8 inch thick and can be easily moved. Also, students can use dry-erase markers on them because they are the same material that non-magnetic white boards are made of. I would have a board for every four to five groups of students. (Of course, FLL teams will have to construct their tournament tables, and this surface could be used instead.) Along with the robot surface, you will need some blue painter’s masking tape and various boxes or props that can serve as obstacles. The blue tape will be used to create the challenges that will be described in detail later.

GENERAL RULES OF THE ROBOTICS THUMB

The following is a list of overarching rules that apply throughout robotics. 1. The students should be the ones

completing the work, running the tests, and troubleshooting problems. As the teacher, your job is to facilitate through questions.

2. Students should only use techniques that they can fully explain. Students can easily mimic complex procedures without understanding the underlying principles. If they can not explain it fully to you, they can not use it until they learn it (that is where you come in).

3. Consistency is key. Completing a test or challenge once is good. Twice is better. Three times is even better. Robots should be expected to perform tasks repeatedly with the highest degrees of accuracy to be considered successful. Think about it—you would not want your calculator to only properly compute some of the time!

4. There is never one right answer. There are always wrong answers, but there are always many right ways to complete a challenge. Some answers are better than others. Determining what makes one solution better than another is a great beginning point for instruction on evaluation criteria. Do not try to limit your student’s possibilities. The freewheeling creativity is at the heart of the robotics curriculum. Be ready because your students will surprise you.

5. Experimenting is divine. Students should have the freedom to try different solutions and arrive at what they think is the best. Too often, students will get an answer and want to move on. But, in reality, the first answer is not always the best, and it does not signal the end of the problem solving process. As the teacher, you should also experiment by creating new challenges and competitions. Try them and share them!

6. Make connections. Robotics is the vehicle for students to gain a deeper understanding of mathematics, science, and engineering. Use the excitement they get to teach math principles and show them that math extends far beyond the worksheet.

7. If it is not forbidden in the rules, it is fair game. Sometimes creative and quality problem solving will give rise to accusations of “cheating” from other students. Robotics falls firmly within the

Page 4: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 4 of 44

purview of out-of-the-box thinking. It is not just being able to build and program the robot; it is also about the formation of a sound strategy. Encourage this innovative thinking. It is generally contagious.

8. Share ideas. The free and open communication of ideas between students is key. Encourage students to collaborate and share ideas. The goal is not to have students simply mimic others but to use other’s ideas as inspiration to launch into their own creative ventures.

ROBOT BUILDING For these activities, it is recommended that the students build the modified Five-Minute Bot (FMB) adapted from the model presented on NXTprograms.com. The robot is simple to build, requires few pieces, and is highly customizable. It is important to remember that constructing robots and programming them fall under the purview of mechanical and computer engineering respectively. In my experience, it is best to not to try to have the students experiment with both of these simultaneously at the beginning. Once students gain an understanding of the capabilities of NXT-G and the different sensors, they will better be able to construct a robot to suit their needs. COMMON ROBOT BUILDING PROBLEMS A few common problems seem to arise when students build the FMB. It is important to be aware of these problems because errors in construction can greatly alter the performance of the robot and lead students to prematurely blame the programming. This primarily results from increased friction between the tire and

motor. I do not necessarily recommend correcting every problem you witness during the construction process because these mistakes can provide many teachable moments. Common Problem 1: Missing Bushing between Tire and Motor The directions for the FMB call for a full bushing to be placed between the tire hub and the motor. This bushing prevents the hub from sliding along the axle and having the tire rub against the motor housing. This component is easy to miss, but its effects can be rather large. Common Problem 2: Wheels are Placed on Backwards The two sides of the standard NXT wheel hub are not made equal. One is intended to face the motor, and one is intended to face away from the motor. This problem often supersedes the lack of a bushing because the construction of the wheel hub makes it that even with a bushing in place between the hub and motor the tire can easily rub against the motor housing. Common Problem 3: Cable connection mistakes LEGO Mindstorms has a set of predetermined default port configurations for both the drive motors and sensors. For example, when you place a move block in the program it will automatically have both motor B and C selected. These are the default drive motor ports. This does not mean that you must use these ports when constructing the robot, but it can help you save time and avoid the hassle of having to change the block configuration every time you use one. I suggest you use ports B and C simply due to the ease factor. Additionally, the NXT will synchronize motor movement

Page 5: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 5 of 44

to help create straight line movement when using two drive motors. This will occur when any two motors are selected. However, if all three motors are activated to move at the same time, only motors B and C will be synchronized. (This circumstance will be really rare, but it is worth mentioning.) When students are creating the robots they often get confused where the cables should be connected. The cables are what allow the brick to communicate with the motors and sensors. Without this connection, the brick would not be able to poll the sensors or command motor movement. When monitoring the building of the robot make sure that the students are using the lettered ports (A, B, and C) for the motors and the numbered ports (1, 2, 3. and 4) for sensors. Sometimes students do not recognize that the cables need to connect to the motors, and they route cables from the lettered ports to the numbered ports.

USING MINDSTORMS NXT-G LEGO Mindstorms NXT-G is the native programming language of the NXT. It based on National Instrument’s LabView programming environment. This is not the only method to program the NXT, but, in my experience, it strikes a wonderful balance between an easy learning curve and powerful functionality. The curriculum presented here only scratches the surface of what the NXT can do. For a quick survey of the wide array of possibilities of the NXT, take a quick jaunt to YouTube. I do not plan to present a detailed tutorial on the navigation of Mindstorms because there are other resources readily available that do a much better job than I could. There are a great set of video tutorials at Oregon Robotics website— www.ortop.org/NXT_Tutorial/.

BASIC CURRICULUM PROGRESSION

Before diving into the detail of each test and challenge, we need to look at the larger objectives. The progression intends to teach students robotics skills in a logical sequence, which allows them to optimally apply problem solving techniques and create connections between robotics and mathematics. The aim is for participants to not only learn robotics techniques but also learn the underlying thought process and rationale. The first part of the progression focuses on accurate movement of the robot. Students will learn how to make the robot move straight, move a certain distance, complete accurate turns, and combine multiple movements together. They will do this through various tests and challenges. For the purposes of this curriculum, tests are activities that students will have to complete to continue forward. For example, the first test requires the robot to move forward in a straight line. This will need to be demonstrated before tackling future tests and challenges. Challenges, on the other hand, refer to tasks that have multiple solutions that students will have to creatively use their learned skills to solve. Challenges can also provide a bit of competition and celebration of innovative approaches. The second part of the curriculum poses more complex problems and integrates the sensors. The following is a basic overview of the curriculum progression— 1. Straight Line Movement Test 2. Determining Movement Parameters 3. Straight Line Movement Challenges

a. Parking Challenge

Page 6: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 6 of 44

b. Closest to the Wall Challenge 4. Turning Tests

a. 360 Turn Test

b. 90 Turn Test c. Four Turn Test

5. Turning Challenges a. Turn to Park b. Turn to Closest to the Wall c. Obstacle Course Race d. Figure 8 Challenge e. Scaled Course Challenge

6. Sensor Use 7. Targeted Complex Challenges

a. Maze Solving b. Line/Wall Following c. Obstacle Course Traverse

Please keep in mind that this progression

is by no means steadfastly rigid. Challenges can be altered, omitted, or added. In fact, dreaming up new challenges is quite a bit of the appeal of working with robotics. Soon, you and the students will be working collaboratively to tackle new challenges.

Page 7: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 7 of 44

STRAIGHT LINE MOVEMENT

The first hurdle students will face is having the robot simply move in a straight line. This will be their first experience with the difference between the theoretical world of programming and the real physics of the physical world. While this first step may seem trivial, most robot programming and functionality relies on the robot being able to reliably move in a straight line. STRAIGHT LINE TEST Goal: The robot will move in a straight line over a prescribed number of rotations (about 10). Skills:

Problem solving

Making predictions

Measurement

Graphing

Generating mathematical models/formulas

Set-up: Lay out the course with a straight line reference (e.g. edge of panel board, wall, seams in the tile, or tape line). Programming: This will be the one instance that the program will be fixed. The program will consist of a single move block with a defined number of rotations (about 10).

Top: The straight line test program. Bottom: The configuration panel for the move block with the duration set to 10 rotations.

Procedure: To complete this test, create a program to move the robot forward ten rotations. I would not recommend any duration significantly lower than ten rotations because shorter spans may not reveal an aberration in the movement of the robot. Run the robot along a straight edge of a table or laminate panel. This facilitates the evaluation of the straightness of the robot’s movement. It is not uncommon for the robot to curve one way or another. This is the student’s first opportunity to employ engineering-based problem solving. To this end, students should be directed to hypothesize possible reasons for the crooked movement and determine ways to isolate and identify the problem. Students often can identify plausible origins of the problem, but they have trouble figuring out ways to test their guesses. Many students attempt to blame the program, the NXT brick, or the motors, and while they may be at fault, it very rarely turns out to be so. At this time, I must clarify what I mean by straight movement. When I talk about straight movement, I mean the average line the robot takes from the beginning of the movement to the end. Many robots will move in a straight line but seem to shimmy back in forth in a repeating

Page 8: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 8 of 44

pattern. Think about it as shaking your hips while walking in a straight line. This shimmy results from the error correction in the move block. While the two motors should, in the perfect world, be completely synched with each other and turn at the same speed, this is not always the case. As the robot goes forward, the NXT brick is continually checking the information from the embedded rotation sensor in each motor. When one motor moves faster than the other, the NXT automatically compensates by speeding the other motor up. Once the slower motor catches up this temporary increase in power goes away and then the scenario repeats itself. This is common problem, and you can attempt to match motors. A good explanation of how to do this is found on the TechBrick Robotics website (http://www.techbrick.com/Lego/TechBrick/TechTips/NXTCalibration/).

Tire problems

Typically, the problems arise from a difference in the distance traveled by each of the wheels. When there is an appreciable difference between the distances traveled by each of the wheels, the robot will curve towards the wheel that moves the shorter distance. When students are wrestling with identification of the movement problem, they may have difficulty creating a method to confirm that the curving movement arises from the tires. A simple method is to switch the tires. If a robot continually curves to the right and you switch the tires, you would reasonably assume that it should curve to the left if the problem lies within the tires. Tires problems can result from a number of factors explained below.

Improperly mounted wheels As discussed previously, there are a few common mistakes that are made wheel placing the wheels on the robot. The omission of the bushing or the accidental reversing of the wheel hub can both cause the rubber tire to rub against the motor housing.

This shows the different sides of the tire hubs. The one of the left should face the outside of the robot. The side on the right should be facing the motor with a bushing in between.

The resulting friction can reduce the

power and cause that wheel to travel a shorter distance than desired. Both of these problems are easily remedied through either the addition of bushing or flipping of the tire. Improperly seated tires

While the information below could apply to any LEGO wheel, it is particularly observed in the balloon tires included in the older retail and education kits. The flat wheels are not as greatly affected by improper seating.

It is difficult to explain their problem verbally, and this problem is best understood by removing the rubber tire from the plastic hub. When looking at the hub, you will see two narrow channels on the outside edges. The inner edge of the rubber tire has complimentary rubber band

Page 9: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 9 of 44

that should sit within those channels when properly constructed. Many problems arise when the bands are not completely seated within the channel on both the inside and outside of the tire. An improperly seated tire is easy to spot because at the point where the rubber tire meets the plastic hub there will be a couple millimeter gap, and the rubber tire will easily move across the hub. A properly seated tire will have a tight union and a much sturdier feel.

The wheel on the left is properly seated while the one on the right is not. The arrow shows the gap that results from improper seating. The wheels appear to vary in size slightly, which can cause the inaccurate movement.

Improper seating causes a problem

because it changes the size of the wheel’s circumference. Take two wheels, one properly seated and one improperly seated, and look at them from the top (as opposed to the side—you should not see the hub). If you look carefully, you will notice that the improperly seated tire is slightly skinnier than the properly seated one. This happens because the natural elasticity of the rubber contracts, and when it does so, not only does it make the tires profile thinner, but it also increases the circumference slightly. This change might not be enormous, but when the motor is completing multiple rotations, the error is being compounded and becomes significant over time. For

example, if one wheel is 0.2 centimeters larger than the other wheel, the difference in the distance traveled over the course of a single rotation will be nearly unnoticeable. However, over ten rotations, the larger wheel will have traveled a total of 2 cm (0.2 cm error x 10 rotations) farther than the other wheel and the difference begins to become significant. This begins to illuminate a feature of robotics programming—especially hard coding (programming preset movements without the robot using sensors to gather information about the environment and making decisions based on the information gathered)—that every move a robot makes is predicated on the previous movements. Errors will compound in such a way that longer programs (ones with multiple commands or movements) will become increasingly susceptible to minute errors. On side note, there are many ways to take this error into account and mitigate its effects, but the scope of that discussion is to great to be entered into at this point. Different size tires It is generally assumed that the manufacturing process will yield identically sized tires. This is rarely, if ever, the case. There are minute differences in the circumferences and construction of the tires, but these differences are often so minute that they are nearly imperceptible even over the course of long movements. However, it does happen that two properly mounted and seated wheels will have a significant enough difference to result in a noticeable curvature of forward movement. After you have isolated the problem to the tires, you will simply have to switch out the wheels to find a closely matched pair. With four wheels in the NXT starter kit, you are almost certain to find a pair that will be close

Page 10: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 10 of 44

enough in size to result in straight movement. Structural Problems Structural problems, as I call them, can arise predominantly from either loose connections or improper balance. NXT robots, while sturdy, are clearly not indestructible. Handling and moving the robot can often jar loose some of the pins holding components together. It is advistable to have the students take a quick glance periodically (optimally before every program run) to make sure the connections are not coming loose. It is enormously aggravating to methodically problem solve to find out that a simple shoddy connection is to blame. The other structural problem arises from imbalance. This is will not arise often during an initial straight line test because your robot will typically be the base design. However, if you add a hugely disparate amount of weight to one side, the trueness of the straight line movement can be affected. Motor Problems While it is rare, it can occur that two motors are so poorly synched that it can affect straight line movement. You should not be questioning the motor’s accuracy until tested the wheels and checked the structural integrity. If you have eliminated these two factors, you may indeed need to look to the motors. Problem solving motor synchronization problems follow much the same course as the tires. Switch out motors until you see the effect mitigated. As mentioned earlier, there are methods to attempt to find matched motors without having to tear apart and rebuild the robot continuously. The efficacy of the methodology presented in the

aforementioned website has not been evaluated, but it does seem to make sense. Other problems Sometimes you will experience stranger difficulties with the NXT. You might program the robot to move forward, but when you run the program, the robot either only moves one wheel or does not respond at all. There are series of steps that one should take when this occurs. 1. First, double check that the program you

are running is the one you are intending to run.

2. Look at the name on the NXT display screen and the NXT Mindstorms programming window. If they are the same, take a quick look at the program blocks and make sure that the program is indeed calibrated to move the robot forward.

3. Check to make sure that all cables are correctly routed and completely snapped into the ports. A loose cable can cause the program to run erroneously or not at all.

4. If all else fails, turn the NXT off and back on again. In my experience, this solves some of the more mysterious problems. It might also be suggested that you check to make sure that you have the latest firmware downloaded and copied to your brick. There have been some known technical problems with previous firmware versions.

Page 11: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 11 of 44

DETERMINING MOVEMENT PARAMETERS Hardcoding Movement

Hardcoding is a programming technique where data is entered into the program to directly control the robot. This is distinct from softcoding. Instead of programming direct robot movement parameters, softcoding requires the use of various sensors to gather data about the environment and the programming of various actions based upon this set of data. For an analog in the real world, think about the hardcoding/softcoding distinction this way. If someone were to give you directions to a specific destination, there are many ways to do so. One person might say go one mile east then turn left (hardcoding). Another person may say go east until you see the supermarket on the corner and then turn left (softcoding). Both methods should lead you down the same path, but only one will rely upon you actively gathering information from your surrounding and making decisions based upon what you see. In the beginning, you will be focusing on hardcoding techniques because they are frankly simpler and will provide a basis for the addition of sensors. Types of Movement Parameters

All movement of the NXT is regulated by the duration of the motor’s activation. You are never programming how you want the robot to move; you are simply telling the motors to turn on for certain durations. The motor movement subsequently results in the movement of the robot. This distinction is especially important when it comes to turning.

The move block allows the programmer to regulate movement of the motors through four different units of measure, which we refer to as parameters:

1. Number of Motor Rotations 2. Number of Degrees of Rotation 3. Time (in seconds) 4. Unlimited

For the purposes of teaching the basics of robotic movement, we will be using motor rotations are the movement parameter of choice. Using motor rotations as the unit of measure provides a high degree of movement accuracy and sensitivity while being able to be easily understood by most students. However, before we proceed, each unit will be discussed in slightly more detail. Rotations and Degrees Each NXT motor has a built-in rotation sensor that continually measures the rotation of the motor. To control the movement of the motor, programmers can input a parameter in either rotations or degrees (e.g. 1.5 rotations or 540 degrees). During movement, the robot will apply power to the motor and monitor the information from the rotation sensor. It will turn off the motor when the rotation sensor reaches the movement parameter. The newer versions of NXT-G allow a motor rotations parameter to be precise to the thousandths place. Time (Seconds)

When employing time as the movement parameter, the NXT brick applies power to the motor for a certain amount of time. However, using time as turn parameter can be pretty unreliable. This is because the actual movement of the robot will vary depending on the charge state of the battery. Even though both motor power settings can be exactly the same, a fully charged battery would supply more power to the motors and result in a greater distance moved than a robot with a lower

Page 12: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 12 of 44

battery charge. However, this does not mean that seconds does not have a proper place in programming. To understand this, we need to pause for a moment and take a closer look at the NXT-G programming environment. When executing a program, the NXT will complete each block or command before moving to the next one. For example, if you program to the motor to complete 2.65 rotations, it will not move to the next command until the rotation sensor measures 2.65 rotations. This can be problematic if the robot encounters a situation where the motors can not complete the requisite number of rotations. This could happen when the robot runs into an object or wall. If this occurs, the program will stall and the robot will continue to try to complete the rotations before moving on. Typically, you will hear a high pitched whine from the robot as it tries to move the motors but is unable to. Past experience shows that this generally occurs more often with an attached actuator than with the movement wheels. Students will often immediately decry the program, and they would be partially correct. Changing the movement unit to time would solve this problem because, even if the motor binds, the program will still progress after the programmed time has expired. Unlimited The unlimited movement parameter does not mean that the robot will simply continue to apply power to the motor indefinitely. If it did, its suitability for programming would be incredibly limited. The unlimited movement parameter is typically used in conjunction with wait blocks, “do” loops, “while” loops, and switches. This will suffice for now because its use in practice can be somewhat counter-

intuitive, and this discussion is best left for later. Creating Connections between Motor Rotations and Distance This part explains a few different methods you can use to cement the connection between the rotations of the motors and the distance it travels. Of course, over one full rotation, the robot will travel a distance equal to the wheel’s circumference given that there is no slippage or obstacles. Interestingly enough, this can be a difficult concept for the students to grasp. They quickly understand that the motors need to rotate for the robot to move, but they frequently can not provide a realistic estimate of the distance the robot will move as it completes a full rotation. They will also often conflate speed of the motor rotations with distance traveled. Left to their own devices, students will often employ a guess and check strategy, and while this can eventually yield a correct answer, it is clearly not the most efficient. Through the following practices, we attempt to develop the conceptual understanding of and reflective thinking about how the circumference of the tires relate to the distance traveled. The first step is to have students concretely observe the distance traveled over several motor rotations. There are many ways of doing this, and we will document four below. All four deal with determining the circumference of the wheel, but each does it in a slightly different way. Choose the one (or make up one) that will be appropriate to the level of your students. As a general rule of thumb, students should only employ strategies and methods that they can completely explain. Even after teaching the concept, if students can not

Page 13: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 13 of 44

explain their process, they do not really understand what they are doing.

All four have students determine how far the wheels will move over a certain number of rotations. Then, they will use the information to determine how many rotations (including fractional parts of rotations) it will take to move a certain distance. This is much more helpful in practice, and this skill will be used throughout the challenges presented later. Also, all four methods help walk the students down the path to creating an algebraic equation to express the relationship. Algebraic Connection Regardless of the method used to determine the rotational distance of a given wheel, you can require students to create an algebraic model to represent what is happening.

From the outset, we know that the distance traveled will depend on the circumference of the wheel and the number of rotations it completes. To help create the understanding in student you can have them observe the difference in distance traveled between different sized wheels and over different numbers of rotations.

The mathematical model at work could be represented by the following equation:

Number

of Rotations

× Circumference of the Wheel

= Distance Traveled

However, this model only works if we

already know the circumference of the wheels. This is vital piece of information, and, in fact, the four methods listed below all aim to determine the circumference of the tires by controlling the number of

rotations and measuring the distance travelled. Therefore, through a bit of algebraic manipulation, you can find out the wheel circumference if you know the other two using the equation below.

Determining the wheel

circumference is only an intermediate step to deriving a more useful mathematical model. Most often, you will want to determine the number of motor rotations it will take to move your robot a certain distance. For example, if during a challenge you need to move the robot forward 16 centimeters, you can use the desired travel distance and the known cirumference of the wheel to determine the number of motor rotations. The equation below shows the relationship.

It is important to remember that any

student could complete the calculations above if they are hand-fed the equation and given a calculator. This process was intentionally designed to move from the concrete towards the abstract. The mathematical models were presented to help you as a facilitator understand the mathematical progression of the process. This should help when walking the students through one of the methods below. Mastering the abstract formulas is a goal, but it is best met through the use of actual observations and concrete models. Method #1: Measuring Circumference with Flexible Ruler

Distance Travelled =

Circumference of the Wheel Number of Rotations

Desired Travel Distance =

Motor Rotations Parameter Circumference of the Wheel

Page 14: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 14 of 44

Students use a flexible ruler to measure the circumference of the tire. When they know the circumference, it will be easy for them to determine the number of rotations necessary to go any set distance by creating an algebraic equation (which will be discussed later). This option is only recommended for those students who have a robust geometric knowledge and can explain fully how the circumference relates to rotational distance. You will also need to be careful because this measurement method tends to be a bit more inaccurate than others because it relies on a single measurement. Method #2: Using a Wheelie and Graph This method relies on the use of a wheelie to measure the distance traveled during different numbers of wheel rotations. The wheelie, similar to a trundle wheel, is an instrument constructed of a beam, axle, tire, and tattletale. To use the wheelie, students should lay out a tape measure or yard/meter stick and run the wheelie along the measurement device. Using the tattletale, the students will determine how far the wheelie traveled during one rotation and record this information on a line graph comparing the number of rotations (x-axis) to the distance traveled (y-axis). Have students repeat process with an increasing number of rotations (up to about 5 rotations). After the students graph several data points they should be able to draw a line of best fit. Many will immediately recognize that the line is straight and that they will not have to complete further rotation measurements to determine the distance traveled. This is a prime opportunity to discuss linear functions and why this relationship is linear. Once students have completed the graph, they will be able to accurately

estimate the number of rotations required to go a certain distance. It will not be exact, but it will provide them with a relatively close estimate.

A fully constructed wheelie with orange tattletale.

Using the graph will not only increase

their graphing skills but will also force students to use their estimation and decimal skills.

Over time, students will begin to make the connection and actively seek an easier algorithm. This will be an opportunity to help students derive the equation listed above. Method #3: Constructing a Tape Measure This really capitalizes on parts of the two previous methods. Using a flexible tape measure or wheelie, students should calculate the circumference of the wheel. Give the students a long piece of adding machine tape. Students will mark multiples of the wheel circumference on the paper. For example, if the wheel measured 15 centimeters in diameter, the students would make marks on the tape at 15 cm, 30 cm, 45 cm, 60 cm, etc. and mark them one rotation, two rotations, three rotations, and four rotations respectively. Then, during the challenges, the students could use their tape measure to determine the number of

Page 15: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 15 of 44

rotations they need to have the motors turn. This will help reinforce fractional parts of a unit measure. Once again, the goal will eventually be to move them towards an algorithm like the one presented earlier. Method #4: Five Rotation Test This method relies on students analyzing the movement of the robot to inductively determine the circumference of the wheel. To do this, have the students program the robot to move forward five rotations. They should measure the distance traveled as accurately as possible. In fact, it is always advisable to have them repeat the movement a few times to get a reliable measurement. From there, challenge the students to determine the distance the robot would travel over a single rotation. Their level of accuracy should be high, and you should expect them to find the rotational distance to three to four significant digits (to the hundredth or thousandths place).

Page 16: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 16 of 44

STRAIGHT LINE CHALLENGE #1: PARKING BETWEEN THE LINES Goal: The robot must move from behind the starting line and stop between the two finish lines without any part of the robot touching or over the tape. Skills:

Measurement

Decimal/Fraction number sense

Making Predictions

Estimation (Reflective Thinking)

Algebraic Reasoning

Problem Solving

Geometry (Circumference) Set-Up: Using blue painter’s tape, create a starting line and a parking space. The parking space should be a good distance (over a meter) from the starting point and should be slightly wider than the length of the robot. The size of the parking space will dictate how precise the movement parameters will need to be. Generally, I make the parking spaces only about 5 cm larger than the robot.

Procedure: After the course is set-up, allow students the opportunity to determine the distance the robot will need to travel to stop between the lines. Do not allow blind

guessing and checking. While this would eventually lead to an acceptable solution, it is inefficient and moves the students away from what you are trying to teach them. To encourage the use of measurement to find the movement parameter, you should stress the importance of getting it right with as few attempts as possible. Students can easily complete this challenge in a single attempt. To measure, students should choose a point on the robot to serve a measuring point. For example, students could choose the leading edge of the wheel. Students can place the robot behind the starting line and align their measurement device to the measurement point. Then, the students can place their robot in the desired ending position. Using the measurement point, they can then ascertain the total travel distance. Programming: This is nearly the simplest program you could conceive of. The program should consist of a single move block with the proper movement parameter. Students often will want to begin adding more blocks to the program, but at this point, you will want to stress the importance of accurate movement and how that will serve as a basis for the longer, more complex programs that are on the horizon. When students are trying to increase or reduce their movement parameter, some will add another move block instead of changing the duration in the move block configuration panel. This is common mistake. Move blocks are never exact; even the most consistent robots will not be perfect. Remember errors compound over multiple movements, so it is better to use one move block instead of two or three (if they are simply doing the same thing).

A diagram showing the set-up of the Parking Between the Lines Challenge

Page 17: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 17 of 44

Additional Information: Use this opportunity begin reinforcing the idea that the robots ending point is completely dependent on the starting point. Often students will slightly change the starting point between trials even though they will vehemently deny it. When they begin to understand the importance of the starting position, have them brainstorm ways to increase the consistency of the starting position. This can range from the use of landmarks (marks on the board, edges of the tape, etc.) to the use of constructed templates. It is not uncommon for students to really struggle with this idea. But, introducing this idea early will help when you introduce the idea of reference points later on. You will also find that some students begin to grasp this idea quickly, and you should encourage this by allowing them to capitalize on their creativity and critical thinking. Remember, if it is not specifically stated that it is against the rules, it is not cheating. Extensions:

Increase the difficulty of the challenge in a number of ways. You can move the parking lines closer together or move the starting line farther back.

Require the robot to move completely past the parking space and back into it.

Have the students complete the challenge again with a pair of different sized tires. They would have to determine the distance traveled per rotation again, but it would provide a crystal clear picture of whether they understand what they are doing.

Complete the challenge moving backwards and have the students determine if there is any difference.

Experiment with power levels of the move block and see any changes occur.

Page 18: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 18 of 44

STRAIGHT LINE CHALLENGE #2: CLOSEST TO THE WALL Goal: The robot must move from behind the starting line and stop within 1 cm (just under 1/2 of an inch) of a wall without touching it. Skills:

Measurement

Decimal/Fraction number sense

Making Predictions

Estimation (Reflective Thinking)

Algebraic Reasoning

Problem Solving

Geometry (Circumference) Set-Up: Create a starting line with blue painter’s tape. The starting line should be parallel to a wall (or other solid surface that can substitute for a wall, e.g. pile of books, LEGO NXT box, etc.)

A diagram showing the set-up for the Closest to the Wall challenge.

Procedure: Similar to the Parking Between the Lines challenge, allow the students to measure the distance they intend to have their robot move. Emphasize trying to accomplish the goal within as few attempts as possible.

Programming: The program will consist of a single move block with the student’s calculated movement parameter. Additional Information: The Closest to the Wall challenge is a great follow-up to the Parking Between the Lines challenge because it requires greater precision and can easily be arranged into a competition. The placement of the robot will become even more crucial during this challenge because the margin of error will be much smaller. Some groups might try to want to build an apparatus to mark their starting position to increase their consistency. If they do, you should encourage this because consistency is one of the goals of robot programming. Extensions:

The one-centimeter target threshold is simply a starting point. With careful calculation and robot placement, students can stop their robot within just a couple of millimeters of the wall. When students get this close, you can perform the “piece of paper test,” in which you slide a single sheet to paper between the robot and the wall to determine if it is indeed not touching the wall. This challenge provides you with the opportunity to push the students to try to do better than just good enough. Some groups will want to get within the target threshold and move on. Try to challenge these groups to better their performance.

Complete the challenge with different sized wheels.

Complete the challenge with different power levels. At higher power levels, the robot will continue to move forward after the motor have stopped and recoil backwards. This is similar to what happens when someone slams on the brakes in a car. Passengers continue to move forward and press against the seat belt, and

Page 19: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 19 of 44

then, the recoil and push back into the seat. This jerk forward can cause the robot to touch the wall. This would be a great introduction to momentum.

Page 20: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 20 of 44

TURNING Now, that the students have begun to grasp the fundamentals of straight line movement, the next step is figuring out how to accurately turn the robot. TYPES OF TURNS

There are three basic ways to turn the robot—pivot turn, tank turn, and car turn—and each has it merits and drawbacks. During this progression, we will predominantly use the pivot turn because of its straightforward and accurate calibration. However, before moving on, a quick summary of the differences between the turning techniques will be presented. Pivot Turn A pivot turn is when one wheel remains stationary and the other moves resulting in the robot pivoting around the stationary wheel. Pivot turns require either a caster wheel or sliders (like on the Five-Minute Bot) to allow the robot to turn with a reasonable degree of accuracy. Sliders tend to be slightly more accurate because the orientation of a pivoting caster wheel can alter the turn leading to inaccurate turning.

A pivot turn.

The pivot turn is a great starting

point because it is easy for students to determine the number of rotations for a particular turn, lends itself to a clear connection to the underlying mathematical principles (which will be covered later), and is easy to ascertain the robot’s position after the completion of the turn. The downside of a pivot turn is that it requires a large amount of room and, therefore, may be problematic in tight quarters. To program a pivot turn, simply turn off one of the drive motors. This would result in a turn similar to the previous figure. This is called a forward pivot turn. Pivot turns can also be completed by turning off one motor and having the other motor move backward. This results in a backward pivot turn. Both the forward and backward pivot turns should result in the same directional facing, but the robot’s ending position will be different. It is helpful to understand both pivot turn types because they will be useful in different situations. For example, let’s say you want to move your robot toward and stop in front of an obstacle and then turn left. In this instance, a backward pivot turn might be optimal because the robot will still be able to complete its turn even if the robot ends a little too close to the obstacle. If the robot moved too close and tried to complete a forward pivot turn, the turning wheel would hit the obstacle resulting in an incomplete turn. Tank Turn A tank turn is similar to a pivot turn except that one wheel is moving backwards while the other is moving forwards. This opposing motion causes the robot to rotate around the center point of the drive axle (if you are using a single-axle like the Five-Minute Bot). Tanks turns are wonderful for

Page 21: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 21 of 44

tight situations because the turn footprint is much smaller than that of a pivot turn. However, they are a bit more difficult to understand the calibration of the turn parameter and determining the position after the completion of the turn is a bit more complicated.

A tank turn.

To program a tank turn, move the slider in the steering section of the move block settings all the way to one side or the other. There are other ways to program a tank turn, but this one is by far the easiest.

Steering slider position for a tank turn towards motor B. To turn the other way, move the slider to the other end.

Car Turn Car turns are similar to the way an actual car turns. Real cars rely on changing

the angle of the front tires while employing differentials to allow the wheels to turn at different speeds. Without differentials, cars would drag some of their wheels because while turning the inside and outside wheels must travel different distances, so they must travel a varying speeds to allow them to stay aligned with each other at the end of the turn.

A car turn.

The robots will use a much more simplified version of this mechanism. In terms of the NXT, car turns are executed by having the wheels turn at different speeds. The difference between the speeds of the wheels will dictate the angle of the resulting turn. As this difference increases, the angle of the turn increases. Since most robots do not have a differential, the robot will either have to employ a caster wheel or sliders (like the Five-Minute Bot) to allow the robot to turn with any accuracy. Car turns allow the robot to move in different curves and might even be more efficient in some instances. However, it is difficult for students to extrapolate the underlying mathematics to be able to

Page 22: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 22 of 44

effectively understand the process at work and apply it elsewhere. Additionally, the ending point of the robot as it completes a turn is difficult to determine and would make it hard to accurately gauge the next action. Programming a car turn is very simple. The steering calibration slider within the move block settings window can be moved to either side to change the curve of the turn. The arrow above the slider displays the depth of the turn, and the drop down menus on either side display the drive motors. MATHEMATICS BEHIND TURNING Similar to straight line movement, you should aim to move students from concrete models of turning to understand and generate formulas that underlie turning calibrations. As stated before, do not give students the formulas or try to move them to this point until they can understand the mathematical principles well enough to create the formulas (for the most part) on their own. The rotation parameter of a turn is dictated by two factors—the circumference on the wheels and the turn radius. The turn radius is different for each of the three types of turns, and we will discuss those later. However, the underlying mathematical principles of all turns lie within the realm of circle geometry. Before moving on, it is necessary to address one the most common mistakes students make when first learning how to program turns. The problem lies with the fact that degrees are used as both a measurement unit for how far the motor spins and how far the robot turns. When

asked to have their robot make a 360 turn, they will often place a move block in the program flow and, in the configuration

panel, they will input a duration of 360 and change the units to “degrees.”

This is a common mistake amongst people first learning how to turn the robot. The move block controls only the motor movement. This program would make the chosen motor(s) move exactly one

rotation or 360 .

This does not work because the motor block only controls the movement of the motors. There is no way for the move block to change directional heading (rotate) in this fashion because the number of rotations to turn a full circle is dependent upon the circumference of the wheel and the turning radius. Since the move block does not know these factors there is no way for it to calculate the necessary motor movement parameters. You will have to do this yourself. Mathematics of the Pivot Turn Realistically, determining straight line movement parameters is no different from determining turn parameters. First, you find the distance the wheels need to travel; and, using the distance traveled per wheel rotation, you can figure out how many rotations would be required to move the robot that distance.

To understand the how one derives the formula for turning parameters we will start with calculating the number of rotations it takes a particular robot to make

a 360 pivot point turn. Of the two components required to determine the turn parameter for different magnitude pivot turns, we already know one. The first

Page 23: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 23 of 44

required element is the circumference of the wheel. This was determined during the straight line tests. This leaves the turn radius. For a pivot, the turn radius is equal to the distance between the two tires. This is because one tire remains in place while the other one orbits around it.

The pivot turn’s radius and pivot point.

With these two pieces of information, we can use the formula for calculating the

circumference a circle (C = 2 r) to determine the turn parameter. To do this, you can use the turn radius to calculate the distance the turning wheel needs to travel (the circumference of the circle that is created by the movement of the wheel). This would be the resulting formula.

Distance the Wheel Needs to

Move (Circumference)

= 2 x x

Distance Between the Tires (Radius)

Using this information along with the skills learned during straight line movement yields the following equation and will allow you to calculate the necessary number of rotations.

Number of Rotations

(Turn Parameter)

=

Circumference of the circle

Distance of a single wheel rotation

To make it more succinct (and mathematical), you can combine the two equations into a single one.

Rotations = 2 r

Circumference

of Wheel However, this equation will only yield a turn parameter that will make the robot move in a full circle. Moving the robot this way has little real world applicability, and it is more important to be able to complete quarter or half turns. At this point, the leap to calculate these turn parameters should be very obvious for the students. To find this values you should divide the derived turn parameter by four and two, respectively. But, how could you make an equation that would be able to determine the turn parameter for any magnitude turn? Once you have derived the formula for a full turn, all other turns are simply fractional parts of it. Therefore, the formula would be the following.

Number of Rotations

(Turn Parameter)

=

Degrees of Turn

x

Circumference of the circle

360 Distance of a single wheel

rotation Remember, that you should not teach this progression of thought as a starting point. Instead use the concrete models that are presented in the section “Determining Pivot Turn Parameters,” and, from there, you can begin leading the students to this goal.

Page 24: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 24 of 44

Mathematics of the Tank Turn Tank turns use the exact same equations and mathematical principles as the pivot turn. The only difference is the size of turn radius. Whereas in a pivot turn the turn radius was equal to the distance between the wheels, the tank turn’s turning radius is equivalent to the distance between the wheels divided by two.

This is true because the robot does not turn around a stationary wheel; instead, it rotates around the mid-point of the axle. Therefore, to calculate the turn parameters for a tank turn simply adjust the turning radius value. However, it is necessary to mention how the tank turn would operate on a treaded vehicle like a tank. The treads move the pivot point to a point in space that is not necessarily on an axle. To understand the placement of this point, it is easier to think about each of the treads as single large wheel. Imagining them this way, it is also easy to imagine an imaginary axle that would be placed at the midpoint between the front and back of the treads. The pivot

point would then be the midpoint of this imaginary axle as shown in the following figure.

While this does not alter the calculation of the turn parameters in any way, it does change the position of the robot after it completes a turn. Mathematics of the Car Turn The mathematics of the car will not be discussed at any length here because the mathematics is much more complex and the move block’s steering settings make an in depth discussion unnecessary. Programming a car turn without the using the preset parameters of the steering option in the move block configuration panel is possible, but any possible benefit would be outweighed by its difficulty. A quick look at the car turn reveals why this holds true. Unlike the pivot and tank turns, the pivot point of the car turn is a bit more difficult to determine because its location depends on the magnitude of the turn. This magnitude is dependent on the difference between the power levels of the motors. Since the power level is scaled from 0 to 100, the difference in the power levels could range from 0 to 100. If the difference is zero, both motors have equal power levels, and all other things

The tank turn’s radius and pivot point.

A robot with treads radius and pivot point.

Page 25: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 25 of 44

being equal, the robot should move in a straight line. As the difference increases, the sharpness of the turn does too. At the maximum difference of 100, one wheel is being given full power while the other is completely stopped—a pivot turn. (Theoretically, the maximum difference would be 200, but this would mean one wheel would be powered fully in one direction and the other fully powered in the opposite direction—the tank turn. We do not include this possibility in the car turn, because standard automobile wheels spin in the same direction.) Each of these differences in motor powers will yield a different pivot point because the wheels will travel in different sized circles. In the diagram showing the path of the wheels during a car turn, it is easy to see that the wheels travel different lengths over the same period of time. This means to accurately determine the turn parameters without using the preset steering settings, you would have to calculate the ratio of the distance traveled and translate this relationship into the power settings. Of course, the ratio of the distance traveled by the two wheels would depend not only on the sharpness of the turn but also on the distance between the wheels.

Figure : Diagram of the two different turn radiuses for a car turn.

Can this be done? Absolutely. But, it is beyond the scope of this curriculum to tackle the calibration of the car turn. DETERMINING PIVOT TURN PARAMETERS Now, that we have looked at the mathematical principles underlying the calculation of turn parameters, let’s take a look at a concrete model you can use to teach your students how to do this. As mentioned earlier, pivot turns are the easiest to calibrate and understand, so this is where students will begin their work with turning the robot. Like straight line movement and the connection between rotations and distance, students will start by using a tool to help the see more clearly how many rotations it takes to complete various turns. The recommended tool is a turning jig.

Similar to the wheelie, the turning jig is a contraption made from LEGOs that will help simulate the robot’s turns and allow the students to count the number of rotations for a particular turn. The turning jig can be created in countless ways, but there are a few required features to make it

Page 26: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 26 of 44

work appropriately. First, one wheel, the pivot wheel, should be locked into place and not turn. The other wheel, the measurement wheel, should spin freely, so students will be able to count the number of rotations this wheel completes as it turns a particular amount. This tool will by no means provide an incredibly accurate movement parameter, but it will yield a quality, concrete estimate. The importance of using a tool like the turning jig does not lie within its ability to give you an exact turn parameter. Instead the value comes from generating a reasonable approximation, which the students can comprehensively understand, defend, and repeat under different conditions.

Figure : Top: A side view of the turning jig with the tattletale on the closest wheel. Below: A top view of the turning jig.

This tool is used in place of the robot due to ease and accuracy. You can have the students use the robots in place of the turning jig, but some extra precautions must be observed to avoid miscalculation or damage to the robot. When using the robot to test for a turn parameter, it is important to not push down on brick to get it to move. The motors do spin, but the internal resistance of the motor mechanism makes it much more difficult to turn than the turning jig. Many times, students will push the robot downwards in an effort to apply a forward force. This can result in an erroneous turn parameter and possibly damage the robot. When pushing down, you are placing stress on many of the connections and the axles. As it bends, you alter, albeit slightly, the structure of the robot, which can cause the turn parameter to be off. It is also really easy to have the robot slide and throw off the accuracy. Plus, this stress is a great way to permanently bend or snap a piece. To prevent this, have the students only touch the wheels of the robot. One hand will prevent the pivot wheel from moving while the other hand rotates the measurement wheel. This should eliminate much of the bending and provide a much more accurate measurement.

Once a baseline estimate has been obtained, students are ready to attempt

their first turning test—the 360 turn test.

Page 27: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 27 of 44

TURNING TEST #1: 360 TURN TEST

Goal: The goal of the 360 turn test is for students to have their robot perform a

perfect 360 turn. Upon completion of the test, students will turn parameters for both

right-hand and left-hand 360 turns. Skills:

Decimal number sense

Estimation

Problem solving

Geometry (Angles and Circles)

Algebraic reasoning Set-up: Create a testing space that has a straight line (edge of panel board, wall, tape line, or tile seams) that can be used as a reference to determine whether the robot is moving in a straight line.

Procedure: To complete the 360 turn test, students will first establish a reasonable

estimate for a 360 rotation using the method described in the “Determining Pivot Turn Parameters” section. To highlight inaccuracies with the turn parameters, we will add some straight movements before

and after the 360 rotation. Therefore, the program progression will be to move

forward one rotation, turn 360 , and move forward another one or two rotations. A

perfect 360 turn parameter should cause the robot to continue exactly along the path it started with the initial movement forward. An easy way to have the students observe this is to line the robot along the edge of your testing surface, a tape line, or seams in the tile. This will help spot any deviation from the original path. The direction of the deviation will also help determine whether the robot is over or under steering. Using the results of the test runs, students should

be able to explain any modifications and reasons for the changes.

Figure : This shows the progression and results of the

360 turn test.

Students should successfully complete a

360 in both directions. It is important to have them complete the test in both directions because the turn parameters might be slightly different for the respective directions. Programming: At this point, students will need to learn how to program a pivot turn using the move block. To do so, simply place a move block in the program flow and uncheck the port for the motor you would like turned off.

Figure: To program a pivot turn, simply uncheck one of the motors in the port section of the move block configuration panel.

Sometimes you will have to switch

the direction of a turn. Just remember the program will never let you have no motors checked for a move block, so you will always have to check the motor you want before deselecting the other motor.

Page 28: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 28 of 44

Figure : This will be the basic program flow for the

360 turn test. Of course, the middle move block could also only have motor C active.

This also marks the first time

students will be required to create a program with more than one step. To add more steps to a program, simply drag a new move block from the palette and drop it into the program sequence.

Additional Information: The 360 turn test typically requires really high levels of accuracy. This can cause problems with the students, and it usually manifests itself in their adjustments of the turn parameter following an unsuccessful test. Students often will overestimate or underestimate the required change to the parameter. For example, if a robot under turned by only a really short distance, students who have not yet made connection will want to increase the parameter by a full rotation. Even though you can foresee that the correction is way too much, let them try it out. Once they observe the results, have them hypothesize why the robot moved the way it did. Remind them that the duration field accepts numbers to the thousandths place when measuring in rotations. Other students will only adjust the parameter by adding or subtracting 0.001 each time. Since the observable difference is so minute, it is easy for them to get frustrated, but this is a prime learning opportunity. Additionally, be on the lookout for opportunities to cement students understanding of decimal number sense. Often you will hear some resembling the following from a student—“5.1 rotations is too little. 5.2 rotations is too big. What is in between 5.1 and 5.2?” This is a prime moment for them to experience an epiphany.

There is only one more thing to mention about the correcting the turn parameters between tests. It is often advisable to initially have the students overcorrect. This allows the students to establish the boundaries. If they can figure out what parameter is too small and what parameter is too large, they have now implicitly determined the test boundaries. This should help them to more quickly hone in on the correct turning parameter.

Turning is more susceptible to friction. This results from the sliding of elements of the robot across the ground. It is important to have students complete the

360 turn test on the same surface that they will complete their future challenges on. This will ensure that their turn parameters will be applicable. While two smooth surfaces may appear similar, they can alter the robot’s performance, and this discrepancy can lead to frustration later on. Extensions:

Complete the test having one of the motors move backwards. Have the students determine if the direction of the motor movement changes the required parameter.

Complete the tests using various power settings. Students should investigate any differences in the accuracy of the turn.

Complete the turn with different sized tires.

Complete the turns on different surfaces to investigate how the friction coefficients of each surface interact with the turning accuracy.

Complete the test with different weight loads applied to the robot. Place weights on the robot in different areas (e.g. over the drive wheels, in the back of the robot, etc.) and observe any differences in performance and accuracy. This will be a

Page 29: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 29 of 44

great introduction into a discussion on friction and its impact on turning precision.

Page 30: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 30 of 44

TURNING TEST #2: 90 TURN TEST Goal: During this test, the students will make their robot complete a right angle pivot turn to both the left and right. Skills:

Decimal number sense

Estimation

Problem solving

Geometry (Angles and Circles)

Algebraic reasoning Set-Up: This test will take very little room,

but similar to the 360 turn test, it is important to have the students complete the test on the surface that they will complete other challenges on. Procedure: Using the turning parameter

derived from the 360 turn test, have the students figure out how to come up with a

reasonable, defendable parameter for a 90 turn. Students should be able to quickly understand that they should divide their parameter by four. If not, you can ask them

how they could use their 360 turn parameter to figure out how they could make their robot only complete half a turn. This usually will spur them to see the relationship between the turning parameter and the magnitude of the turn. Once they have determined their parameter, they should create a single move

block program that turns the robot 90 . To test the program, have students run their program and judge the turn accordingly. Sometimes it is helpful to have some landmarks like tape lines to help you evaluate the turn. If the turn is not exact, have the students explain how they will change the programming. Judging the turn accuracy is difficult at best, and it is hard to

see the minute errors. One of the easiest ways to highlight the accuracy is simply to run the program four times. After you run the program once, do not move the robot. Simply press the button to execute the program again. Running the program four

times should result in a perfect 360 turn, and since errors compound, it will be easier to judge the accuracy. Programming: The program requires a single move block with the turn parameters for a

90 turn inputted. Additional Information: This test can often lead to some frustration because of the number of trials it typically takes to perfect it. You should use your judgment when it comes to deciding the level of perfection that you require. Since judging the turn is inexact by just eyeballing it, you might accept a turning parameter that is less than perfectly accurate. This is only acceptable because the next test will force the students to perfect the turn parameter and be easier to observe any inaccuracies. At this point, you may want to have students try to figure out how to determine turn parameters for any turn angle. The

progression between the 360 turn

parameter and the 90 turn parameter should prepare the students cognitively to begin to understand the relationship. Below is a potential progression of questions you can ask that might illuminate the pattern further:

How could you determine the turn

parameter for a 45 turn?

Could you figure out how to make

the robot turn 270 ?

What would the turn parameter be

to make the robot turn 1 ?

Page 31: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 31 of 44

How could you figure out the turn

parameter for a 131 turn?

How could you find the turn parameter for any turn angle?

This sequence of questions moves from easy understandable fractional part or multiples

of a 90 turn to a single degree. Once students can determine the turn parameter

for 1 , they can calculate the parameter for any turn angle. (Of course, this all depends

upon their accuracy of their 90 turn parameter.) Students often will answer the last question by explaining that they can

simply multiply the turn parameter for a 1 turn by the desire turn angle. This is not the same formula discussed when talking about the mathematics of turning, but it achieves the same end and is more understandable in many cases. This is the beauty of it; they may not be able to derive the exact equation, but they are doing the same conceptual work, and they can explain it, which is infinitely more important. Extensions:

Complete the test having one of the motors move backwards. Have the students determine if the direction of the motor movement changes the required parameter.

Complete the tests using various power settings. Students should investigate any differences in the accuracy of the turn.

Complete the turn with different sized tires.

Have students determine a turn parameter for other turn angles.

Have student derive a mathematical means to determine the turn parameter for any turn angle.

Page 32: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 32 of 44

TURN TEST #3: FOUR-TURN TEST Goal: Make the robot travel in a perfect square.

The test will help students observe

any problems with and fine tune their 90 turn parameter. The four-turn test requires students to program the robot to move in a square and continue in a straight line. The straight line movement after the completion of the square will help identify any miscalibration of the parameter similar to

the 360 turn test. Also, this test will require a high degree of accuracy because errors in parameters compound over multiple movements. This is a lesson that students often have a difficult time understanding, but the concreteness of the results of this test usually helps the grasp the concept. Skills:

Decimal number sense

Observation

Estimation

Problem solving

Geometry (Angles and Circles)

Algebraic reasoning Set-Up: No special set-up is required. The robots will need about a 4’ by 4’ area to complete the test. Similar to the straight

line and 360 turn test, it is helpful to have a straight line landmark to help you see the deviation from straight line movement. Procedure: Students will use their previously

determined 90 turn parameter to create a program to do the following:

1. Move forward 2 rotations.

2. Turn 90 to the right. 3. Move forward 2 rotations.

4. Turn 90 to the right.

5. Move forward 2 rotations.

6. Turn 90 to the right. 7. Move forward 2 rotations.

8. Turn 90 to the right. 9. Move forward 2 rotations.

Figure : The movement of the robot through the four-turn test.

Once the students run their test, they should observe the final stopping position of the robot. If the turn parameters are perfect, the robot should have completed the square perfectly and continued down the straight line at the end. Most robots on their first attempt will end heading in a direction that is not in line with the side of the square. (See figure below.)

If this is the case, have the students

The possible turning parameter errors of the four-turn test.

Page 33: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 33 of 44

postulate what this means for their turning parameter.

When students begin changing their turn parameters, it is important to remember that the error is amplified. The actual error is actually quadrupled because the incorrect heading of the robot results from the summed errors of four turns. Students will often not understand this, and they will try to change the error as if it resulted from a single turn. Really, the change in the turn parameter should seek to only address 1/4 of the turning problem. Once the students have demonstrated an accurate four-turn test result, they should repeat the test moving the other direction. These new, revised turn parameters should be recorded and remembers because they will be used throughout future challenges.

Programming: The program required for the four-turn test is much longer than any the students have written so far, and it should consist of a total of nine blocks.

Example of the program flow for the four-turn test.

At this point in the curriculum it is

helpful to reinforce how to read the blocks using the small icons on the block in the program flow. This will not be sufficient to resolve all programming issues, but it allows the students to quickly identify large programming problems.

This is also a great time to introduce the loop block. Since the program consists

of repetitions of the same programming, a loop block can be used to make the code more efficient while completing the same actions. The loop block is a command that tells the program to complete certain actions for a prescribed number of iterations. There are a number of ways to control the number of iterations the loop block will make including:

1. Make it repeat forever. 2. Define a certain number of iterations

or count. 3. Have is continue looping for a set

amount of time. 4. Terminate the loop based on

information gathered by a sensor. 5. Escape the loop using logic true/false

statements. For this test, we want the program to repeat the move forward and turn actions four times. To do this, you will place the move forward and turn move blocks within the loop block. Then, change the control setting in the configuration panel to count and change the count value to 4.

The configuration panel of the loop block for the four-turn test.

However, since we want the robot to continue moving forward to check the calibration of the turn parameter, a move forward command must be issued after the completion of the loop actions. This block should be placed outside of the loop along the program flow.

Page 34: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 34 of 44

The four-turn test program with the loop block.

Including the loop block makes the program much more manageable, and it moves the students towards the goal of having much more efficient and clean code. An additionally benefit is that when students must change their turn calibration, they must only change it in one move block as opposed to four. This is a very simplistic use of the loop block, but introducing it in this way will prepare the students for future applications.

Page 35: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 35 of 44

TURN CHALLENGES: TURN TO PARK AND TURN TO CLOSEST TO THE WALL This section will introduce two related challenges—turn to park and turn to closest to wall. The latter is really just an extension of the former with a bit more rigorous standards. We will begin by introducing the turn to park challenge, and the information describing the turn to closest to the wall can be found in the extensions section. Goal: The robot must start completely behind the starting line and stop the robot completely within the define space. This challenge is very similar to the Between the Lines challenge, but the target space is perpendicular to the start position.

Figure : The configuration of the turn to park challenge.

Skills:

Decimal number sense

Measurement

Estimation

Problem solving

Algebraic reasoning Set-Up: Create a course on the test area by using blue painter’s tape to establish a starting line and a parking spot as seen in the figure above. The farther you place the parking space away from the starting line the more difficult the challenge will be.

Procedure: As with the straight line movement challenges, you should require the students to measure the course first to establish turn parameters instead of using blind guess and check. Students should program the turn parameters and try the challenge. Once again, encourage the students to complete the challenge in as few attempts as possible. Programming: The programming for this challenge requires no special considerations. Additional Information: This challenge adds a new level of difficulty, which makes it the hardest task thus far. This results from the increased number of unique movements. An error in any of these movement parameters will cause the robot to not be successful in completing the task. This error sensitivity also makes the initial placement of the robot even more important. Use pointed questions to have the students make the connection between the starting position and its ending location. In fact, students will often immediately resort to programming changes without considering starting placement changes. When appropriate, challenge students to correct the ending placement without altering the program. Extensions:

Have students complete the TURN TO CLOSEST TO WALL CHALLENGE. To do this, orient the back of the parking spot to be against a barrier like a stack of books or a wall. The challenge still requires the robot to stop in the parking space, but this time the robot needs to stop within 1 cm of the wall.

Require the robot to back into the parking spot instead of moving forward. This could mean that the robot runs the

Page 36: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 36 of 44

entire course backwards or moves forward then turns to back in the spot.

Make the students create a program

to park the robot without using a 90 turn.

Page 37: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 37 of 44

MOVEMENT CHALLENGES Now that you have established

correct straight line and turning parameters, you can have the students complete various challenges. Over the next few sections, different challenges will be presented. Each challenge requires students to apply their knowledge and skills in different ways. You should use the challenges that address your educational objectives. The following challenges will be presented:

Simple Obstacle Course Race – Two robots will race head-to-head and attempt to navigate a simple obstacle course in the fastest time possible.

Object Retrieval – Students are required to build and program an actuator to grab and retrieve an object.

Figure 8 Challenge – Students will program their robot to follow a figure-8 course.

Obstacle Course – Students must program their robot to navigate an obstacle course.

Scaled Obstacle Course – Students will be given a scaled map of an obstacle course, and they must program the robot to navigate the course using only the map for reference.

These challenges represent only the

tip of the iceberg in terms of possibilities. Herein lies the fun for the instructor; the variety of potential challenges is only dictated by your imagination.

Before explaining the challenges, we must first talk about the sound sensor because it will be required for the first challenge.

SOUND SENSOR The sound sensor will be the first sensor that will be added to the robot. An in

depth explanation of the various sensors and uses will be presented later. For now, a quick overview of the placement and programming of the sound sensor will suffice.

Attaching the Sound Sensor Attaching the sound sensor is actually quite simple. When placing the sound sensor on the robot, you will want to orient the sound sensor to point towards the origin of the noise. In this case, the noise will be coming from the students, so it is helpful to have the sensor facing up. The easiest way to attach the sensor is to use a long beam and connect it to the side of the robot.

Make sure the students use two points of connection on every union. This will lock pieces into place and prevent unwanted moving of components.

http://www.legoeducation.us/eng/product/nxt_sound_sensor/2227

Page 38: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 38 of 44

Once the sound sensor is attached to the robot, you will now need to wire it to the brick. Sensors must be connected to the numbered ports, and the sound sensor’s default port is 2. (You can hook it up to any port, but it makes it easier to stick with the default for now.) Programming the Sound Sensor Wait Block How the Sound Sensor Works

The sound sensor detects the ambient decibel level of the environment. It can not distinguish between different sounds or noises; it can only measure their volume. There are many ways you can use the information gathered by the sensor, and many of those will addressed later. However, for our purposes, we will use the sound sensor as a trigger for beginning the robot’s movement through the use of a wait block. Wait blocks, like all program flow control commands, have an orange band across the block as opposed to the green band of the move block.

Wait blocks basically act as a gateway that prevents the progression of the program flow until certain conditions are met. Functionally, they can be used like a simplistic “do” loop. A do loop is a programming technique that tells the robot to continue to do something until the designated condition is met.

These conditions depend on a user defined threshold value, and the acceptable numerical values depend on the type of

sensor you are using. The sound sensor changes the decibels of the detected noise into a scaled value ranging from 0% to 100%. (You can calibrate these settings through a calibration program. However, for what we will be using the sound sensor for, it is unnecessary. We will explain sensor calibration when talking about the light block in the next group of challenges.) Therefore, you can set the sound block to not advance the program flow until it detects a noise lower or higher than the entered threshold.

We will use the sound sensor to remain idle until it hears a loud noise. Once it detects a noise of sufficient volume, the program will start the robot’s movement. This will allow us to start multiple robots at the same time because all the programs will wait for the same trigger. This is incredibly helpful when running different competitions that rely on a fair start. To do this, we will place a sound sensor wait block at the beginning of our program as shown below.

Wait blocks are found on the common palette by hovering your cursor over the hourglass icon. Several choices will appear, and you want to choose the sound wait block.

The sound sensor wait block.

Page 39: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 39 of 44

The top image shows the hourglass icon that contains the wait blocks. The bottom image shows the expanded menu choices. The sound wait block is the third one with the microphone on it. We will then set the conditions and threshold in the sound sensor wait block’s configuration panel.

For this application, set the “until” option to greater than by either clicking on the radio button in the right side of the slider or changing the sign in the drop down menu.

The highlighted area on the slider represents the conditions necessary to advance the program flow. In this example, the wait block will not move the program forward until a sound of 50% or greater is detected.

Then, change the threshold to 100 by either moving the slider all the way to the right or typing the number in the box. The configuration panel should look like the figure below.

The correctly configured settings for the sound sensor wait block.

Once you have done this, you can put various move blocks after the wait block. Now, when you run the program, the robot will wait until it detects a sound higher than 100.

Troubleshooting the Sound Sensor The sound sensor is relatively easy to use, and there are few problems that can occur when using the sound sensor this way.

If the robot starts moving immediately without waiting for the sound…

the ambient noise level might be too high. Reduce the volume in the area.

the threshold might be set too low. Make sure the threshold is set to 100.

the condition is incorrect. Make sure the until condition is greater than. If not, the program is waiting until it hears a sound quieter than your threshold.

If the robot will not move at all despite ridiculously loud sounds…

check to make sure the cable between the brick and sound sensor and that the connections are secure.

make sure the cable is plugged into a numbered port.

make sure the port that sound sensor is plugged into matches the selected port in the wait block configuration panel.

The sound sensor wait block’s configuration panel.

Page 40: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 40 of 44

SIMPLE OBSTACLE COURSE RACE Goal: Students must program their robots to navigate around an obstacle as fast as they can. The students will be competing against each other. The robots must start completely within their starting block, but they can be oriented any way the students choose. Skills:

Decimal number sense

Measurement

Game strategy

Problem solving

Algebraic reasoning

Time management Set-Up: Create a simple course with a starting line, an obstacle, and a finish line like in the figure below. The obstacle can be anything from lines of tape to a stack of books. A couple of NXT boxes works really well.

An example set-up for the Simple Obstacle Course Race. The red and blue lines show the potential paths of the robots.

The important features of the challenge design is the side-by-side starting positions and equal length paths. The finish line can oriented differently, but when the line is set-up like in the above figure, it provides

exciting finishes and possible different game strategies. Procedure: Since the program of the robot will differ based on the starting location, I assign each team a starting location. (You can also require teams to create programs for each of the two starting locations, so you can have student teams compete in a tournament- like format.) Determine a set amount of time (30-45 minutes) to allow students to prepare for the task. Students should then create a strategy, measure the course, determine the movement parameters, and build the program(s). You can allow the students to practice on the course and revise their program until the competition starts. Many times, students will watch other group’s robot traverse the course and, in response, make their program even better. This is valuable because their intrinsic motivation will begin to take over, and they will push themselves. It is important to remember that although most students will want to stick

with 90 turns, this is not required. Some students will begin to see that different routes are shorter than the ones shown in the image, and you should encourage them to explore how to do this. At the end of the work time, have student team’s race each other. Programming: All programs are required to begin with a sound sensor wait block programmed to wait for a sound louder than 100. This will allow student’s robots to simultaneously start the race. (For a review of how to do this, see the previous section regarding the sound block.) Extensions:

Page 41: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 41 of 44

Challenge the students to create a single program that could address both potential routes. This is a very difficult extension because it would require the use of advanced programming techniques like switches and logic statements. Even if the students could not program is quite yet, you could have them brainstorm possibilities.

An example of a program that would be able to run the course from either starting spot.

Increase the difficult of the obstacle course through the addition of more obstacles.

Require the students to have the robot circumnavigate the obstacle and finish in the other starting spot.

Page 42: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 42 of 44

FIGURE 8 CHALLENGE Goal: Students will program the robot to follow a figure 8 pattern without their tire deviating off the course. The robot should end exactly where it began. Skills:

Decimal number sense

Measurement

Game strategy

Problem solving

Algebraic reasoning Set-Up: Using blue tape, create a figure 8 course like the one shown in the figure below.

The Figure 8 challenge course set-up.

All of the tape lines should be perpendicular to each other. You can make the figure 8

any size you like. The width of the course should not be less than about 18”. Procedure: First, show the students the initial placement of the robot. The robot should have its left wheel on top of the tape line if you are using the same exact set-up as shown in the figure. To be successful, the robot needs to complete the course without having that tire leave the tape line.

Allow the students to measure the course and program the robot. Once the students are ready, they should be able to try out their program. Most likely, they will have to make modifications to either their starting position/alignment or movement parameters. Programming: Beyond precision of movement parameters, there are no special programming considerations. Additional Information: This test requires high levels of precision, so some students might experience some difficulty. To mitigate some of this, you can make the tape line thicker. Extensions:

Create different shapes for the robot to trace. When building a new course, remember that all of the turns need to be the same direction unless you build an unclosed shape.

Use turn angles other than 90 .

Have the students complete the course in the other direction.

Require the students to pick up an object along the course.

Require the students to complete two laps of the course.

Have the robot complete the course going backwards.

Page 43: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 43 of 44

OBSTACLE COURSE NAVIGATION

This challenge depends heavily on the set-up of the course. It can range from a simple course like in the Simple Obstacle Race to a full-blown robot maze. Due to its subjectivity, this challenge can be repeated multiple times with increasingly difficult configurations. You will also see the obstacle course come back after introducing sensors. Goal: Program the robot to successfully navigate the obstacle course/maze. Skills:

Decimal number sense

Measurement

Game strategy

Problem solving

Algebraic reasoning

Time management Set-Up: Create an obstacle course. This can be created from nearly anything. Piles of books, NXT boxes, or cardboard boxes are all easy, inexpensive obstacles and/or walls. In fact, tape lines on the floor can serve the exact same purpose and allow infinite configurations. You can add anything—rocks, volcano models, other LEGO models, etc.—to the obstacle course to add some excitement.

An example obstacle course set-up.

Another possibility is to create a full-blown maze using wood walls. There are many different methods to construct the maze, but some of the best allow for variable set-ups, small storage requirements, and easy set-up and take down.

An example maze configuration.

The difficulty of an obstacle course lies within the number of elements, the allowable margin or error, and length. Procedure/Extensions: The procedure depends heavily on the obstacle course and your objectives. Beyond simply moving through the obstacle course or maze, you could augment the experience by doing the following:

Provide a time limit for preparation.

Allow only a certain number of test runs.

Time the runs to see who completes the course the fastest.

Carry an object through the maze.

Pick up an object in the obstacle course and bring it to the finish line.

Require the robot to move through the maze, turn around, and move back.

Page 44: NXT Curriculum - Arizona FIRST LEGO League

LEGO Robotics Curriculum 1.0 Erik Von Burg and Bill Johnson LEGO® is a trademark of the LEGO group and did not create or endorse this curriculum.

Page 44 of 44

Require the robots to perform certain maneuvers (e.g. must move backwards at some point).

Ban certain movements to have students brainstorm other possibilities (e.g. no right turns). All of these additions will keep the challenge fresh and require students to stretch their thinking. Programming: The programming depends on the type of obstacle course created. There are no special programming considerations. Additional Information: Creating a fictional scenario can add some fun to an obstacle course challenge. For example, instead of navigating around piles of old dictionaries, you can make up a story about a lunar rover delivery life-saving supplies to a stranded moon outpost that lies on the far side of a canyon that just experienced seismic activity. Hardcoding a program to navigate an obstacle course or maze will be a perfect set-up to introduce soft-coding in the future.

COMING SOON: The rest of the movement challenges and sensor programming…