Trusted Publishing Platform
Serving Researchers Since 2012
IJERT-MRP IJERT-MRP

Arduino-Based Ultrasonic Distance Measurement and Analysis System

DOI : 10.17577/IJERTV14IS080003

Download Full-Text PDF Cite this Publication

Text Only Version

Arduino-Based Ultrasonic Distance Measurement and Analysis System

Chidvilasini, Lalith Kumar, Chaitanya, Bhuvaneswar Reddy, Vivek Sai, Giri Prasad

BE students

Abstract

Dr. Nimai Sarkar

Assistant Professor

VIT AP University,Amaravati.

Department of School of Advanced Sciences.

Many researchers have looked into how ultrasonic sensors

This paper presents about distance measuring device constructed to distance measurement of any object with in the range of 50 cm and 500 cm(5m). It makes use of ultrasonic sensors, which detects distance by sending ultrasonic signals. The device funcions independently, without the use of other gadgets like mobile phones, and is fitted with a microcontroller that is Arduino uno board which acts as its brain. This microcontroller continuously assists the device in tracking its surrounding objects and their distance from it.

With this system, we are having a feature that it is able to turn in 360 degrees which means it can measure distances at all angles without missing any single detail. For this we are using servomotor which helps the ultrasonic sensor move smoothly in all directions, making sure that the device can measure all objects distance that are around it without leaving single object. If any object comes close to the device it detects and provides and alert by using a buzzer knowing that device is having some threat. We can use these devices in real life in Parking assistance systems, Security systems, Smart home systems, Blind assistance etc.

Keywords: Distance Measurement, Ultrasonic Sensor, Servo Motor, Angular Measurement, Proximity Alert, Arduino Uno, Buzzer Alert, Display Integration.

  1. INTRODUCTION

    Measuring and analysis of the distances between vehicles to vehicles, and objects has become an integral part of the road safety measures. This can be achieved with the help of Radar Systems.There are several positive features for these Ultrasonic detectors such as cheapness, higher sensing range, sustainable and better robustness than other types. Furthermore, the ability of expanding the sensing range by controlling the signal atten- uation and the circuit sensitivity [1].The Radar Systems have always been part of the detection system using radio waves. This work delves into how ultrasonic sensors and Arduino based technology combines to create a Radar Technology. The radars principle is sending and receiving waves through spe- cific medium that allows waves to pass.Each ultra Sonic Radar has a ultrasonic sensor that transforms the ultrasonic waves to electric form and vice versa. Ultrasonic sensors are known for their features such as cheapness, high sensing range and ro- bustness. The core of the work is an Arduino that manages how the ultrasonic sensor communicates with servo motor for controlling direction.

    can be used for a variety of purposes. Shrivastava et al. (2010) worked on distance measurement using the P89C51RD2 mi- crocontroller and ultrasonic sensors, but found that the accu- racy dropped off for distances beyond 50 cm [2].More recently, Shengbo Eben Li et al. (2017) designed an ultrasonic array sys- tem using Arduino to detect objects, although it was limited to an angular range of -60° to +60° [1].Rapid advancements in technology in the automation of robotic systems have allowed the progress of wheeled robots to reach a state of maturity. At present, autonomous mobile wheeled robots are extensively employed to transfer materials, nuclear weapons, military op- erations, and various other occupations [3].A study by Soni et al. (2017) [4], made a motion detector using the ultrasonic sensor and Arduino Uno microcontroller to detect motion and finally their study was finally able to display the distance on the LCD. There were some limitations in their study such as the sensor had only a visual signal, no sound or recorded sig- nal. This implied that their study could only apply when there is eye focus to the LCD screen [5]. Another research paper contains the error percentage and another paper concentrates on the detection of wood, alluminium and other metals. While these studies show the growing importance of ultrasonic sen- sors, they also have some challenges, like limited range, added complexity, and restricted flexibility.

    Several researchers have come up with motion detec- tors techniques to cub insecurity amongst other applications [6].Some of them have used Passive Infrared sensors (PIR) for distance measurement. The study by Ervin et al. (2010) [7], used Arduino Uno microcontroller to detect the motion of the object or the intruder. Their study was able to give an alert by producing the sound signals using buzzers but they were not able to display the distance between the sensor and the intruder to the LCD.

    Ultrasonic sensors allow us to equip robots with a means of perceiving surrounding objects, an alternative to technical vision [1] . However, this approach is not enough. All possible types and kinds of sensors should be used, including those that are similar to those of other animals and creations (in particu- lar, echolocation in dolphins and bats), as well as sensors that have no analogues in the wild [8].Ultrasonic sensing of artic- ulator movement is an area of multimodal speech recognition that has not been researched extensively. The effectiveness of ultrasound as a more lightweight secondary source of informa- tion in speech recognition [9].

    In this paper, we are adding more advanced ultrasonic

    In this paper, we are adding more advanced ultrasonic radar system that includes a 360-degree camera, which allows 360 degrees full-range distance measurement and a complete view of the surroundings. We are also integrating the an- gle measurement in this project where the system will detect the angle of the object.With this we are also adding a piezo buzzer to give instant feedback when objects are detected very nearby,enhancing awareness and also there will be an LCD screen which displays the angle from where the object is de- tected and the speed of the object. The usage of Aurduino Uno, LCD , Servo Motor, Piezo Buzzer is cheap since the designing of the circuit is not complex. Arduino is a low-cost and effec- tive [5] microcontroller.The main advantage of this Aurduino Uno is that it uses readily available and cheap appliances which can easily be found in electronics dealers and also the needed to program the microcontroller is friendly as it uses a combination of c++ and c. Our goal is to combine the accuracy of ultrasonic sensing with improved visualization and alert features, making the system highly suitable for tasks like surveillance and colli- sion avoidance.

  2. PRELIMINARY TOOLS

    1. Arduino Uno

      Figure 1: Arduino UNO

      The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller and de- veloped by Arduino. [10].It stands for its versatility, accessi- bility and user-friendly nature. Arduino Uno offers a vari- ety of analog input/output pins for conecting with actuators, sensors, LCDS and other electronic devices. It has 14 pins with 6 PWM outputs and 6 analog input pins the Uno offers connectivity options for various applications. [11].A signifi- cant benefit of the Arduino Uno is its to use development en- vironment called the Arduino Integrated Development Envi- ronment (IDE). This open-source software simplifies program- ming tasks, allowing the users to write and upload code in C and C++. It also includes a USB interface for connection to computers to facilitate code uploading and seril communica- tion. The Arduino UNO represents a blend of creativity and accessibility, in technology enabling people to delve into the realm of electronics and answers to problems. [12]

    2. Ultrasonic Sensors

      Figure 2: Ultrasonic Sensor

      The Ultra sonic sensor is a popular budget friendly distance measuring tool used in robotics and eloctronics.It functions by utilizing echolocation like how bats navigate, emitting waves and calculating the distance by timing their reflection off ob- jects accurately. The sensor trasmits waves at 40kHz with the receiver detecting the returning signals. By measuring the time between transmitting and reception of these signals the sensor identifies the object distance with accuracy. The ultrasonic sen- sor can easily be connected to microcontrollers like Arduino, Raspberry Pi or any other embedded systems with having the four connections, VCC, GND, TRIG and ECHO. we have to send a pulse to the pin to initiate the ultrasonic wave emission and measure how much time it takes for the ECHO pin to re- ceive the reflected signal. The ultrasonic sensor is famous, for its dependability, precision and adaptability making it ideal for a variety of uses like spotting obstacles measuring distances tracking objects and sensing proximity. Its affordability, user nature and ability to work with platforms have cemented its status as a key element in numerous do it yourself endeavours, educational initiatives and business products, in various sec- tors. [13].

    3. Piezo buzzer

      Figure 3: Peizo Buzzer

      Piezo buzzer is a simple sounding device which can generate basic tones and beeps.These buzzers work by using a peizo crystal, a material when voltage is applied changes its shape. If that peizo crystal pushes against the diaphragm , like a tiny speaker cone, the pressure wave is generated which human ear can picks up as sound. The frequency of the voltage is sent to the piezo and it will start generating sounds by changing the shape very quickly [14].

    4. Liquid -Crystal Display (LCD)

      Figure 4: LCD

      Liquid-Crystal Display(LCD) is a flat panel display. liquid crystal light-modulating device since the liquid crystal was dis- covered , the liquid crystal light-modulating devices have been used in various types of displays . Crystals paired with polar- izers . liquid crystals themselves are not light emitters, as they rely on a backlight or reflector to produce the display. [15].

    5. Servo Motor

      Figure 5: Servo Motor

      A servo system refers to a feedback control loop system for controlling one or several parameters in such system, In case of servomotor that is considered as a linear rotary actuator, the parameters to be controlled are acceleration, speed and posi- tion [16]. The servomotor system for position or distance mea- surements usually includes a special motor, a sensor for error signal requirements and a controller CNC machines, robots and automation are a clearly applications of servomotors [17].In this work, a servomotor is used beside both the Arduino board and the ultrasonic sensor HC-SR04 for position determination to capture the 360 degrees surroundings.

  3. METHODOLOGY

    1. Hardware Setup

      Arduino UNO: The arduino uno board plays major role as it links all the other components like ultrasonic sensor, servo mo- tor, piezo buzzer and LCD display and coordinates them.

      Ultrasonic Sensor (HC-SR04): Ultrasonic sensor and Ar- duino board are connected via two pins named TRIG and ECHO .The role of TRIG pin is to send out the ultrasonic waves and ECHO captures the reflected signals.

      The distance is calculated based on the time difference between the sending and receiving ultrasonic waves. The equation is :

      Distance = Time × Speed of Sound

      2

      Servo Motor (SG90): servo motor is programmed to rotate 360-degrees which covers all the surroundings. By adjusting the angle continously the device can scan environment accu- rately.

      Piezo Buzzer:The piezo buzzer is attached on the Arduino board which produces sound when an object comes near a threshold distance which in this case is 50 cm.This characteris- tic facilitates instant response making it appropriate for use in situations where alerts that are close to the object are needed.

      LCD Display: A 16×2 LCD display which displays the speed and distance in real time . The LCD shows distance in centime- ters or meters , depending upon the setup.

      Figure 6: Block Diagram of the system

      Figure 7: The proposed system

    2. Connections

      1. Power

        The Arduino uno is powered with the USB. GND Rails and the breadboard are connected to aurduinos 5V . To power all the components GDP pins are used.

      2. Ultrasonic sensor

        The VCC is connected to the arduino to provide power. The TRIG pin is connected to the digital pin on arduino for trigger- ing the ultrasonic wave. To recieve the waves the ECHO pin is connected to the another digital pin on the arduino.

      3. Servo Motor

        The two signal pins are connected to the two PWM digital pins on the arduino and power pin to the 5V on the breadboard and ground pins to the GND line on bread board.

      4. Buzzer

        The positive terminal of the buzzer is connected to the digital pin on the Arduino and the negative terminal of the buzzer is connected to the GND.

        Original Distance

        Measured Distance

        Error%

        20

        20

        0.0%

        30

        30

        0.0%

        40

        40

        0.0%

        50

        51

        2.0%

        60

        60

        0.0%

        70

        71

        1.43%

        80

        79

        1.25%

        90

        91

        1.11%

        100

        100

        0.0%

        110

        109

        0.91%

        120

        118

        1.67%

        Table 1: Distance measurement

    3. Figure 8: Circuit Connectivity Diagram Flow Chart

      Figure 10: Experimental results from other research paper [18]

      The above Figure 10 is the experimenal results from the re- search paper by Raheem Hatem. That research paper findings( real and measured distances) and the error percentage is the Figure 10 and the Table 1 depicts this research paper findings( real and measured distances) and the error percentage. On the comparative study between this research paper and the other re- search paper we can observe that we have achieved to decrease the error percentage.

      Original Angle

      Measured Angle

      00

      10

      300

      290

      600

      600

      1200

      1220

      1800

      1790

      2400

      2390

      2700

      2710

      3600

      3580

      Figure 9: Flow Chart of the project system produced

  4. RESULTS AND DISCUSSIONS

    The model has been tested experimentally with the different objects. The obtained results are tabled to clearly focus on the difference between the measured distances and real distances to conclude the error measurement. Table 1 depicts the real, measured distances and error percentage. The table 2 depicts th real angle and the measured angle from which direction the object is detected. The table 3 depicts the real speed and the measured speed of the objects.

    Table 2: Angle Measurement

    Original Speed

    Measured Speed

    27.77

    29.5

    21.739

    20.54

    33.61

    35.46

    38.461

    37.98

    40.540

    41.45

    34.313

    35.7

    35.714

    35.25

    44.776

    46.6

    Table 3: Speed Measurement

    The Distances, Angles and the Speeds recorded from the LCD had a small deviation from the actual distances as shown in table 1 , table 2 table 3. The actual values from the tape mea- sure differ from the values recorded by LCD by small margins as sdhown in the column of Measured erorrs. The variation be- tween the system readings and the manual readings of distances might be because of this some possible sources of errors like Instrumental errors,Observation errors and Variation of natural phenomena.

  5. CONCLUSION

    The Arduino-based Ultrasonic Distance Measurement involves the several key components like Aurduino, Servo Motor of 360

    ‌using p89c51rd2. International Journal of Computer Theory and Engineering, 2(1):6468, 2010.‌

    1. ‌Kolapo Sulaimon Alli, Moses Oluwafemi Onibonoje, Akinola S Oluwole, Michael Adegoke Ogunlade, Anthony C Mmonyi, Oladimeji Ayamolowo, and Samuel Olushola Dada. Development of an arduino- based obstacle avoidance robotic system for an unmanned vehicle. ARPN Journal of Engineering and Applied Sci- ences, 13(3):17, 2018.‌

    2. ‌Neeraja Soni, S Sarita, Basant kumar Sahu, Bhavishya Jain, and Garima Shrivastava. Distance measurement us- ing ultrasonic sensor and arduino. International Journal of Engineering Science and Computing, 7(3):12, 2017.

      degrees range, An Ultrasonic sensor, 16×2 LCD and a Peizo Buzzer to identify the distance between the objects accurately at different angles( from 0 to 360 degrees). This design of- fers a very budget friendly , customizable and practical solution for autonomous vehicles.By utilizing Arduinos flexibility and open-

      source nature, particularly for IoT applications [19].In this work, the circuit was successfully connected and the pro- gram

    3. Mutinda M Gabriel and Kamweru P Kuria. Arduino uno, ultrasonic sensor hc-sr04 motion detector with display of distance in the lcd. 2020.

      Hon Fong Chong and Danny Wee Kiat Ng. Develop- ment of iot device for traffic management system. In 2016 IEEE Student Conference on Research and Development (SCOReD), pages 16. IEEE, 2016.

      Frank Ervin. Arduino-based object detection system. Project Final Report, 2010.

      was sent to the Arduino chip to run the circuit.The servo motor with a capacity to rotate 360 degrees object identifica- tion and the ultrasonic sensor was able to send the ultrasonic sound waves to the object and the alarm sound from the Piezo Buzzer was produced by analyzing the distance, if the object is very near and the distance between the sensor and the object is recorded and displayed on the LCD screen very accurately.The angle from which the object is detected and the speed of the objects are shown on the LCD.With many objects many tests were conducted on the designed system at different distances, we have also included moving objects also.The error was very negligible with our designed system as the readings from the system were very close to the reality.

  6. FUTURE SCOPE

This proposed arduino based ultrasonic distance measurement and analysis system can be used in the various robotics sys- tems to avoid the obstacles and collisions, automated vehicles, measuring general distances etc. This designed arduino based ultrasonic distance measurement system will be able to detect the motions or objects in the war fields or on the border lines as this system has a 360 degrees fully object detection with the help of the rotational servo motors. The proposed system could also be mobile robotic application capable of detecting the ob- jects and measuring the distance at same time. Iot (Internet of things) serves well in that type of applications. It can be inte- grated into the proposed system and so the sensed data Can be monitered using a smart phone remotely, Although it is outside the scope of research work it will also looks like a possible ex- tension in future. This model can also be recommended to be used to give signals in case there are any complications in the tunnels.

REFERENCES

  1. ‌Shengbo Eben Li, Guofa Li, Jiaying Yu, Chang Liu, Bo Cheng, Jianqiang Wang, and Keqiang Li. Kalman filter-based tracking of moving objects using linear ultra- sonic sensor array for road vehicles. Mechanical Systems and Signal Processing, 98:173189, 2018.

  2. ‌AK Shrivastava, A Verma, and SP Singh. Distance mea- surement of an object or obstacle by ultrasound sensors

  1. ‌VA Zhmud, NO Kondratiev, KA Kuznetsov, VG Trubin, and LV

    Dimitrov. Application of ultrasonic sensor for measuring distances in robotics. In Journal of Physics: Conference Series, volume 1015, page 032189. IOP Pub- lishing, 2018.

  2. ‌Bo Zhu, Timothy J Hazen, and James R Glass. Multi- modal speech recognition with ultrasonic sensors. PhD thesis, Massachusetts Institute of Technology, Depart- ment of Electrical Engineering . . . , 2008.

  3. ‌Yusuf Abdullahi Badamasi. The working principle of an arduino. In 2014 11th international conference on elec- tronics, computer and computation (ICECCO), pages 1

    ‌4. IEEE, 2014.

  4. ‌Neetu Settia and Krishan Mohan Mandal. Exploring the potential of arduino and ultrasonic sensor integration in radar systems. International Research Journal on Ad- vanced Engineering Hub (IRJAEH), 2(05):15301536, 2024.

  5. PRACHI GUPTA, AMAN SINGH, AVIRAL KUMAR,

    ‌and VV Mehtre. Radar system using arduino and ultra- sonic sensor. IRE Journals, 6(1), 2022.

  6. ‌Ikechi Risi, A Amakiri, and N Tasie. Arduino uno con- trolled robotic radar system object detector using ultra- sonic sensor. Am. J. Eng. Res, 9:18, 2020.

  7. Faisal Sikder and Dilip Sarkar. Log-sum distance mea- sures and its application to human-activity monitoring and recognition using data from motion sensors. IEEE Sensors Journal, 17(14):45204533, 2017.

  8. Rajesh Singh, Anita Gehlot, and Dolly Sharma. Futuris- tic Sustainable Energy and Technology. CRC Press, 2022.

  9. DB Kadam, YB Patil, KV Chougale, SS Perdeshi, and DB Kadam. Arduino based moving radar system. In- ternational Journal of Innovative Studies in Sciences and Engineering Technology (IJISSET), 3(4):2327, 2017.

  10. N Anju Latha, B Rama Murthy, and K Bharat Kumar. Distance sensing with ultrasonic sensor and arduino. In- ternational Journal of Advance Research, Ideas and In- novations in Technology, 2(5):15, 2016.

  11. H Raheem Hatem, Ali I Abdalla, and Zainab Najeeb Ab- dulhameed Al-Rawi. Design and implementation of ul-

    trasonic radar system for distance measurements using arduino. International Journal of Engineering & Tech- nology, 7(4):31153118, 2018.

  12. Helmi Jamaludin. Designing esp32 base shield board for iot application. Politeknik ≈ Kolej Komuniti Journal of Engineering and Technology, 5(1):130137, 2020.