Robotics · lesson 17 of 30 · free

The distance sensor — Robotics for kids

An ultrasonic distance sensor works like a bat. It sends a sound too high for us to hear and listens for the echo. Sound travels about 34 cm every millisecond, but it has to go to the object AND come back, so the object is 34 ÷ 2 = 17 cm away for every millisecond of echo time. An echo after 4 ms means 17 × 4 = 68 cm. A robot can use this to stop before it hits a wall.

▶ Watch how it works

Got it? Practise ↓

Robot tip

Half the echo path — “the sound goes there and back, so the distance is half of what the sound travels”

  1. Distance (cm) = 17 × echo time (ms), because 34 cm per ms ÷ 2 for there and back.
  2. Echo time (ms) = distance × 2 ÷ 34.
  3. Distance after driving = distance now − speed × time.

Use it for: Obstacle-avoiding robots, parking sensors, bats and dolphins in science, and speed–distance–time sums.

Worked example: 📡 A distance sensor sends a sound pulse and hears the echo 4 ms later. Sound travels about 34 cm every millisecond. How far away is the object (in cm)? → 68

  1. In 4 ms the sound travels 34 × 4 = 136 cm, there and back.
  2. Half of that is the distance: 17 × 4 = 68 cm.

Check: 68 × 2 = 136 = 34 × 4 ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 17 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 📡 Echo Measurer badge when you pass — and a certificate when you finish all 10 lessons of Part 2 · How robots move and sense. You can still take the test without signing in.

🖨️ Robotics Worksheet: Ultrasonic Distance Sensor

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 Robotics classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Electronics & IoT Circuits, sensors and microcontroller boards.