You are on page 1of 34

Find the Light

Book DI: NXT Data Logging Level 1

LEGO Engineering Conferences


ROBOLAB and MINDSTORMS Education
Version 5.0 December 2009
NXT-G Data Logging Book I: Introductory Robotic Activities for use with the NXT

Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

NXT Data Logging Book DI: Introductory Data Logging Activities for use with the NXT
This purpose of this book is to help you develop a basic understanding of how to collect and graph data using the LEGO MINDSTORMS program and the NXT brick. Each activity in this book contains learning objectives and step-by-step programming instructions that illustrate how to conduct data logging experiments. At the end of each activity, an open-ended Exploration Task provides you with the opportunity to practice the techniques you just learned. In these introductory activities, the primary focus points include creating data logging experiments, integrating data logging experiments into NXT programs, and displaying data in the NXT Data Logging workspace. The Introductory activities involve collecting data from the NXT touch sensor, NXT light sensor, NXT rotation sensor, and the NXT sound sensor. Activities in this book assume that the user has experience programming with blocks in LEGO MINDSTORMS. You should also be able to modify the blocks using the configuration panel. If you do not have experience programming in LEGO MINDSTORMS, please review NXT-G Software Book I: Introductory. Activities Finding the Light Voting Booth Measuring Wheel Into the Dark Hidden Letter Level 1 1 2 2 2 Additional Required Materials These materials are not provided with the Conference Kits, and must be colleted separately before attempting any of the activities in this workbook. Materials Meter or Yard stick Roll of broad black tape (electrical tape) Roll of white tape Pair of Scissors Power adaptor for charging NXT Brick Large print-out of letters of the alphabet Number 2 3 2 1 2 1 Page DI - 2 DI - 8 DI - 14 DI - 20 DI - 27

Some sort of construction to hide a letter so that a data collector cannot see what their NXT vehicle is driving over (chair covered by cloth, cardboard box tunnel, etc)

D1 - 1 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

Level 1 Data Logging

Find the Light


Learning Objective: Understand how to collect information from the light sensor using both the NXT brick and the NXT Data Logging feature in NXT MINDSTORMS v. 2.0. Challenge: In this challenge, you will be asked to use your NXT brick and a light sensor to collect light sensor information. You will first use the view feature on your NXT to read light levels in the room to become accustomed to using this sensor to collect data. This data will be displayed numerically on your NXT screen. You will then attach your NXT and light sensor to your computer to read light levels in the environment around your computer. With data displayed graphically. Building Procedure: NOTE: This activity will not involve building an NXT vehicle. Step 1: Using a wire, attach an NXT light sensor to your NXT brick via port 2. Light Sensor:

Using the NXT Step 1: Turn on the NXT by selecting the orange button. The NXT will turn on to show the main menu.

Step 2: Using the grey arrow buttons, navigate through the menu until you see the view icon.

D1 - 2 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

Step 3: Select View by pressing the orange select button. You will be directed to a list of sensors. Navigate to the ambient light icon using the grey navigation buttons. Select this menu option by pressing the orange select button.

Note: Ambient light measures the light levels in the environment around the light sensor. Reflected light measures the amount of light that is returned to the light sensor from light that it generates itself. The Ambient Light option is what you should use when you want to know about light levels surrounding the NXT. The Reflective Light option is what to use to measure light reflected off of materials (darker, less shiny materials will not reflect much light, whereas lighter, more reflective materials will reflect a lot of light) Step 4: You will be directed to a menu of ports. Navigate to the correct port using the grey arrow buttons. Select the correct port (input port 2) using the orange select button.

Step 5: At this point, you will be able to view the light levels that your light sensor is measuring. Walk around the room to find the darkest spot you can and the lightest spot you can. The NXT measures light levels on a scale of 0 100, with 0 being the darkest, 100 being the lightest.

Step 6: Notice the value of light in different areas of the room. You will use NXT data logging to measure light levels at your desk, so keep in mind the values to see if you can replicate the highest and lowest values when sitting at your desk. Programming Procedure: Step 1: Open up NXT MINDSTORMS v. 2.0. Step 2: Access the NXT Data Logging menu by clicking on the top of the NXT Programming menu. button at the

D1 - 3 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

Step 3: You will be directed to the NXT Data Logging menu shown below:

Step 4: Type the name of your experiment into the NXT Data Logging menu in the Start New Experiment title box.

Step 5: Click the box to continue.

button to the right of the orange Start New Experiment title

Step 6: The Experiment Configuration panel will appear. You will be collecting light sensor data from a light sensor wired to port 2, for 10 seconds, at a rate of 5 light sensor samples a second. This will give you a total of 50 data points. Configure the experiment as shown below:

Step 7: In the Experiment Configuration panel, the experiment will automatically look for reflected light, for this experiment you want to collect ambient light data. To do this, uncheck the reflected light option in the experiment configuration panel. Shown below: Note: You are measuring light levels in the environment, which is why you want to measure ambient rather than reflectedshould light. now appear and workspace

Step 8: The NXT Data Logging look similar to the image below:

D1 - 4 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

There are five main areas in the Data Logging workspace: Area 1 The Data Logging toolbar, which contains tools for manipulating data. Area 2 The Navigation Space, used to select different experiment tabs. Area 3 The Data Logging Graph, which displays collected data as line graphs. Area 4 The Data Logging Controller, which allows for information transfer between the computer and the NXT Brick. Area 5 The Dataset Table, which displays the collected data as numbers. Data Collection: Step 1: Attach your NXT brick to your computer via the USB cable. Step 2: Now you are ready to run your experiment. To collect data, click on the play button in the center of the Data Logging Controller at the lower right corner of your data logging workspace (Area 4). This button will collect the data from your NXT brick as you sit at your desk.

D1 - 5 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

Step 3: While the experiment is running, examine the environment at your desk by pointing your light sensor in different directions. Try to find the darkest and the lightest areas around your computer, can you replicate the numbers you got when you walked around the room examining light sensor values on your NXT? Remember that you only have 10 seconds to collect your data. Data Analysis: Step 1: Your graph should look similar to the graph shown below. The peaks will indicate when the light sensor was in the lightest area(s) and the valleys indicate when the light sensor was in the darkest area(s):

Step 2: To analyze your graph you can use the section analysis tool located in the top toolbar:

D1 - 6 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Find the Light

Book DI: NXT Data Logging Level 1

Step 3: This tool will automatically place a section on your graph. Move the section by selecting the left or right edges and dragging them to the spot that you want to start or end the analysis. Use the section analysis tool to find the minimum value and maximum value on your graph as shown below:

Step 4: You can also analyze your data in the data set table below your graph. You can look at the amount of light the sensor was detecting at each interval of your experiment, as shown below:

Further Experimentation: Data logging allows you to collect and store information over a period of time. You can reconfigure this experiment to collect data on light levels over much longer periods of time, say 24 hours. This type of experiment would show how the light levels in a room would change over the course of a day as the lights are turned on/off and as the sun goes up and down. D1 - 7 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Level 1 Data Logging

Voting Booth
Learning Objective: Understanding how to collect and analyze data from two touch sensors in NXT Data Logging. Challenge: In this challenge, you will write an experiment to collect data from two touch sensors wired to your NXT brick to make a voting booth. You will think of a yes/no question for the group/class to vote on. Other people will vote on your question by pressing one of two sensors on your voting booth to give their answer(s). You will total the number of votes by counting peaks on your graph. Building Procedure: Whats your vote? YES NO

Step 1: Think of a yes/no question that you would like to survey other people in the room about. Write this question on an index card. Step 2: Wire one touch sensor to port 1 on your NXT brick and label this sensor Yes with a piece of masking tape or half of an index card. You should secure the sensor using a beam and pegs so that it is mounted on one side of the NXT brick. Step 3: Wire the other touch sensor to port 3. Secure the touch sensor to the other side of your NXT brick using beams and pegs. Label this touch sensor No. Programming Procedure: Step 1: Open up NXT MINDSTORMS v. 2.0. Click on the left. icon in the upper

D1 - 8 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Step 2: You will be directed to the Start Data Logging window. Type the name of your experiment in the Start New Experiment box.

Step 3: Click the button to the right of the orange Start New Experiment title box to continue. Step 4: The Experiment Configuration Panel will now appear. Configure the experiment as shown below. You will be collecting data for 300 seconds at a rate of 5 samples per second from two separate touch sensors, one wired to port 1 and the other to port 3.

Step 5: Click to proceed to the data logging workspace. Data Collection: Step 1: Connect your voting booth (NXT brick) to your computer via the USB cable. Step 2: You will leave your experiment at your computer while you walk around the room to vote at other groups voting booths. Place your voting booth next to your computer and set it up so that people can read the question on the index card and vote on the question using your NXT voting machine while you are away. Step 3: When everyone in the class is ready to vote, begin your experiment by clicking on the play button in the center of your data logging control panel at the lower right corner of the graphing space, as shown below:

Step 4: You will have 5 minutes (300 seconds) for your experiment to run, collecting votes, while you vote on other groups questions. At the end of the 5 minutes, return to your computer to analyze your data. Data Analysis: Step 1: Your graphs should look similar to the graph shown below. There should be two separate graphs, one for each sensor. A value of 1.0 indicates that the touch sensor was depressed by someone voting on at your voting booth. It may be difficult to see the difference between the two separate graphs. D1 - 9 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Step 2: To make it easier to differentiate the two graphs, you can change the color of the graph by clicking on the Plot Color/Style in the Dataset Table area below the graph:

Step 3: Choose two contrasting colors for your graph, like the graph shown below:

Step 4: Next you will hide one graph, so that you can examine the number of peaks on the other. This will allow you to count how many yes votes, and how many no votes there were. To hide a graph, click on the eye icon,as shown below:

Step 5: Count the peaks on the graph for touch sensor 1: D1 - 10 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth 1 2 3 4 5 6 7 8

Book DI: NXT Data Logging Level 1 9 10

Touch sensor 1 votes: 10

Step 6: Hide the graph for touch sensor 1 and show the graph for touch sensor 3. Count the number of peaks on the touch sensor 3 graph. D1 - 11 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1 2 3 4 5 6 7

Touch sensor 3 votes: 7 Step 7: You can also analyze your data by examining your Dataset Table. A value of 1.0 indicates the sensor is pressed and a value of 0.0 indicates that the touch sensor is not being depressed.

Reflection: This activity shows how data collection can be automated and used to collect data from multiple sensors while you are not actually by your NXT, producing visible results. Think of other experiments that could be set up in a similar way.

D1 - 12 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Test Your Knowledge

Book DI: NXT Data Logging Level 1

Test Your Knowledge

Explore What You Have Learned


Challenge: Below are some suggestions of ways that you can use what you have learned about data logging to do further exploration. Can you think of any other ways to test your knowledge? What is the lowest and highest light level readings you can get when you sit at your computer? What light level readings do you get when you cover the light sensor with your hand? Think of other questions to vote on using your touch sensors. What values to do get when you check the reflected light option and point the light sensor at different materials?

D1 - 13 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Level 2 Data Logging

Measuring Wheel
Lesson Objectives: In this lesson you will use your NXT vehicle to figure out how many rotations your wheels make over a certain distance. Challenge: In this challenge, you will configure an experiment in NXT Data Logging to perform remote data collection of rotation sensor data. You will download this experiment to your NXT brick and disconnect it from the computer. You will then physically push your vehicle along the ground over a specified distance to perform the experiment. You will upload this rotation sensor data to decipher how many rotations your wheels make as the car is rolled a specific distance. You can use this data to figure out how many rotations it will take your car to drive a mystery distance. Building Procedure:

Step 1: Build an NXT two-motor vehicle. Step 2: Wire one motor to output port B and the other to output port C. Programming Procedure: Step 1: Open up NXT MINDSTORMS v. 2.0. Click on in the upper left.

Step 2: You will be directed to the Start Data Logging menu. Type the name of your experiment in the Start New Experiment box.

D1 - 14 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Step 3: Click the button to the right of the orange Start New Experiment title box to continue. Step 4: The Experiment Configuration Panel will appear. Configure your experiment to collect rotation sensor data from output port B for 10 seconds at a rate of 5 samples a second. Shown below:

Step 5: Click ok to open your new experiment. Data Collection: Step 1: Unlike the previous two data logging activities, you will download your program to your NXT and disconnect the vehicle from the computer to collect data. To do this, connect your NXT vehicle to your computer via the USB cable. Click the download button (shown below) to transfer your experiment from the computer to the NXT brick.

Step 2: Disconnect your NXT vehicle from the USB cable. Bring the vehicle to a tape measure or ruler on the floor. Step 3: Run the experiment on your NXT. Navigate to the software file of your experiment by selecting the orange button. Select the file and click Run to start your experiment. Once your program is running, physically roll your NXT vehicle along the ground for a measurable distance (e.g.1 meter, 5 feet, 16 inches). Step 4: Return to your computer and reconnect the USB cable to the NXT brick. Click on the upload button to transfer the data from your NXT brick to the computer.

D1 - 15 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Step 5: The following box will appear and will list all the experiments that are stored on your NXT:

Note: All logs that are stored on your NXT will be displayed here. The most recent log will be at the very top of the logs that are listed. You can delete logs to make space on your NXT by clicking on a log and then clicking the delete button in the lower left corner. Step 6: Click on the experiment(s) you would like to upload, they should be highlighted (shown below):

D1 - 16 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Step 7: In the lower right-hand corner of the screen you should select open log in the After Upload dialog box. This will open the data set selected in a new window. If you select import log, you can open multiple data sets in the same window. For this experiment you will only need to open one data set.

Step 8: Click ok to open your graph and begin analysis. Data Analysis: Step 1: The graph of your rotation sensor data should appear in the graphing space and look similar to the graph shown below:

Step 2: To change the y-axis of your graph so that you have a better view of your graph click on in the lower left-hand corner.

Step 3 (Point Analysis): You can find the total number of rotations using two different analysis tools, point analysis and section analysis. First select the point analysis tool from the tool bar at the top of the graphing window:

D1 - 17 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Step 4 (Point Analysis): When you select this tool, the computer will automatically place the point analysis bar onto your graph. You should move this point to the highest point on your graph by clicking on the yellow line and holding down your mouse to move the line.

Step 5 (Section Analysis): Use the section analysis tool to accomplish the same task. When you select the section analysis tool it will automatically place a grey bar on your graph:

Step 6: Move the grey bar to cover the entire graph. The maximum value will be the total number of rotations that the wheel on your NXT vehicle made over the distance you pushed it.

Optional Challenge: Step 1: The instructor will give a mystery distance for your vehicle to travel. Step 2: Click to open up a new program where you will tell your car to drive (separate from your experiment). Call your new program drive:

D1 - 18 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Measuring Wheel

Book DI: NXT Data Logging Level 2

Step 3: click Go to open up the programming window. Place a move block into your drive program:

Step 4: Using the information collected in your graph, figure out how many rotations your wheels must make to travel the distance specified by the instructor. Use the proportion you came up with in your experiment (e.g. 2 rotations for 6 inches or 2 rot/6 in) Cross multiply to figure out the number of rotations you will need to travel the distance specified by the teacher # of rotations from experiment Distance from experiment = ? Rotations mystery distance

Example: 2.75 Rotations = ? Rotations 1 Foot 3 Feet = 2.75 x 3 = 8.25 Rotations Step 5: In the configuration panel of the move block, enter this number of rotations you calculated:

Step 6: Connect your vehicle to the computer via the USB cable. Download your program by clicking on the download button in the lower right corner of the programming workspace. Step 7: Disconnect your vehicle from the USB cable, and run your program by selecting it with the orange button the NXT brick. Measure how far your car travels when you run the program. Did it travel the distance the instructor specified? Conclusion: This activity can be connected to the Going the Distance programming activity in which you program your car to travel for several different times, measure the distance your vehicle travels, and create a distance-time graph. The graph is then used to predict how long you must program your vehicle to drive to stop after a mystery distance. Think about the pros and cons of using time or rotation measurements to program your vehicle to travel a given distance. D1 - 19 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Level 2 Data Logging

Into the Dark


Lesson Objectives: To understand how to collect data from a moving NXT vehicle. This lesson requires the use of both NXT Data Logging and programming. Challenge: In this challenge, you will combine NXT Data Logging and Programming to accomplish a task. You will write an experiment to collect light sensor data. You will incorporate this experiment into a program so that you can collect data as your car drives. You will then upload the data to analyze how the environment around the car changes as it drives. Building Procedure:

Step 1: Construct a two-motor NXT vehicle. Attach a light sensor to the front of the car. Orient the light sensor so that it is pointed horizontally. Step 2: Wire one motor to output port B and the other to output port C. Step 3: Wire the light sensor to input port 2. Programming Procedure: Step 1: Open NXT MINDSTORMS v. 2.0. Click the window to open NXT data logging. in the upper left corner of

Step 2: Type the name of your experiment in the Start New Experiment box.

D1 - 20 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Step 3: Click the button in the Start New Experiment title box to continue. Step 4: The Experiment Configuration Panel will appear. Configure your experiment to collect light sensor data from input port 2, for 10 seconds, at a rate of 5 samples a second. You should collect ambient light conditions. Therefore, uncheck the reflected light option. Shown below:

Step 5: Click ok at the bottom of the Experiment Configuration panel to open the graphing workspace. Step 6: You will now use the experiment that you configured in step 4 in a program that will collect this information as the NXT vehicle performs other actions. In the Tools menu option on the top bar of your computer, select Create Data Logging Program

Step 7: The NXT programming window will appear with a programming block already in the workspace. This programming block is a Start Datalog block, which signals your NXT to record information from the environment depending on how your experiment is configured.

Step 8: Add a Move Block to the program so that your car will drive as it collects data. Place this block before the Start Datalog Block. The Move Block is found in the common menu.

Step 9: Configure the Move Block as shown below. The block should signal the car to drive straight for an unlimited amount of time. Because the NXT brick reads programs D1 - 21 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

from left to right, it will read the Move Block, tell the motors to turn, and then read the Start Datalog block to begin the experiment as the car is driving.

Step 10: Configure the Start Datalog block like the one shown below. You should be sure that the wait for completion option is checked. This ensures that the program will not move to the next block until the data logging has taken place.

Step 11: Add a Move Block after the Start Datalog block to stop the car after the experiment is complete:

Step 12: Configure this Move Block as shown below:

Step 13: Click on File in the top tool bar and save your file as lightdrive. Step 14: Connect your NXT vehicle to the computer via the USB cable. Download the program to your NXT vehicle by clicking the download button in the lower right corner.

D1 - 22 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Data Collection: Step 1: Disconnect your NXT vehicle from your computer and bring it to an area of the room with enough space for your car to drive forward for 10 seconds, but so that it will drive into a darker area, like under a desk, or away from a light source. Step 2: Select the lightdrive program from the software files, and select Run using the orange button to begin your program. Your car should drive forward for 10 seconds, collecting light sensor data as it drives. Step 3: Make multiple runs (2 3) of different areas in the room, you will compare these samples as graphs in NXT data logging. Data Analysis: Step 1: Return to your computer and reconnect your NXT vehicle to the USB cable. Return to NXT data logging by clicking on the icon in the upper left corner:

Step 2: Click on the upload button in the lower right corner of your graphing space:

Step 3: Your log files will appear. If you only want to open one of your logs, highlight the log file by clicking on it. At the bottom right of the screen, select open log and click on upload

Step 4: To upload multiple log files, select the log files, check the option import log, and click the upload button:

D1 - 23 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Step 5: You will be directed to the graphing workspace in NXT data logging. The graphs of the log files that you just imported should appear. Change the color of these graphs so that you can easily identify them by clicking on the change color/plot icon.

Step 6: Zoom into the graphs by clicking in the lower left corner of your graph, below the y-axis. Your resulting graph should look similar to the graph below:

Step 7: You can use the analysis tools to examine differences between your two graphs. Click on the section analysis tool from the toolbar about your graphing space:

Step 8: Drag the section analysis tool to cover the entire 10 seconds of your logs by clicking on either side of the bar and dragging it to the edge of the graph. You can view the minimum and maximum values for each graph and compare these values:

D1 - 24 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Voting Booth

Book DI: NXT Data Logging Level 1

Step 9: Select the Show Linear Fit option at the bottom of the section analysis box. This will place two linear fit lines on your graph and give you the equation for these lines. Compare the slope of these graphs. Which situation did the light levels change the fastest? Which situation did it change the slowest?

D1 - 25 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Test Your Knowledge

Book DI: NXT Data Logging Level 2

Test Your Knowledge

Explore What You Have Learned


Challenge: Below are some suggestions of ways that you can use what you have learned about data logging to do further exploration. Can you think of any other ways to test your knowledge? Can you program the car to turn while it collects light sensor data rather than driving in a straight line? Program your car to drive while it collects light sensor data. And then drive back to you so that you do not have to go retrieve it. Program your car to collect rotation sensor data as it drives. How many rotations per second is your car driving? What if you change the power level? Run multiple trials to test different power levels.

D1 - 26 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Level 2 Data Logging

Hidden Letter
Learning Objective: To understand how to collect data from a moving NXT vehicle, and how to interpret this data using NXT Data Logging. Student Challenge: In this challenge, you will program your NXT vehicle to collect light sensor data while it is driving. The vehicle will drive over a letter of the alphabet that is hidden from view in different positions to collect light sensor data. You will use this data to decipher which letter of the alphabet your NXT has driven over. Building Procedure:

Step 1: Build a NXT two-motor car with a light sensor mounted vertically so that it can measure reflected light levels off of the floor. Step 2: Wire one motor to output port B and the other motor to output port C. Step 3: Wire the light sensor to input port 1. Programming Procedure: Step 1: Open NXT MINDSTORMS v. 2.0. Click Logging menu. t o access the Data

Step 2: In the Data Logging menu, type the name of your experiment Hidden Letter into the orange Start New Experiment title box.

DI - 27 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2 button to the right of the Start New Experiment title box.

Step 3: Click the

Step 4: The experiment configuration panel will appear. Configure your experiment like shown below. Collect reflective light sensor data for a period of 10 seconds at a rate of 5 samples per second.

Step 5: You should be sure that the reflected light option is checked. Since you are collecting information from a piece of paper that may be hidden in a dark space, it is important that your light sensor is generating light. The NXT will measure the amount of light that is reflected back from the light that it is generating. This will be useful in detecting the differences between the white and black areas on the paper.

Step 6: To collect data while your NXT vehicle is driving, you must convert the experiment that you just configured (Hidden Letter) into a programming block. Select the Create Data Logging Program under the Tools menu in the top toolbar.

Step 7: The NXT programming interface will appear with a programming block already in the workspace. This programming block is a Start Datalog block, which is configured to collect data depending on how you configured your experiment in NXT Data Logging.

DI - 28 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Step 8: You will add two programming blocks to complete your program. Place one Move block before the Start Datalog block and the other one after. The Move block is located in the Common submenu on the left hand side of the programming workspace.

Step 9: Program the first block to drive for an unlimited amount of time at a low power. Since your NXT will read the program from left to right, the program will jump from the first programming block immediately to the Start Datalog block. As the car is driving it will perform the experiment as it is configured in the Start Datalog block. You should check the wait for completion option in the Start Datalog block to ensure that the NXT does not jump to the last programming block before the experiment is complete. The last programming block will signal the NXT vehicle to stop driving before the program ends.

Each block should be configured as shown below:

NOTE: In the Start Datalog block, the Wait for Completion option should be checked This will ensure that the car will continue to drive while the experiment is taking place.

Step 10: Save this program with the title Hidden Letter.

DI - 29 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Step 11: Connect your NXT brick to your computer via the USB cable. Download your program to the NXT brick using the Download Button. When the program download is complete, disconnect your NXT from the USB cable.

Data Collection: Step 1: Unplug your NXT vehicle from the USB cable and place it so that it will drive over the letter of the alphabet that is hidden from view. Step 2: Run the Hidden Letter program by selecting Run using the orange button. Step 3: Have your vehicle drive over the hidden letter several times at slightly different locations to collect multiple logs. (see diagram below)

Data Analysis Step 1: Reconnect your NXT brick to the USB cable. Be certain the NXT is on. Step 2: Return to the NXT data logging by clicking the corner of the programming workspace. button at the top left

Step 3: You will be directed to the graphing workspace in NXT Data Logging. Click the Upload Button in the Data Logging Controller in the lower right corner to transfer your data from the NXT brick to the computer.

DI - 30 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Step 4: The log files that are stored on your NXT will appear in the log upload window. The files are organized by the time that they occurred, with the most recent log at the top of the list. For this activity, you will want to import multiple logs. Select multiple logs by clicking on a log and holding down the CTRL button to select others.

Step 5: After you have selected the files that you will upload, select the option Import Log after upload. This option will open up all of your logs in the graphing workspace. Click upload to open these files.

Note: Depending on the number of trials you perform, or the number of other program(s) stored on your NXT, you may need to delete files to make space for more. You can do this in several ways. You must have your NXT connected to perform these actions Option 1 Upload Menu: After you select the upload icon you can not only import logs, but also delete them. Highlight the logs that you would like to delete, and select delete at the bottom of the screen.

DI - 31 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Option 2 NXT Data Window: Select the NXT Data button in the Data Controller at the lower right corner of the graphing workspace:

A window containing data specific to your NXT will appear. Select the Memory tab. Select Programs next to the bar on the left of the window, which shows the memory allocation, to view programs that are stored on your NXT. Select any programs that you would like to delete, or delete all your programs by selecting Delete All

Step 6: All of your graphs will open at once in the graphing workspace.

Step 7: Examine each graph one at a time using the hide/show button in the Dataset Table space. Keep in mind the order that you performed your trials and the orientation that the car was pointed. The most recent log should be at the top of the list:

DI - 32 Copyright 2009 Tufts University Center for Engineering Education and Outreach

Hidden Letter

Book I: NXT-G Data Logging Level 2

Step 8: Each graph will look similar to the graph shown below. There will be areas of dark and areas of light. Dark areas will be lower values than light areas. Use this information to try to figure out the letter that your car was driving over. On the white part of the paper Off the paper, on the floor Driving over black ink (letter)

Example: For the following scenario (the letter A), the graphs may look as follows: 3 2 1

A
A B C

DI - 33 Copyright 2009 Tufts University Center for Engineering Education and Outreach

You might also like