Self Driving Car Model Using Raspberry Pi IJERTV9IS020086
Self Driving Car Model Using Raspberry Pi IJERTV9IS020086
Abstract - Self-driving cars are autonomous vehicles that can navigates on its own, avoids obstacles, detects and picks up a
drive by themselves without any human interference and has the different colour balls [2]. A mathematical model is proposed
potential to mark the technological revolution of the next to explore the characteristics of a two-wheel self-balancing
decade. This work presents the development of a low-cost robot and control its behaviour on a planar surface and on an
prototype of a miniature self-driving car model using simple and
easily available technologies. The objective of the work is to
inclined plane [3]. An accident alert system for motor cycles
avoid accidents caused due to driver faults. In this prototype, is proposed which sends out the accident information to
Raspberry Pi controller and H-bridge drives two DC motors to emergency services to initiate rescue operation and save
realize vehicle automation. Technologies such as GPS to access lives. The device includes a small embedded unit mounted at
location, sonar sensors for obstacle detection and avoidance, the safest place of the vehicle and an emergency switch for
image processing for pedestrian detection, computer vision for use during a medical emergency [4]. A lane detection system
processing images and machine learning for intelligent systems based on Raspberry Pi and Arduino controller is proposed
have been deployed. If this car meets with an accident, it is with two subsystems: object detection and image processing.
detected with an accelerometer and an alert message and live Image processing is used for lane detection with the camera
location are sent to the registered mobile number and E-mail of
a contact person using Geocoding through Twilio application.
mounted on the prototype capturing the image and image data
These self-driving cars are proposed as accident-free and on- is extracted to generate the necessary command for the
time urban transportation solution and in military applications. obstacle detection system. This system has a disadvantage of
not detecting lane accurately as the model goes little out of
Keywords—Raspberry Pi, Lane detection, Traffic light lane [5]. A real time traffic sign recognition system is
detection, Convolutional Neural Network, Single Shot Detector,
implemented using traffic sign detection and traffic light
MobileNet, Accident Alert, Accelerometer.
recognition algorithms. While a u-Eye camera is used to
capture images, the system suffers from instability with
I. INTRODUCTION changes in ambient light [6]. An accident detection system is
Road accidents are a global challenge due to which nearly proposed to monitor the vehicle constantly and detect if the
1.25 million people die in road accidents globally every year, vehicle is in normal posture or has fallen down. When the
or on an average 3287 deaths per day and 20-50 million vehicle fall is detected, the body condition or heartbeat rate of
people get injured and disabled for life annually, as reported the driver is checked. If any abnormality is found, the
by World Health Organization (WHO). International Road message is sent to the nearest hospital [7].
Federation (IRF), Geneva report says that India has the In this direction, a prototype of driverless car is developed
highest number of road deaths and ranking first while which senses the ever-changing traffic conditions on road and
accounting for 10% of global road accidents. It is found that takes appropriate decisions for navigation dynamically,
78% of road accidents are due to driver’s fault or human error without any human input.
in driving and it is interesting to address this human issue with
deployment of technology in the form of “Driverless Car”. The remainder of the paper is organized as follows: Section II
presents the design of architecture of self-driving car with its
With rapid advancements in technology, scientists are hardware and software organization. Section III describes the
proposing new ideas to build “self-driving car” in order to subsystems of the self-driving car and their function. While
ensure accident-free transportation. Companies like Google, Section IV presents results and discussion, Section V
Uber and Tesla are leading the global initiative in the design concludes with some pointers to future work.
and manufacture of an autonomous car. This helps in
significant savings in time as we can work even as the car is
driving by itself in city traffic during rush hours to the office. II. DESIGN OF ARCHITECTURE OF SELF-
A CNN based SSD-MobileNet technique is proposed to DRIVING CAR
detect and track the real world objects. This prototype has The block diagram of the self-driving car system is shown
achieved excellent results of detection and tracking of the in Fig. 1.
trained objects with 99% accuracy at 98.2% confidence level,
which helps the robot to avoid accidents [1]. An obstacle
detection and avoidance robot is presented based on Hough
transform algorithm of object detection using Java
programming and controlled by a Microcontroller. The robot
The process flow of the real-time object detection system out a text message - “Accident is detected” and the location to
is shown in the Fig. 5. If the IR sensor mounted on the left the E-mail
detects the object, car should move right and vice versa. The
ultrasonic sensor installed on the front detects and overcomes
small objects and calculates its distance from the object
dynamically. Real-Time Object Detection is implemented on
Raspberry Pi using OpenCV Deep Neural Network (DNN)
and MobileNet-SSD algorithm [1]. The algorithm is
implemented in Python using OpenCV.
1. Data-sets
2. Feeding the image to the network
3. Feature Maps
4. Hard Negative Mining
5. Data Augmentation
6. Non-Maximum Suppression (NMS)
Training datasets and test datasets with ground truth bounding
boxes like Caffe-datasets and assigned class labels are
required for MobileNet-SSD algorithm. To feed image into
the network, the image is converted into a blob, a pre-
processed image that serves as the input. Pre-processing Fig. 6: The process flow of Accident Alert System
techniques like cropping, resizing, and color swapping are
applied. Features maps represent the dominant features of the And phone number of the contact person through Twilio
image at different scales. Therefore, running Multi-Box on messaging application.
multiple feature maps increases the size of any object to be Accelerometer gives values in terms of gravity ‘g’. Voltage at
detected. During training, it is followed to keep a ratio of the midpoint 0 g (Earth gravity) is half of the supply voltage.
negative to positive of around 3:1, instead of using all Accelerometer operates at supply voltage, Vs= 3.3 V; Analog
negative predictions to ensure that the network also needs to voltage value of 0-3.3 V corresponds to 0-1023 in digital
learn what constitutes an incorrect detection. The non- format.
maximum suppression technique is applied to all bounding
boxes and the top predictions are preserved. This ensures that Sensitivity= 330 mV/g.
the most likely predictions of object are retained by the At 0g, Vs = Vs / 2 = 3.3 / 2 = 1.65V ……..….…… (1)
network, while the noisy ones are removed.
The digital value is generated as:
C. Accident Alert System
Digital value = (Analog voltage obtained*Resolution) /3.3
An Accident Alert System is designed and developed to
= 0.5*(1023/3.3) = 155
generate the location information of car when it meets with an
accident like vehicle rollover or head-on collision. The For analog voltage of 1.65 V, digital value is 512.
process flow of Accident Alert System is shown in Fig. 6.
The accelerometer is mounted on top of the self- driving
car to sense tilt in complete 3-axis. Accelerometer is fixed
with a value in all 3- axes. The X-axis value is fixed at 500-
530 for GY-61 ADXL335 accelerometer and its axis gets
disturbed, when the self-driving car experiences accidents due
to street conditions, run-off-road collisions, collisions with
fallen debris, rollovers and collisions with animals. It is
considered as an accident when X-axis value goes beyond
500-530. In that case, the accelerometer sends out analog
voltage value to the IC MCP3008 ADC which converts analog
voltage to corresponding digital number. The controller
receives the digital value and sends out signal to H-bridge to
stop the self- driving car and processes the data to get the live
location of the place of accident using Geocoding and sends
Fig. 7: Prototype of the self-driving car.