Ultrasonic Range Finder

The ultrasonic range finder kit consists of the ultrasonic range finder sensor (pictured below).
Ultrasonic Range Finder Figure 1a.jpg


An ultrasonic range finder sensor enables a robot to detect obstacles in its path by utilizing the propagation of high-frequency sound waves. The sensor emits a 40kHz sound wave, which bounces off a reflective surface and returns to the sensor. Then, using the amount of time it takes for the wave to return to the sensor, the distance to the object can be computed.


Unlike the bumper switch and limit switch that alert you when they have been hit, the ultrasonic range finder sensor can alert you to an obstacle in the path of the robot prior to hitting it. This can allow you time to safely navigate around obstacles.

Sensitivity and Resolution

The sensitivity of the sensor depends on the objects’ surfaces that are detected by the emitted sound waves. For example, a reflective surface may produce a different reading than a non-reflective surface.

The resolution of the sensor depends on the sound waves. However, sound waves can reflect or be absorbed and possibly not return with enough power.


The sensor can be used to determine distances to objects. It can be used as a tool to determine if any objects are in the robot’s path at all. To increase the sensing range, the sensor can be mounted to a servo to allow it to rotate. Figure 2 below shows a robot that utilizes such a setup.
Ultrasonic Range Finder Figure 2.jpg

Beam Pattern / Angle

Ultrasonic Range Finder Figure 3.jpg

Technical Information

  • Sensor Type
    • Ultrasonic Range Finder
  • Useable range
    • 3.0 centimeters – 3.0 meter / 1.5 inches – 115 inches
  • Sensitivity
    • Detect a 3cm diameter pole at greater than 2m
  • Input Trigger
    • 10uS Min. pulse
  • Echo Pulse
    • Width proportional to range (See: Beam Pattern)
  • Frequency
    • 40 KHz
  • Weight **0.08 lbs.
  • Input Function
    • Start signal to the ultrasonic sensor
  • Output Function
    • Echo response from the ultrasonic sensor
  • Output
    • Wiring Black – ground; Red – (+) power; Orange – control signal

ROBOTC Sample Code


CMU Robotics Academy Resources

easyC Sample Code

Ultrasonic Range Finder Figure 4.jpg