[RL33] Grade 3 – Session 3

Session 3: Navigating with Sensors – Distance Sensor and Line Follower

Session Architect: Muhammad Bilal
Session Length: 40 - 50 minutes


Equipment Required:

  • M3D Robotics kit (including Distance Sensor and Line Follower)
  • Laptops with Scratch pre-installed
  • Paper and pencils for students to document their observations
  • Black tape to create a path on white paper
  • Obstacles (small objects or markers)

Learning Objectives:

  • Understand how sensors help robots interact with their environment.
  • Learn to use the Distance Sensor to avoid obstacles and the Line Follower to follow a path.
  • Combine both sensors to create a more advanced navigation system for the robot.

Resources:

Scratch Code File:

Grade 3 Session 3.sb3 (410.2 KB)


1. Introduction to Sensing and Navigation (10 minutes)

Activity: Physical Navigation Exercise
To introduce the concept of sensing, you can lead a fun and interactive activity where students try to navigate through a classroom obstacle course.

Instructions:

  1. Set Up the Physical Activity:

    • Arrange a few objects (books, chairs, etc.) around the room to act as obstacles.
    • Mark a path on the floor using tape or objects, guiding students from one point to another.
  2. Student Participation:

    • Ask for volunteers to walk along the path, avoiding the obstacles without touching them. You can say:

“Now, I want you to walk from this point to that point, but don’t touch any of these obstacles. Follow the path, and be careful!”

  1. Discussion:
    • After a few students complete the task, gather them and ask:

“How were you able to follow the path and avoid the obstacles? What senses did you use?”

  1. Build on Their Answers:
    • Lead the discussion to the concept of sensors:

“You used your eyes to see the path and obstacles, and your brain to make decisions. Robots don’t have eyes like us, but they use sensors to detect their surroundings, just like you used your senses!”

Teacher’s Role:

  • Actively guide the discussion, asking students how they avoided obstacles and detected the path, then explain how robots use sensors in a similar way.

2. Distance Sensor – Avoiding Obstacles (15 minutes)

Activity:
Students will now attach the Distance Sensor to their robot and learn how it helps the robot avoid obstacles by detecting objects in its path.

Instructions:

  1. Attaching the Distance Sensor:

    • Show students how to connect the Distance Sensor to the robot.
    • You may have a picture of the sensor displayed on the projector for their assistance. Or, you may show them the sensor in your hand and ask them to identify them from the M3D Go kit.
    • Explain that this sensor can detect objects in front of it and help the robot avoid collisions.
  2. Using the “Start Obstacle Detection” Block:

Once the sensor is attached, students will use a custom block available in the provided session file.

  • Introduce the custom Scratch block “Start Obstacle Detection”.

    • Explain how this block tells the robot to check for obstacles and adjust its movement to avoid them.
    • Let students take turns controlling the robot using movement keys while the Distance Sensor is active.
    • When the robot gets close to an obstacle, it will automatically avoid it.
  1. Testing the Sensor:
    • Encourage students to set up different obstacles and guide the robot around them, observing how it detects and avoids each obstacle.
    • You may say:

“Let’s see how well our robot can avoid obstacles! Set up a few objects in front of the robot and use the movement keys to guide it. When it gets close to an obstacle, watch how it avoids it!”

Teacher’s Role:

  • Assist students in connecting the Distance Sensor.
  • Guide them through using the “Start Obstacle Detection” block, ensuring they understand how the sensor works.
  • Encourage experimentation with obstacle setups to see how well the sensor detects objects.

3. Line Follower – Following a Path (15 minutes)

Activity:
Next, students will be introduced to the Line Follower sensor. They will learn how this sensor allows the robot to detect and follow a path marked by black tape on a white surface.

Instructions:

  1. Attaching the Line Follower Sensor:

    • Show students how to attach the Line Follower sensor to the robot.
    • You can have it’s picture displayed on the projector so students can identify it easily. Or, you may show them the sensor in your hand and ask them to identify them from the M3D Go kit.
  2. Using the “Follow Line” Block:

  3. Drawing the Path:

    • Provide students with black tape and a large sheet of white paper. Ask them to create their own simple paths for the robot to follow.
  4. Testing the Line Follower:

    • Students will place their robot on the path and activate the “Follow Line” block to see the robot follow the black tape.
    • Encourage them to observe how the robot stays on the path. You might say:

“Let’s see if our robot can follow the path you’ve created! Place it on the line and watch how it uses the sensor to stay on track.”

Teacher’s Role:

  • Help students attach the Line Follower sensor and set up their paths.
  • Guide them through using the “Follow Line” block, ensuring they understand how the sensor detects the black tape.
  • Encourage students to observe how well the robot follows the line and adjust their paths if needed.

4. Displaying Sensor Values in Real Time (15 minutes)

Activity:
In this final activity, students will explore how sensors detect obstacles and follow lines by displaying real-time sensor values on the robot’s screen using the “Show Text” block.

Instructions:

  1. Introducing the “Show Text” Block:

    • Start by introducing the “Show Text” block in Scratch. Explain how students can use it to display any message they want on the robot’s screen.

    • Encourage them to play around with the block by showing simple messages like their name, “Hello!”, or “Robot Ready.”

  2. Linking Sensors to the Display:

    • After they’ve explored displaying text, start a discussion:

“Now that we’ve seen how the robot can display words, let’s think about this: How do you think the robot knows when there’s an obstacle or if it’s on the right path?”

  • Lead students to the idea that sensors gather information, and we can actually see what the sensors are detecting by displaying their values on the robot’s screen.
  1. Demonstrating Sensor Values:

    • Show how to display sensor data, like the “IR Sensor 1”, “IR Sensor 2” (for line detection), and the “Range Finder Value” (for obstacle detection), using the “Show Text” block.

    • Show them the sensor value blocks and how they can drag them from the list and drop in the “Show Text” block.


    • Demonstrate how the sensor values change in real time when you place an object in front of the distance sensor or guide the robot over a line.

    • Example:

      • Move the robot near an obstacle and display the changing Range Finder Value as it approaches or moves away from the object.
      • Show the IR Sensor values when the robot detects a line and how they change when the robot strays off the line.
  2. Encouraging Exploration and Comparison:

Encourage students to test the robot in different conditions:

  • Place obstacles at different distances and observe how the Range Finder Value changes.
  • Move the robot on and off the line and see how the IR Sensor values fluctuate.
  • Ask them to write down the sensor values for different situations and compare them:

“What is the value when there’s no obstacle? What happens when there’s an obstacle in front?”

“What does the IR Sensor show when the robot is following the line versus when it’s off the line?”

Teacher’s Role:

  • Introduce the “Show Text” block in a fun and engaging way, allowing students to explore displaying custom messages before moving to sensor data.
  • Guide the discussion to help students understand how sensors detect information and display it on the screen.
  • Demonstrate the change in sensor values and encourage students to experiment with real-time feedback.
  • Assist students in noting down and comparing values to better understand how the sensors work in different scenarios.

5. Reflection and Wrap-Up (5-10 minutes)

Activity:
End the session by discussing how the robot used its sensors to navigate the environment, just like humans use their senses to walk around.

Reflection Questions:

  • “How did the Distance Sensor help the robot avoid obstacles?”
  • “What happened when the robot followed the line?”
  • “What was the most challenging part while using the sensors?”

Teacher’s Role:

  • Lead a reflective discussion, helping students understand the importance of sensors in robotics.
  • Celebrate their success in creating sensor-based navigation and encourage them to think about how sensors are used in the real world.

Learning Outcome:

By the end of the session, students will have a solid understanding of how the Distance Sensor and Line Follower work. They will be able to program the robot to follow a path, avoid obstacles, and observe how the sensor readings change in real time.