The previous activity revealed that the sonar sensor's range is limited. To use the sonar effectively, especially indoors, we must understand a second limitation. In contrast to natural environments, indoor environments contain many smooth surfaces, which can be a problem for sonar. If the sonar pulse strikes a smooth surface at an angle, much of the sound will be reflected away from the receiver instead of towards it. This might result in the sonar sensor not detecting large smooth surfaces. This is called the acoustic mirror effect.

This effect can be observed by pointing the robot to a smooth surface (like a wall) while the program used in Activity 1 is running:

sonar_directionality - mBlock Community

<aside> 💡

Clicking the link to the program will open the mBlock website. To see the actual program, click Source at the bottom left of the page that opened.

You can use the program in the online version of mBlock or download it to your computer by selecting File and Save to your computer. The downloaded program can then be edited using mBlock if installed on your computer.

See Step 1: Open the example program for an example and more instructions.

</aside>

Left: the robot is pointed straight at a smooth, flat wall. The sonar sensor has no problem detecting the wall and turns green. Right: The robot is pointed at the wall from an angle. Due to the acoustic mirror effect, the robot does not detect the wall.

Left: the robot is pointed straight at a smooth, flat wall. The sonar sensor has no problem detecting the wall and turns green. Right: The robot is pointed at the wall from an angle. Due to the acoustic mirror effect, the robot does not detect the wall.