Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Obstacle avoiding robots are machines that can move around without bumping into things. They use sensors to notice objects such as walls, chair legs, or blocks in their path. This skill matters because it helps robots work safely in homes, schools, factories, and even space missions.

A small wheeled robot can learn a simple rule: sense the distance, decide what to do, then move again.

Key Facts

  • Distance from ultrasonic sensor: distance = speed of sound × echo time ÷ 2
  • Speed of sound in air is about 343 m/s at room temperature.
  • Example decision rule: if distance < 20 cm, then stop and turn.
  • Robot path: move forward, detect obstacle, stop, turn, continue.
  • A microcontroller reads sensor data and sends commands to the motors.
  • Turning can be done by spinning one wheel faster than the other.

Vocabulary

Ultrasonic sensor
A sensor that sends out high frequency sound pulses and measures their echoes to find distance.
Microcontroller
A small computer on a circuit board that reads inputs, follows code, and controls outputs.
Obstacle
An object in the robot's path that the robot needs to avoid.
Echo time
The time it takes for a sound pulse to travel to an object and return to the sensor.
Decision logic
A set of rules that tells a robot what action to take based on sensor information.

Common Mistakes to Avoid

  • Forgetting to divide the echo distance by 2 is wrong because the sound travels to the obstacle and back, so the total trip is twice the one-way distance.
  • Using meters and centimeters together without converting is wrong because calculations only work when units match.
  • Setting the stop distance too small is unsafe because the robot may not have enough time or space to stop before hitting the obstacle.
  • Assuming the sensor sees everything is wrong because an ultrasonic sensor detects best inside its cone and may miss objects that are too low, too soft, or at a sharp angle.

Practice Questions

  1. 1 An ultrasonic sensor measures an echo time of 0.004 s. Using 343 m/s for the speed of sound, how far away is the obstacle in meters?
  2. 2 A robot stops when distance < 20 cm. It reads distances of 35 cm, 24 cm, 18 cm, and 40 cm. At which reading should it stop and turn?
  3. 3 A robot keeps bumping into thin chair legs even though its ultrasonic sensor works. Explain one reason this might happen and one design change that could help.