Professional Documents
Culture Documents
Ultrasonic Distance Sensor
Ultrasonic Distance Sensor
TECHNICAL REPORT
STUDENT NAME:
STUDENT ID:
COURSE EXAMINER:
DATE: 21 - 04 - 2020
NAME OF UNIVERSITY
Table of Contents
Introduction...........................................................................................................................................2
Construction & Working Principle..........................................................................................................2
Distinctive Features................................................................................................................................2
HC-SR04 Module....................................................................................................................................3
Application in Mechatronics System......................................................................................................3
Conclusion..............................................................................................................................................4
References..............................................................................................................................................5
Table of Figures
1|Page
Introduction
Ultrasound is an amazing discovery of science which plays wonderful role in various applications.
The waves of this sound are termed as ultrasonic waves and their frequency is over 20,000 Hz.
These are inaudible to humans as human hearing range is between 20 and 20,000 Hz. This report is
consisted of the fundamental and technical description of ultrasonic distance measurement sensor
along with an application in an Arduino Microcontroller based control system.
When this sensor is triggered through an attached microcontroller, a few ultrasonic pulses are sent
by transmitter at frequency beyond 20 kHz and the time is measured till their receiving after
echoing back from obstacle. That time is then converted to distance using the following relation:
As the total distance travelled by the sound waves is twice of the distance to be measured, so:
Distinctive Features
1) Ultrasonic distance sensor is robust which increases its utility in aggressive environments.
2) Since it works through sound propagation, it can be used in almost all kinds of
environments. (Vidhya et al., 2016)
3) It measures distance from object on the basis of travelling time of ultrasonic waves which
makes its accuracy independent of object color rendering, design and surface type.
4) It is not sensitive to dirt as it cleans itself through vibration.
5) It is proved to be reliable and versatile for various engineering applications including robot
movement control, vehicle control and medical applications. (Vidhya et al., 2016)
2|Page
HC-SR04 Module
This time is found to be 150μs to 25ms in case of obstacle within module’s range whereas it is
about 38ms in case of no obstacle. (Vidhya, Rebelo, D’Silva, Fernandes & Costa, 2016)
3|Page
1. Arduino Uno Microcontroller
2. HC-SR04 Distance Measurement Module
3. IC-L293D Motor Driver
4. Tower Pro SG90 Servo Motor
5. 2 Geared Motors for Two Wheels
6. Batteries With Holder and Push Button
The circuit diagram to connect all these components is drawn on fritzing software and it is shown in
figure 5. When the robot is turned on after circuit completion, both of its motors run in the same
direction and it starts moving forward. The ultrasonic sensor continuously measures the gap
between the robot and the reflective surfaces in its range.
Distance measurement calculation is fed to Arduino where the distance is compared with a preset
value. For instance, preset value is 20 cm; if the distance from the obstacle comes out to be less
than 20cm, Arduino will stop the geared motors and activate the servo motor to measure the
distance in the left and right sides of the robot. If the distance on right side is greater than that on
the left side, the robot will turn right by running its right motor in the reverse direction.
Similar to this, if the distance comes out to be more on left side of the robot, it will take left turn by
Figure 5 Obstacle Avoidance Robot Circuit Diagram
activating the left motor in reverse direction. Robot will keep on repeating this process to make its
way while avoiding obstacles.
Conclusion
4|Page
Ultrasonic distance sensor is discussed in this technical report along with its application in an
obstacle avoidance robot. A commonly used HC-SR04 module is considered which generates sonic
burst of 40kHz to measure distance. It is an inexpensive sensor with distance measurement range
of 2cm to 4m. It is interfaced with Arduino Uno to continuously measure distance around robot in
the considered application. Arduino then control robot wheels motors on the basis of this
information.
References
Latha, N. A., Murthy, B. R., & Kumar, K. B. (2016). Distance sensing with ultrasonic sensor and
Arduino. International Journal of Advance Research, Ideas and Innovations in
Technology, 2(5), 1-5.
Czernek, W., Margas, W., Wyżgolik, R., Budzan, S., Ziębiński, A., & Cupek, R. (2016). GPS and
ultrasonic distance sensors for Autonomous Mobile Platform. Studia Informatica, 37(4A), 51-
67.
Vidhya, D. S., Rebelo, D. P., D’Silva, C. J., Fernandes, L. W., & Costa, C. J. (2016). Obstacle detection
using ultrasonic sensors. International Journal for Innovative Research in Science &
Technology, 2(11), 316-320.
Obstacle Avoiding Robot using Arduino. Electronics Hub. (2017). Retrieved 18 April 2020, from
https://www.electronicshub.org/obstacle-avoiding-robot-arduino/.s
5|Page