General Questions about Ultrasonic Sensor

I recently have been thinking of using ultrasonic sensors to increase programming precision. Being new to it, I was wondering if there are anything i should know before implementing it.

  1. Does it take time to initialize (similar to gyro)?

  2. I still dont know how does it calculate the distance. is its sensing range 45 degrees to the left and right (90 degrees combined)? If so, what value would it return if there were multiple objects within its range?

  3. Does the speed of the robot’s movement affect its output?

  4. What are its limitations with respect to calculating the robot’s position in the field? How accurate and percise can I be if i used its output to calculate the position of the robot? How many sensors should i use to do so?

Is there anything else that I should know before using the ultrasonic sensor?


A short burst of high frequency sound is emitted from the sensor, the time for an echo to be received is used to calculate the distance. Generally the distance of the closest object will be given but there are many factors that affect this, the size and shape of the object, the material that the object is made of etc.

Slightly, but it’s not significant.

This depends on the configuration of your robot, +/- 1 inch is reasonable for accuracy. The number of sensors really depends on the application, however, as more are added the update rate for each will be slower (as they are checked sequentially and each takes about 1/10 second to read).

Do some tests, experiment a little, that’s the best way to learn.