Lesson 02 · 60 minutes

Same Job, Different Physics

Laser, sonar and infrared

Today's goal

Measure the same distances with the laser and the sonar, predict which one will be fooled by each object, and explain why.

Ideas in this lesson

Sense → Think → Do

Today is all SENSE. Two sensors answer the same question, 'how far is the wall?', with completely different physics, and they disagree in interesting ways.

How the session runs

  1. Connect the Mecanum Workshop app and open the Sensors tab. Find the 'Laser rangefinder and sonar' panel.
  2. Press Watch (rw). Both numbers update five times a second: the big number is the laser in mm, the line below it is the sonar. 'nothing in range' and 'no echo' mean 'I got nothing back'.
  3. Hold a book flat in front of the robot at 20 cm, 50 cm and 1 m. Write down both readings each time. Do they agree?
  4. Now predict, then test: a fuzzy sweater, a window or glass door, a chair leg off to one side, a plastic bottle, your hand.
  5. Chair leg to the side: the sonar's wide cone often 'sees' it; the laser's narrow beam usually does not. Fuzzy sweater: sound gets soaked up. Glass: the laser can go straight through or bounce.
  6. Point the IR remote at a phone camera and press a key. The 'invisible' light shows up as a flicker on the screen.
  7. Make a class table: object, laser, sonar, who was right, why.

Try this

When it goes wrong

What you seeWhat it means
Laser panel says 'not found'The VL53L0X was not found at start-up. Check SDA to A4 and SCL to A5, then restart the robot; it only looks once, at power-on.
Sonar says 'A2/A3 used by sensors'A line or light sensor is wired to A2 or A3 in the running layout. The sonar steps aside on purpose. Use the ADS1115 layout or move those sensors.
Laser always reads shortThe little coloured protective film is still on the sensor window. Peel it off.
Both numbers jump aroundNormal near the edge of what each can see. Hold the object still and read several times.
Notes for the grown-up

The goal is not 'which sensor is best' but 'every sensor has blind spots, and you can predict them from the physics'. Let them be wrong in their predictions; the surprises are the memorable part.

Ages: K-5: just two objects (book and sweater) and the phone-camera trick; talk about bats and dolphins for sonar. 6-12: compute speed of sound from the sonar (343 m/s, there and back) and discuss why the laser needs picosecond timing.

Materials: Robot with laser and sonar, app on a tablet or laptop, tape measure, book, fuzzy sweater or towel, glass or window, chair, phone with a camera.

← Robot or Not?Did It Actually Turn? →