An Automated Obstacle Detector and Path Finder Robotic Car

— This is to present you a simple and cost-efficient obstacle detecting mobile robot. Here a controlled rotating sonar sensor has been used to measure distance. With this robot the angular and distance values are being sampled with the system support and being simplified to get a correct way through the given algorithm. The system was implemented in C++ type Arduino coding Software. Inputting the data and processing it in Arduino; all were digitally maintained; the digital pins of Arduino were used. And the outputs were controlled by the Arduino which were pre-given. This simple, cost efficient and mostly accurate project can be used in farming as well as defense and security sector of any country.


I. INTRODUCTION
As the science is growing so fast the application and requirements of using robotic car is increasing at a massive rate. Presently this kind of robots are using in many sectors like agricultural field, as housekeeping, medical field etc. In recent years, the whole world is increasing the percentage of development in the robotic sectors and designing most complex and effective algorithms for the betterment of humankind. As a necessary function of robot work, obstacle detecting is the major issue before designing a robotic car. The so-called obstacle avoidance is to use the advanced range finding device in front of the robotic car. When the robotic car faces an obstacle, it can locate and respond to the location sensor and enter the Arduino through the data transmission starts the core processing. This model has high sensitivity to the single chip computer. When it receives the signal, it can quickly analyze and respond. A perfect sonar obstacle detector way for intelligent car is formed by the setup up of the sensor and other things. There have some experiments which shows that smart car can accomplish obstacles and avoid tasks such as friction and collision at high speed, and successfully achieve obstacle avoidance, enabling intelligent vehicle to achieve self-regulation and self-driving control objectives [1, 2]. The use of sonar sensors to avoid the obstacle is convenient, simple, and easier to set up real time control and it can meet the actual requirements of measurement accuracy. In this paper the collected data of the distance between the obstacle and robotic car through sonar sensor and realize obstacle detection [3]. We can set a programmer for the robotic car that it can track the desired way by detecting the obstacle and changing its route by its own. Now a day's obstacle avoidance systems are using in a robotic car based on single sensor or multi based sensors. Point avoidance obstacle adopts single sensor and its accuracy and success rate are very low. By relying on complex algorithm and iterative operation and constantly controlling car body during operation, it is easy to cause false impact and low accuracy. Although there have multi sensors operation but because of involving the timer between timing sharing, request processing chip operation ability are mutual, time because of the need of data integration between different sensors with complex algorithm for optimization of time and space complexity have higher requirements.
Therefore, a controlled rotating sonar sensor has been made and it is based on single sensor distance measurement. The automatic obstacle voidance of the intelligent car is realized. The angle and the distance values can be sampled with the help of this system and get a correct way through the given algorithm. In this paper the robotic car has been designed and programmed as per the need of using this in the field of many sectors of our life. Here a high torque servo motor, two DC motor and their driver have been used. If an obstacle comes in front of the sensor then the sensor compiled into ASC‖ code and give it to the Arduino and then the Arduino analysis the given code and by the help of the programmed that we have insert into it, it takes the right way to begin its journey again.

II. SYSTEM DESIGN
In this project the sonar sensor sends the signal to the Arduino to process them according to codes which are processed and comes out as an output. The process block diagram has been given bellow as Figure2.

Basic Design of Robot
In this project the robotic car has been made with the help of a Arduino which is connected with DC Motor through L298N Motor Driver board (pin2, pin3, pin4, pin7) which provides power to the actuators [2, 4-6]. In moving Forward, Backward, Left and Right directions actuators are used. Pin5 and pin6 are used as PWM to control the speed of the car.
The principle of module work: By using input/output trigger ranging, the high level signal has to be maintained at least 15µs; the sensor sends 40Khz square wave when it turns on, then the return signal is detected [7]; By input/output the return signal distance and time is measured. the duration of the high level is the sonar from launch to return. Va = 331.45 (1) In (1) the partial pressure of water vapor and the atmospheric pressure is denoted by Pw, the thermodynamic temperature is denoted by T [8].
s= va ×t/2 (2) in (2) the distance of the obstacle is denoted by s and the va is the speed of the acoustic wave (typically 340m/s), t is the time of the high level of the Sonar sensor. d = s/λ (3) In (3) d is the actual distance which converted by s, and there is an important intermediate variable λ. When the temperature is 20 degree and the atmosphere is dry, the speed of sound is about 343m/s and 0.0343cm/µs and in another angle is 1/0.0343µs/cm, that is 29.15µs/cm. s= vt, so the speed is v=s/t=1/29. And the distance is measured by two times, so v = s/2t =1/(2×29) =1/58. So λ = 58.. The transmitted ultrasonic waves into the air from a sonar sensor gets reflected from obstacle and detected by it as shown in Figure.7, the sonar provides 2cm -400cm noncontact measurement function. The distance is measured between the robotic car and the obstacle is determined by given equation.
(4) Where, d: is the distance measured, t: is the time traveling between the sensor and obstacle, v: is the sound velocity on air. There are some limitations in ultrasonic measurement; if the surface is perfectly perpendicular to the object then the waves can be transmitted and reflected and detected perfectly and the obstacle can be detected as shown in Figure.7. Only a few numbers of waves are scattered in some other directions. However, if the surface is curved by larger than 15 degree of angle, then the obstacle cannot be detected perfectly [3. 5 and 8]. By using servomotor drive to rotate the sensor by extra degrees while the robot moves this problem can be solved. The reflected waves are affected by the surface structure of the obstacle. Therefore, the irregularities of the surfaces should be prevented before using this method. λ = = = 8.5 mm (5) Where, λ = wavelength, v = sound velocity in air (340m/s), = ultrasonic sound frequency 40KHz.

IV. KINEMATICS MODEL OF ROBOTIC CAR
Kinematics is an art and part of physics that delivers the knowledge of motion. It's a mathematical equation which helps to conduct the system. An equation is build up between the behavior of a system and control parameters. The Right wheel and Left wheel speed (vr , vl) has a relation with the angular speed as follows: vr = rωr (6) vl = rωl (7) Where, r = the radius of the wheel, ωr and ωl = angular velocity of the right and left wheels, By the help of equations (8) and (9), angular speed and total linear speed can be determined [9]. The robot in a state of motion must always rotate about a point that lies somewhere on the common axis of its two wheels. This point is often called the instantaneous center of curvature.

V = {vr(t)+vl(t)}/2 (8) R = = [{vr(t)+vl(t)}/{vr(t)-vl(t)}]
(9) Where, v = the velocity of the robot, ω = angular velocity of the robot, R = instantaneous radius of curvature, S = is the robot curvature travel. Three types of robotic motion have been shown below: When vl = vr , forward linear motion in a straight line we get and R gets infinite therefore the rotation θ is 0 and the car moves straight forward or backward. When vl > vr , we get a right rotation with R. If vl < vr , we get a left rotation with R.

A. Software Implementation
The system was implemented in C++ using the Arduino Software. The sensor become active when the motors start to move forward direction. The sensor sends a signal by trig at 40 KHz and waits for receiving sensor signal from echo. The distance and the time of the path that the signal runs twice between obstacle and sensor are calculated and it is given by [10]: d = (tIN×v)/2 (10) Where, d = distance between the sensor and the obstacle, tIN = the time between transmitted and received reflected wave, v = the ultrasonic wave propagation speed in air at normal speed 344m/s. When distance is lesser than 40cm, Arduino gives instruction to the motor to turn at 90-degree angle right or left and move forward.

The proposed algorithm system has given bellow
The proposed Algorithm, The proposed algorithm system has given bellow : 1. The car moved along a specific distance; it counts the distance while it is moving on the track. 2. If the sonar sensor can detect any obstacle, then Arduino will give instruction to stop instantly. 3. The Left side and Right-side distance value will be determined by the sensor with the help of rotating SG90 servo motor. 4. If the left side distance value is more than right side distance value, then the car turns 900 to the left. Otherwise, it turns 900 to the right. 5. After the obstacle disappears the car starts to move again 6. After this the car will start to move forward until the obstacle comes in front of it Flowchart of the proposed system is represented bellow: RESULT AND DISCUSSION By placing various objects at a distance across its path the system was tested. The detection of the sensor was counted since the obstacle were placed on different places. The equation of percentage of accuracy and probability of failure has been given bellow, (11) Where, Su = Accuracy of the Sonar Sensor, Noa = Total number of obstacles avoided, Nt = total number of obstacles tested. The probability of failure is given bellow, P = (12) The percentage of accuracy and probability of failure of our project has been given bellow,

Error of the measured distance
The Real Distance(cm) Error Sonar Distance(cm) Fig.10 Error Analysis of the Measured Distance.
During the time of testing all data, there some problem arises, and the problem was about the cloth, wind, and the angle of the wall. The sonar sensor could not detect the only cloth without human being; it was fluctuating so much when the ceiling fan was on. Again, when it went in front of any wall which looks like triangle then the sensor could not detect the wall.

VIII. SYSTEM IMPLEMENTATION AND RUNNING
After the operation was done the robot starts its journey and starts detecting obstacle in front of it, if the obstacle distance is larger than 40cm the robot moves forward, else it take the decision to turn left or right as given figure bellow to avoid any object and start again its journey.  A simple, cost effective obstacle detection and avoidance system has been shown in this paper. For detecting obstacles one single sensor was used along with a servo motor. The percentage of accuracy and minimum probability of failure were obtained. The system shows that it can avoid obstacles, able to avoid collision and change its position. It can be said that, with the design more function can be added to perform various work to lessened human's stress. Finally, the project will be helpful for our environment, defense, and security sectors of the country.