Name: ______________________________
Date: ____________________
Week 4
Helping Robots Sense
Read real sensor values, find thresholds, and calibrate a robot to trust what it senses.
70-85 minutes
Key ideas
Four senses a robot can have
A robot senses the world through sensors. Four common ones are the touch sensor (is it being pressed?), the distance sensor (how far is the nearest thing?), the light sensor (how bright is it?), and the color sensor (what color is the surface?).
A reading is a number, not a yes or no
Most sensors don't just say 'yes' or 'no' - they give a number called a sensor reading. A distance sensor might read 12 centimeters; a light sensor might read a brightness of 47.
A threshold turns numbers into decisions
A threshold is a cutoff number you choose to separate two cases. If you pick 15 centimeters, then any reading below 15 means 'near' and any reading above 15 means 'far'.
Detection limits: every sensor has a range
No sensor can sense everything. A distance sensor stops working past a certain range - it might read fine up to about 2 meters but give junk beyond that. That farthest point it can still sense is its detection limit.
Noise: why one reading isn't enough
Point a distance sensor at a wall that isn't moving and read it several times. You might get 30, 31, 30, 29, 31 - the number wobbles a little even though nothing changed. That wobble is called noise.
Calibration and reliability
Calibration means checking or adjusting a sensor so its readings are correct for this room and this robot. A light sensor reads differently in a sunny room than a dark one, so the same threshold won't work everywhere - you calibrate it to the room you're in.
Words to know
- Touch sensor:
- A sensor that tells whether it is being pressed or not, like a button or a bumper.
- Distance sensor:
- A sensor that measures how far away the nearest object is, usually in centimeters.
- Light sensor:
- A sensor that measures how bright or dark it is, giving a higher number in bright light.
- Color sensor:
- A sensor that reads the color of a surface right in front of it, like red, blue, or white.
- Sensor reading:
- The number a sensor gives you at one moment, such as 20 centimeters or a brightness of 47.
- Threshold:
- A cutoff number you pick that separates two cases, like 'closer than 15 cm means near'.
- Detection limit:
- The point past which a sensor can no longer sense, like a distance sensor that can't read farther than about 2 meters.
- Calibration:
- Adjusting or checking a sensor so its readings are correct for this room and this robot.
- Noise:
- Small wobbles in a reading even when nothing changes, which is why you take several readings.
- Reliability:
- How much you can trust a sensor to give the same, correct reading each time.
- Trial:
- One single measurement in a test; you usually run several trials and compare them.
- Baseline:
- A starting reading you take in a known, steady condition to compare other readings against.
Your activity
Sensor Investigation Lab
Goal: Measure how a sensor's reading changes as a condition changes, and find a threshold that cleanly splits two cases.
- Pick one condition to change step by step - the distance to a wall, the brightness, or the surface color - and read the sensor at each step.
- Write every reading in the log. Then look at the numbers and choose a threshold: a cutoff value that separates 'near from far' or 'light from dark'.
- Remember: this week the robot only reads and reports. You are the one who decides what the numbers mean.
Write what happened:
Calibration & Threshold Challenge
Goal: Handle noise by taking several readings, then calibrate a light-or-dark (or near-or-far) threshold that works reliably in this room.
- Pick a steady condition and take several readings of the same thing without changing anything - notice how much the number wobbles. That wobble is noise.
- Take a reading in a clearly 'low' condition and a clearly 'high' condition (dark vs light, or near vs far). Set your threshold in the middle so it cleanly separates the two.
- Test your threshold: check that low-condition readings land on one side and high-condition readings on the other. If not, adjust it - that is calibration.
Write what happened:
Predict
Write your guess before you test.
Before you measure: if a distance sensor reads 20 cm when a wall is at 20 cm, what do you predict it will read when you move the wall to 40 cm - a bigger or smaller number, and roughly what?
Predict: if you read the same still wall five times in a row, will you get the exact same number every time?
Test and record
Distance-vs-reading table
Place the wall (or set the condition) at each listed distance, take the sensor reading, and record the number. Use the middle of three readings if it wobbles.
Record: The sensor reading at each set distance, and whether you'd call it near or far
| Set distance (cm) | Sensor reading | Near or far? |
|---|---|---|
Three-trial noise check
Pick one condition and don't change it. Read the sensor three times in a row and record each reading to see how much it wobbles.
Record: How much the reading changes between trials when nothing is changing (the noise)
| Trial | Sensor reading | Difference from trial 1 |
|---|---|---|
Knowledge check
Answer each question. For choice questions, circle the best answer.
Match each sensor to what it measures.
Distance sensor
Light sensor
Touch sensor
Color sensor
How far away something is
How bright it is
Whether something is pressed
What color a surface is
(Draw a line from each item on the left to its match on the right.)
In your own words, what is a sensor threshold?
What is a sensor reading?
- A.The number a sensor gives you at one moment
- B.The name of the sensor
- C.The color of the robot
- D.A command that moves the robot
A distance sensor reads 30 cm at one wall and 12 cm at a closer wall. What does this tell you about how the reading works?
- A.The reading gets bigger as things get closer
- B.The reading gets smaller as things get closer
- C.The reading is random and means nothing
- D.The sensor is broken
You want the robot to treat anything closer than 15 cm as 'near'. What is the number 15 called?
- A.A detection limit
- B.Noise
- C.A threshold
- D.An actuator
You read the same still wall five times and get 30, 31, 30, 29, 31. Why do the numbers wobble?
- A.The wall keeps moving
- B.Because of noise, so you take several readings
- C.The threshold is wrong
- D.The sensor ran out of battery
Your light-or-dark threshold worked in the classroom but fails in a sunny room. What should you do?
- A.Give up - light sensors don't work outside
- B.Calibrate the sensor for the new room and set a new threshold
- C.Make the robot drive faster
- D.Add more wheels
Reflect
When did your sensor give an unexpected reading, and what may have caused it?
You read a still object several times and got slightly different numbers. Why does that happen, and what did you do about it?
Why might a robot that senses perfectly in one room need to be calibrated again in a different room?