Welcome to Module Two! In Module One, you learned how to write programs for robots. You learned about variables, decisions, loops, and sub-programs. You learned how to give your robot clear instructions.
But there is a problem. A robot that only follows instructions is blind. It cannot see. It cannot hear. It cannot feel. It just does what it was told, even if something is in the way.
Imagine you are walking to school with your eyes closed. You would bump into everything! You need your eyes to see where you are going. You need your ears to hear cars coming. You need your skin to feel if something is hot.
Robots are the same. They need sensors to understand the world around them. Sensors are like a robot's eyes, ears, and skin. They help the robot perceive — that means to notice and understand — what is happening around it.
In this module, you will learn about different types of sensors. You will learn how they work. You will learn how to use them in your programs. You will learn how to make your robot react to the world.
This is where robotics becomes really exciting. Your robot will stop being a machine that just follows orders. It will start being a machine that responds to its environment.
Let us begin!
By the end of this module, you will be able to:
Once upon a time, in the city of Aba, Nigeria, there lived a boy named Emeka. Emeka loved building things. His favourite project was a small robot named Nneka.
Nneka was a simple robot. She had two wheels, a small motor, and a computer brain. Emeka could program Nneka to move forward, backward, left, and right.
One day, Emeka decided to show Nneka to his friends. He put Nneka on the floor and pressed START. Nneka began to move forward. She moved straight. She moved fast. She moved proudly.
Then — BANG! Nneka hit the wall. She kept pushing against the wall. Her wheels spun. Her motor made a loud noise. She did not stop. She did not turn. She just kept pushing.
Emeka's friends laughed. "Your robot is blind!" they said.
Emeka felt sad. But then he thought, "They are right. Nneka is blind. She cannot see the wall. She cannot feel the wall. She just follows instructions."
Emeka went home and thought about the problem. How could he make Nneka see? How could he make her feel?
The next day, Emeka went to the market with his father. He saw many things: a trader touching tomatoes to check if they were ripe, a driver looking at the road, a woman listening for her phone ringing.
"Everyone uses their senses," Emeka thought. "Eyes to see, ears to hear, skin to feel. Maybe I can give Nneka senses too."
Emeka went to a computer shop and bought a small touch sensor. It was like a button. When something pressed it, it sent a signal to the robot's brain.
He attached the touch sensor to the front of Nneka. Then he wrote a new program:
Step 1: Move forward Step 2: IF touch sensor is pressed, THEN stop and turn right Step 3: Repeat from Step 1
He uploaded the program and pressed START. Nneka began to move forward. She moved toward the wall. She touched the wall. The touch sensor was pressed. Nneka stopped. She turned right. She moved forward again. She avoided the wall!
Emeka's friends were amazed. "Nneka can feel!" they shouted.
Emeka smiled. He had given his robot a sense. He had made Nneka perceive the world.
That is what you will learn in this module. You will learn how to give your robot senses. You will learn how to make your robot perceive the world.
Let us begin!
A sensor is a device that detects something in the environment and sends that information to the robot's brain.
Without sensors, a robot is blind and deaf. It cannot react to anything. It just follows its program, even if something goes wrong. Sensors give robots the ability to sense the world and make better decisions.
Think of your five senses: sight, hearing, touch, taste, and smell. These senses tell you what is happening around you. A sensor is like a robot's sense. It tells the robot what is happening around it.
Your phone has sensors. It has a light sensor that adjusts the screen brightness. It has a motion sensor that knows when you turn the phone.
A fire alarm has a smoke sensor. When it detects smoke, it makes a loud noise.
A refrigerator has a temperature sensor. It knows when the fridge is too warm, so it turns on the cooling system.
A generator has a fuel sensor. When the fuel is low, it warns you to buy more fuel.
Sensor in a Robot
+-------------------+
| Environment |
| (world) |
+-------------------+
|
| (something happens)
V
+-------------------+
| Sensor |
| detects it |
+-------------------+
|
| (sends signal)
V
+-------------------+
| Robot Brain |
| decides what |
| to do |
+-------------------+
|
V
+-------------------+
| Robot acts |
+-------------------+
A sensor is a device that detects something in the environment. It sends information to the robot's brain. Sensors give robots the ability to sense the world.
Perception is the process of using sensors to understand the world. It is how a robot makes sense of what its sensors tell it.
A sensor alone is not enough. The robot must also understand what the sensor means. For example, a touch sensor detects a press. But the robot must understand that the press means "there is an obstacle." That understanding is perception.
Imagine you touch a hot pot. Your skin senses heat. But your brain perceives danger. It tells you to pull your hand away. The sensor is your skin. The perception is your brain understanding the danger.
When you see dark clouds, your eyes sense the clouds. Your brain perceives that it might rain. You decide to take an umbrella.
When you hear the school bell, your ears sense the sound. Your brain perceives that it is time for break. You decide to go outside.
When you smell burning food, your nose senses the smell. Your brain perceives that the food is burning. You decide to turn off the cooker.
When a driver hears a horn behind him, his ears sense the sound. His brain perceives that another car wants to overtake. He decides to move aside.
Perception Process
+-------------+
| Sensor |
| detects |
+-------------+
|
V
+-------------+
| Robot |
| brain |
| understands|
+-------------+
|
V
+-------------+
| Robot |
| decides |
+-------------+
|
V
+-------------+
| Robot |
| acts |
+-------------+
Perception is how a robot understands what its sensors detect. It is the bridge between sensing and acting.
A touch sensor (also called a bump sensor) detects when something presses against it. It is like a button.
Touch sensors help robots detect collisions. When a robot bumps into something, the touch sensor sends a signal. The robot can then stop or turn.
Think of a doorbell. When you press it, it makes a sound. A touch sensor works the same way. When something presses it, it sends a signal.
Your phone screen is a touch sensor. When you tap an app, the screen senses your touch and opens the app.
A computer keyboard has touch sensors. When you press a key, the keyboard senses it and sends the letter to the computer.
A light switch is a touch sensor. When you press it, it senses your touch and turns the light on or off.
A car horn is a touch sensor. When you press it, it senses your touch and makes a sound.
Touch Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Touch | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (robot moves forward)
V
+-------------------+
| Wall |
+-------------------+
|
| (sensor is pressed)
V
+-------------------+
| Signal sent to |
| robot brain |
+-------------------+
|
V
+-------------------+
| Robot stops |
| or turns |
+-------------------+
A touch sensor detects when something presses it. It helps robots detect collisions and react to obstacles.
An ultrasonic sensor uses sound waves to measure distance. It sends out a sound wave and waits for it to bounce back. The time it takes tells the robot how far away something is.
Ultrasonic sensors help robots avoid obstacles from a distance. The robot does not need to touch the obstacle. It can sense it from far away and change direction.
Imagine you are in a big empty room. You shout "HELLO!" and wait for the echo. If the echo comes back quickly, the wall is close. If the echo takes a long time, the wall is far. Ultrasonic sensors work the same way, but with sound waves that humans cannot hear.
Bats use ultrasonic sound to navigate in the dark. They send out sound waves and listen for the echo. That is how they know where obstacles are.
Some cars have parking sensors. They use ultrasonic waves to detect how close the car is to the wall.
Some vacuum cleaners are robots. They use ultrasonic sensors to avoid bumping into furniture.
A car reversing in a tight parking space in Lagos uses ultrasonic sensors to avoid hitting other cars.
Ultrasonic Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Ultrasonic| |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (sends sound wave)
V
+-------------------+
| Obstacle |
+-------------------+
|
| (sound wave bounces back)
V
+-------------------+
| Robot receives |
| echo |
+-------------------+
|
| (calculates distance)
V
+-------------------+
| Robot knows |
| how far away |
+-------------------+
An ultrasonic sensor uses sound waves to measure distance. It helps robots avoid obstacles from far away.
A light sensor detects the amount of light in the environment. It can tell if it is bright or dark.
Light sensors help robots follow lines, detect edges, and react to changes in light. They are very useful in line-following robots.
Think of your eyes. When you enter a dark room, your eyes adjust. When you go outside in the sun, your eyes squint. A light sensor does the same thing. It measures how much light is around.
Street lights turn on automatically when it gets dark. They use light sensors.
Some classrooms have automatic lights. When the room is bright, the lights stay off. When it gets dark, the lights turn on.
Your phone screen adjusts its brightness based on the light around you. It uses a light sensor.
Solar panels use light sensors to know when the sun is shining. They store energy during the day.
Light Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Light | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (detects light level)
V
+-------------------+
| Bright or dark? |
+-------------------+
/ \
BRIGHT DARK
/ \
V V
+---------+ +---------+
| Robot | | Robot |
| follows | | stops |
| line | | |
+---------+ +---------+
A light sensor detects brightness. It helps robots follow lines and react to light changes.
A sound sensor (also called a microphone sensor) detects sound. It can tell if there is noise and how loud it is.
Sound sensors help robots react to claps, voices, or other sounds. They can be used to start a robot with a clap or stop it with a loud noise.
Think of your ears. When someone claps, your ears hear it. Your brain understands that it is a clap. A sound sensor does the same thing. It detects sound and sends a signal to the robot's brain.
Some toys clap-activated. When you clap, they move or make a sound. They use sound sensors.
The school bell is like a sound sensor for students. When it rings, students know it is time for break or assembly.
Some televisions can be controlled by voice. They use sound sensors to hear your commands.
A clap-activated light in a compound uses a sound sensor. When you clap, the light turns on.
Sound Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Sound | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (detects sound)
V
+-------------------+
| Was there a |
| clap? |
+-------------------+
/ \
YES NO
/ \
V V
+---------+ +---------+
| Robot | | Robot |
| starts | | waits |
+---------+ +---------+
A sound sensor detects noise. It helps robots react to claps, voices, and other sounds.
A colour sensor detects colours. It can tell the difference between red, green, blue, and other colours.
Colour sensors help robots sort objects by colour. They can also be used in line-following robots that follow coloured lines.
Think of a traffic light. Red means stop. Green means go. A colour sensor can detect these colours and tell the robot what to do.
Some factories use colour sensors to sort fruits. Red apples go in one box. Green apples go in another.
In art class, you sort crayons by colour. A colour sensor can do that automatically.
A washing machine can sort clothes by colour using a colour sensor. It separates white clothes from coloured clothes.
A tomato sorting machine in a market uses colour sensors to separate ripe red tomatoes from unripe green ones.
Colour Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Colour | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (detects colour)
V
+-------------------+
| What colour? |
+-------------------+
/ \
RED GREEN
/ \
V V
+---------+ +---------+
| Robot | | Robot |
| stops | | goes |
+---------+ +---------+
A colour sensor detects colours. It helps robots sort objects and follow coloured lines.
A distance sensor measures how far away an object is. Ultrasonic sensors are one type of distance sensor. There are also infrared (IR) distance sensors.
Distance sensors help robots navigate. They can tell if an obstacle is near or far. This helps the robot decide whether to slow down, stop, or turn.
Imagine you are playing a game where you must guess how far a tree is. You look at the tree and estimate. A distance sensor does the same thing, but with more accuracy.
Some cars have sensors that beep when you are too close to another car. They use distance sensors.
A measuring tape is like a distance sensor. It tells you how long something is.
A laser measure tool uses a distance sensor to tell you how wide a room is.
A danfo driver uses his eyes as distance sensors. He looks at the car in front and decides if he is too close.
Distance Sensor
+-------------------+
| Robot |
| +-----------+ |
| | Distance | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
| (measures distance)
V
+-------------------+
| How far away? |
+-------------------+
/ \
NEAR FAR
/ \
V V
+---------+ +---------+
| Robot | | Robot |
| stops | | moves |
+---------+ +---------+
A distance sensor measures how far away an object is. It helps robots navigate and avoid obstacles.
Sensor fusion means using multiple sensors together to get a better understanding of the world.
One sensor alone can be confused. A touch sensor only knows when something touches it. An ultrasonic sensor only knows distance. But if you combine them, the robot can understand much more.
Think of crossing a road. You use your eyes to see cars. You use your ears to hear cars. You use both senses together to decide when it is safe to cross. That is sensor fusion.
A self-driving car uses many sensors: cameras, ultrasonic sensors, radar, and GPS. It combines all of them to drive safely.
When you study for an exam, you use your eyes to read and your ears to listen. You combine both to learn better.
When cooking, you use your eyes to see the food and your nose to smell it. You combine both to know when it is ready.
A trader at the market uses her eyes to see customers and her ears to hear them. She combines both to serve them better.
Sensor Fusion
+-------------+ +-------------+
| Touch | | Ultrasonic |
| Sensor | | Sensor |
+-------------+ +-------------+
\ /
\ /
V V
+-------------------+
| Robot Brain |
| combines both |
+-------------------+
|
V
+-------------------+
| Better decision |
+-------------------+
Sensor fusion means using multiple sensors together. It gives the robot a better understanding of the world.
A sensor program is a program that reads sensor data and makes decisions based on that data.
Sensors are only useful if the robot can react to them. A sensor program tells the robot what to do when a sensor detects something.
Imagine you have a touch sensor on your robot. You write a program that says: IF the touch sensor is pressed, THEN stop and turn. That is a sensor program.
A doorbell program: IF the button is pressed, THEN play a sound. That is a sensor program.
A fire alarm program: IF smoke is detected, THEN sound the alarm. That is a sensor program.
A fridge program: IF temperature is too high, THEN turn on cooling. That is a sensor program.
A generator program: IF fuel is low, THEN show warning light. That is a sensor program.
Sensor Program Flow
[ Start ]
|
V
[ Read sensor ]
|
V
[ Is sensor triggered? ]
/ \
YES NO
/ \
V V
[ Act ] [ Continue ]
\ /
\ /
V V
[ Repeat ]
A sensor program reads sensor data and makes decisions. It tells the robot how to react to the world.
Calibration means adjusting a sensor so it works correctly. It means setting the sensor to understand what is normal.
Sensors can be confused. A light sensor might think a shadow is total darkness. Calibration helps the sensor understand the difference between normal light and darkness.
Imagine you get a new pair of glasses. At first, everything looks blurry. You adjust them until you can see clearly. That is calibration.
When you set an alarm clock, you are calibrating it to wake you at the right time.
When you adjust the volume on a radio, you are calibrating the sound.
When you adjust the temperature on an air conditioner, you are calibrating it to the right coolness.
When you tune your radio to a station, you are calibrating it to get clear sound.
Calibration Process
[ Sensor gives wrong reading ]
|
V
[ Adjust sensor settings ]
|
V
[ Test again ]
|
V
[ Does it work? ]
/ \
NO YES
/ \
V V
[Adjust] [Done!]
Calibration means adjusting a sensor so it works correctly. It helps sensors understand normal conditions.
A range is the distance or value a sensor can detect. A threshold is the point where the robot decides something has happened.
Every sensor has limits. An ultrasonic sensor might only detect objects up to 4 metres away. A light sensor might only detect a certain range of brightness. Understanding ranges and thresholds helps you write better programs.
Imagine you can only see things that are less than 10 metres away. That is your range. If something is 11 metres away, you cannot see it. A threshold is like deciding: "If something is closer than 2 metres, I will stop."
Your eyes have a range. You cannot see things that are too far away. You cannot see things that are too small.
Your ears have a range. You cannot hear sounds that are too quiet. You cannot hear sounds that are too high-pitched.
Your nose has a range. You can smell food in the kitchen, but not food in your neighbour's house.
A trader's voice has a range. She can call customers near her stall, but not across the whole market.
Sensor Range and Threshold
Sensor Range: 0 to 4 metres
0m 1m 2m 3m 4m
|---------|---------|---------|---------|
NEAR OK FAR TOO FAR
Threshold: 2 metres
If distance < 2m, robot stops.
If distance >= 2m, robot moves.
Range is how far a sensor can detect. Threshold is the point where the robot decides to act. Both are important for good programming.
Sensor problems are issues that cause sensors to give wrong readings or fail to work.
If a sensor gives wrong information, the robot will make wrong decisions. It might stop when it should move, or move when it should stop. Understanding common problems helps you fix them.
| Problem | Cause | Solution |
|---|---|---|
| Sensor gives no reading | Loose wire or dead battery | Check connections and power |
| Sensor gives wrong reading | Needs calibration | Recalibrate the sensor |
| Sensor is too sensitive | Threshold is too low | Increase threshold |
| Sensor is not sensitive enough | Threshold is too high | Decrease threshold |
| Sensor is affected by noise | Environmental interference | Move sensor or add filtering |
If your phone screen is cracked, the touch sensor may not work. You need to fix or replace it.
If a microphone is too far from the speaker, it may not pick up sound well. You need to move it closer.
If a smoke detector keeps beeping even when there is no smoke, it may need cleaning or new batteries.
If a generator's fuel sensor is faulty, it may show full when the tank is empty. You need to repair or replace the sensor.
Sensor Problem Example
[ Sensor gives wrong reading ]
|
V
[ Check connections ]
|
V
[ Check power ]
|
V
[ Recalibrate ]
|
V
[ Test again ]
|
V
[ Works? ]
/ \
YES NO
/ \
V V
[Done] [Replace sensor]
Sensors can have problems. Common issues include loose wires, wrong calibration, and incorrect thresholds. Learning to fix these problems is part of robotics.
Real robots use many sensors together to do complex tasks.
Understanding how real robots use sensors helps you design your own robots better.
| Robot | Sensors Used | Purpose |
|---|---|---|
| Vacuum Robot | Touch, ultrasonic, cliff sensors | Avoid obstacles, detect stairs |
| Self-Driving Car | Camera, radar, ultrasonic, GPS | Navigate roads, avoid accidents |
| Mars Rover | Camera, temperature, radiation | Explore Mars, collect data |
| Surgical Robot | Force sensors, cameras | Perform precise surgery |
| Drone | Gyroscope, accelerometer, GPS | Fly stably, navigate |
A robot vacuum cleaner uses touch sensors to know when it bumps into a chair. It uses cliff sensors to know when it is near stairs.
A school science project robot might use a light sensor to follow a black line on a white board.
A robotic toy uses sound sensors to respond to claps.
A Nigerian-made robot used in a university might use ultrasonic sensors to navigate a maze.
Real Robot: Vacuum Cleaner
+-------------------+
| Robot Vacuum |
| +-----------+ |
| | Touch | |
| | Sensor | |
| +-----------+ |
| +-----------+ |
| | Ultrasonic| |
| | Sensor | |
| +-----------+ |
| +-----------+ |
| | Cliff | |
| | Sensor | |
| +-----------+ |
+-------------------+
|
V
Cleans floor safely
Real robots use many sensors together. Each sensor helps the robot understand a different part of the world.
Designing a sensor-based robot means choosing the right sensors and writing programs that use them.
Not all sensors are right for all tasks. You must choose the best sensor for the job.
If you want a robot to follow a line, you need a light sensor. If you want a robot to avoid walls, you need an ultrasonic sensor.
If you want a robot to sort coloured balls, you need a colour sensor.
If you want a robot to open the door when someone claps, you need a sound sensor.
If you want a robot to help farmers detect ripe tomatoes, you need a colour sensor.
Sensor-Based Robot Design
[ What should robot do? ]
|
V
[ What must it sense? ]
|
V
[ Choose sensors ]
|
V
[ Mount sensors ]
|
V
[ Write program ]
|
V
[ Test and improve ]
Designing a sensor-based robot means choosing the right sensors for the job and writing programs that use them.
| Word | Simple Definition |
|---|---|
| Sensor | A device that detects something in the environment. |
| Perception | Understanding what sensors detect. |
| Touch Sensor | A sensor that detects when something presses it. |
| Ultrasonic Sensor | A sensor that uses sound waves to measure distance. |
| Light Sensor | A sensor that detects brightness. |
| Sound Sensor | A sensor that detects noise. |
| Colour Sensor | A sensor that detects colours. |
| Distance Sensor | A sensor that measures how far away something is. |
| Sensor Fusion | Using multiple sensors together. |
| Calibration | Adjusting a sensor so it works correctly. |
| Range | How far a sensor can detect. |
| Threshold | The point where the robot decides to act. |
| Sensor Program | A program that reads sensor data and makes decisions. |
| Concept | Real-Life Example |
|---|---|
| Sensor | Your phone's light sensor adjusts screen brightness. |
| Perception | You see dark clouds and perceive that it might rain. |
| Touch Sensor | A doorbell button detects your press. |
| Ultrasonic Sensor | Bats use sound waves to navigate in the dark. |
| Light Sensor | Street lights turn on automatically when it gets dark. |
| Sound Sensor | Clap-activated toys respond to sound. |
| Colour Sensor | Factories sort fruits by colour. |
| Distance Sensor | Cars beep when you are too close to another car. |
| Sensor Fusion | Self-driving cars use many sensors together. |
| Concept | Nigerian Example |
|---|---|
| Sensor | A generator's fuel sensor warns when fuel is low. |
| Perception | A driver hears a horn and perceives another car wants to overtake. |
| Touch Sensor | A car horn responds when you press it. |
| Ultrasonic Sensor | A car reversing in Lagos uses parking sensors. |
| Light Sensor | Solar panels use light sensors to know when the sun is shining. |
| Sound Sensor | A clap-activated light in a compound. |
| Colour Sensor | A tomato sorting machine separates ripe and unripe tomatoes. |
| Distance Sensor | A danfo driver uses his eyes to judge distance. |
| Sensor Fusion | A trader uses eyes and ears to serve customers. |
| Concept | Everyday Example |
|---|---|
| Sensor | Your phone's fingerprint sensor unlocks the phone. |
| Perception | You smell food and know it is ready. |
| Touch Sensor | A light switch responds to your touch. |
| Ultrasonic Sensor | A car parking sensor beeps when you are close. |
| Light Sensor | Your phone screen adjusts brightness automatically. |
| Sound Sensor | A baby monitor picks up sounds. |
| Colour Sensor | A washing machine sorts clothes by colour. |
| Distance Sensor | A measuring tape tells you how long something is. |
| Mistake | Why It Is Wrong | How to Fix It |
|---|---|---|
| Not calibrating sensors | Sensor gives wrong readings. | Calibrate before use. |
| Using the wrong sensor | The robot cannot do the task. | Choose the right sensor for the job. |
| Ignoring sensor range | The robot misses obstacles far away. | Know the sensor's range. |
| Setting thresholds wrong | Robot reacts too early or too late. | Adjust thresholds carefully. |
| Not testing sensors | Problems go unnoticed. | Test sensors before using them. |
| Mounting sensors poorly | Sensors cannot detect correctly. | Mount sensors in the right position. |
+-------------------+
| Robot Brain |
| (computer) |
+-------------------+
| | | |
| | | |
V V V V
+-----+ +-----+ +-----+ +-----+
|Touch| |Ultra| |Light| |Sound|
|Sens | |Sonic| |Sens | |Sens |
+-----+ +-----+ +-----+ +-----+
( Start )
|
V
+----------------+
| Move forward |
+----------------+
|
V
+----------------+
| Touch sensor |
| pressed? |
+----------------+
/ \
YES NO
/ \
V V
+---------+ +-----------+
| Stop | | Keep |
| and turn| | moving |
+---------+ +-----------+
\ /
\ /
V V
( Repeat )
| Sensor | Detects | Best For |
|---|---|---|
| Touch | Physical contact | Collision detection |
| Ultrasonic | Distance using sound | Obstacle avoidance |
| Light | Brightness | Line following |
| Sound | Noise level | Clap control |
| Colour | Colours | Sorting objects |
| Distance | Distance | Navigation |
Step 1: Choose sensor
|
V
Step 2: Mount sensor
|
V
Step 3: Calibrate sensor
|
V
Step 4: Write program
|
V
Step 5: Test sensor
|
V
Step 6: Fix problems
|
V
Step 7: Done!
A sensor detects something in the environment. Sensors give robots the ability to sense the world.
Perception is how a robot understands what its sensors detect. It is the bridge between sensing and acting.
A touch sensor detects when something presses it. It helps robots detect collisions.
An ultrasonic sensor uses sound waves to measure distance. It helps robots avoid obstacles from far away.
A light sensor detects brightness. It helps robots follow lines and react to light changes.
A sound sensor detects noise. It helps robots react to claps, voices, and other sounds.
A colour sensor detects colours. It helps robots sort objects and follow coloured lines.
A distance sensor measures how far away an object is. It helps robots navigate.
Sensor fusion means using multiple sensors together. It gives the robot a better understanding of the world.
A sensor program reads sensor data and makes decisions. It tells the robot how to react.
Calibration means adjusting a sensor so it works correctly. It helps sensors understand normal conditions.
Range is how far a sensor can detect. Threshold is the point where the robot decides to act.
Sensors can have problems. Common issues include loose wires, wrong calibration, and incorrect thresholds.
Real robots use many sensors together. Each sensor helps the robot understand a different part of the world.
Designing a sensor-based robot means choosing the right sensors for the job and writing programs that use them.
In this module, you learned about sensors and perception. You learned that sensors are like a robot's senses. They help the robot detect the world around it.
You learned about many types of sensors: touch sensors, ultrasonic sensors, light sensors, sound sensors, colour sensors, and distance sensors. You learned how each one works and what it is used for.
You learned about perception — how the robot understands what its sensors detect. You learned about sensor fusion — using multiple sensors together. You learned about calibration, ranges, and thresholds.
You learned how to write sensor programs and how to design a sensor-based robot. You learned about common sensor problems and how to fix them.
Most importantly, you learned that sensors are what make robots truly interactive. Without sensors, a robot is blind and deaf. With sensors, a robot can understand and react to the world.
In the next module, you will learn about actuators and motion systems. You will learn how robots move and how to control their movement precisely. You will learn about motors, gears, and PID control.
But for now, take a moment to celebrate what you have learned. You have taken another big step in your journey to becoming a robotics expert. Well done!
Match the sensor on the left with what it detects on the right.
| Sensor | Detects |
|---|---|
| 1. Touch Sensor | A. Colours |
| 2. Ultrasonic Sensor | B. Physical contact |
| 3. Light Sensor | C. Noise |
| 4. Sound Sensor | D. Distance using sound |
| 5. Colour Sensor | E. Brightness |
| 6. Distance Sensor | F. Distance |
Answers: 1-B, 2-D, 3-E, 4-C, 5-A, 6-F
Title: Design a Sensor-Based Robot
Instructions:
Example:
Task: Robot avoids obstacles Sensors needed: - Ultrasonic sensor (to detect distance) - Touch sensor (to detect collision) Program: 1. Move forward 2. IF ultrasonic sensor detects obstacle, THEN turn right 3. IF touch sensor is pressed, THEN stop and turn 4. Repeat from Step 1
Title: Sensor Scavenger Hunt
Instructions:
Example:
| Device | Sensor | What It Detects |
|---|---|---|
| Phone | Touch sensor | Your finger press |
| Doorbell | Touch sensor | Button press |
| TV remote | Infrared sensor | Remote signals |
| Fridge | Temperature sensor | Coldness |
| Car | Parking sensor | Distance to objects |
Title: Build a Line-Following Robot
Goal: Create a robot that follows a black line on a white surface using a light sensor.
Steps:
Deliverables:
Title: Build an Obstacle-Avoiding Robot
Instructions:
Grading Criteria:
| Criteria | Points |
|---|---|
| Robot avoids obstacles correctly | 40 |
| Uses ultrasonic sensor properly | 20 |
| Program uses if/else and loops | 20 |
| Report is clear | 20 |
| Total | 100 |
In Module Three, you will learn about Actuators and Motion Systems. You will learn how robots move and how to control their movement precisely.
You will learn about:
To prepare for Module Three:
Get ready for an exciting journey into the world of robot movement!
Congratulations! You have completed Module Two of Fundamentals of Robotics Level Two. You have learned about sensors and perception.
You learned that sensors are like a robot's senses. They help the robot detect the world. You learned about touch sensors, ultrasonic sensors, light sensors, sound sensors, colour sensors, and distance sensors.
You learned about perception — how the robot understands what its sensors detect. You learned about sensor fusion, calibration, ranges, and thresholds.
You learned how to write sensor programs and how to design a sensor-based robot. You learned about common sensor problems and how to fix them.
You also learned many examples from Nigeria, from your home, from school, and from everyday life. You learned through stories, illustrations, and activities.
Now you are ready for Module Three: Actuators and Motion Systems. In Module Three, you will learn how robots move. You will learn about motors, gears, and how to control movement precisely. You will learn how to make your robot move smoothly and accurately.
But before you move on, take a moment to review this module. Make sure you understand the key ideas. Practise writing sensor programs. Draw diagrams. Test your sensors. The more you practise, the better you will become.
You are doing great. Keep learning. Keep exploring. Keep building. The world of robotics is waiting for you!
End of Module Two
Next: Module Three — Actuators and Motion Systems