Implementation of Ultrasonic Sensor as a Radar for Obstacle Detection

The Arduino UNO, ultrasonic sensor, servo motor, and Processing as visual software was used to create a low cost ultrasonic radar system that can detect and determine the location of an object, such as obstacles, in a short distance. Objects can be sensed up to 40 cm away from the ultrasonic sensor and the ultrasonic radar's angular rotation can detect objects from 15o to 165o and counterclockwise. The obstacle objects will be displayed in the computer panel by running the visual software. A comparative analysis of the distance error between the radar and the obstacles is used to assess the feasibility of the proposed system. The findings obtained from measurements of the obstacles are tabled to show that the planned design achieved a relatively small error, with 90% as the lowest accuracy.


INTRODUCTION
Radar is an electronic instrument that uses electromagnetic waves to calculate the altitude, location, direction, and even speed of moving and stationary objects. Ultrasonic radar, on the other hand, uses ultrasonic waves rather than electromagnetic waves. The ultrasonic radar's key features are its low power consumption, low cost, and ease of deployment, which enable it to be used in a variety of applications such as defense, robotics, and also object detection [1].
Radar is an automated framework capable of detecting objects within its transmitting and reception set. Radar systems come in a variety of shapes and sizes, each with its own set of capabilities [2].
The history of radar (Radio Detection and Ranging) began with Heinrich Hertz's experiments in the late 1800s, which demonstrated that radio waves could be reflected by metallic materials. It was German engineer Christian Hülsmeyer who was the first to use them to detect object nearby. Over the next two decades, a slew of similar systems was built that provided directional information to objects at short ranges [3].
The invention of devices capable of producing brief bursts of radio energy was a critical step in the development of advanced radar systems. The range could be measured by timing the pulse, and the orientation of the system showed the angular position of the targets [3].
One that immensely popular implementation of radar can be seen on a radar system on marine. It serves to determine the obstacles in the path of the marines. We can determine the bearing and distance of other items such as ships and other obstacles using the radar system, and further the radar system information can be used to avoid collisions with obstacles [4]. By implementing that example of radar system to detect object at the surrounding, we can also implement the same exact method to detect obstacles or other objects by using ultrasonic sensor to get relatively similar system but low cost [5].
By using a programmable microcontroller, it can be developed and implemented a low-cost ultrasonic radar detection system. The device can built on a single prototype board and included an ultrasonic sensor that was rotated from 15 to 150 degrees by a servo motor operated by an Arduino microcontroller. If an object is observed, a processing IDE shows the angle and direction [3]. User can access radar interface from computer that connected to the microcontroller.
A microcontroller, a motor servo, and an ultrasonic sensor make up the radar system. The system is regulated by an Arduino UNO, which sends and receives signals in order to perform an operation. If an object interrupts a signal sent by an ultrasonic sensor, the signal bounces back to the ultrasonic sensor [6]. The software Processing is a program that displays the angle and distance of an object sensed by an ultrasonic sensor [3].

Arduino UNO
The hardware brain box in the implementation is the Arduino UNO, also known as the microcontroller, which manipulate other modules for the complete performance of commands. The order is, of course, imbued into the Arduino board from the machine link in the form of code written in the Arduino IDE. The servo motor is regulated by an Arduino UNO [7].
The Arduino UNO is a microcontroller that is open source. It is made up of an ATmega328P microcontroller chip installed on the circuit board. It has 14 optical I/O pins, 6 analog I/O pins, serial ports, USB power in port, 7-power socket port, 16MHz crystal oscillator, reset button, and other parts.

Servo
A servo motor is an electrical unit that can precisely rotate objects. It has a rotation angle that varies to some extent [3].
A servo motor is a rotary unit that can move from left to right, right to left, or in an angular motion. It primarily serves as a foundation or pivot for the movement of other components or modules that are connected to it. It is the device that rotates the ultrasonic sensor, looking for obstacles in the range to the front and back [2].
A servo motor with 150 degrees of rotation is used to rotate the ultrasonic sensor HC-SR04 in order to determine position in this study [1].

Ultrasonic Sensor
Due to its ease of installation, the ultrasonic sensor has been used to this application that low cost and providing fast operation. The ultrasound wave used has a frequency over 20 kHz and up to Gigahertz, which is too high for the human ear to hear [8]. Excellent distance measurement accuracy was demonstrated in a study involving ultrasonic sensor use [9].
The ultrasonic sensor is also known as a transceiver because it operates on the transmitting and receiving principle, which means that it transforms electrical energy into sound or radio waves as an activated signal that is transmitted from the microcontroller (Arduino UNO) to the Ultrasonic Sensor in the capacity of 10μS [10]. The Ultrasonic Sensor receives the pulse and produces an acoustic wave that is then propagated along the air medium to strike objects within the range. After a short period of time, the Ultrasonic Sensor receives the echo and converts the wave back into electrical energy, where the object's information is stored [2].
The high frequency sound (ultrasound) waves are produced by an ultrasonic sensor. When ultrasound strikes an object, it reflects as an echo, which the receiver detects [3].
The HC-SR04 sensor is used in this framework. As a supply, VCC is set to +5 V. GND stands for Ground. TRIG: Sensor trigger input. The HC ultrasonic module receives 10 stimulus pulses from the microcontroller. ECHO: The sensor's echo output. This pin is read by the microcontroller in order to sense the obstacle or calculate the distance [3]. Since the signal passes from the HC-SR04 to the object and then back to the HC-SR04, the total distance is divided by two.

   
Total Distance 343 time of high echo / 2   (1) Due to the obvious similarities in operation, the operation of a radar or sonar may be used to explain the operation of an ultrasonic sensor. In other words, by calculating the time it takes to transmit and receive an ultrasonic wave, some characteristics of the source or barrier that allows the wave to be reflected, such as distance, can be determined [11]. The nature of the medium and its temperature are normally two factors that influence the speed of an ultrasonic wave in the medium, as seen in Equation 2, where T is the medium's temperature [1].

Programming Software
The Arduino IDE is the programming software for the Arduino microcontroller. It's an open-source platform [3]. The Arduino IDE is written in Java, but it has a simpler syntax [1].
Processing is also an open-source graphical library (IDE) that can be used for non-programmers to visualize system. It was created for the electronic arts and visual design communities.
Processing is based on the Java programming language, but with additional features including extra classes and operations. It also has a graphical user interface that makes the compilation and execution stages easier. Figure 1 depicts the system's deployment and also its wiring connection to Arduino UNO as the microcontroller and computer as visual representation of obstacles detected. Figure 1. Circuit diagram Figure 1 shows a fully functional wiring diagram created with Fritzing. The written computer code from the IDE software is checked to see how any of the components will interact with the coding program to power an Arduino UNO controller [12].

METHOD
The prototype ultrasonic radar system can do rotation over using the servo motor. It has the ability to rotate in both clockwise and counterclockwise directions.
Once the device is powered up, both ultrasonic sensors emit an ultrasound wave within a certain range and detect the presence of an object, which is then sent to the processing unit. Until the machine is turned off, these cycles are replicated indefinitely. The HC-SR04 sensor has four pins: "Voltage at the Common Collector (VCC)" for control, "TRIG" for impulse trigger, "ECHO" for impulse receiver, and "Ground (GND)" for ground connector. Table 1 summarizes the pin connections for program code to the control unit device. The flow process of the whole system is depicted in Figure 2.  The efficiency of the engineered device for a certain obstacle is calculated using Equation (3) to find the percentage error.
where the parameters actual of distance and measured distance indicate the distance in (cm) measured manually and by the device, respectively [1].

RESULTS AND DISCUSSION
The proposed concept for a low-cost ultrasonic radar system to detect obstacles has been deployed successfully and performs well. The ultrasonic radar senses an object and sends the appropriate signal to the Arduino board, which then communicates with the Processing program to measure and visualize the object's distance, angle and position.
The ultrasonic radar system attached and communicated serially with processing software that displays the detected object. The design's validity has been put to the test in an experimental environment at 20 cm as reference real distance but put at various angles. The reference distance is located randomly, swapped over clockwise and anticlockwise region. Several objects are regarded as obstacles. The collected results are tabled to highlight the difference between the true and observed distances, allowing the measuring error to be determined. From the measurement conducted, the error ranges from 0% up to 10%. The percentage error rate is small and acceptable. The error may arise for several reasons. Ambient factors and also human error can influence an instrument's systematic error [13].
The percentage error for the calculated distance was good using the proposed design, according to the data. It can be concluded that the design is operating correctly with a reasonable level of error.

CONCLUSIONS
The Arduino UNO, servo motor, and ultrasonic sensor were used to create a low-cost but powerful radar system for obstacle detection. The radar system can track obstacles or other objects in 15 to 165 degree anticlockwise and 165 to 15 degree clockwise directions using the attached radar system. The proposed model can detect the position of an object and converts this data into a visual representation through a monitor display. System can also calculates the distance and angle of any point it encounters in its direction, allowing it to predict the obstacle's range distance. The percentage distance error observed does not exceed 10%, according to the results. This method was created with a rational degree of reliability and simplicity.