Computer Science Grade 9 20 min

Robot Parts: Motors and Sensors

Introduction to basic robot parts like motors (for movement) and sensors (for detecting things).

What you'll learn

  • Identify at least two different robot parts as either a motor or a sensor.
  • Explain in simple terms what a motor does to help a robot move.
  • Describe in simple terms what a sensor does to help a robot "see" or "feel" things.
  • Match at least three different robot actions (like 'move forward', 'stop when it sees something', 'turn') to whether it would need a motor or a sensor to perform the action.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Identify the difference between an actuator (like a motor) and a sensor. Explain the function of at least two types of motors (DC, Servo) and two types of sensors (Ultrasonic, Infrared). Write pseudocode to control the speed and direction of a motor. Write pseudocode to read and store a value from a sensor. Create a simple program that uses sensor data to make a decision and control a motor. Describe the relationship between a robot's physical components and the code that controls them. How does a self-driving car know when to stop, or a robot vacuum know not to fall down the stairs? 🤖 It's all about giving the robot 'muscles' to move and 'senses' to perceive the world! In this lesson, we'll explore the fundamental bui...
2

Key Concepts & Vocabulary

TermDefinitionExample ActuatorA component of a robot that is responsible for moving or controlling a mechanism. It takes an electrical signal and converts it into physical motion.A DC motor that spins a wheel is an actuator. It takes a 'go' signal from the computer and creates movement. SensorA component that detects events or changes in its environment and sends that information to the robot's computer. It gives the robot awareness of its surroundings.An ultrasonic sensor sends out sound waves to measure the distance to an object, acting like the robot's 'eyes'. DC MotorA simple motor that provides continuous rotation. Its speed and direction can be controlled, but not its exact position.Used for the wheels of a simple robot car, where you want them to keep...
3

Core Syntax & Patterns

Controlling an Actuator (Motor) motor.set_power(value) This is a common pattern for controlling a motor. You call a function associated with your motor object and pass a value. A positive value (e.g., 100) might mean full speed forward, a negative value (e.g., -100) full speed backward, and 0 means stop. Reading from a Sensor variable = sensor.read_distance() To use sensor data, you must first read it and store it in a variable. This pattern calls a function on the sensor object, which returns a value (like a distance in cm) that your program can then use. Sensor-Based Decision Making if sensor.read_distance() < 20: motor.set_power(0) This is the core of robotics: the Sense-Think-Act loop. The program 'senses' the environment (reads the sensor), &#03...

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
A robot needs to slow down proportionally as it gets closer to a wall. Which pseudocode logic inside a `while True:` loop would best achieve this behavior?
A.if distance < 50: motor.set_power(20)
B.power = 100 - distance; motor.set_power(power)
C.if distance < 10: motor.set_power(0)
D.power = distance * 2; motor.set_power(power)
Challenging
You are designing a robot to gently grip a fragile object. You have a servo for the gripper and a pressure sensor (`sensor.read_pressure()`). How should you structure the code to close the gripper until it feels a slight touch, then stop?
A.Set the servo to its fully closed position and then read the pressure.
B.In a loop, slowly increase the servo angle by 1 degree at a time, and `break` the loop when the pressure reading exceeds a small threshold.
C.Read the pressure once, and if it's zero, close the gripper completely.
D.Use a DC motor instead of a servo for more gripping power.
Challenging
A line-following robot with an IR sensor works perfectly on a matte white paper with a black electrical tape line. When moved to a shiny, polished white floor with the same tape, it behaves erratically. What is the most likely cause?
A.The DC motors are overheating on the new surface.
B.The shiny floor is creating specular reflections, confusing the IR sensor.
C.The robot's code is not suitable for shiny surfaces.
D.The ultrasonic sensor is interfering with the IR sensor.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Introduction to Robotics: Building and Controlling Machines

Computer Science for other grades

Frequently asked questions

What grade level is "Robot Parts: Motors and Sensors"?

Robot Parts: Motors and Sensors is a Grade 9 Computer Science lesson on ExcelOS.

What will I learn in Robot Parts: Motors and Sensors?

You'll be able to: Identify at least two different robot parts as either a motor or a sensor; Explain in simple terms what a motor does to help a robot move; Describe in simple terms what a sensor does to help a robot "see" or "feel" things.

Is "Robot Parts: Motors and Sensors" free to practice?

Yes. You can read the tutorial preview for free, and signing up for a free ExcelOS account unlocks the full tutorial and all practice questions with instant feedback.

How many practice questions are included with Robot Parts: Motors and Sensors?

This lesson includes 27 practice questions across multiple difficulty levels, each with instant feedback and explanations.

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.