2D Scanner with Ultrasonic sensor and a servo

A project log for Obstacle Avoiding Robot with evive

Making a modular differential drive robot which is designed to avoid the simple obstacles using ultrasonic sensor and servo.

evive toolkitevive toolkit 08/22/2016 at 18:180 Comments

Working of Ultrasonic sensor-

We have mounted an ultrasonic sensor atop a servo. When the ultrasonic sensor is triggered, it sends out a pulse and simultaneously starts an internal clock. When the pulse hits an obstacle, it gets reflected back to the sensor. The sensor calculates the time difference between the sending and receiving of the pulse. Since the speed of the pulse in air (let it be 'v') and the time gap ('t') is known, the distance to the obstacle can be calculated as-

Time for total trip = t

Time for reaching the obstacle = t/2

=> distance = v*(t/2)

This value has been calculated in our code and can be stored and manipulated accordingly.