Introduction to Sensors-Ultrasonic





Name of Activity Introduction to Sensors-Ultrasonic Sensor
Author Danish Bhatti, Kenny Westermann
Keywords NXT Robotics, Sensors, Ultrasonic Sensor, Datalogging
Subject NXTs
Grade Level 4
Time 1 Hour Total
Brief Description An introduction to robotics would be incomplete without imparting a basic understanding of how robots perceive their environment and react to it. We did this activity to add more dimensions to the functionalities of the robots that our class made. Up till now the robots could not function with respect to external stimuli and performed only simple tasks.

Once we put sensors into the equation, robotics suddenly became much more engaging for the students since their creations started displaying a sense of awareness as compared to the mindless drones that they were before.

At the start of the lesson, we began by trying to show the class how animals in nature perceive their environments. We also discussed how humans use their eyes ears and touch to understand different aspects of our environment. Then we worked on relating this concept to robots and NXT robots in particular. How the sensors corresponded to some of the key senses of the human body, how the NXT brick functioned as the Brain and how motors resembled muscles in their role as actuators.

Then we moved on to talk about the ultrasonic sensor and its functions. We also spent some time teaching the class how they could incorporate the sensors into their mindstorms programs. In the previous lesson we had introduced the wait-for command so the class was very quick to catch on.

We gave the class some time to install the sensors on their robots and then we simply put up a checklist of tasks we wanted the class to have their robots perform–tasks that had at least one part which relied on the use of the ultrasonic sensor. e.g: If anything comes closer to the robot than 20cm, have the robot panic and run backwards at full speed for 2 seconds.

Lesson Objectives: Understanding the concept of a sensor.
Where sensors are found in the natural world.
How does the Ultrasonic sensor work?
How to write a program that can make use of ultrasonic sensorsor sensors in general?
Altering the design of your robot to ensure optimum placement for the sensor.
Materials Needed: NXT Kit
Computers w/ NXT software
Preparation and Set Up: None
Necessary Background Experience making NXT robots that rely on sensors.
Procedure 1-What are Sensors? 2-Where can we find them in the real world? 3-What is an ultrasonic sensor and how does it work? 4-Adding the sensor to the robot. 5-Programming it. 6-Testing the machine 7-Optimization

Find the Hidden Letter





Name of Activity Find the Hidden Letter
Author STOMP
Keywords 1 Hour Total, NXT, datalogging, hidden letter, alphabet, light sensor, data, 4-6, 7-9
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students will use the NXT/RCX datalogging feature to identify a hidden
letter of the alphabet using light sensor data.
Lesson Objectives: To program an NXT/RCX vehicle to collect data.
To analyze data and come up with a solution.
Materials Needed: NXT/RCX kits.
MINDSTORMS 2.0 with datalogging
capabilities orROBOLAB investigator.
Large print out of a letter of the alphabet.
Should cover a 8 1/2 by 11 sized paper.
Preparation and Set Up: Set up the hidden letter on the floor or on a table, but make sure that it cannot be seen.
Have pre-built NXT/RCX vehicles or allow students to construct their own.
Set up computer with MINDSTORMS 2.0 or ROBOLAB Investigator.
Necessary Background Datalogging is used to collect data from the sensors on the NXT vehicle.
This data an then be uploaded on to a computer an analyzed.
The light sensor will be used in this activity to collect information
about the color changes of the hidden letter.
  1. Attach a light sensor to your NXT/RCX car so that it is pointed at the floor. Wire this to port 1.
  2. Open the datalogging feature in MINDSTORMS 2.0, or open Investigator 2 in ROBOLAB.
  3. Program your vehicle to collect light data as it drives (see picture attached). You may need to adjust the power level depending on how fast your car drives over the hidden letter.
  4. Have the car drive across the letter at least 5 times in different places.
    1. This can be done by having your car drive across the letter one way three times, each time moving the car down a few inches, then doing the same thing but in a different orientation.
  5. Upload your data by clicking on the upload button of MINDSTORMS datalogging or in ROBOLAB investigator.
  6. Examine the data for peaks and valleys indicating light or dark areas. From these graphs have students try to decipher what letter the car drove over.
  7. Allow student to continue testing and then to guess what the hidden letter is.
  8. You may want to have a few hidden letters so that students can try this activity several times.
Extensions: Limit the number of times you allow a car to drive over a letter.

Add a second light sensor to collect more data.

Reference 1

Switch to our mobile site