Nothing Special   »   [go: up one dir, main page]

Hassan Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

FINAL YEAR PROJECT REPORT

BS Electrical Engineering Technology


Batch 2019-2023

SMART ROAD SAFETY AND ACCIDENT


PREVENTION SYSTEM FOR MOUNTAIN
ROADS

DEPARTMENT OF ELECTRICAL ENGINEERING TECHNOLOGY


RISE GROUP OF COLLEGE
AFFILIATED WITH
GOVERNMENT COLLEGE UNIVERSITY, FAISALABAD
AUGUST, 2023

i
Submitted by

Hafiz Qamar Zia 358033

Rana Hassan Maqbool 358024

Muhammad Bilal 358020

Shahzad Siddique 358027

Project Supervisor

Name: _________Engr. Muhammad Waseem_______

Signature: _______________________________

DEPARTMENT OF ELECTRICAL ENGINEERING TECHNOLOGY


RISE GROUP OF COLLEGE
AFFILIATED WITH
GOVERNMENT COLLEGE UNIVERSITY, FAISALABAD
AUGUST, 2023

ii
DECLARATION
We certify that this Final Year Project Titled “Smart Road Safety and Accident Prevention System
for Mountain Roads” is our own project. The project has not been presented elsewhere for
assessment. The material that has been used from other sources has been properly acknowledged
/ referred.

Name: ___ Hafiz Qamar Zia ______ Roll No.: _358033_ Signature: _________

Name: ___ Rana Hassan Maqbool__ Roll No.: _358024_ Signature: _________

Name: ____Muhammad Bilal______ Roll No.: _358020_ Signature: _________

Name: ____Shahzad Siddique____ Roll No.: _358027_ Signature: _________

iii
COPYRIGHT STATEMENT
 Copyright in text of this Report rests with the student author. Copies (by any process) either
in full, or of extracts, may be made only in accordance with instructions given by the author
and lodged in the library of Department of Electrical Engineering Technology. Details may
be obtained by the librarian. This page must form part of any such copies made. Further
copies (by any process) may not be made without the permission (in writing) of the author.

 The ownership of any intellectual property rights which may be described in this report is
vested in Department of Electrical Engineering Technology, Government College
University Faisalabad, subject to any prior agreement to the contrary, and may not be made
available for use by third parties without the written permission of the Department of
Electrical Engineering Technology, which will prescribe the terms and conditions of any
such agreement.

iv
ACKNOWLEDGEMENTS
We are thankful to our creator Allah Almighty to have guided us throughout this work at every
step and for every new thought which He had setup in our minds to improve it. Indeed, we could
have done nothing without His priceless help and guidance. Whosoever helped us throughout the
course of our project, whether our parents or any other individual was His will, so indeed none be
worthy of praise but Allah.

We are profusely thankful to our beloved parents who raised us when we were not capable of
walking and continued to support us throughout in every department of our life. We would also
like to express special thanks to our supervisor for his help throughout our Final Year Project.

We would also like to pay special thanks to Engr. Muhammad Waseem for his/their tremendous
support and cooperation. Each time we got stuck in something, he came up with the solution.
Without his/their help we wouldn’t have been able to complete our Final Year Project. We
appreciate his patience and guidance throughout the whole project.

Finally, I would like to express my gratitude to all the individuals who have rendered valuable
assistance to my study.

v
ABSTRACT
Growth in population has led to growth in technology. People use car on large number and number
of accidents taking place, is increasing day-by-day. Road accidents are undoubtedly the most
frequent happening cases and overall, the cause of the most damage. There are many dangerous
roads in the world like mountain roads, narrow curve roads, T roads. Some mountain roads are
very narrow and they have many curves. The problems in these curve roads is that the drivers are
not able to see the vehicle or obstacles coming from another end of the curve. If the vehicle is in
great speed then it is difficult to control and there are chances of falling off a cliff. Hence there is
a need of many road safety systems. To avoid these problems in curve roads of mountain areas,
we have proposed this vehicle accident prevention system. This accident prevention system using
sensors is powered by Arduino-Uno board, it consists of IR sensors, LED lights, LCD display and
buzzer. When two cars pass from the opposite side of a mountain curve the IR sensor senses the
car and LED color changes to red and raises the buzzer giving signal of danger and then it changes
one LED color into green to allow the one car to pass and then the other LED color turns green. In
this way we can prevent the accidents of curved road.

Keywords: Arduino Uno, Sensors, Curved roads, IR sensors

vi
Table of Contents
DECLARATION ....................................................................................................................................................... iii

COPYRIGHT STATEMENT....................................................................................................................................iv

ACKNOWLEDGEMENTS ........................................................................................................................................v

ABSTRACT ................................................................................................................................................................vi

Table of Contents ...................................................................................................................................................... vii

List of Figures .............................................................................................................................................................ix

List of Tables ................................................................................................................................................................x

List of Abbreviations ..................................................................................................................................................xi

CHAPTER 1: INTRODUCTION...............................................................................................................................1

1.1 Introduction ..................................................................................................................................................1

1.2 Literature Review .........................................................................................................................................1

1.3 Proposed Idea ...............................................................................................................................................3

1.3.1 Working Features .....................................................................................................................................4

1.3.2 Architecture of System ............................................................................................................................4

1.3.3 Observation ..............................................................................................................................................4

1.4 Objective ......................................................................................................................................................5

CHAPTER 2: PROJECT METHODOLOGY ..........................................................................................................6

2.1 Proposed Model ...........................................................................................................................................6

2.1.1 System Components ................................................................................................................................6

2.1.2 System Operation .....................................................................................................................................6

2.1.3 Control Techniques ..................................................................................................................................7

2.2 Hardware ......................................................................................................................................................9

2.2.1 Power Supply ......................................................................................................................................... 10

2.2.2 Ultrasonic Sensor (HC-SR04)................................................................................................................ 11

2.2.2.1 Specifications ................................................................................................................................ 11

2.2.2.2 HC-SR04 Ultrasonic Sensor Pinout .............................................................................................. 12

2.2.2.3 Wiring an HC-SR04 Sensor to an Arduino ................................................................................... 13

............................................................................................................................................................................. 13

vii
2.2.3 Arduino UNO ........................................................................................................................................ 13

2.2.3.1 Pin Description.............................................................................................................................. 14

2.2.3.2 Features and Specification ............................................................................................................ 16

2.2.3.3 Working Principle of Arduino Uno ............................................................................................... 16

2.2.4 Transistor (BD 136) ............................................................................................................................... 17

2.2.4.1 Features ......................................................................................................................................... 17

2.2.4.2 Brief Description on BD136 Transistor ........................................................................................ 17

2.2.4.3 Applications .................................................................................................................................. 18

2.2.5 Voltage Regulator (LM7805) ................................................................................................................ 18

2.2.5.1 7805 Voltage Regulator IC Specifications .................................................................................... 18

2.2.5.2 LM7805 Voltage Regulator Pinout ............................................................................................... 19

2.2.5.3 IC 7805 Voltage Regulator Applications ...................................................................................... 20

2.2.6 Warning System..................................................................................................................................... 21

2.3 Software ..................................................................................................................................................... 21

CHAPTER 3: COMMERCIALIZATION .............................................................................................................. 22

3.1 End Product ................................................................................................................................................ 22

3.2 Marketability .............................................................................................................................................. 23

3.3 Future Scope .............................................................................................................................................. 24

REFERENCES .......................................................................................................................................................... 25

APPENDIX A............................................................................................................................................................. 26

viii
List of Figures
Figure_ 1 Schematic diagram of Accident prevention system ......................................................................................7
Figure_ 2 Flow Chart ....................................................................................................................................................8
Figure_ 3 Circuit Diagram .......................................................................................................................................... 10
Figure_ 4 Power Supply Circuit Diagram................................................................................................................... 10
Figure_ 5 Ultrasonic Sensor ....................................................................................................................................... 11
Figure_ 6 Ultrasonic Sensor Pin out Diagram ............................................................................................................ 12
Figure_ 7 Ultrasonic Sensor with Arduino ................................................................................................................. 13
Figure_ 8 Arduino Uno ............................................................................................................................................... 14
Figure_ 9 Arduino Pin out Diagram ........................................................................................................................... 15
Figure_ 10 Transistor BD 136 .................................................................................................................................... 18
Figure_ 11 Beep Buzzer ............................................................................................................................................. 21
Figure_ 12 Hardware Diagram ................................................................................................................................... 22

ix
List of Tables
Table 1 Different conditions of accident prevention system .........................................................................................7
Table 2 LM 7805 Pin Specifications ........................................................................................................................... 19

x
List of Abbreviations

FYP Final Year Project


GSM Global System for Mobile communication
GPS Global Positioning System
LCD Liquid-Crystal Display
LED Light Emitting Diode
IDE Integrated Development Environment

xi
CHAPTER 1: INTRODUCTION

1.1 Introduction
We all are living in 21st century now and the population growth is increasing in a sharper rate. As
the population is increasing day by day the chances of accident occurring is also increasing.
Prevention of this meeting accidents are of great concern today. Every year 100s of deaths occur
on mountain roads, many even fall off the cliff and there is no trace of such people some-times.
The main cause of all these accidents are negligence, negotiation of safety measures etc. To avoid
these problems in curve roads of mountain areas. Not only accidents are a common occurrence for
such places but also many vehicles even fall off the mountain with no trace of driver for days. This
causes loss of human life and also loss in property. As technology is getting advanced in a greater
speed safety measures also being modified but still accidents are still happening. Earlier various
steps were taken to prevent those accidents but still accidents were occurring at a higher rate. GPS
(Global Positioning System) and GSM (Global System for Mobile communication) were
introduced but both of these were useful after accidents had happened as GPS is used to give
information regarding the location and GSM is useful for sending messages from the users mobile
to indicate the authority that accident happened. GPS and GSM are used for indicating that
accidents occurred but our proposed model is an exception to all this as it prevents the accident
from occurring and thus saving lives. Our proposed model is an indication system that indicates
accident may occur so that we can take necessary measures to avoid these accidents. Thus this is
a one step towards lifesaving and it’s also on we humans how we take care of our own safety as
safety comes along with us.
In the developing country accidents are the major causes of death. In the mountain road there are
tight curve and narrow road. In this situation drivers are not able to see the vehicle coming from
opposite side. Thousands of people lost their lives because of this problem. The problem at
mountain road is also occurred by falling of mountains, trees and the big rock. This system is used
to save the life of many peoples.

1.2 Literature Review


There are many existing plans towards safety against road accidents like due to advanced
technology GSM and GPS were introduced so that they are helpful in tracking the vehicles that

1
met with an accident but they are not preventive for avoiding the accidents. Arduino based vehicle
accident detection system was proposed as an approach towards avoiding road accidents. In this
proposed model Arduino, GSM, GPS, LCD, vibration sensors were used. In this system vibration
sensor is used as an input source to system which is analyzed by the Arduino and when the sensor
reading exceeds the normal or threshold appropriate action starts taking place as it will direct the
GSM to send messages from the user mobile to the authority as they can send immediate help to
the accident victims.
We are keeping ultrasonic sensor in one side of the road before the curve and keeping a LED light
after the curve. Ultrasonic sensor which is also called as obstacle sensor sends signal as pulse from
trigger. If vehicle is present signal will hit the vehicle and it is received by the sensor. At that time
light will glow at the other side of the curve. In the absence of the vehicle the signal will not be
received by the sensor and the light will not glow. As soon as the light glows driver can slow down
his vehicle and he could even stop it if it’s necessary. This sensor based light system can be
applicable when the driver cannot see the vehicle coming from other end of the road. Using this
idea we can make all the mountain roads and curve roads safer from accidents and can save
thousands of lives. The purpose of this paper is to decrease the number of accidents in curve roads
[1]. The use of GPS adds to the advantage of the system being cost-effective, portable and detecting
the accurate location [2]. They proposed that measures of the driver’s eyes are capable to detect
drowsiness under simulator or experiment conditions. The performance of the latest eye tracking
based in vehicle fatigue prediction measures are evaluated. These measures are assessed
statistically and by a classification method based on a large dataset of 90 hours of real road drives.
The results show that eye-tracking drowsiness detection works well for some drivers as long as
the blinks detection works properly. Even with some proposed improvements, however, there are
still problems with bad light conditions and for persons wearing glasses. As a summary, the
camera-based sleepiness measures provide a valuable contribution for a drowsiness reference, but
are not reliable enough to be the only reference [3]. They proposed that to reduce the amount of
such fatalities, a module for an advanced driver assistance system, which caters for automatic
driver drowsiness detection and also driver distraction, is presented. Artificial intelligence
algorithms are used to process the visual information in order to locate, track and analyze both the
driver’s face and eyes to compute the drowsiness and distraction indexes. This real-time system
works during nocturnal conditions as a result of a near-infrared lighting system. Finally, examples

2
of different driver images taken in a real vehicle at night time are shown to validate the proposed
algorithms [4]. Accident prevention in U-turn, S-turn, hilly Ghats and mountain roads using
modern sensor technology, Which uses Arduino UNO, Ultrasonic sensor, RF module LED etc.It
is the one having possibilities to reduce the accidents in U-turn, S-turn, hilly Ghats and mountain
roads as the system is outside the vehicle. Moreover this technology covers all kind of vehicles
New version and Old version cars [5].The proposed system in [6] aims at reducing the loss of lives
due to traffic accidents and performs three main tasks – detecting an accident and sending the
location to the nearest hospital, controlling traffic light signals in the route taken by the ambulance
[7][8] and monitoring vital parameters of the patient inside the ambulance itself and sending this
information to the hospital.
This approach was made by accident control system using ultrasonic sensor. Ultrasonic sensors
were used along with controller and Arduino to prevent the accident from occurring. Buzzers and
lamps are placed on both the side of the roads along with controller and ultrasonic sensors. The
ultrasonic sensors senses from where the vehicles are coming and accordingly the controller sends
signals and accordingly buzzers will ring and the lamps will glow to indicate that vehicles are
coming from the other sides and thus saving the vehicles from meeting with an accident. Various
measures were also taken by the government to reduce the chances of accidents on the turnings by
providing glasses so that vehicles coming from the other sides are aware of coming vehicles.

1.3 Proposed Idea


The mountain roads have numerous turns and blind spots. These spots are so dangerous at times
that they cause accidents if not maneuvered properly. Our system is such a system which will be
beneficial in roads like these and will also reduce the number of accidents that occur often. Here
we are considering hairpin curves where the driver of a vehicle has no idea whether there is any
other vehicle coming from the other side or not. Thus, our system when fixed at these dangerous
curves will have proximity sensors, signals (RGB LED) and a counter, to aid the drivers. The
proximity sensor senses the vehicles, and the counter keeps the count of vehicles present in that
particular turn, coming from a particular direction. Based on the data of the counter, the signal will
change its color. In this project, we proposed a vehicle accident prevention system which will alert
the drivers on both sides of the blind spot on mountainous roads about the oncoming traffic from
the other side. It would change colors and alert the drivers with the help of LEDs. Our project

3
proposes a system which would be installed on mountain roads and will use sensors to detect
vehicles. It would also be a major safety booster for mountain roads.

1.3.1 Working Features

This accident prevention system using sensors is powered by Arduino board, it consists of IR
sensors, LED lights, and buzzer. When two cars pass from the opposite side of a mountain curve
the IR sensor senses the car and LED color changes to red and raises the buzzer giving signal of
danger and then it changes one LED color into green to allow the one car to pass and then the other
LED color turns green. In this way we can prevent the accidents of curved road.

1.3.2 Architecture of System

In this system there will be warning lights which are LED’s shown in architecture installed on side
of mountain roads specifically on blind spots .There will be sensors on the both side of roads that
will track the oncoming vehicle from both the sides. The lights will change colors according to the
vehicles coming and the distance between two vehicles. If the light is red that means there is a
vehicle coming from the opposite side and it is very close. Similarly if the light is green it would
mean vehicle coming from the opposite side has passed and it is safe to go ahead. LED decisions
will be taken on software coding using Arduino IDE tool which is open source software.

1.3.3 Observation

This vehicle accident prevention system was developed so that any person on the road can realize
that someone is coming from the other side or not. It consists of modern sensors, LEDs, buzzers
etc. which provide a modern solution for the safety of such roads. The system after being installed
on the curved section of the mountain road with the LEDs, sensors, buzzer etc. When a car came
close on the curved road, the sensors sensed the vehicle and the LED turned RED and the buzzer
gave a sound to alert the driver, also it was noticed that when there was no vehicle on the road, the
LED remained GREEN. This basically provides useful information to the driver that incase the
LED is red he should understand that some vehicle is coming from the other side of the road and
he should be alert and slow down, and if the LED is GREEN then there is nothing to be worried
about as there is no vehicle coming from the opposite side. It was also observed that nothing of
this sort was available before this, there was hardly any measure to ensure safety on mountain
roads, government relied mostly on warning signs and awareness campaigns but it required

4
modern technological solution for this problem, this system is new and unique and will massively
ensure the safety of drivers on mountain roads.

1.4 Objective
The objectives of this project are to:
 Avoid accidents
 Save lives
 Save money
 Save government resources
 Smooth and comfortable drive/journey

5
CHAPTER 2: PROJECT METHODOLOGY

2.1 Proposed Model


In our project, ultrasonic sensors are used to detect whether a vehicle is coming from one side of
the road or the other by calculating distance. If the vehicle is coming from the wrong side, the
system sends a RED signal to the opposite side of the road. If the vehicle side is safe, the system
displays a yellow LED on the opposite side of the road. Green LED is normally and safely used
for safety indication, indicating that no vehicles are passing or that vehicles have passed securely.
For generating power we have used solar panels. The generated output is stored in the battery and
used for our system and street light also. Street light is intensity based as dark intensity detects
system makes street light ON with that intensity.

2.1.1 System Components

1. IR Sensors - The system will use IR sensors to detect the presence of oncoming vehicles
on mountain roads. The sensors will be placed at strategic locations along the road, and
will communicate with a central control unit.
2. Control Unit - The control unit will receive data from the IR sensors and use algorithms to
analyze the incoming data. When a vehicle is detected, the control unit will trigger an alert.
3. Alert System - The alert system will notify drivers of oncoming vehicles by flashing lights
and emitting an audible alarm. The alert system will be installed at various locations along
the road, providing ample warning to drivers.

2.1.2 System Operation

1. IR Sensors will be placed at strategic locations along mountain roads, and they will detect
the presence of oncoming vehicles.
2. The sensors will send data to the control unit, which will analyze the incoming data.
3. If the control unit detects an oncoming vehicle, it will trigger an alert system. The alert
system will then notify drivers of the oncoming vehicle by flashing lights and emitting an
audible alarm.

6
2.1.3 Control Techniques

Control strategy includes the interference of Hardware and Software. The different colors of Led
are being used on the both side of road as shown in fig. When the Vehicle is coming from A to B
and No vehicle in coming from B to A then the signal for the driver coming from side A is Green.
The same rule is used for vice versa. Considering the case when cars are coming from both the
sides and Car coming from side A has already entered/ crossed the line then the signal for the car
coming from other side will become Red. In this fashion this project provides a better way to
reduce the chances of accident. In addition, we can also include a buzzer in synchronism with the
Led for improving the quality of output.

Figure_ 1 Schematic diagram of Accident prevention system

Table 1 Different conditions of accident prevention system

7
It involves the physical setup of the model. There are two infrared sensors kept at a particular
distance. The two sensors are used because the intention to show that vehicle is at safe distance
means far from the curve but which ensures the vehicle is coming. This can be done by glowing
the green LED light and when the vehicle approaches very near the curve then it will glow red
LED light, by this one can alert at the other side .Which helps to avoid the accident. Conclusion
The purpose of this project is to decrease the number of accidents occurring on hilly and curved
roads. This is done by keeping an ir sensor in one side of the road before the curve and keeping a
LED light after the curve, so that if vehicle comes from one end of the curve sensor senses and
LED light glows at the opposite side. By this we can save thousands of lives including animals.

The flow chart of this project is given below;

Figure_ 2 Flow Chart

8
2.2 Hardware
It uses two IR sensors, which are placed on either side of the turn. One sensor ir1 is installed by
the side of the uphill section of the road, similarly one sensor ir2 is installed by the side of the
downhill section of the road. The sensors are connected to Arduino Uno through wires. Based on
the output of sensors, position of vehicles on either side of the bend is detected which is provided
as an input to the Arduino Uno IR sensor has pins +5V VCC, GND, IR emitter led and IR receiver
led. IR sensor sends the signal in the form of pulses from emitter led. When this signal hit the
object it will get reflected back and is received by the echo receiver led. From echo the signal is
sent to microcontroller Arduino UNO. Microcontroller Arduino UNO processes this data and
operates the LED which is connected to output pin of the microcontroller Arduino UNO. LED is
operated according to the command i.e. LED will glow if the signal is reflected back. In the absence
of the object the signal will not reflect back. Hence the LED will not glow.

This project contains the following components;


 Arduino Uno & IR Sensor
 Buzzer & LED’s
 Resistors, Capacitors & Transistors
 Cables and Connectors
 Diodes
 PCB
 Power Supply/Adapter
 7805 Voltage regulator IC
 Push Buttons
 Switch

9
The circuit diagram of this project is given below;

Figure_ 3 Circuit Diagram

2.2.1 Power Supply

In order to use the 220V AC supply as 5V DC supply, voltage step down transformer and a rectifier
circuit are used shown in figure below. In this circuitry, a step-down transformer is used to convert
220V AC to 9V AC. This 9V AC is then transformed into 9V DC by a full bridge rectifier circuit.
The DC produced in the output of the full bridge rectifier has a significant amount of ripples and
in order to reduce it, a smoothing capacitor is used in parallel. Finally this 9V DC is transformed
into 5V DC by the used of 7805 regulator IC.

Figure_ 4 Power Supply Circuit Diagram

10
2.2.2 Ultrasonic Sensor (HC-SR04)

This is the HC-SR04 ultrasonic distance sensor. This economical sensor provides 2cm to 400cm
of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm. Each
HC-SR04 module includes an ultrasonic transmitter, a receiver and a control circuit.

There are only four pins that you need to worry about on the HC-SR04: VCC (Power), Trig
(Trigger), Echo (Receive), and GND (Ground). You will find this sensor very easy to set up and
use for your next range-finding project. This sensor has additional control circuitry that can prevent
inconsistent "bouncy" data depending on the application.

Figure_ 5 Ultrasonic Sensor

This sensor provides excellent non-contact range detection between 2 cm to 400 cm (~13 feet)
with an accuracy of 3 mm. Since it operates on 5 volts, it can be connected directly to an Arduino
or any other 5V logic microcontroller.

2.2.2.1 Specifications

Operating Voltage DC 5V

Operating Current 15mA

Operating Frequency 40KHz

Max Range 4m

Min Range 2cm

11
Ranging Accuracy 3mm

Measuring Angle 15 degree

Trigger Input Signal 10µS TTL pulse

Dimension 45 x 20 x 15mm

2.2.2.2 HC-SR04 Ultrasonic Sensor Pinout

VCC supplies power to the HC-SR04 ultrasonic sensor. You can connect it to the 5V output from
your Arduino.

Trig (Trigger) pin is used to trigger ultrasonic sound pulses. By setting this pin to HIGH for 10µs,
the sensor initiates an ultrasonic burst.

Echo pin goes high when the ultrasonic burst is transmitted and remains high until the sensor
receives an echo, after which it goes low. By measuring the time the Echo pin stays high, the
distance can be calculated.

Figure_ 6 Ultrasonic Sensor Pin out Diagram

12
2.2.2.3 Wiring an HC-SR04 Sensor to an Arduino

Connecting the HC-SR04 to Arduino is very easy. Start by placing the sensor on your breadboard.
Connect the VCC pin to the 5V pin on the Arduino and the GND pin to the ground pin. Now
connect the trig and echo pins to digital pins #9 and #10 respectively.

Figure_ 7 Ultrasonic Sensor with Arduino

2.2.3 Arduino UNO

Arduino Uno Arduino is a single-board microcontroller, which is used to make the application
more accessible which are interactive objects and its surroundings. The Arduino Uno
Microcontroller is prepared based on the ATmega328. There are 14 digital input and output pins
in it. It also has six analog inputs, a Universal Serial Bus (USB) connection jack, a power jack,
and in Circuit Serial Programming Header (ICSP), and a reset button. The microcontroller has all
the elements to support it properly. The microcontroller can be powered by a battery or by an USB
or an AC-DC adapter. Arduino Uno is programmed by Arduino software. Arduino Uno is the

13
controller of our project. This microcontroller can operate between 6 volts DC to 20 volts DC,
however if it is supplied by less than 7 volts then the 5volts pin may not supply 5volts and the
board may malfunction. Therefore, it is better to use more than 7 volts and less than 20 volts. The
necessary power can be supplied by an external power supply like a battery or an AC to DC adapter
or it can be supplied via a USB cable or any kind of voltage regulator that can provide the required
voltage. The pin diagram and features and specification of Arduino is discussing below.

Figure_ 8 Arduino Uno

2.2.3.1 Pin Description

Arduino Uno has 14 pins that can be used as an input/output pin. Each of the pins have an internal
pull-up resistor that is of 20 to 50 kΩ. Each of them operate at 5V and can supply or consume a
maximum of 40 mA. The details of the pins are given below.

a. The Uno has six analog input pins, which are labeled as A0 to A5 and provide with 10 bits
of resolution.

14
b. Among the 14 pins of input/output, pin 0 is used for receiving and pin 1 is used for
transmitting purpose of the data. They are connected to the corresponding pins of the
ATmega8 USB to TTL chip.
c. Pin 2 and 3 are used to start up an interrupt in case there is a low value, change in value or
rising and falling edge.

Figure_ 9 Arduino Pin out Diagram

d. Also pin 3, 4, 5, 6, 9, 10, 11 are used for 8 bit pulse width modulation (PWM).
e. Pin 10, 11, 12 and 13 provide the serial peripheral interface (SPI) communication with the
help of SPI library. A LED is connected to the pin 13. When the pin 13 is HIGH, the LED
is on and when the pin is LOW, the LED is off. Using the wire library A4 (SDA) or A5
(SCL) pin support the two wire interface (TWI) communication.

15
f. There are few more pins and one of them is an AREF pin which works as a reference
voltage for the analog inputs.
g. By default, the voltage varies from 0V to 5V but the upper end value can be changed using
this pin along with analog Reference () function.
h. There is also a RESET pin which if brought down resets the microcontroller.

2.2.3.2 Features and Specification

The CPU type of Arduino Uno is 8-bit AVR. It generally performs at 20 MIPS at 20 MHz
frequency. Its EPROM (Appendix A) is 1-kilo byte (kB), SRAM (Appendix A) is 2 kB and the
flash memory is of 32 kB. There are 16 channels and 28-pin PDIP, MLF, 32-pin TQFP, MLF.
There is a maximum of 26 input/output pins. The maximum frequency for this is 20 MHz. There
are two external interrupts.

2.2.3.3 Working Principle of Arduino Uno

Arduino Uno is a microcontroller board and it is based on ATmega328 chip that is easily available.
Microcontroller acts as the brain of the Arduino and send/receive information or command from
the device that is connected to the Arduino. The Arduino Uno board can be programmed with the
Arduino software. Arduino Uno have many features that include PWM pins, external and internal
interrupts, timers etc. As shown in figure 1.1, the Arduino Uno board has an USB interface and it
can be plugged-in in any USB port at any place thus making it easier to connect the Arduino with
modern day devices at any place. The clock speed for this device is 16 MHz, which makes its
application very fast, and to save the code it has 32 KB of memory allocation. In addition, it is
good for troubleshooting and debugging and as for power control; it has a voltage regulator already
built inside it. It can be externally supplied up to 12V, the voltage regulator will regulate it to 5V,
and 3.3V or it can be directly connected to any USB port without connecting it to any external
power supply. There is a pin that take on external power supply and two other pins for 5V and
3.3V power and also there are ground pins. There is an ICSP connector that is used to bypass the
USB port. Other than that, it also interfaces the Arduino as a serial device and act as a re-bootloader
for chips that get damaged. A bootloader is a programmer that programs the microcontroller and
installs new firmware without needing an external programmer. It has a few RESET buttons that
reset the Arduino microcontroller and make it easier to carry out different operations. We can see

16
that it has 14 digital pins and six analog pins form figure 1.1 and sensors or other electronic devices
can be connected to the corresponding pins directly. Arduino Uno microcontroller has the potential
to sense the environmental status after it receives data from various sensors. It has the ability to
influence its surroundings by controlling lights, motor etc.

2.2.4 Transistor (BD 136)

2.2.4.1 Features

 Plastic casing PNP Transistor


 High DC Current Gain (hFE), typically 80 when IC=10mA
 Continuous Collector current (IC) is 1.5A
 Collector-Emitter voltage (VCE) is 45 V
 Collector-Base voltage (VCB) is 45V
 Emitter Base Breakdown Voltage (VBE) is 5V
 DC current gain (hfe) is 40 to 250
 Available in To-225 package

2.2.4.2 Brief Description on BD136 Transistor

BD136 is a PNP transistor hence the collector and emitter will be closed (Forward biased) when
the base pin is held at ground and will be opened (Reverse biased) when a signal is provided to
base pin. This is where a PNP transistor differs from a NPN transistor, if you are looking for an
equivalent NPN type check out BD135 transistor.

BD136 has a gain value of 40 to 250, this value determines the amplification capacity of the
transistor. The maximum amount of current that could flow through the Collector pin is 1.5A,
hence we cannot connect loads that consume more than 1.5A using this transistor. To bias a
transistor we have to supply current to base pin, this current (IB) should be limited to 5mA and
voltage across the base emitter pin should be 5V.

When this transistor is fully biased then it can allow a maximum of 1.5A to flow across the
collector and emitter. This stage is called Saturation Region and the typical voltage allowed across
the Collector-Emitter (VCE) or Base-Emitter (VBE) could be 45V and 45V respectively. When

17
base current is removed the transistor becomes fully off, this stage is called as the Cut-off Region
and the Base Emitter voltage could be around 500 mV.

Figure_ 10 Transistor BD 136

2.2.4.3 Applications

 Switching circuits

 Amplification circuits

 Audio amplifiers

 Load driver circuits

2.2.5 Voltage Regulator (LM7805)

Voltage sources in a circuit may have fluctuations resulting in not providing fixed voltage outputs.
A voltage regulator IC maintains the output voltage at a constant value. 7805 Voltage Regulator,
a member of the 78xx series of fixed linear voltage regulators used to maintain such fluctuations,
is a popular voltage regulator integrated circuit (IC).

The xx in 78xx indicates the output voltage it provides. 7805 IC provides +5 volts regulated power
supply with provisions to add a heat sink.

2.2.5.1 7805 Voltage Regulator IC Specifications

 Minimum Input voltage is 7V

 Maximum Input Voltage is 35V

18
 Current rating Ic = 1A

 Maximum Output Voltage VMax=5.2V

 Minimum Output Voltage VMin=4.8V

2.2.5.2 LM7805 Voltage Regulator Pinout

Below you can see the 7805 Voltage Regulator Pin Diagram.

Table 2 LM 7805 Pin Specifications

Pin No. Pin Function Description

In this pin of the IC positive


1 INPUT Input voltage (7V-35V) unregulated voltage is given in the
regulation.

In this pin where the ground is


2 GROUND Ground (0V) given. This pin is neutral for equally
the input and output.

19
The output of the regulated 5V is
Regulated output; 5V (4.8V-
3 OUTPUT taken out at this pin of the IC
5.2V)
regulator.

As you may have noticed, there is a significant difference between the input voltage & the output
voltage of the voltage regulator. This difference between the input and output voltage is released
as heat. The greater the difference between the input and output voltage, more the heat is generated.

If the regulator does not have a heat sink to dissipate this heat, it can get destroyed and malfunction.
Hence, it is advisable to limit the voltage to a maximum of 2-3 volts above the output voltage.

So, we now have 2 options. Either design your circuit so that the input voltage going into the
regulator is limited to 2-3 volts above the output regulated voltage or place an appropriate heatsink,
that can efficiently dissipate heat.

2.2.5.3 IC 7805 Voltage Regulator Applications

7805 IC is used in a wide range of circuits. The major ones are:

 Fixed-Output Regulator

 Positive voltage Regulator in Negative voltage Configuration

 Adjustable Output Regulator

 Current Regulator

 Adjustable DC Voltage Regulator

 Regulated Dual-Supply

 Output Polarity-Reversal-Protection Circuit

 Reverse bias projection Circuit

20
2.2.6 Warning System

The warning system consists of a red light and a beep buzzer that warn the driver of any danger
on the road. The warning system is triggered by the Arduino Uno when a vehicle is detected on
the road. The red light flashes to alert the driver, and the beep buzzer sounds to grab the driver's
attention. The warning system is designed to be easily visible and audible to the driver, even in
adverse weather conditions.

Figure_ 11 Beep Buzzer

2.3 Software
The software design consists of programming the microcontroller which is programmed by
Arduino 1.8.5 IDE tool which is open source software Programming can be done by using either
embedded C or C++ depending on programmer choice. First step is to initialize the trigger pin and
echo pin as input and output pin and connect LED pin to the output. Then send pulse through
trigger pin and then receive it through echo pin. Then received value should be converted into
distance. Time delay should be set to 30 if the distance is in range, else no actions should be taken
and this process is continued. Next process is to check if time delay is zero if it satisfies the
condition then LED will be turned off and if it does not satisfy the condition then turn on LED and
decrease the value of time delay by one. Code is attached in Appendix A.

21
CHAPTER 3: COMMERCIALIZATION

3.1 End Product


We have used Microcontroller (Arduino UNO), LED light and ultrasonic sensor. The function of
ultrasonic sensor which include sending and receiving of signal is similar as that of bat. Ultrasonic
sensor has 4 pins. They are +5V VCC, GND, Trig pin and Echo pin. Trigger pin acts as output pin
and Echo pin acts as input pin. Ultrasonic sensor sends the signal in the form of pulses from trigger
pin and is received by the echo pin and then signal is sent to Arduino UNO. Microcontroller
Arduino UNO processes this data and operates the LED according to programming which is
connected to output pin of the microcontroller Arduino UNO. LED is operated according to the
command i.e. LED will glow if the signal is reflected back. In the absence of the object the signal
will not reflect back. Hence the LED will not glow. The simple block diagram is shown in the
figure 1. The trig pin of ultrasonic sensor is connected to the digital pin 3, 4 of microcontroller
Arduino UNO and echo pin is connected to digital pin 2, 5. VCC is connected to +5V and GND is
connected to GND of microcontroller Arduino UNO. LED is connected to pin number 6, 9, 7, and
10 of microcontroller Arduino UNO. The sensor senses the vehicle In the presence of vehicle; the
light will glow at the other end of the curve. The sensor will not sense in the absence of the vehicle
and the light will not glow. This process goes on continuously.

The following pictures depicts the final hardware;

(a) (b)

Figure_ 12 Hardware Diagram

22
First step is Coding of micro controller Arduino UNO which consists of set of commands to
process the data from sensor and to operate the LED. Second step is Circuit connection of sensor,
Led and microcontroller Arduino UNO where the sensor senses the vehicle or obstacle and the
microcontroller Arduino UNO operates LED according to commands. Analyzing, debugging and
running the program becomes the third step of building this system. Once this process is done the
program is uploaded to microcontroller Arduino UNO. Sensor performs its function by sending
the signal as sensor senses the object, it gives the signal information to microcontroller Arduino
UNO which possesses and shows the output in the serial monitor. Here the output is in distance.
Fourth step is fixing the circuit to the hardware model which includes fixing of microcontroller
Arduino UNO, ultrasonic sensor and LED light to the model of curve road.

Detection of obstacle by the sensor when vehicle passes through the road is fifth step. The signal
sent by the sensor hits the vehicle and reflected back to the sensor. It is the experimental
demonstration. In last step Output is obtained i.e. glowing of LED when the signal is received by
the sensor after reflecting back from the vehicle. By all this steps experimental demonstration is
performed successfully and result of glowing Led is obtained and sensor based system is ready to
perform its particular task and fulfils the main objective of our project.

The purpose of this project is to save thousands of precious lives and decrease the number of
accidents in curve roads. This is possible by alerting the driver by means of LED light which glows
when vehicle comes from the other side of the curve. The vehicle is detected by the help of
Ultrasonic sensor which is interfaced to the microcontroller Arduino UNO. By this we can save
thousands of lives in the curve roads.

3.2 Marketability
The demand of our project is at high level because many people travel towards northern areas of
Pakistan every year in summer as well as in winters and many accidents happened due to sharp
turns and fog. Many people lost their lives and may families lost their loved ones. So, it is the
utmost requirement today. We want to implement our project at northern areas of Pakistan at bigger
level.

23
3.3 Future Scope
The scope of this system is to prevent the lives of people in future. By adding a camera, we can
make this system better which will give us the photograph of accident place. We can add GPS also
for tracking the location of accident vehicle. By using these technologies we can make the safe
environment for people and animals. We can decrease the number of accident occurs at mountain
roads, curved road.

24
REFERENCES
[1] Sarode, Santosh, Priyanka Malokar, Sanover Sheikh, Shivani Samrit, and Rajendra Khule.,
2021, “Review Paper on Vehicle Accident Prevention System for Hilly and Mountain Roads”
International Journal for Research in Applied Science & Engineering Technology 9, Vol. 4,
pp. 1652-1655.
[2] GPS Beginner`s Guide, Garmin Ltd, 2008.
[3] Fabian Friedrichs and Bin Yang, June 2010 “Camerabased Drowsiness Reference for Driver
State Classification under Real Driving Conditions” 2010 IEEE Intelligent Vehicles
Symposium University of California, San Diego, CA, USA, 21-24.
[4] M.J. Flores J. Ma Armingol A. de la Escalera, 2011, “Driver drowsiness detection system
under infrared illumination for an intelligent vehicle” Published in IET Intelligent Transport
Systems Received on 13th October 2009 Revised on 1st April.
[5] Aravinda B, Chaithralakshmi C, Deeksha, Ashutha K, June2016, “Sensor Based Accident
Prevention System” International Journal of Innovative Research in Electrical, Electronics,
Instrumentation And Control Engineering Vol. 4, Issue 6.
[6] B. Prachi, D. Kasturi and C. Priyanka, 2016, "Intelligent Accident-Detection And
AmbulanceRescue System", International Journal Of Scientific & Technology Research, Vol.
3, No. 6.
[7] Mr.S.Iyyappan and Mr.V.Nandagopal, 2013, “Accident Detection and Ambulance Rescue
with Intelligent Traffic Light System?” International Journal of Advanced Technology and
Engineering Research.
[8] Amnesh Goel, Sukanya Ray, Nidhi Chandra, 2012, “Intelligent Traffic Light System to
Prioritized Emergency Purpose Vehicles based on Wireless Sensor Network” International
Journal of Computer Applications, Volume 40– No.12.

25
APPENDIX A
Arduino Code:

#define trigPin 3 // F
#define echoPin 2
#define trigPin2 5 // L
#define echoPin2 4

#define led1 6
#define led2 7

long duration, distance;


long duration2, distance2;

void setup()
{

Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);

pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);

digitalWrite(led1, LOW);
digitalWrite(led2, LOW);

26
Serial.println("Ready");

void loop()
{
get_sonar();
get_sonar2();

void get_sonar(){ //Front


digitalWrite(trigPin, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); // Added this line
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;

if (distance >1 && distance < 15) { // This is where the LED On/Off happens
Serial.println ("Hurdle 1");
digitalWrite(led1, HIGH);
delay(5000);
}
else {
digitalWrite(led1, LOW);
}
}

27
void get_sonar2() { //Left
digitalWrite(trigPin2, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin2, HIGH);
delayMicroseconds(10); // Added this line
digitalWrite(trigPin2, LOW);
duration2 = pulseIn(echoPin2, HIGH);
distance2 = (duration2/2) / 29.1;

if (distance2 >1 && distance2 < 15) { // This is where the LED On/Off happens
Serial.println ("Hurdle 2");
digitalWrite(led2, HIGH);
delay(5000);
}
else {
digitalWrite(led2, LOW);
}
}

28
Data Sheets

29

You might also like