Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
Autonomous Navigation: An Arduino-Based Smart Car
                  Obstacle Avoidance System
Sharifah Nurulhuda Tuan Mohd Yasin1*, Maisatul Akmal Mat Tahir1 and
                         Iliyasu Hussaini2
                                   1Department
                                             of Electrical Engineering,
                                    Politeknik Kuala Terengganu,
                            20200 Kuala Terengganu, Terengganu, Malaysia.
                                 2Universal
                                         Basic Education Commission,
                            Abuja 904101, Federal Capital Territory, Nigeria.
                   *Corresponding Author’s E-mail: sh.nurulhuda@pkt.edu.my
                 Article History: Received 18 October 2023; Revised 9 June 2024;
                                      Accepted 10 June 2024
              ©2024 S.N.T.M. Yasin et al. Published by Jabatan Pendidikan Politeknik dan Kolej Komuniti.
 This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/).
Abstract
Autonomous car navigation is currently attracting considerable research interest. The design
of an Arduino-based smart car obstacle avoidance system includes the use of an ultrasonic
sensor to detect obstacles and control the car's movement. The system is designed and
developed to operate in a self-driven remote to avoid obstacles and reduce collisions. This
paper presents the prototype development of a smart car obstacle avoidance system using an
Arduino microcontroller and ultrasonic sensor. The research methodology operates by using
an ultrasonic sensor to detect obstacles, emit sound waves, and measure the time it takes
for the waves to be reflected. Arduino microcontroller serves as the system's control unit
which enables the real-time analysis of sensor data and controls the movement of the car.
Arduino microcontroller processes the data and calculates the distance of the obstacles. The
direction and speed of the car is adjusted based on the calculated distance to avoid collision.
The proposed system is intended to provide a cost-effective, efficient, and reliable obstacle
avoidance system that could be used in various applications, such as robotics and automated
vehicles. The success of the system is determined by the accuracy of the sensor data and the
effectiveness of the control algorithms used to drive the car through the environment. Overall,
the design of an Arduino-based smart car obstacle avoidance system is an interesting and
innovative application of robotics technology.
Keywords: Arduino Microcontroller, Ultrasonic Sensor, Servo Motor, Robot, Obstacle
Avoidance
1.0      Introduction
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 operations, and various other
occupations [1]. These robots have contributed significantly by simplifying
tasks that were earlier considered strenuous and time-consuming. Previous
research has established the development of a smart car obstacle avoidance
system based on the application of Arduino microcontroller [2]. The system
uses ultrasonic sensors to detect obstacles and prevent collisions. The
sensors send signals to the microcontroller, which controls the motors to
                                                                                                                  53
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
change the direction of the car and avoid obstacles [1], [2]. Gunawan et al. [3]
presented the system is designed to be modular and can be programmed
using Arduino boards. The use of motor driver circuits and servo motors
allows for precise control of the car's movements. The system has been
evaluated and shows a high accuracy in obstacle detection. The Arduino-
based smart car obstacle avoidance system has potential applications in
various fields, including robotics and engineering [4].
Another study conducted by Divya et al. [5] suggests that an Arduino-based
smart car obstacle avoidance system is feasible, cost-effective and efficient. In
addition, Shabani et al. [6] developed a smart car control system for obstacle
avoidance and engine temperature control using Arduino Uno, which avoided
road obstacles and reduced engine breakdown due to excess engine
temperature. Li et al. [7] designed and implemented an autonomous obstacle-
avoiding robot car using ultrasonic wave sensors and an Arduino
microcontroller, which effectively avoided obstacles. Goswami and Sahoo [8]
designed a robotic vehicle to avoid obstacles using an Arduino microcontroller
and ultrasonic sensor. This study demonstrates a practical application of
Arduino microcontrollers and ultrasonic sensors in creating intelligent robotic
systems. Meanwhile, Yılmaz and Özyer [9] developed a remote and
autonomously controlled robotic car with real-time obstacle detection and
avoidance using Arduino Uno, Bluetooth technology, and various sensors,
which can detect live objects and flee from obstacles. Overall, these papers
demonstrate the potential of Arduino-based smart car obstacle avoidance
systems in reducing car accidents and improving safety.
The issue of creating efficient trajectory planning has resulted in the demand
for robots that possess the ability to detect and steer clear of objects in a pre-
calculated path or objects that suddenly emerge [9]. The resolution for this
predicament comprises the utilization of sensors by the robot to recognize
hurdles and sidestep them, thereby rendering the automaton more self-
governing as it would not necessitate external support Riesen [10]. The
primary objective of designing such a robot or technology is to enable its use
in the fast-paced transportation industry today, reducing the occurrences of
accidents that frequently happen in congested areas by applying an
emergency brake [10]. If this technology were integrated into cars or any other
vehicle, it would automatically sense obstacles and take a route to the
available free space, potentially lowering vehicle accidents in the future [11].
Thus, the advancement of such technology may result in an enhancement in
the overall safety of the transportation sector. The present study concerns the
creation and execution of a smart robot car that avoids obstacles with the aid
of artificial intelligence. This study aims to design a self-driving car that can
recognize and evade obstructions on its path using artificial intelligence
without any external aid. This project demands a combination of technological
expertise and an in-depth understanding of the principles of robotics.
                                                                                                              54
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
2.0      Methodology
This section presents the details of the hardware components and software
implementations employed to formulate and execute the study.
2.1      Hardware Requirements
The phases that involve the physical implementation of the robot are known
as the hardware implementation phases. This set of phases can be broken
down into six distinct components, which include the HC-SR04 Ultrasonic
Sensor, the SG-90 Servo Motor, the Arduino UNO R3, the L298D Motor Driver
IC, the Power Supply, and the Left and Right DC Motors. All these components
have been thoroughly explained in the chart given, along with their respective
electrical diagrams used in the robot's design. Figure 1 shows the block
diagram of the project hardware design. The project hardware consists of
several main components such as ultrasonic sensors that provide the details
of the entire process, facilitating a more thorough comprehension of the
hardware design and development process. The hardware implementation
phases play a crucial role in the development of the robot. It is essential to
ensure that each component is correctly integrated to achieve maximum
efficiency.
                  Ultrasonic                                        Power supply
                   sensor                                             (12 Volts)
                                                                                           DC motor
                                                Arduino                                      (left)
                 Servo motor                      Uno                   L293D               MOTOR
                                                                        Motor
                                                                       driver IC
                                                                                           DC motor
                Power supply
                                                                                            (right)
                                                                                           MOTOR
                 Figure 1: Block diagram of the project hardware design
                                                                                                              55
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
                         Table 1: Description of the main component
 Component                     Description                                               Figure
 HC-SR04               The HC-SR04 ultrasonic
 Ultrasonic            sensor is powered by a 5V
 Sensor; SG-           DC supply with a quiescent
 90 Servo              current of less than 2mA, a
 Motor                 working current of 15mA,
                       and an effective angle of
                       less than 15 degrees. It is
                       capable       of    ranging
                       distances from 2cm to
                       400cm/1" - 13ft with a
                       resolution of 0.3 cm and a
                       measuring angle of 30
                       degrees, while the trigger
                       input pulse width is 10uS.
                       The sensor measures at                         Figure 2: HC-SR04 ultrasonic
                       45mm x 20mm x 15mm.                            sensor and SG-90 servo motor
 L298D                 The L293D is a highly
 Motor                 sophisticated      integrated
 Driver                driver that can deftly
 Shield                manage             enormous
                       amounts of voltage and
                       current.       With      four
                       channels available, this
                       chip is perfect for driving
                       DC motors with a power                          Figure 3: L298D motor driver
                       supply of up to 36 Volts. In                                shield
                       addition, every channel
                       can provide a maximum of
                       600mA, making it an
                       effective and dependable
                       choice     for     regulating
                       motors. This specific chip
                       is additionally categorized
                       as an H-Bridge, which is
                       an electrical circuit that
                       enables a voltage to be
                       applied across a load in
                       either direction to an
                       output (such as a motor).
                       Various         applications
                       benefit from the precise
                       motor control offered by
                       the       versatile      and
                       functional L293D. Overall,
                       this chip is an excellent
                                                                                                              56
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
 Component                     Description                                               Figure
                       option for anyone looking
                       for a reliable and efficient
                       motor driver solution. It is
                       different from the shield in
                       [10].
 Arduino               Arduino Uno Overview
 UNO R3                 – Power
                       The Arduino Uno provides
                       two options for powering,
                       either via USB or through
                       an external supply using
                       the barrel jack connector.
                       The external supply voltage
                       range is limited to 7 to 12
                       DC.
                                                                         Figure 4: Arduino UNO R3
Upon activation of the Key Switch, the circuit will commence operation only if
the switch is in an open position. The ultrasonic technology embedded within
the circuit serves to identify any obstacles or objects in the vicinity, such as
a car or wall. Once an obstacle is detected by the sensor, the vehicle will
immediately come to a halt and manoeuvre backwards slightly. It should be
taken into account that the ultrasonic sensor is solely capable of recognizing
barriers that are under 15 centimetres away. Therefore, it is crucial to exercise
due caution, especially when operating in an area with limited space or
visibility. In conclusion, the incorporation of ultrasonic technology into the
circuit has been demonstrated to be a crucial security feature for the
automobile and its occupants. The schematic circuit for building the project
is shown below.
                                       Figure 5: Schematic circuit
                                                                                                              57
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
2.2 Software Requirements
This particular undertaking encompasses the programming that is
indispensable to govern all Arduino-driven activities and movements. To
render this programming viable for the Arduino, it must be erected and put
forth through the utilization of the Arduino IDE application. This software
application can operate with any microcontroller that is discernible within the
software repository. As such, it provides an expansive range of compatibility
options to facilitate the implementation of the requisite coding. Figure 6 shows
the flowchart of the project system produced.
                    Figure 6: Flowchart of the project system produced
Upon activation, the four motors of the robot initiate their normal operation,
propelling the robot forward. The ultrasonic sensor concurrently calculates
the distance between the robot and any reflective surface that may be in its
path. The Arduino then processes this information. If the robot senses an
obstacle within 20cm, it stops and scans the immediate left and right using
the Servo Motor and Ultrasonic Sensor. In case the left distance is larger than
the right, the robot will ready itself for a left turn. However, before doing so,
the robot will first reverse slightly and then engage the Left Wheel Motor. If
the right distance is less than the left, the robot will prepare to turn right.
                                                                                                              58
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
This cyclical process ensues indefinitely, enabling the robot to move
unimpeded and without colliding with any obstacles.
3.0      Results and Discussion
The outcome of the current research is a robot vehicle that is controlled by an
Arduino and can identify obstructions that could be present in its route and
then avoid them. The robot deploys ultrasonic sensors during its operation to
effectively transmit output ultrasound waves to three distinct positions: the
front position at 90 degrees, the right position at 36 degrees, and the left
position at 144 degrees. When the emitted wave strikes an obstacle, it
bounces back, and the distance is recorded for the forward, right, and left
positions.
The microcontroller evaluates the algorithm results and decides whether it
should proceed or alter its trajectory. The analysis indicates that the proposed
Arduino-controlled robot car is a promising novelty that can be employed in
a wide range of uses. However, the system is notoriously ineffective,
inefficient, and unreliable, and should be avoided for any future development
or improvement. The study's outcomes propose that the proposed technology
has noteworthy consequences for the fields of robotics and automation, and
it can potentially optimize the efficiency and effectiveness of these systems in
the coming years. The assessment conducted on the autonomous system
manifests its proficiency in circumventing obstacles, as well as its adeptness
in avoiding collisions and altering its position.
Tests conducted on the final hardware demonstrated the constraints of the
detection algorithm. The limitations were associated with instances of certain
obstacles failing to be detected. This was due to the sensor's inability to
measure obstacles outside the sensor's measuring range. In instances where
an object impedes the car's movement and is not within the sensor's line of
sight, it will not be detected, resulting in a collision. To address this challenge,
further testing was conducted in an enclosed area where the wall was the only
obstacle, enabling the car to move freely without collision. However, to invent
a vehicle that can identify multiple barriers and evade them, it would be
necessary to use more sensors to cover a broader range of obstacle detection.
The safety and reliability of the car is crucial considerations.
                          Figure 7: The mechanical design prototype
                                                                                                              59
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
The system's accuracy, speed, and reliability are crucial factors to consider in
the testing process. By comparing the results with existing designs or
benchmarks, it is possible to assess the system's capabilities and identify
areas for improvement. The system's performance can be evaluated through
various metrics, such as the number of avoided obstacles and the response
time to detected obstacles.
4.0      Conclusion
The design of an Arduino-based smart car obstacle avoidance system offers a
practical and customizable solution for autonomous vehicles. By utilizing
Arduino's flexibility and open-source nature, particularly for IoT applications
[12], the system can be easily prototyped and adapted to different scenarios.
The system's algorithm, sensor integration, and decision-making process
enable real-time obstacle detection and avoidance, ensuring the safety and
efficiency of the autonomous vehicle. A range of studies have explored the
development of obstacle avoidance systems for autonomous vehicles, with a
focus on enhancing safety and navigation. Mahmud et al. [10] and Goswami
and Sahoo [8] both proved that ultrasonic sensors and the Arduino
microcontroller detect and avoid obstacles, achieving high accuracy rates.
Anand [13] expanded on this by incorporating AI and IoT devices, enabling
the vehicle to detect traffic signals and signs. These studies collectively
demonstrate the potential of Arduino-based smart car obstacle avoidance
systems in improving safety and navigation. This analysis implies that the
current design can accommodate additional functionalities with minimal or
no human intervention. Hence, it is plausible to augment the system's
capabilities to execute diverse tasks, thereby reducing the human workload.
There is a need for further research on Arduino-based smart car obstacle
avoidance systems, especially in the areas of hardware and software design,
sensor technology, and real-time obstacle detection and avoidance. Further
research and improvements can enhance the system's performance and
expand its applications in various industries.
Acknowledgement
The authors would like to acknowledge the support from Politeknik Kuala
Terengganu and the Jabatan Pendidikan Politeknik dan Kolej Komuniti of the
Ministry of Higher Education Malaysia.
Author Contributions
S.N.T.M. Yasin: Abstract, Methodology, Results and Discussion, Editing;
M.A.M. Tahir: Introduction and Conclusion; I. Hussaini: Editing,
Proofreading.
Conflicts of Interest
The manuscript has not been published elsewhere and is not under
consideration by other journals. All authors have approved the review, agree
with its submission, and declare no conflict of interest in the manuscript.
                                                                                                              60
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
References
[1]  K. S. Alli, M. O. Onibonoje, A. S. Oluwole, M. A. Ogunlade, A. C.
     Mmonyi, O. Ayamolowo, and S. O. Dada, “Development of an Arduino-
     based obstacle avoidance robotic system for an unmanned vehicle,”
     ARPN Journal of Engineering and Applied Sciences, vol. 13, no. 3, pp. 1–
     7, 2018.
[2]  R. Mothe, S. T. Reddy, G. Sunil, and C. Sidhardha, “An IoT Based
     Obstacle Avoidance Robot Using Ultrasonic Sensor and Arduino,” IOP
     Conf. Series: Materials Science and Engineering, vol. 981, no. 4, 2020.
[3]  T. S. Gunawan, A. Omar, M. Kartiwi, M. R. Effendi, and N. Ismail,
     “Prototype development of vehicle collision avoidance system using
     Arduino,” in 2021 IEEE 7th International Conference on Smart
     Instrumentation, Measurement and Applications (ICSIMA), Bandung,
     Indonesia, 2021, pp. 70-75.
[4]  R. Vairavan, S. Ajith Kumar, L. Shabin Ashiff, and C. Godwin Jose,
     “Obstacle avoidance robotic vehicle using ultrasonic sensor, Arduino
     controller,” International Research Journal of Engineering and
     Technology, vol. 5, No. 2, pp. 2140-2143, 2018.
[5]  P. Divya, N. Bhavana, and M. George, “Arduino Based Obstacle
     Detecting System,” in International Conference of Advance Research and
     Innovation (ICARI-2020), New Delhi, India, 2020, pp. 231-234.
[6]  H. Shabani, M. R. M. Razif, and M. F. Muhsin, “Smart Car Control
     System Based Arduino Uno for Obstacles Avoidance and Engine
     Temperature Control,” in 2021 IEEE Symposium on Computers &
     Informatics (ISCI), Kuala Lumpur, Malaysia, 2021, pp. 1-6.
[7]  J. Li, H. Bao, X. Han, F. Pan, W. Pan, F. Zhang, and D. Wang, “Real-
     time self-driving car navigation and obstacle avoidance using mobile 3D
     laser scanner and GNSS,” Multimedia Tools and Applications, vol. 76,
     no. 21, pp. 23017-23039, 2017.
[8]  S. S. Goswami and S. K. Sahoo, “Design of a robotic vehicle to avoid
     obstacle using Arduino microcontroller and ultrasonic sensor,” in
     Applied Mathematics, Modelling and Computer Simulation, IOS Press,
     2023, pp. 1002-1010.
[9]  E. Yilmaz, and S. T. Özyer, “Remote and autonomous controlled robotic
     car based on Arduino with real time obstacle detection and avoidance,”
     Universal Journal of Engineering Science, vol. 7, no. 1, pp. 1-7, 2019.
[10] T. Mahmud, I. Ara, R. Chakma, K. Barua, D. Islam, M. S. Hossain, A.
     Barua, K. Andersson, “Design and implementation of an ultrasonic
     sensor-based obstacle avoidance system for Arduino robots,” in 2023
     International Conference on Information and Communication Technology
     for Sustainable Development, Dhaka, Bangladesh, 2023, pp. 264-268.
[11] K. Balakrishna and N. Rajesh, “Design of remote monitored solar
     powered grasscutter robot with obstacle avoidance using IoT,” Global
     Transitions Proceedings, vol. 3, no. 1, pp. 109-113, 2022.
                                                                                                              61
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883
                                      Autonomous Navigation: An Arduino-Based Smart Car Obstacle Avoidance System
[12]     H. Jamaludin, “Designing ESP32 base shield board for IoT application,”
         Politeknik & Kolej Komuniti Journal of Engineering and Technology, vol.
         5, no. 1, pp. 130–137, 2020.
[13]     S. Anand, T. A. Sidharth, P. G. Arjun, R. L. Karthik Ramesh, and V. T.
         Rohith Jain, “A.I. based obstacle avoidance and signal management
         autonomous car with less collision,” in 2022 IEEE North Karnataka
         Subsection Flagship International Conference (NKCon), Vijaypur, India,
         pp. 1-7, 2022.
                                                                                                              62
Politeknik & Kolej Komuniti Journal of Engineering and Technology, Vol. 9, No. 1, 2024
eISSN 0128-2883