Distance Measurement via Using of Ultrasonic Sensor

Michal Kelemen, Ivan Virgala, Tatiana Kelemenová, Ľubica Miková, Peter Frankovský, Tomáš Lipták, Milan Lörinc

Journal of Automation and Control

Distance Measurement via Using of Ultrasonic Sensor

Michal Kelemen1,, Ivan Virgala1, Tatiana Kelemenová2, Ľubica Miková1, Peter Frankovský1, Tomáš Lipták1, Milan Lörinc1

1Department of Mechatronics, Technical University of Kosice, Faculty of Mechanical Engineering, Kosice, Slovak Republic

2Department of Biomedical Engineering and Measurement, Technical University of Kosice, Faculty of Mechanical Engineering, Kosice, Slovak Republic


Paper deals with ultrasonic sensors used for distance measurement. Selected ultrasonic sensor has been tested and results of experiments are shown in the paper. Uncertainty analysis also has been realized.

Cite this article:

  • Michal Kelemen, Ivan Virgala, Tatiana Kelemenová, Ľubica Miková, Peter Frankovský, Tomáš Lipták, Milan Lörinc. Distance Measurement via Using of Ultrasonic Sensor. Journal of Automation and Control. Vol. 3, No. 3, 2015, pp 71-74. http://pubs.sciepub.com/automation/3/3/6
  • Kelemen, Michal, et al. "Distance Measurement via Using of Ultrasonic Sensor." Journal of Automation and Control 3.3 (2015): 71-74.
  • Kelemen, M. , Virgala, I. , Kelemenová, T. , Miková, Ľ. , Frankovský, P. , Lipták, T. , & Lörinc, M. (2015). Distance Measurement via Using of Ultrasonic Sensor. Journal of Automation and Control, 3(3), 71-74.
  • Kelemen, Michal, Ivan Virgala, Tatiana Kelemenová, Ľubica Miková, Peter Frankovský, Tomáš Lipták, and Milan Lörinc. "Distance Measurement via Using of Ultrasonic Sensor." Journal of Automation and Control 3, no. 3 (2015): 71-74.

Import into BibTeX Import into EndNote Import into RefMan Import into RefWorks

At a glance: Figures

1. Introduction

Ultrasonic distance sensors are designed for non-contact distance measurement and these types consist of transmitter and receiver or transceiver which is able to transmit and to receive ultrasonic sound (Figure 1). Main idea is to measure time to fly of ultrasonic sound wave from sensor to detected object. An ultrasonic transmitter sends a sound frequency of above 18 kHz in the air at the speed of 344 meter per second (at 20°C) and the receiver receives the reflected sound from the object. Distance between the transmitter and the object can be calculated by simple calculation by considering the time taken by the ultrasonic wave to travel from transmitter and received back (reflected) by the receiver. Measurement range is up to several meters.

Almost all materials reflect sound waves, so ultrasonic sensors are a fine choice for many tasks. Excellence in the detection and measurement of films, transparent objects, and liquids separate these sensors from their photoelectric counterparts. Target color or frequent color changes also have no effect on ultrasonic sensors.

Due to their use of sound waves, ultrasonic sensors also perform well in dusty, dirty environments. However, they do not operate well with small targets against large backgrounds or targets such as foam batting that are excellent for absorbing sound waves [1, 2, 3, 4].

A typical ultrasonic sensor (Figure 2) comprises a clock (signal) generator and a controller to excite the transducer, then a processor and output amplifier to handle the return signal [4].

Besides the time of flight principle also they are used physical principles based on Doppler effect and the attenuation of sound waves.

Frequently application is as navigation sensor for mobile robots for obstacle avoiding [5].

Ultrasonic sensors have been used in Tukebot robot (Figure 3, Figure 4) built for “puck collecting competition” at RobotChallenge. RobotChallenge is one of the biggest competitions for self-made, autonomous and mobile robots worldwide. Competitive robots have to collect small discs ("pucks") on the field according to color. To robots compete against each other on a 250 x 250 cm field. The aim is to collect all pucks of the assigned color and carry them to the own home base. The first robot which collects all the assigned pucks wins [5, 6].

Locomotion microcontroller obtains signals from infrared distance sensor, from collision bumper touch sensors and from ultrasonic distance sensors (Figure 4). On the base of these sensors, locomotion microcontroller plans next locomotion and control it through drives of both wheels. These sensors enable to recognize, where the other rival robot is and where these assigned pucks are. It means that robot is still looking for assigned pucks and it avoids the rival robot [5, 6].

Figure 4. Sensor for puck collecting robot (1 – ultrasonic sensor active field), (2 – infrared sensor active field)

2. Experimental testing of ultrasonic distance sensor

Ultrasonic distance sensor with analogue output 0 – 10V has been selected for testing. The sensor uses 300 kHz sound frequency. Measurement range is from 120 mm up to 1000 mm and it has linear characteristic. Repeat accuracy is ±0.15% and resolution is 0.037 mm.

Next step is to examine properties of the sensor. Experimental stand (Figure 5) has been designed for testing and set of length gauges (Figure 6) have been used for sensor testing.

Gauge lengths - blocks have been used as etalon of length and desired value of length or distance has been composed from these blocks. Two sets of gauges have been used for testing and it is possible to compose every possible etalon of length with resolution 0.001 mm in range 0 to 1000 mm.

Some materials are not suitable for distance measurement. Vibration absorbents may cause problems with measurement. For this reason testing of distance with this material has been executed.

Figure 7. Testing of ultrasonic sensor with compliant obstacle

Experimental testing has been executed with solid and compliant (vibration absorbent) material. Results from these testing are visible on Figure 8.

Figure 8. Measurement result of ultrasonic sensor – transformation characteristic

As it is visible (Figure 8), the sensor has linear characteristic with dead zone, it means that it is not able to measure distances less then 120 mm. Total measurement range is up to 700 mm and after this value sensor has constant value of output voltage. There is also visible difference (change of slope of the characteristic) between the measurement realized with solid material and compliant material.

Calibration characteristic from the measurement to solid obstacle is shown on Figure 9.

Figure 9. Measurement result of ultrasonic sensor – calibration characteristic

Math model obtained from regression of calibration characteristic define the equation (Figure 9), which can be used for recalculation of measured output sensor voltage to searched information about position measurement. For practical using of the sensor, it is necessary to analyse the uncertainty of measurement.

3. Uncertainty of Measurement

Calibration characteristic (Figure 9) is made for set of values (xi - sensor output voltage, yi distance of detected object). The calibration curve is approximated with linear model, where regression coefficients have also uncertainty of determination expressed with equations:


Covariance between these regression coefficients estimation is defined with equation:


Where is standard deviation of distance (yi) is possible to estimate with residual variance:


For general math model described with polynom of p degree overall standard uncertainty is defined as:


For our linear model equation (5) can be simplified:


Standard uncertainty (Figure 10) is obtained applying the equation (4) for measurement chain with ultrasonic distance sensor. These values represent together uncertainty for all parts of measuring chain (ultrasonic sensor, multimeter, length gauges, positioning table etc.)

Figure 10. Standard uncertainty of measurement for measurement chain with ultrasonic distance sensor

Larger value of uncertainty occurs because it is out of the useful range of the sensor. All others uncertainties are less than 1 mm. Consequently standard uncertainty depends also on more factors (not only on sensor).

4. Conclusion

Ultrasonic sensors have variety application as distance measurement, obstacle avoiding and anti-collision detection, robot navigation, measurement in automotive parking assistance systems, measurement of air flow velocity - anemometer, medical ultrasonography, non-destructive testing, piezoelectric transducers, level measurement, pallet detection on forklifts, vehicle detection in barrier systems etc.

Ultrasonic sensors are non-intrusive in that they do not require physical contact with their target, and can detect certain clear or shiny targets otherwise obscured to some vision-based sensors. On the other hand, their measurements are very sensitive to temperature and to the angle of the target. Temperature and humidity affect the speed of sound in air. Therefore, range finders may need to be recalibrated to make accurate measurements in a new environment. Temperature variations and air currents can create invisible boundaries that will reflect ultrasonic waves, so care must be taken to avoid these. For the transmitted wave to echo back to the receiver, the target surface must be perpendicular to the transmitter. Round objects are therefore most easily sensed since they always show some perpendicular face. When targeting a flat object, care must be taken to ensure that its angle with respect to the sensor does not exceed a particular range.

Ultrasonic sensors typically have a “dead zone” immediately in front of them in which objects cannot be detected because they deflect the wave back before the receiver is operational. (This is because reverberations from the transmitter force the receiver to pause a moment before beginning to listen for the echo). Some materials are more absorbent than others, and these will reflect less ultrasound. This complicates using the attenuation method to measure the distance of arbitrary objects [7-29][7].


The work has been accomplished under the research projects No. KEGA 048TUKE-4/2014, VEGA 1/0182/15 and KEGA No. 014STU-4/2015 financed by the Slovak Ministry of Education.


[1]  Smart Sensors and Applications Student Guide. VERSION 1.0. Parallax Inc., https://www.parallax.com/sites/default /files/downloads/28029-Smart-Sensors-Text-v1.0.pdf
In article      
[2]  ))) Ultrasonic Distance Sensor. Parallax Inc., https://www.parallax.com/product/28015
In article      
[3]  ))) Ultrasonic Distance Sensor (#28015). https://www.parallax.com/sites/default/files/downloads/28015-PING-Sensor-Product-Guide-v2.0.pdf
In article      
[4]  The Search for a Better Proximity Sensor Starts Here Published in Design World, February 2010. Balluff Inc. http://www.balluff.com/balluff/MUS/en/news/search-for-better-proximity-sensor.jsp
In article      
[5]  M. Kelemen et all, Puck collecting robot, 2014. In: Applied Mechanics and Materials. Vol. 611 (2014), p. 256-264.
In article      View Article
[6]  RobotChallenge. International championship for self-made, autonomous, and mobile robots. Available online. cited 06-112013. http://www.robotchallenge.org/
In article      
[7]  jwilans on SensorWiki.org, Ultrasound. Last modified: 2011/04/11, cited 2015/25/11. Available online: http://www.sensorwiki.org/doku.php/sensors/ultrasound
In article      
[8]  J. Wilson, 2005. Sensor Technology Handbook. , UK.: Elsevier.
In article      
[9]  R. Pallàs-Areny, , and J. Webster. 2001. Sensors and Signal Conditioning, 2nd ed. : John Wiley & Sons.
In article      PubMed
[10]  J. J. Carr. 1993. Sensors and Circuits. : PTR Prentice-Hall, Inc.
In article      
[11]  Li-Hong Juang, Ming-Ni Wu, Zhi-Zhong Weng, Object identification using mobile devices, Measurement, Volume 51, May 2014, Pages 100-111, (2014).
In article      
[12]  M. Dekan, F. Duchoň, L. Jurišica, A. Vitko, A. Babinec, iRobot Create Used in Education, Journal of Mechanics Engineering and Automation. Vol. 3, Iss. 4, 2013, pages 197-202, (2013).
In article      
[13]  Z. Liu, F. Li, G. Zhang, An external parameter calibration method for multiple cameras based on laser rangefinder, Measurement, Volume 47, January 2014, Pages 954-962 (2014).
In article      
[14]  Y. Xue et al., A New Approach for Autonomous Robot Obstacle Avoidance Using PSD Infrared Sensor Combined with Digital Compass, Applied Mechanics and Materials, Volume 511-512, February, 2014, pages 101-104, (2014).
In article      
[15]  N. Kelly, A Guide to Ultrasonic Sensor Set Up and Testing Instructions, Limitations, and Sample Applications. Application Note. . available online: http://www.egr.msu.edu/classes/ece480/capstone/fall09/group05/docs/ece480_dt5_application_note_nkelly. pdf
In article      
[16]  A. Carullo; M. Parvis (2001). An Ultrasonic Sensor for Distance Measurement in Automotive Applications. In: IEEE SENSORS JOURNAL, vol. 1 n. 2, pp. 143-147.
In article      View Article
[17]  Z. Yi, H. Y. Khing ; Ch. Ch. Seng ; Z. X. Wei, Multi-ultrasonic sensor fusion for mobile robots, Intelligent Vehicles Symposium, 2000. IV 2000. Proceedings of the IEEE, pages 387-391.
In article      PubMed
[18]  D. Han, S. Kim, S. Park, Two-dimensional ultrasonic anemometer using the directivity angle of an ultrasonic sensor, Microelectronics Journal, Volume 39, Issue 10, October 2008, Pages 1195-1199.
In article      View Article
[19]  M.Y.I. Idris et all, Parking Guidance System Utilizing Wireless Sensor Network and Ultrasonic Sensor, Information Technology Journal 8 (2), 2009, pages 138-146.
In article      View Article
[20]  B. Henning , J. Rautenberg, Process monitoring using ultrasonic sensor systems, Ultrasonics, Volume 44, Supplement, 22 December 2006, Pages e1395-e1399.
In article      View Article  PubMed
[21]  D. Koniar, L. Hargaš, M. Hrianka, P. Špánik, Frequency and Trajectory Objects Evaluation in Frames Sequence, Advances in Electrical and Electronic Engineering, 2011.
In article      
[22]  G. V. Blessing ; D. G. Eitzen, Ultrasonic Sensor For Measuring Surface Roughness, Proc. SPIE 1009, Surface Measurement and Characterization, 281 (March 21, 1989).
In article      
[23]  P. G. Kim et all, Obstacle Avoidance of a Mobile Robot Using Vision System and Ultrasonic Sensor, Advanced Intelligent Computing Theories and Applications. With Aspects of Theoretical and Methodological Issues, Volume 4681 of the series Lecture Notes in Computer Science pp 545-553.
In article      
[24]  A. Babinec, M. Dekan, F. Duchoň, A. Vitko, Modifications of VFH Navigation Methods for Mobile Robots, Procedia Engineering, Volume 48, 2012, Pages 10-14.
In article      View Article
[25]  F. Fang, X. Ma, X. Dai, A Multi-sensor Fusion SLAM Approach for Robots. In: Proceedings of the IEEE International Conference on Mechatronics and Automation, Niagara Falls, Canada (2005).
In article      View Article
[26]  J. Yun-ho, A Real Time Obstacle Avoidance for Mobile Robot Using Nearness Diagram, Limit-cycle and Vector Field Method. Korea Aerospace University (2006).
In article      
[27]  F. Duchoň, P. Hubinský, J. Hanzel, A. Babinec, M. Tölgyessy, Intelligent Vehicles as the Robotic Applications, Procedia Engineering, Volume 48, 2012, Pages 105-114.
In article      View Article
[28]  D. Koniar, , L. Hargaš, S. Štofan, Segmentation of Motion Regions for Biomechanical Systems, Procedia Engineering, Volume 48, 2012, Pages 304-311.
In article      View Article
[29]  Sukop M., Hajduk M., Varga J., Proposal Hardware and Software Modules for Multi-agent System of Robosoccer, Acta Mechanica Slovaca. Volume 18, Issue 2, Pages 20-27.
In article      
  • CiteULikeCiteULike
  • MendeleyMendeley
  • StumbleUponStumbleUpon
  • Add to DeliciousDelicious
  • FacebookFacebook
  • TwitterTwitter
  • LinkedInLinkedIn