Lesson 12 · 60 minutes
When Sensors Lie
Noise, blind spots, and trusting the wrong number
Today's goal
Make each sensor give a confidently wrong answer, and explain to somebody else why it happened.
Ideas in this lesson
- Sensors do not measure what you think — they measure a proxy for it
- Sonar measures echo time, not distance to the thing you care about
- Line sensors measure reflection, not colour
- A robot cannot tell a wrong reading from a right one; only you can
Sense → Think → Do
SENSE, interrogated. Every later lesson relies on sensors, so knowing their failure modes is knowing their limits.
How the session runs
- Sonar versus a soft jumper: hold cloth in front. The reading jumps or reads clear. Sound is absorbed, not reflected.
- Sonar versus an angled wall: turn a book to 45°. The echo bounces away and never comes home.
- Sonar versus a table edge: drive along a bench so the beam clears it. The robot is blind to something obviously there.
- Line sensors versus a dark floor: contrast, not colour, is what they see.
- Proximity versus sunlight: take it near a window. Infrared from the sun swamps the sensor.
- For each one, write the sentence: 'It reported X because it actually measures Y.'
Sample program
Creep forward only while the way ahead is clear. Run it toward a soft jumper and watch it drive straight into something it says is not there.
V 4 P 15 I 6 F 300 Z I 5 W 200 Z Q
Paste it into the Workshop's Robot language box, then press Text → blocks to see it as blocks — or just send it straight to the robot.
Try this
- Build an obstacle course the robot's sonar cannot see at all. How would you fix the robot — better sensor, or more of them?
- Two sensors disagree. Write a rule for which to believe.
- Where would a self-driving car have these same blind spots?
When it goes wrong
| What you see | What it means |
|---|---|
| Readings jump around wildly near soft things | Weak echoes arrive late or not at all. This is the sensor's honest limit, not a fault. |
| Everything reads 400 cm | No echoes at all. Check NOECHO in Read sensors — that means the sensor never answered, which is different from seeing nothing. |
Notes for the grown-up
This lesson prevents a whole class of frustration later: when a maze run fails, the first question becomes 'did the sensor see it?' rather than 'is the code wrong?'. That is real debugging instinct.