Follow the Hand

ACTIVITY HEADER

Name of Activity Follow Hand- Ultrasonic Sensor
Author Leiny Garcia and Kenny Westerman
Keywords Ultrasonic Sensor
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students have to program the car robot to follow a hand or object.
Lesson Objectives: Introduce the Ultrasonic sensor while using prior knowledge of programming, including loops and switches.
Materials Needed: LEGO NXT kit
Computers
Preparation and Set Up: 1. Distribute NXT kits and computers
2. Pair up students
3. Worksheet to brainstorm programming
Necessary Background Programming with switches and loops
Procedure 1. Introduce how the ultrasonic sensor works if needed 2. Review programming with switches and loops 3. Introduce activity. Explain that the robot needs to follow the hand. When the hand is too far, then the robot must move forward. If the hand is too close, then the robot must stop. 4. Distribute materials 5. Program and test. 6. Final Demonstration.

Communication Towers

ACTIVITY HEADER

Name of Activity Communication Towers
Author Ali Boreiko + Jen Scinto
Keywords communication, non-NXT, building, teamwork, social skills
Subject Non-LEGO
Grade Level 5, 6, 7, 8, 9+
Time <1 Hour Total
Brief Description In this activity, students will better understand the importance of communication for engineers. By completing an engineering challenge silently in groups , they will gain an appreciation for verbal communication.
Lesson Objectives: The objective of this activity is to have students reflect on how they communicate to their classmates and to the teachers. 
Materials Needed: -Found materials (paper, bottles, straws, clothespins, etc)

-An arm’s length of tape

-A separate room/space where half of the students can work (e.g. a hallway or empty classroom nearby).

Procedure Warm up the class by discussing: What is communication? How do humans communicate? Animals? Robots? Who do engineering need to communicate with when they’re working on a project? Who do you communicate with when you’re working on a project? (5-10 mins)

Then, divide the class up into teams of 6-10 people, let them choose their team name. The teams are competing to build the tallest tower. But, the team must build the top and bottom half separately. So, divide the teams up again into two groups, the top and the bottom (each with 3-6 people).

Tell them that the two groups working on the bottom cannot talk, but are allowed to write and draw. The team working on the top is not allowed to write or draw, but is allowed to talk. Let the kids work for ~10 minutes on their part of the tower. They should NOT be able to see the other half of the tower.

Then, each of the two groups (top and bottom) sends a representative to discuss their ideas with the other half of their team to plan how the tower will fit together. They cannot bring any pieces from the tower, just their ideas. Each representative keeps his or her handicap. After they meet for 5 minutes, the representatives return to their groups and continue to build. 

After ~10 more minutes of building, the groups unite and get 5 minutes to connect their tower, all the while with their handicaps. Finally, once each team has a tower, measure them! 

Debrief by asking: What was hard about the activity? Why is communication so important for engineers? (5-10 mins)

NXT Calculator

ACTIVITY HEADER

 

 

 

Name of Activity NXT Calculator
Author Jay Clark
Keywords NXT, calculator, build, operate, numbers, math block, display block, user interface, 1 Hour Total
Subject NXTs
Grade Level 7, 8, 9+
Time 1 Hour Total
Brief Description Students build and program an NXT calculator that can operate on two numbers.
Lesson Objectives: Programming with the math block
Learning the display block
A first exposure to user interfaces
Materials Needed: 1 NXT kit per group
Computers with Minstorms NXT software
Procedure This is an open ended challenge that is sure to challenge students’ programming knowledge and yield many unique solutions. Students must think about how they are going to input numbers, and how they are going to choose the operator.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/l.jpg

Challenge Day!

ACTIVITY HEADER

 

 

 

Name of Activity Challenge Day!
Author Jay Clark
Keywords difficulty, tasks, points, programming, risk, reward, risk vs. reward, NXT, MINDSTORMS, 3 Hours Total
Subject NXTs
Grade Level K, 1, 2, 3, 4, 5, 6, 7, 8, 9+
Time 3 Hours Total
Brief Description Students choose from a list of different tasks with a range of difficulty levels and varying point values. The group with the most points at the end of the class period wins!
Lesson Objectives: Review Programming Skills.
A first exposure to making risk/reward decisions.
Materials Needed: One NXT kit per group
Computers with Mindstorms NXT software
Black electrical tape
Preparation and Set Up: Put together a list of challenges on a worksheet. They should range in difficulty level from very, very simple to challenges that are more or less impossible to complete. Assign point values to the activities based on their difficulty, keeping in mind that close scores are more fun and drive the students to keep working. An example worksheet is attached below.
Necessary Background This activity is as much of an activity in assessing risk/reward and strategy as it is in programming. Some students will complete many tasks with simple, fundamental programming. Others will bite off more than they can chew, and end up without many points at all.
Procedure
  • Introduce challenge day and go over what each challenge calls for specifically.
  • Hand out worksheets and set a strict time limit.
  • Update scores on an overhead or white board.
  • After the time is up, talk with children about risk/reward, and about how hard each challenge was. If they could do it over again, which would they choose? which were fastest.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/i.doc

NXT Bluetooth Remote Control

ACTIVITY HEADER

 

 

 

Name of Activity NXT Bluetooth Remote Control
Author Jay Clark
Keywords NXT, master, worker, simple, remote control car, soccer, maze, navigation, battlebots
Subject NXTs
Grade Level 7, 8, 9+
Time 1 Hour Total
Brief Description Students will program two NXT’s: One to be the master and one to be the worker. They will create simple remote control car as an introduction to a more complicated activity: A soccer match, maze navigation, battlebots, etc.
Lesson Objectives: Introduce students to bluetooth communication.
Encourage division of tasks and creative solutions.
Understand loops, switches, wiring, and data flow.
Materials Needed: Two NXT’s per group (bring extra NXT’s or combine groups)
Computes with Mindstorms NXT software
Preparation and Set Up: If you have time, give all NXT’s a unique name using the procedure outlined below.
Necessary Background Bluetooth connectivity in the NXT will bring surefire excitement into your classroom. However, there are a lot of (albeit simple) steps involved in making a connection. Be prepared for varying levels of difficulty across groups.

Groups that achieve connectivity early can work on making their remote controls more complex and sophisticated. Work to achieve connectivity before helping groups with involved programming questions.

Vocabulary:
Bluetooth – a standard for the short range wireless interconnection of electronic devices.

Master – Device in a communication relationship that sends commands.

Worker – Device in a communication relationship that receives and executes commands.

Procedure (1) Students must give their NXT a unique name. This is done by clicking on the NXT window button (located above the download and run button), replacing the name on the right hand side of the pop up window and pressing the enter button next to the name. Make sure the new name remains in the slot.

(2) Turn Bluetooth on on both of the NXT’s. This is done by scrolling over to bluetooth, clicking “turn on/off” and selecting on. The NXT should display the bluetooth symbol with a “<” next to it.

(3) One NXT should “search” for the other. In the bluetooth menu, select ‘search.’ The NXT will display a status bar while it scans electronic devices. A list will come up listing all closeby computers, phones, and NXT’s. Scroll to the NXT you want to connect to and select it.

(4) Choose a connection port. The NXT can connect to multiple devices. Connect to any port.

(5) Enter passkey. The passkey is 1234. If you successfully connected, both NXT’s should have a “<>” symbol next to the bluetooth symbol.

 

Programming the Master

The master will send messages using the “send message” command. For controlling a car with a continuous sensor value (rotation, light, sound, distance), you will be sending a number. Select your connection port, change message type to number. Finally, assign a mailbox for your command. Every command should have its own unique mailbox. (For example, the rotation sensor on the master will be controlling the power of the motors on the worker, while the NXT buttons will be controlling the steering. The rotation sensor message should get its own mailbox, and each NXT button should get its own mailbox, but they should all have the same connection number) To control the worker using buttons (NXT buttons and touch sensors), you will be sending logic. So switch the message type to logic and wire from the logic output of the sensor.   The program should be in a loop to check for and send commands continuously.

 

Programming the Worker

The worker uses the “receive message” command. Choose the mailbox and the message type, and use the wiring tool to use the information to send commands. If the message type is a number, you can wire it directly into the output you want to control. If its logic, you need to use it with a switch.

Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/h.png

NXT Musical Instrument

ACTIVITY HEADER

 

 

 

Name of Activity NXT Musical Instrument
Author Jay Clark
Keywords Mary Had A Little Lamb, simple song, NXT, switches, sensors, task, instrument, wiring, math blocks, programming, loops, MINDSTORMS, Music Engineering, numerical frequency, audible, pitch, 2 Hours Total
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 2 Hours Total
Brief Description Students will play “Mary Had A Little Lamb” and other simple songs on their NXT using switches and touch sensors. When students complete that task, they will make an instrument using other sensors, requiring wiring and math blocks in their programs.
Lesson Objectives: Learn about loops, switches, and math blocks
Introduce Musical Instrument Engineering
Understand the relationship between numerical frequency and audible pitch
Materials Needed: NXT Kit
Computer with MINDSTORMS NXT software
Necessary Background Mary had a little lamb is a simple song consisting of just three notes. The notes and corresponding lyrics are below:

E D C D E E E

ma-ry had a lit-tle lamb

D D D E E E

lit-tle lamb, lit-tle lamb

E D C D E E E

mar-y had a lit-tle lamb

E D D E D C

whose fleece was white as snow

All musical notes have a corresponding frequency. Concert A (or middle A) is 440 Hz. In order to play mary had a little lamb using a light or distance sensor, you must know the frequencies of the three notes you’re using:

C – 262

D – 294

E – 330

Vocabulary:

frequency – the rate at which a vibration occurs. Determines the pitch of a note.

Procedure Introduction Introduce switches to the students. A switch is a program structure that makes decisions based on external criteria, such as a sensor value. Introduce the lesson. Show the students the notes of Mary had a little lamb. Ask them how many touch sensors they would need to play it. Guide them to realize that they could use 2, and there are 4 opportunities for notes to play with two touch sensors: Left pressed, right pressed, both pressed, none pressed. Guide them through brainstorming how the program should look. Usually it’s hard for them to see that the second switch is required. ActivityHave the students program their robots to be able to play mary had a little lamb using switch blocks and sound blocks. When they finish, have them use another sensor and wiring and math blocks in their program to create another musical instrument. Or allow them to use switches with another sensor to set up ranges for each note.
Extensions: Play a different song!
Use touch sensors in conjunction with another sensor to set the octave.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/g.png

Peak Performance

ACTIVITY HEADER

 

 

 

Name of Activity Peak Performance
Author Jay Clark
Keywords NXT, car, course, fastest, flat, inclined, gear, gear ratios, torque, speed, optimization, building, drive gear, driven gear, 1 Hour Total
Subject NXTs
Grade Level K, 1, 2, 3, 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students must gear their NXT car to complete the course the fastest. The course consists of a flat section and an inclined section.
Lesson Objectives: To learn about gear ratios, gearing for torque vs gearing for speed, optimization, and building.
Materials Needed: NXT kit
Ramp
Computers running MINDSTORMS
Preparation and Set Up: Prepare one or more courses – With a flat beginning and an incline ending. The length of both sections will determine the optimum gear ratio. To allow for extensions, set up other courses with varying distances of the course components.
Necessary Background Using gear ratios students can gear their cars for more torque or more speed. If the drive gear is bigger than the driven gear, the car will be geared for speed. If the other way around, it will be geared for torque.

A car geared for torque will be slower, but will climb better. A car geared for speed will be quick, but might not be able to climb the ramp.

Vocabulary:

Gear Ratio – The ratio of the speed of rotation of the drive gear of a gear train to that of the driven gear.

Drive Gear- The gear attached to the source of torque. (Usually the motor).

Driven Gear – The gear that receives motion from the drive gear.

Optimization – Finding a balance between design concerns that yields the best solution.

Procedure Introduction – 10 Minutes Ask students if they’ve ever used gears before. More than likely, they’ve driven a 10 speed bike before, and never knew how the gears worked. Introduce students to gears and gear ratios. Using a pre-made gear train, show them the size of the drive gear and the driven gear, and ask if the driven gear will spin faster or slower than the drive. If they are having trouble seeing it, ask them for every one rotation of the drive gear, how many times does the driven gear rotate? Explain torque vs. speed. ie. tugboats – high torque, low speed. Handheld fans- high speed, low torque. Introduce the concept of optimization. Introduce the activity Activity – 40 minutes Clean up/ Wrap up – 10 minutes

  • What was easiest? What was hardest?
  •  What would you have done differently?
  •  What were some good ideas you saw that other groups came up with?
Extensions: Have the students try a different course with different dimensions and slopes.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/e.jpg
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/f.jpg

Wall Follower

ACTIVITY HEADER

 

 

 

Name of Activity Wall Follower
Author Jay Clark
Keywords NXTs, car, wall, distance, loops, conditional loops, sensor, threshold
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students will program their NXT cars to follow the outer edge of the classroom by driving along the wall at a set distance away.
Lesson Objectives: Programming using loops and conditional loops
Determining and Implementing sensor thresholds
Materials Needed: Prebuilt NXT car with a sound sensor
Clear wall space
Computers with NXT Mindstorms software
Preparation and Set Up: Find a section of the room that has the most dynamic wall. -Maybe the wall juts out for a closet and back in again afterwards-

Clear this space for cars to run next to.

For any inside turns (turning to the right if the wall is on your left), place a strip of black tape a foot or so away from the wall for the extensions.

Necessary Background A wall follower activity is very similar to the line follower programmatically. Start close to the wall. Turn away from the wall until the distance sensor reads that you are too far, then drive back towards the wall until the distance sensor reads that you are too close. Loop.

There is a challenge in trying to get the car to make an outside turn. This involves playing with the distance away from the wall you set your car to follow, and how dramatically you have the car steer.

Inside turns cannot be made using the loop. Some other sensor must tell the car that an inside turn is approaching, and then the car must react by turning. Students may use a touch sensor, a light sensor, a sound sensor, or even another distance sensor (if they have one)

Vocabulary: Threshold – The sensor value that when breached, will trigger a wait for block or a conditional loop. (Some students have had a better time understanding it as a “benchmark”)

Procedure Introduction – 10 minutes Introduce/ Review loops with the students and why they are useful in programs.

  • Loops allow us to repeat a set of commands that would otherwise be tedious to program over and over.

Introduce the activity, and ask the students if they have an idea of what the program should look like. Activity – 40 minutes Allow students to make the mistake of not including any turns in their program. They will understand their mistake when trying to make the first outside turn. Clean up/ Wrap up – 10 minutes

  • What was easiest? What was hardest?
  •  What would you have done differently?
  •  What were some good ideas you saw that other groups came up with?
Extensions: In order to make inside turns, students will have to use a conditional loop and another sensor to warn them of the upcoming turn.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/c1.jpg
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/d.png

NXT Trolly

ACTIVITY HEADER

 

 

 

Name of Activity NXT Trolly
Author Jay Clark
Keywords NXTs, cars, car, trolly, trollies, light sensor, loop, proximity sensor, sound sensor, threshold, switch
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 2 Hours Total
Brief Description Students program their NXT cars to be trollies. The activity has three tasks.

(1) Using a light sensor, the trolly must follow the black tape loop that runs through the “town”

(2) Using a proximity sensor, the trolly must detect stations and stop for boarding.

(3) Using a sound sensor, the trolly must stop for townspeople whistling for the trolly.

Lesson Objectives: Programming with conditional loops and switches.
Determining and implementing multiple sensor thresholds.
Materials Needed: Pre-built NXT car and complete NXT kit.
Computers with Mindstorms NXT software.
Black tape for trolly track.
Boxes/Books/etc for trolly stations.
Extra LEGO people.
Preparation and Set Up: Set up a the trolly track with black tape in the classroom.
Place the trolly stations either all inside or all outside of the loop. (This is so the proximity sensor can be pointed to the right or left).
Necessary Background In order to follow a line, students will have to program their cars to repeatedly jump off and back on the line. In fact, they aren’t following the black line, but rather the line formed by the edge of the black tape and white floor. Students programs should consist of four blocks:
- Turn Right.
- Wait for Darker.
- Turn Left.
- Wait for Lighter.

Students will need to use a conditional loop or a switch to stop following the line at the station. A conditional loop will keep performing the line following functions until the distance threshold is breached. It will then move on to the next bit of code. A switch will make a decision about the program flow based on a sensor value.

Vocabulary:
Threshold – The sensor value that when breached, will trigger a wait for block or a conditional loop. (Some students have had a better time understanding it as a “benchmark”)

Switch – A program structure that makes a decision about which line of code to run next based on some criterion (time, sensor value, logic etc)

Procedure Introduction 10 minutes Review loops with the students and why they are useful in programs.

  • Loops allow us to repeat a set of commands that would otherwise be tedious to program over and over.

Sometimes loops should go on forever. Ask the students for examples they’ve done where loops go on forever. In more sophisticated programs, they should not. Ask if they can think of a situation in which you don’t want a program to go on forever. A conditional loop is a great way to end a loop exactly when you want it to end and move on to another task. Our brains use conditional loops all the time!

  •  When crossing the street, we look both ways. If its not safe, we do it again. We keep doing it until its safe, and then we cross the street.

Activity – 40 minutes If students haven’t done a line follower before, introduce the concepts using the line follower activity on the activities database. For the second task, students will have to use a conditional loop to look for the stations. After the loop, they should stop the car for 5 seconds. It’s important to note that you must drive past the station before you start looking for a new station. Therefore, there should be a loop with a counter on it, or another conditional loop to follow the line past the station before looking for the next one. For the third task, the students will have to use switches. First look at one of the sensors, say the sound sensor. If it detects a whistle, stop for five seconds, if not, look at the proximity sensor. If it detects a station, stop for five seconds. If not, continue following the line. Clean up/ Wrap up – 10 minutes

  • What was easiest? What was hardest?
  •  What would you have done differently?
  •  What were some good ideas you saw that other groups came up with?
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/a1.jpg
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/b5.png

NXT Segway

ACTIVITY HEADER

 

 

 

Name of Activity NXT Segway
Author Jay Clark
Keywords NXT, balance, wheels, sensors, wiring, math blocks, proportional controllers, light sensor
Subject NXTs
Grade Level 9+
Time 3 Hours Total
Brief Description Students build and program an NXT to balance on only two wheels using two light sensors.
Lesson Objectives: Master the use of wiring and math blocks
Master Building with NXT pieces
Introduce the concept of proportional controllers
Materials Needed: NXT kit plus one additional light sensor for each group.
Computers with LEGO Mindstorms installed.
Preparation and Set Up: Make sure this activity is done in an evenly lit room with a consistently-colored floor. Otherwise, it will not work.
Distribute extra light sensors to each group.
Necessary Background An NXT segway works by separating two light sensors about the center of gravity of the robot. If the robot loses its balance and starts to lean one way, one light sensor will receive more reflected light than the other. The differnce in these values can be scaled and then used to control the motors.

Generally, the following tips allow for the easiest construction of an NXT Segway:

The robot’s center of gravity should be such that the robot’s balancing point allows for the two light sensors to be evenly spaced off the ground.
The further the light sensors are from the robot, the more sensitive the response.
Weight should be added way above the pivot point (the wheels). Think about balancing a broom vs. balancing a watermelon.

Vocabulary: Proportional Controller – Control in which the amount of corrective action is proportional to the amount of error

Procedure Introduce students to the concept of proportional control. examples:

  • slowing down based on distance from stop sign
  • changing dial in shower based on error from desired temperature.

Introduce proportional control in the human brain in the form of keeping balance.

  • If you lean forward a little bit, your brain applies pressure to your toes to try to push your center of gravity back.
  • If you move to far forward, your brain will step forward.
  • If you are leaning way far forward, your brain will call for a very quick, large step.

The reaction is proportional to the error.   Introduce the segway activity. Now that we know how to balance an object that we know is leaning one way or another, we need to determine how we can figure out if the NXT is leaning. Ask students for suggestions. Encourage all ideas, but in the end, tell them that we’re going to use light sensors because they have the most consistent response and resolution. Activity If we mount the light sensors so they are the exact same distance off the ground when the robot is balanced, we can be sure that the light sensors will have the same reading. If the robot starts leaning, there will be a difference in the light sensor readings. We can use that difference to control the motors to balance the robot.Notes Students will have to experimentally determine their constant of proportionality. Because the power input of the move block converts negative numbers into positive numbers, there needs to be a comparison block to set the move block’s direction.

Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/a3.png
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/b4.png

Switch to our mobile site