Ultrasonic sensor , Fall 2018

Author/s: Shweta Hebbalkar


As name implies this device uses an ultrasonic sound to measure the distance between itself, and the nearest solid object. Like if we take the nature’s example then it would be like Bats detecting shapes from sound. Also, There are many applications for ultrasonic sensors, such as in intrusion alarm systems, automatic door openers and backup sensors for automobiles.


  • Operating Voltage: 5V DC         – VCC  = 5 volt power connection
  • Operating Current: 15mA          – TRIG = trigger pin (input)
  • Measure Angle: 15°                   – ECHO = Echo pin (output)
  • Ranging Distance: 2cm – 4m     – GND = Ground

Theoretical Explanation of the ultrasonic sensor:

Let’s look in more depth, ultrasonic Waves are sounds, which cannot be heard by humans and are normally, frequencies of above 20kHz. Here are the basic characteristics of ultrasonic waves in wavelength and Radiation a velocity of wave propagation is express by multiplication of frequency and wavelength. The velocity of an electromagnetic wave but the velocity of sound wave propagation in air is as slow as about 344m/ s (at 20°C). At these slower velocities, wavelengths are short, meaning that higher resolution of distance and direction can be obtained. Because of the higher resolution, it is possible to get higher measurement made large accuracy. The surface dimension of the ultrasonic device can be easily to obtain accurate radiation.  In order to detect the presence of an object, ultrasonic waves are reflected on objects. Because metal, wood, concrete, glass, rubber and paper, etc. reflect approximately 100% of ultrasonic waves, these objects can be easily detected. Cloth, cotton, wool, etc. are difficult to detect because they absorb ultrasonic waves. It may often be difficult, also, to detect objects having large surface undulation, because of irregular reflection.

In this illustration explains how the ultrasonic sensors works, the solid curve lines are transmitting singles and the dotted curves line are reflective singles. 

In order to generate the ultrasound you need to set the Trig on a High State for 10 µs. That will send out an 8 cycle sonic burst, which will travel at the speed sound, and it will be received in the Echo pin. The Echo pin will output the time in microseconds the sound wave traveled.