Vehicle Autonomous Driving System
Vehicle Autonomous Driving System
The Eurasia Proceedings of Science, Technology, Engineering & Mathematics (EPSTEM), 2024
Shaima Momani
Yarmouk University
Haneen Bani-Salameh
Yarmouk University
Abstract: Autonomous vehicles or self-driving cars industry and technology have played an important role in
research industry and automotive industry. Autonomous cars are those vehicles have the ability to sense there
surrounding and navigate and drive themselves on roads through traffic without human interventions. In other
words, they can move from one location to another one without human interaction. In this paper, an
autonomous vehicle system prototype is proposed. The vehicle is able to sense its surrounding and keep going
on the road on its own through traffic and other barriers such as people and traffic lights. That is, the vehicles
are able to drive and detect the road signals and take decision accordingly, whether to continue or to make a
turn. The proposed system uses raspberry pi microcontroller and ultrasonic sensors to detect any object,
obstacle, or pedestrians in front of the vehicle and to measure the distance. In addition, a raspberry pi camera is
connected to the raspberry pi to continuously take pictures of the road. These pictures will be analyzed by the
raspberry pi microcontroller. The vehicle is able to reach its destination safely. A self-driving car prototype has
been designed and implemented. The porotype autonomous vehicle system was tested and performed as
expected.
Keywords: Self-driving car, Raspberry Pi, Ultrasonic sensor, Signal detection, Raspberry Pi camera
Introduction
As technology is moving fast, manufacturing is also moving toward automation. Vehicle automation in contrast
is in fact changing the conception of industry (Al-Smadi & Msallam, 2022). Autonomous vehicles or self-
driving cars industry and technology have played an important role in research and automotive industry.
Autonomous cars are those cars have the ability to sense there surrounding, navigate, and drive themselves on
roads through traffic without human interventions (Szikora & Madarász, 2017; Pawar et al., 2021). In other
words, autonomous cars are those cars that can move from one location to another without human interaction.
With the number of vehicles rapidly increasing in every country, the number of traffic accidents is increasing on
the roads day by day. Many of these accidents are due to human errors. Some of the common causes of these
accidents are the use of mobile phones while driving, in addition to several in-car entertainment equipment’s.
According to the study (Ondruša et al., 2020), it is expected due to autonomous vehicles that accidents will
decrease to 80% by the year of 2040. The reason of this expectation is because autonomous vehicle would make
it possible to reduce traffic collision and controlling speed limits. Currently, autonomous vehicles are already
implemented in several countries without any human input (Shetty et al., 2019). Tesla Motors Inc.
- This is an Open Access article distributed under the terms of the Creative Commons Attribution-Noncommercial 4.0 Unported License,
permitting all non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
- Selection and peer-review under responsibility of the Organizing Committee of the Conference
© 2024 Published by ISRES Publishing: www.isres.org
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
headquartered in Texas –United States of America successfully manufactured self-driving car, Tesla X in the
year of 2015. Several companies such as Nissan Waymo and Tesla Motors Inc. are involved in manufacturing
self-driving cars (Manikandan et al., 2020).
Banerjee (2020) presented a review survey about the autonomous vehicles. His paper presents a brief
description of the various elements and components that are essential in making up a self-driving car system.
Some of these components are sensors, global positioning system (GPS), image processing units. Thadeshwar et
al. (2020) proposed an autonomous car model that consists of Monocular vision algorithm, CNN, Raspberry Pi,
camera, Arduino, Haar cascade classifier, and an Ultrasonic sensor. The instructions’ commands will reach the
vehicle through the Arduino microcontroller which is connected to the RC vehicle. The car will operate based
on convolutional neural network predictions and some hardware coded commands. Nandhini et al. (2020)
described a self-driving car model using a PIC microcontroller, raspberry pi processor, speed sensor, color
sensor, and ultrasonic sensor. These components were integrated to build an autonomous car. Shirke et al.
(2020) proposed a self-driving car using Arduino uno, raspberry pi, ultrasonic sensors, a dc motor, and a
camera. The prototype model was built with a toy car with two motors. One motor to move the toy car straight
forward and backward, while the second motor is to turn the toy car left or right.
In this paper, a self-driving vehicle model is proposed. The vehicle can sense its surrounding and move on the
road on its own through traffic and other obstacles such as pedestrians and traffic lights. That is, the self-driving
can drive and detect the road signals and take decision accordingly, whether to continue or to make a turn. The
proposed system uses raspberry pi microcontroller and ultrasonic sensors to detect any obstacle, or pedestrians
in front of the vehicle and to calculate the distance. In addition, the raspberry pi camera is connected to the
raspberry pi to continuously take pictures of the road. These pictures will be analyzed by the raspberry pi
microcontroller. The vehicle can reach its destination safely. A self-driving car prototype has been designed and
implemented. The porotype autonomous vehicle system was tested and performed as expected.
Proposed System
As the world population grows, the number of vehicles on the roads are continuously increasing. Hence, the
number of traffic accidents are increasing which result in death and injuries of people. Traffic congestion is
another problem the world will be facing with the increasing number of automobiles which is fuel and time
costly. In this paper, we propose a self-driving car system that is able to sense and drive without any human
intervention. The system includes ultrasonic sensors, raspberry pi, Dc motors, H-Bridge, raspberry pi camera,
and a power supply. The ultrasonic sensors are mainly used to calculate the distance in front of the car, while the
raspberry pi camera selects the correct road and the Dc motor move the car. Figure 1 shows the block diagram
of the proposed module. The main components of the proposed vehicle automated driving system are described
as follows.
409
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
Raspberry Pi 3 Processor
Raspberry pi processor is a small computer board has a size of a credit card developed in 2009 by the raspberry
pi foundation which is registered in England and Wales. The development of the raspberry pi was intended for
teaching basic computer science and its related areas. Currently, there are five types of the raspberry pi available
in the market (Nandhini et al., 2020; Al-Smadi et al., 2023). Raspberry pi microcontroller uses Python language;
hence the name raspberry pi comes from the raspberry fruit and pi for python. The raspberry pi processor has
been widely used to build school projects. It can be used as any desktop computer if it is connected to all
peripherals such as keyboard, mouse, and monitor. Raspberry pi processor is shown in Figure 2.
Raspberry Pi 3 Camera
The Raspberry Pi camera module 2 (v2) has an 8-megapixel image sensor. The camera can take high definition
video in addition to photographs. It can be used online for time-lapse, and slow-motion videos. It is connected to
the camera serial interface (CSI) port on the raspberry pi with a 15 cm ribbon cable. The CSI connectors consist
of two smaller interfaces which establish the communication bus. The first interface transfers data and clock
signals from the camera to the processor in one direction only. The other interface is bidirectional control link
(Upton & Halfacree, 2012).
410
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
Ultrasonic Sensor
An ultrasonic (US) sensor is an electronic sensor that can perform as a transmitter and a receiver. The
transmitter converts electrical signal into ultrasonic wave. It emits ultrasonic wave at frequency of 40K Hz that
travels in the air. The ultrasonic receiver waits for the ultrasonic wave to return after it gets reflected by an
object and converts the sound wave into electrical and sends it back to the sensor. Figure 4 shows HC-SR04
ultrasonic sensor module. This module HC-SR04 is provided with 2cm-400cm measurement with an accuracy
of about 3mm. As the pins of the HC-SR04 sensor indicates, pin 1 (Trigger) is the input pin. Pin 3 (Echo) is the
output pin. The sensor uses the ultrasonic sound wave to measure the distance to the object (Al-Smadi et al.,
2023).
H-Bridge
An H-bridge or a motor driver is an electronic drive circuit consists of transistors that allow the motor to change
its direction as well as its speed. It is called H-bridge because it resembles the letter H. H-bridge circuit can be
easily interfaced to control the DC motor rotation. It is used to drive the motor counterclockwise and clockwise
by switching the polarity of the applied voltage (Al-Smadi et al. 2020). As shown in Figure 5, the H-bridge
driver has four switches that allow controlling the applied source across the load in both directions. These
switches are normally made with MOSTFETs or pnp and npn transistors. The H-bridge makes the motor move
forward and backward by activating two switches together. For example, activating S2 and S3 at the same time
while keeping S1 and S4 open will apply appositive voltage across the motor. On the other hand, activating S 1
and S4 at the same time while keeping S2 and S3 open will reverse the applied voltage across the motor. This
allows reserve rotation of the motor. Figure 6 shows the L298N twin H-bridge motor driver. This device permits
to control speed and direction of two DC motors at the same time.
411
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
Python Language
Python language is a popular dynamic type, object oriented, and high-level programing language. It was
developed by Guido Van Rossum in the 1980s. It is a general-purpose language which may be used for many
applications such as in website developing, machine language, automating repetitive tasks, desktop applications,
and many other fields (Stewart, 2019).
System Implementation
The block diagram of the proposed self-driving car prototype model is shown in Figure 1. The circuit diagram is
presented in Figure 7. The main component of the proposed module is the Raspberry pi microcontroller which is
considered to be the brain of the system. All other components of the system are connected to the raspberry pi.
In the circuit diagram of Figure 7 the ultrasonic sensor connected to the raspberry pi. As the vehicle moves, the
ultrasonic sensor will measure the distance between the front of the vehicle (where the sensor is placed) and any
object on the road. The distance is calculated by measuring the amount of time required to send ultrasonic wave
from the Trig pin of the sensor and waiting for the ultrasonic wave to be received back to the Echo pin of the
sensor. Hence, the distance is
The universal speed of ultrasonic wave is 330 meter/second. The time in Equation (1) is divided by 2 because it
is the time from sending trigger and receiving echo signals. The raspberry pi camera, which is interfaced with
the raspberry pi controller through 15-pin ribbon cable is activated as long as the car is moving to keep the car at
the center of the road. If the distance from the observed object is more than 20 cm, the camera will continuously
take pictures of the road. These pictures will be analyzed by the raspberry pi microcontroller. The first step, the
colors of the pictures will be changed to black and white using library functions imported in the code. The
second step, the contours of the road will be detected by the contour function. There is another function to detect
whether the road is at the center of the picture or not. This function, called the moment function, works by
transforming the pixels into matrix. This matrix contains zeros and ones. The moment function also calculates
the final value of the matrix which is referred to as “cx”. This value is the number of the column with entries of
ones which determines whether the car should veer to the left, to the right, or keep moving straight. It was
determined experimentally that the movements of the car are governed as follows.
412
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
These processes are shown in the flow chart of Figure 8. According to the results, the raspberry pi generates the
necessary signal for the H-bridge driver motor to move in the correct direction at the proper speed. The right
two wheels are connected to one DC motor, while the left two wheels are connected to the second DC motor.
Therefore, when both motors rotate in the same direction, the vehicle will move forward. Table 1 shows the
directions of the motors and the vehicle. In the table, clockwise means positive current, while counterclockwise
negative current. If the distance is less than 20 cm, then the car will stop till the obstacle is removed. The camera
will start processing and veer the car to left or to the right and the process will continue as previously described.
All the components in the block diagram of Figure 1 and the circuit diagram of Figure 7 interact with each
other’s by taking orders from the raspberry pi microcontroller through the python code.
413
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
Conclusion
This paper presented a self-driving vehicle that has the ability to move in the correct path without any human
intervention. The system uses raspberry pi, ultrasonic sensors, and raspberry pi camera. Python language was
used to write the code for the raspberry pi microcontroller. A prototype model for the self-driving vehicle
system was built and tested. It performed as expected.
Acknowledgements or Notes
* This article was presented as oral presentation at the International Conference on Basic Sciences, Engineering
and Technology (www.icbaset.net) held in Alanya/Turkey on May 02-05, 2024.
*The authors would like to thank Yarmouk University, Jordan for financial support to implement this research.
415
International Conference on Basic Sciences, Engineering and Technology (ICBASET), May 02-05, 2024, Alanya/Turkey
References
Al-Smadi, A., Al-Ksasbeh, W., Ababneh, M., & Al-Nsairat, M. (2020). Intelligent automobile collision
avoidance and safety system. 17th IEEE International Multi-Conference on Systems, Signals &
Devices, (pp. 319-322). IEEE.
Al-Smadi, A., & Msallam, M. (2022). Vehicle auto parking system. 9th IEEE International Conference on
Electrical and Electronics Engineering (ICEEE 2022) (pp.108-111). IEEE.
Al-Smadi, A., Al-Qaryouti, T., Rehan, A., Assi, H., and Alsharea, A. (2023). A navigation tool for visually
impaired and blind people. 3rd International Conference on Basic Sciences, Engineering and
Technology (ICBASET), 22, 119-126.
Banerjee, U. (2020). A review on fully autonomous vehicle. International Research Journal of Engineering and
Technology (IRJET), 7(3), 247-253.
Manikandan, T., Jayashwanth, S., Harish, S., & Sivatej, K. (2020). Self-driving car. International Journal of
Psychosocial Rehabilitation, 24(5), 380-388.
Nandhini, N., Rakshana, R., Revathi, L., Swarnamalya, S., & Nagaraj, V. (2020). Autonomous cars using
Raspberry Pi. International Research Journal of Engineering and Technology (IRJET), 7(5), 6340-
6346.
Ondruša, J., Kollab, E., Vertaľb, P., & Šarićc, Ž. (2020). How do autonomous cars work? Transportation
Research Procedia, 44, 226–233.
Pawar, S., Pawar, B., & Yewale, K. (2021). Self-driving car demo using Raspberry Pi. International Research
Journal of Engineering and Technology (IRJET), 8(11), 781-784.
Stewart, A. (2019). Python programming for beginners: A comprehensive guide to learnings the basics of
Python programming. USA:Platinum Press LLC.
Shetty, N., Mohan, K., & Kaushik, K. (2019). Autonomous self-driving car using Raspberry Pi model.
International Journal of Engineering Research & Technology (IJERT), 7(8), 1-3.
Szikora, P., & Madarász, N. (2017). Self-driving cars — The human side. IEEE 14th International Scientific
Conference on Informatics (pp.383-387). IEEE.
Shirke, Y., Gawade, U., Jadhav, K., & Hawre, M. (2020). Implementation of SDC: Self-driving car based on
Raspberry Pi. International Research Journal of Engineering and Technology (IRJET), 7(3), 1640-
1646.
Thadeshwar, H., Shah, V., Jain, M., Chaudhari, R., & Badgujar, V. (2020). Artificial intelligence based self-
driving car. 4th International Conference on Computer, Communication and Signal Processing
(ICCCSP) (pp.1-5). IEEE.
Upton, E., & Halfacree, G. (2012). Raspberry Pi user guide. John Wily and Sons Ltd., West Sussex, United
Kingdom.
Author Information
Adnan Al-Smadi Sara Al - Essa
Yarmouk University Yarmouk University
Irbid-Jordan Irbid-Jordan
Contact e-mail: [email protected]
416