Major - Project File

You might also like

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

INDIRA GANDHI ENGINEERING COLLAGE

SAGAR (M.P.)

Session 2022-2023
A
Major Project Report
On
‘’Driver Safety System’’
Submitted to the Rajiv Gandhi Proudygiki
Vishwavidyalaya Bhopal (M.P.)
In Partial Fulfilment of Degree of
Bachelor of Electronics & Communication Engineering

Under the Guidance of Submitted to


Prof. Savita Baraskar Prof. Amy Alice Kujur
(Dept. of Electronics & Comm. Engineering) H.O.D.
I.G.E.C. Sagar (M.P.) (Dept. of Electronics & comm. Engineering)

Submitted By:
Yogesh Mourya(0601EC191066)
Yash Nandanwar(0601EC191064)
Atishay Jain(0601EC191014)
Sachin Shukla(0601EC203D05)
Prashant Kumar(0601EC191038)
8th SEMESTER
Dept. of Electronics & Communication Engineering
Indira Gandhi Govt. Engineering College Sagar(M.P.)
ACKNOWLEDGEMENT

I would like to express my gratitude to all those who gave us the possibility to complete this
project. This is one of the best moments of our Degree Program to be publicly acknowledging those
who have contributed in many different ways to make my success a part of their own. The completion
of the project report depends upon the co-operation, coordination and combined effect of several
resources of knowledge, energy and tune from various quarters.

I am deeply indebted to our guide Prof. Savita Baraskar Mam and also thank him for
accepting me to work under his valuable guidance, closely supervising this work over the past few
months and offering many innovative ideas and helpful suggestions, which lead to the successful
completion of this project. Our sincere thanks also to Prof.Amy Alice Kujur Mam, Head of
Department of Electronics & Communication Engineering.

I am especially thankful Dr. Anurag Dwivedi Sir. Principal, I.G.E.C. Sagar for their kind co-
operation and rendering all possible facilities.

I am thankful to all staff members of Department of the Electronics & Communication


Engineering and my friends for their timely help, co-operation and suggestion during my work. I am
also thankful to my batch mates, college library staff for their help and support for entire duration of
this project.

I like to thank my parents whose love, teachings and support have brought me this far.

SUBMITTED BY:
Yogesh Mourya(0601EC191066)

Yash Nandanwar(0601EC191064)

Atishay Jain(0601EC191014)

Sachin Shukla(0601EC203D05)

Prashat Kumar(0601EC191038)
INDIRA GANDHI ENGINEERING COLLEGE SAGAR
(M.P.)

DECLARATION

I hereby declare that the following document Major Project Report on


"Driver Safety System" is an authentic work done by me. I undertake the Project
report as a part of the course curriculum of Bachelor of Engineering in Electronics &
Communication Engineering from Indira Gandhi Engineering College, Sagar affiliated
by Rajiv Gandhi Praudyogiki Vishwavidyalaya, Bhopal (MP).

SUBMITTED BY:
Yogesh Mourya(0601EC191066)

Yash Nandanwar(0601EC191064)

Atishay Jain(0601EC191014)

Sachin Shukla(0601EC203D05)

Prashant Kumar(0601EC191038)
INDIRA GANDHI ENGINEERING COLLEGE
SAGAR (M.P.)

CERTIFICATE

This is to Certify that Yogesh Mourya, Yash Nandanwar, Atishay Jain, Sachin Shukla
and Prashant Kumar of B.Tech. 8th semester Electronics & Communication Engineering
has completed Major Project report on "Driver Safety System" towards the partial fulfilment
of the requirement for the award of Degree in Electronics & Communication Engineering of
Rajiv Gandhi Proudhyogiki Vishwavidyalaya, Bhopal for the session 2022-2023.

The work presented in this report has been carried out by them under our guidance and
supervision.

Signature Signature Signature

Under the Guidnace of Head of department Principal


Prof. Savita Baraskar Mam Prof. Amy Alice Kujur Mam Dr. Anurag Dwivedi Sir

(Dept. E.C. Engineering) (Dept. E.C. Engineering) (Dept. E.C. Engineering)

(I.G.E.C Sagar M.P.


ABSTRACT

Accident due to drowsy is prevented andcontrolled when the vehicle is out of control. And
also the drunken drive also prevented by installing alcohol detector in the vehicle. The
term used here for the recognition that the driver is drowsy is by using eye blink of the
driver. In recent times drowsiness is one of the major causes for highway accidents. These
types of accidents occurred due to drowsy and driver cant able to control the vehicle, when
he/she wakes. The drowsiness is identified by the eye blink closure and blinking frequency
through infra-red sensor worn by driver by means of spectacles frame. The alcohol
consumption is also verified during the starting process of the vehicle using alcohol
detector. If the driver is drunk then the buzzer indicates and the vehicle doesn’t allow the
driver to start the vehicle. If the driver is drowsy, then the system will give buzzer signal
and the speed of the vehicle is reduced and the obstacle sensor will senses the adjacent
vehicle to avoid collision with that, and if there is no vehicle in left adjacent side then the
vehicle move to the left end of the road by auto steering and controlling and vehicle will
be parked with prior indications.
Table of Content
CONTENTS PAGE NO.

Abstract

List of figures

List of tables

CHAPTER 1 Introduction to Driver Safety System 1

1.1 Brief Overview 2


1.2 Problem Statement 3
1.3 Objective 3
1.4 Proposed System 4
1.5 Application and Advantages 4

CHAPTER 2 Methodology 5
2.1 Methodology 6

CHAPTER 3 Component Used In This Project 7


3.1 Arduino 8

3.1.1 What Does Arduino Mean? 8

3.1.2 What is Arduino ? 8


3.1.3 Arduino UNO Starer kit Specificatios 9

3.1.4 Arduino Hardware 9


3.1.5 Arduino Saftware 9
3.1.6 Arduino Code 10

3.1.7 Arduino Pinout 10


3.2 Alcohol Sensor (MQ-3) 13
3.2.1 Block Diagram 14

3.2.2 Basic Pin Configuration 14


3.2.3 Working Principle 15

3.2.4 Flow Chart 16

3.3 Relay 16
3.3.1 Port Description 18

3.3.2 Single Channel Relay Module Pin Description 18


3.3.3 Working of Relay Circuit 19
3.3.4 Type of Relays 19
3.4 Servo Sg90 20
3.4.1 dc Motor 20

3.4.2 Working of DC Motor 20

3.5 Eye Blink Detection System 21


3.5.1 What is Eye blink Detection system 21
3.5.2 Benefits of Eye Blink Detection system 22

3.5.3 Working of Eye Blink Detection System 23


3.6 Bc547 24
3.6.1 What is Bc547 24

3.6.2 Specifications 25

3.6.3 Type of buzzer 25

3.6.4 Working Principle 26


3.6.5 Buzzer circuit diagram 27
3.7 Resistor 27

3.8 Jump wires 28

CHAPTER 4 Software Requirement 30

4.1 Arduino IDE 31


4.1.1 Uploading 31
4.2 Fritzing 32
4.2.1 What is fritzing 32
4.2.2 Desktop View 34

CHAPTER 5 Circuit Design And Working 35


5.1 Circuit Diagram 36

5.2 Working of Driver Safety system 37


CHAPTER 6 Program 38
6.1 Program or Code 38

CHAPTER 7 Conclusion And Future Scope 41


7.1 Conclusion 42

7.2 Future Works 42

CHAPTER 8 Refrences 43

8.1 refrences 43
List of Figures

Figure 1.1 Testing of Alcohole reading 2

Figure 2.1 Block diagram of driver safety system 6

Figure 3.1 Arduino 9

Figure 3.2 Pin Description of Arduino 11

Figure 3.3 Alcohol Sensor 13

Figure 3.4 Block Diagram of Alcohol Sensor 14

Figure 3.5 Pin configuration of Alcohol Sensor 14

Figure 3.6 MQ-3 Circuit Diagram 15

Figure 3.7 Flowchart of Alcohol Detection and Ignition Locking System 16

Figure 3.8 Relay Module 17

Figure 3.9 Pin Diagram of Relay 18

Figure 3.10 Working Diagram of Relay 19

Figure 3.11 D.C. Motor 20

Figure 3.12 Cross sectional view of motor 21

Figure 3.13 Eye Blink Sensor 22

Figure 3.14 Working of Eye Blink Sensor 23

Figure 3.15 Buzzer pin configuration 24

Figure 3.16 Buzzer Circuit Diagram 27

Figure 3.17 Resistors 28

Figure 4.1 Desktop view of fritzing 34

Figure 5.1 Circuit Diagram Of project 36


List of Tables

Table 3.1 Arduino Uno Pin-out Configuration 12

Table 3.2 Relay Module Pin Description 18


Driver Safety System 2023

CHAPTER 1
Inroduction to Driver Safety
System

Dept. Of Electronics Communication Engineering Page 1


Driver Safety System 2023

1. Introduction
1.1 Brief Overview
Driving under the influence of alcohol continues to be one of the nation’s most serious
problem faced by the general public. It is a known fact that under the influence of alcohol
the driving skills is impaired and the risk of involvement in accidents increases
exponentially.

One study estimates that eliminating alcohol would reduce traffic fatalities by 47 percent
(± 4%), equivalent to a reduction of between 20,000 and 24,000 fatalities annually. There
is no doubt that a reduction in alcohol-impaired driving would result in a substantial
savings of human lives and resources, worldwide.

India had earned the questionable qualification of having a greater number of fatalities
because of street mishaps on the society. Street wellbeing is rising as a noteworthy social
worry far and wide, particularly in India. Drinking and driving is as of now a genuine
general medical issue, which is probably going to rise as a standout amongst the most
critical issues sooner rather than later. The primary reason behind this task is "Drunk
driving detection". Since numerous mishaps are increasing due to the liquor utilization of
the driver or the individual who is driving the vehicle. Subsequently Drunk driving is a
noteworthy reason of mischances in all nations everywhere throughout the world. Thus,
the framework diminishes the quantum of street mischances and fatalities because of
drunk driving in future.

Fig 1.1 – Testing of Alcohole reading

Drunk driving is the purpose for the vast majority of the deaths, Since the Drunk Driving
Detection and Car Ignition Locking Using Arduino intends to change that with
mechanized, straightforward, noninvasive liquor wellbeing check in vehicles. Alcohol

Dept. Of Electronics Communication Engineering Page 2


Driver Safety System 2023

sensor is implanted on the steering of the car, to such an extent that when the level of
liquor crosses an admissible breaking point, where the start of vehicle will stopignition
and the motor will stop. The Arduino processor always uses the liquor sensor information
to check drunk driving and works a bolt on the vehicle. In 2009 alone, more than 10,000
activity fatalities were connected directly to drivers who had more blood alcohol level as
permitted. Numerous accidents occur because of the carelessness with respect to driver.
Numerous drivers drink and drive which is a criminal offense. Such drivers are a danger
to society and ought to be captured rapidly. Despite the fact that the nation has laws to
check drunken driving yet its viable usage is still to be worked upon and at times even
questionable. For such reason we are outlining a framework to decide if he/she is fit to
drive or not.

Consistently, 40 individuals which underneath the age of 25 die due to highway


accidents. What's more, as per the world fitness association, car crashes caused an around
1.24 million deaths within the year 2010, somewhat down from 1.26 million in 2000.
That is one individual is passed on for at regular intervals. Just 28 global areas, speaking
to 449 million individuals (7% of the total population), have allaroundlegitimate rules
that adapt to each of the five threat components. The five perils components for street
mischances are pace, drink–utilizing, protective caps, safety belts andtyke restraints. Over
a third piece of road site visitors dying are inlow-and center income nations are among
walkers and cyclists.

However, under 35% of low and focus profit countries have directions in zone to monitor
those street clients. The vital point of this gadget is to avoid the charge mischances which
can be generally happened because of drunkenness of driving power. This gadget
discovers the drunkenness of driving power and spare the passengersfrom riding, so this
attempt to give one type of security or insurance to driving power and spare remain. The
principle expectation of this framework is to maintain a strategic distance from the rate of
accidents which are ordinarily occurred duetodrunkenness of driver.This framework
identifies the drunkenness of driver and keep them from driving, so this framework will
try to give one kind of security or wellbeing system to driver and spare lives.

1.2 Problem Statement


Drunken driving is the major cause of road accidents worldwide becausedriving under the
influence of alcohol reduces the driver’s perception and vehicle control. Manual checking
of alcohol using breath analyzer is done by the police in order to reduce the problem. But,
this method has very less effect as it is not possible to check if every driver is driving
under the influence of alcohol.

Dept. Of Electronics Communication Engineering Page 3


Driver Safety System 2023

1.3 Objective
The target of this projectis to give an ideaand inventive method for avoiding drunken
driving of a Motorcar by locking the car. Likewise, to permita man who is not alcoholic
to drive a same Motorcar. To broaden this thought with more innovative headways and
make it accessible in a financially effective way. We need to plan a sort of framework
which can recognize the alcohol content in the cars to prevent the conduct of alcoholic
driving. The sensor will be fixed close to the driver's seat. The driver should breath to the
system before the individual begins the car. On the off chance that the alcohol level
identified is underneath the permissible standard, the car can be started regularly. In the
event that the alcohol level is over the suitable standard, the framework will send caution
to the driver through LCD display. The framework ought to be protected, delicate, exact,
advantageous and cheap. This sort of framework can be fixed on each car to guarantee
the driver's driving security.

1.4 Proposed System


An Alcohol sensor (MQ-3) is made use, which on sensing high Blood Alcohol Content
(BAC) locks the Car Ignition, thus making the driver unable to start the engine under the
influence of alcohol. An LCD is used to indicate the detection of alcohol. A GSM
Module is used to send an alert message along with the co-ordinates obtained from the
GPS module to the concerned authorities as well as friends and family. A switch is also
installed along with the system in order to ensure the system is not removed from the car
by the user. In the case of any tampering with the switch, an alert message along with co-
ordinates will be sent to the concerned authorities and strict action can be taken. This is
done to ensure maximum safety of the driver. .

1.5 Applications and Advantages:


Applications of Alcohol Detector in Car:

1) "Alcohol Detector project" can be used in the various vehicles for detecting whether
the driver has consumed alcohol or not.

2) This project can also be used in various companies or organization to detect alcohol
consumption of employees.

Advantages of Alcohol Detector project:

3) "Alcohol Detection System in Cars" provides an automatic safety system for cars and
other vehicles as well.

Dept. Of Electronics Communication Engineering Page 4


Driver Safety System 2023

CHAPTER 2
METHODOLOGY

Dept. Of Electronics Communication Engineering Page 5


Driver Safety System 2023

2.1 METHODOLOGY

The Alcohol Detection with Engine Locking system helps to reduce accidents which are
occurring due to drunk driving. MQ-3 sensor detects the presence of alcohol in the
surroundings. The sensor provides output on the basis of the concentration of the alcohol,
if the alcohol concentration is higher the conductivity of MQ-3 sensor increases which in
turn gives the reading to ARDUINO. If the reading is greater than the threshold level,
ARDUINO will stop the DC motor. The red LED will also blink if the distance is less
than the safe distance to give indication to other vehicles that the vehicle in front of them
is unsafe. Now, with the help of SIM900A the message will be sent to the civil forces that
the particular vehicle is unsafe and can be a threat to other people.

EYE BLINK BUZZER


SENSOR

ARDUINO
LED
ALCOHOL
SENSOR

Fig 2.1 – Block diagram of driver safety system

Dept. Of Electronics Communication Engineering Page 6


Driver Safety System 2023

CHAPTER 3

Components Used In This


Project

Dept. Of Electronics Communication Engineering Page 7


Driver Safety System 2023

3.1 Arduino

3.2 MQ3 Alcohol Sensor

3.3 Relay

3.4 Servo sg90

3.5 Eye blink Sensor

3.6 Buzzer

3.7 Bc547

3.8 .1 Resistor 220 ohm

3.8.2 Resistor 1k ohm

3.9 Jumper wire

3.10 Battery

3.11 Battery cap

3.12 Switch

3.1 Arduino
3.1.1 What Does Arduino Mean?
Arduino refers to an open-source electronics platform or board and the software used to
program it. Arduino is designed to make electronics more accessible to artists, designers,
hobbyists and ayone interested in creating interactive objects or environments. An
Arduino board can be purchased pre-assembled or, because the hardware design is open
source, built by hand. Either way, users can adapt the boards to their needs, as well as
update and distribute their own versions.

3.1.2 What is Arduino?


Arduino is an open-source platform that helps circuit developers build electronic projects.
It consists of both hardware and software. Arduino hardware is a programmable circuit
board called a microcontroller. Arduino software is an IDE (integrated development
environment) through which developers write and upload the code to the
microcontroller.

Dept. Of Electronics Communication Engineering Page 8


Driver Safety System 2023

We can feed a program with a set of instructions to the Arduino board that can carry out
simple to complex tasks. Traditional programmable circuit boards require separate
hardware to load the code onto the board. But Arduino eliminates the need for hardware;
instead, it uses a simple USB cable to load code onto the Arduino board.

The Arduino board enables developers to feed the program in the simplified version of
the C++ language, making it easier for them to learn and code.

3.1.3 Arduino UNO Starter Kit Specifications

Fig.3.1- Arduino

3.1.4 Arduino Hardware


The hardware part of the Arduino is its programmable circuit board. You might have
come across various Arduino boards in your work, but the most commonly used Arduino
board is Arduino UNO. All Arduino boards have a microcontroller known as a small
computer, which is the heart of Arduino. So, when learning about Arduino, it’s essential
to learn about microcontrollers and how to use them. The Arduino microcontroller is
responsible for reading different inputs and controlling the outputs.

3.1.5 Arduino Software


Arduino’s software is called Arduino IDE. You can download the software on your
computer and program the Arduino boards to perform various tasks accordingly.

Dept. Of Electronics Communication Engineering Page 9


Driver Safety System 2023

IDE is similar to a text editor, where you write instructions for the Arduino board.

3.1.6 Arduino Code


Apart from hardware and software, the third most important aspect of Arduino is its code,
also known as a sketch. You can write the code in the Arduino IDE and load it onto the
board.
You might be wondering what language Arduino uses for scripting the code. Arduino has
its native language analogous to C++, called Arduino Programming Language. Any
program developed using Arduino Programming Language is called sketch and saved in a
file with the .ino extension.
To write instructions for Arduino boards, you must possess a basic understanding of C
and C++ programming languages.Together, hardware, software, and code make up
Arduino.

3.1.7 Arduino Pinout


Vin: This is the input voltage pin of the Arduino board used to provide input supply from
an external power source.

5V: This pin of the Arduino board is used as a regulated power supply voltage and it is
used to give supply to the board as well as onboard components.

3.3V: This pin of the board is used to provide a supply of 3.3V which is generated from a
voltage regulator on the board

GND: This pin of the board is used to ground the Arduino board.

Reset: This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.

Analog Pins: The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.

Digital Pins: The pins 0 to 13 are used as a digital input or output for the Arduino board.

Dept. Of Electronics Communication Engineering Page 10


Driver Safety System 2023

Fig. 3.2 – Pin Description of Arduino

Serial Pins: These pins are also known as a UART pin. It is used for communication between
the Arduino board and a computer or other devices. The transmitter pin number 1 and receiver pin
number 0 is used to transmit and receive the data resp.

External Interrupt Pins: This pin of the Arduino board is used to produce the External interrupt
and it is done by pin numbers 2 and 3.

PWM Pins: This pins of the board is used to convert the digital signal into an analog by varying
the width of the Pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.

SPI Pins: This is the Serial Peripheral Interface pin, it is used to maintain SPI communication with
the help of the SPI library. SPI pins include:

1. SS: Pin number 10 is used as a Slave Select


2. MOSI: Pin number 11 is used as a Master Out Slave In
3. MISO: Pin number 12 is used as a Master In Slave Out
4. SCK: Pin number 13 is used as a Serial Clock

LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the
digital pin becomes high.

AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a reference
voltage from an external power supply.
Dept. Of Electronics Communication Engineering Page 11
Driver Safety System 2023

3.1.8 Arduino Uno Pinout Configuration


Table 3.1 - Arduino Uno Pinout Configuration

Pin Category Pin Name Detail

Power Vin, 3.3, 5V, GND


Vin: Input voltage to Arduino when using an
external power source.

5V: Regulated power supply used to power


microcontroller and other components on the
board.

3.3V: 3.3V supply generated by on-board


voltage regulator. Maximum current draw is
50mA.

GND: ground pins

Reset Reset Resets the microcontroller.

Analog Pins A0 – A5 Used to provide analog input in the range of 0-


5V

Input/Output Pins Digital Pins 0-13 Can be used as input or output pins.

Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.

External Interrupts 2, 3 To trigger an interrupt.

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

Dept. Of Electronics Communication Engineering Page 12


Driver Safety System 2023

SPI 10(SS), 11(MOSI), Used for SPI communication.


12(MISP) nad 13 (SCK)

Inbuild LED 13 To turn on the inbuilt LED

TWI A4(SDA), A5(SCA) Used for TWI communication

AREF AREF To provide reference voltage for input voltage.

3.2 Alcohol Sensor (MQ-3 Sensor)


It is a low-cost semiconductor sensor which can detect alcoholat concentrations from
0.05 mg/L to 10 mg/L. The sensitive material used for this sensor is SnO2, whose
conductivity is lower in clean air. The conductivity increases with increase in
concentration of alcohol gases. It is highly sensitive to alcohol and has a good resistance
to disturbances due to smoke and gasoline. It provides both digital and analog outputs.
MQ3 alcohol sensor module can be easily interfaced with Microcontrollers, Raspberry Pi
etc.

This alcohol sensor is suitable for detecting alcohol concentration on your breath. It has
high sensitivity and fast response time. Sensor provides an analog resistive output based
on alcohol concentration. The drive circuit is very simple as it requires only one resistor.
A simple interface could be a 0-3.3V ADC.

Fig. 3.3 – Alcohol Sensor

Dept. Of Electronics Communication Engineering Page 13


Driver Safety System 2023

3.2.1 Block Diagram

Fig. 3.4 – Block Diagram of Alcohol Sensor


I. VCC – Input Power Supply
II. GND – Supply Ground
III. DO – Digital Output
IV. AO – Analog Output

3.2.2 Basic Pin Configuration


The MQ-3 alcohol gas sensor consists of total 6-pins including A, H, B and the other
three pins are A, H, B out of the total 6-pins we use only 4 pins. The two pins A, H are
used for the heating purpose and the other two pins are used for the ground and power.
There is a heating system inside the sensor, which is made up of aluminum oxide, tin
dioxide. It has heat coils that is used as a heat sensor.

Fig. 3.5 –Pin configuration of Alcohol Sensor

Dept. Of Electronics Communication Engineering Page 14


Driver Safety System 2023

3.2.3 Working Principle


The MQ-3 alcohol sensor consists of a tin dioxide (SnO2), a perspective layer inside
aluminum oxide micro tubes (measuring electrodes) and a heating element inside a
tubular casing. The end face of the sensor is enclosed by a stainless-steel net and the back
side holds the connection terminals. Ethyl alcohol present in the breath is oxidized into
acetic acid passing through the heat element. With the ethyl alcohol cascade on the tin
dioxide sensing layer, the resistance decreases. By using the external load resistance, the
resistance variation is converted into a suitable voltage variation.

Fig 3.6– MQ-3 Cicuit Diagram

Dept. Of Electronics Communication Engineering Page 15


Driver Safety System 2023

3.2.4 Flow Chart

Fig 3.7– Flowchart of Alcohol Detection and Ignition Locking System

3.3 Relay
The main usage of the Relay was seen in the history of transmitting and receiving the
information, that was called as Morse code where the input signals used to be either 1 or
0, these change in signals were mechanically noted in terms of ON and OFF of a light

Dept. Of Electronics Communication Engineering Page 16


Driver Safety System 2023

bulb or a beep sound, it means those pulses of 1s and 0s are converted as mechanical ON and
OFF using electromagnets.

A Relay is generally used when it is required to control a circuit by a separate lowpower signal,
or when several circuits must be controlled by one signal. They are classified into many types, a
standard and generally used relay is made up of electromagnets which in general used as a
switch.

Fig. 3.8 – Relay Module

i. The signal received from one side of the device controls the switching operation on the
other side. So, relay is a switch which controls (open and close) circuits electro-
mechanically.
ii. The main operation of this device is to make or break contact with the help of a signal
without any human involvement in order to switch it ON or OFF.
iii. When the switch is open no current passes through the relay, the circuit is open, and the
load that is connected to the relay receives no power.
iv. When a relay is closed, the circuit is completed and current passes through the relay and
delivers power to the load. To open and close a relay electromagnet is used.
v. When the coil controlling the electromagnet is given a voltage, the electromagnet causes
the contacts in the relay to connect and transfer current through the relay.

Dept. Of Electronics Communication Engineering Page 17


Driver Safety System 2023

3.3.1 Port Description

Fig.3.9- Pin Diagram of Relay

3.3.2 Single-Channel Relay Module Pin Description

Table 3.2 Relay Module Pin Description

Pin Number Pin Name Description


1 Relay Trigger Input to activate the relay

2 Ground 0V reference

3 VCC Supply input for powering the


relay coil

4 Normally Normally open terminal


5 Common Common terminal of the relay

6 Normally Cloased Normally closed contact of


the relay

Dept. Of Electronics Communication Engineering Page 18


Driver Safety System 2023

3.3.3 Working of a Relay Circuit

Fig. 3.10 – Working Diagram of Ralay

In the above circuit, 5V relay is powered by a 9V battery. An ON/OFF switch is added


for the switching purpose of the relay. At the initial condition when switch is open, no
current flow through coil, hence Common Port of relay is connected to NO (Normally
Open) Pin, so the LAMP remain off.

When the switch is closed, current start flowing through the coil, and by the concept of
electromagnetic induction, magnetic field is generated in the coil which attracts the
movable armature and the Com Port get connected with NC (Normally Close) pin of the
relay. Hence, the LAMP turns ON.

3.3.4 Types of Relays


I. Electromagnetic Relays
II. Solid State Relays
III. Hybrid Relays

Dept. Of Electronics Communication Engineering Page 19


Driver Safety System 2023

3.4 Servo sg90


3.4.1 DC Motor
A DC motor is any of a class of electrical machines that converts direct current electrical
power into mechanical power. The most common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors have some internal mechanism, either
electromechanical or electronic, to periodically change the direction of current flow in part
of the motor. Most types produce rotary motion, a linear motor directly produces force and
motion in a straight line. The very basic construction of a dc motor contains a current
carrying armature which is connected to the supply end through commutator segments and
brushes and placed within the north south poles of a permanent or an electro-magnet as
shown in the diagram below.

Fig. 3.11 – D.C. Motor

3.4.2 Working of DC Motor


When the terminals of the motor are connected to an external source of DC supply:the
field magnets are excited developing alternate North and South poles and the armature
conductors carry currents.All conductors under North-pole carry currents in one direction
while all the conductors under South-pole carry currents in the opposite direction. The
armature conductors under N-pole carry currents into the plane of the paper and the

Dept. Of Electronics Communication Engineering Page 20


Driver Safety System 2023

conductors under S-pole carry currents out of the plane of paper. On applying Fleming’s
left-hand rule, it is clear that force on each conductor is tending to rotate the armature in
the anticlockwise direction. All these forces add together to produce a driving torque
which sets the armature rotates.

When the conductor moves from one side of a brush to the other, the current in that
conductor is reversed. At the same time, it comes under the influence of the next pole
which is of opposite polarity. Also, the function of a commutator in the motor is the same
as in a generator.

Fig 3.12 – Cross sectional view of motor

3.5 Eye Blink Detection System

3.5.1 What is Eye Blink Detection system

The VC, (Vision Chip) (Komuro et al., 2003) is special purpose tracking hardware that
enables the eye tracking system to track the movements of the eye with the required
frame rate. Essentially, the VC is a camera system with integrated image processing
capabilities. This section describes how the images of the eye are taken, how the tracking
of a target is performed and how its position is calculated. In particular, the functionality
that is used to perform image segmentation by binarization and region growing is
addressed The system tracks eye blinks from the side of the eye. The reliable detection
and tracking of eye blink are important requirements for measuring eye blink duration
and blink frequency in detecting driver alertness. Image acquisition and image processing

Dept. Of Electronics Communication Engineering Page 21


Driver Safety System 2023

algorithms are used for blink detection. By using a spectacle mounted sensor (Figure 4-
3), the problem of analysis of head movement is much reduced.

Fig. 3.13 - Eye Blink Sensor

3.5.2 Benefits of Eye Blink Detection system


Blink detection systems have several benefits, including:

a) Increased Road Safety: Blink detection systems can help reduce the number of
accidents caused by drowsy or distracted driving. By detecting when a driver is
becoming drowsy or inattentive, these systems can alert them to take a break or
pull over to rest.
b) Improved Driver Performance: By monitoring a driver's level of alertness, blink
detection systems can help ensure that drivers are able to perform at their best.
This can improve safety and reduce accidents caused by driver error.
c) Cost-Effective: Blink detection systems are typically affordable and can be
installed easily in vehicles. This makes them a cost-effective way to improve road
safety.
d) Convenience: Blink detection systems can provide drivers with a convenient way
to monitor their level of alertness and take breaks when needed. This can help
prevent accidents caused by driver fatigue or distraction.
e) Compliance with Regulations: Some countries have laws that require commercial
drivers to take regular breaks to prevent driver fatigue. Blink detection systems

Dept. Of Electronics Communication Engineering Page 22


Driver Safety System 2023

can help drivers comply with these regulations and ensure that they are taking the
necessary breaks to stay alert and safe on the road.

There are three-steps to the eye blink detection procedure: background


estimation,template matching and tracking. MatLab Simulink software is used to design a
video capturing algorithm. Simulink software provides a comprehensive set of
referencestandard algorithms and graphical tools for image processing, analysis,
visualization, and algorithm development (Matlab Simulink, Version 7.0.4, 2005). The
system is nitially designed to allow the data to be stored for off-line analysis.

3.5.2 Working of Eye Blink Detection System

Fig. 3.14 – working of Eye Blink Sensor

Eye blink detection systems work by using computer vision algorithms to analyze images
or video of a driver's face. The system looks for the eye region in the image and then
analyzes the blinking patterns of the eyes to determine when a driver is blinking.
There are several methods for detecting eye blinks, including:
a) Image Processing: One method is to use image processing techniques to detect the
eye region in the image and then analyze the position and movement of the eyes to
detect blinks.
b) Machine Learning: Another method is to use machine learning algorithms to train
a model on a large dataset of eye blink images. The model can then be used to
detect blinks in real-time.

Dept. Of Electronics Communication Engineering Page 23


Driver Safety System 2023

c) Depth Sensing: Some eye blink detection systems use depth sensing technology,
such as infrared cameras or 3D scanners, to create a 3D model of the face and
analyze the position and movement of the eyes to detect blinks.

Once the system detects a blink, it can provide an alert to the driver or take other actions,
such as adjusting the vehicle's controls or displaying a message on the dashboard.
Overall, eye blink detection systems can be an effective way to improve road safety and
prevent accidents caused by driver fatigue or distraction.

3.6 Bc547
3.6.1 What is Bc547 ?
An audio signaling device like a beeper or buzzer may be electromechanical
or piezoelectric or mechanical type. The main function of this is to convert the signal
from audio to sound. Generally, it is powered through DC voltage and used in timers,
alarm devices, printers, alarms, computers, etc. Based on the various designs, it can
generate different sounds like alarm, music, bell & siren.

Fig. 3.15 – Buzzer Pin Configuratin

The pin configuration of the buzzer is shown below. It includes two pins namely positive
and negative. The positive terminal of this is represented with the ‘+’ symbol or a longer

Dept. Of Electronics Communication Engineering Page 24


Driver Safety System 2023

terminal. This terminal is powered through 6Volts whereas the negative terminal is
represented with the ‘-‘symbol or short terminal and it is connected to the GND terminal.

3.6.2 Specifications
The specifications of the buzzer include the following.
I. Color is black
II. The frequency range is 3,300Hz
III. Operating Temperature ranges from – 20° C to +60°C
IV. Operating voltage ranges from 3V to 24V DC
V. The sound pressure level is 85dBA or 10cm
VI. The supply current is below 15mA

3.6.3 Types of Buzzer


A buzzer is available in different types which include the following.

 Piezoelectric
 Electromagnetic
 Mechanical
 Electromechanical
 Magnetic

 Piezoelectric
As the name suggests, the piezoelectric type uses the piezoelectric ceramic’s piezoelectric
effect & pulse current to make the metal plate vibrate & generate sound. This kind of
buzzer is made with a resonance box, multi resonator, piezoelectric plate, housing,
impedance matcher, etc. Some of the buzzers are also designed with LEDs.
The multi resonator of this mainly includes ICs and transistors. Once the supply is given
to this resonator, it will oscillate and generates an audio signal with 1.5 to 2.kHz. The
impedance matcher will force the piezoelectric plate to produce sound.

 Electromagnetic
This type of buzzer is made with a magnet, solenoid coil, oscillator, housing, vibration
diaphragm, and magnet. Once the power supply is given, the oscillator which produces
the audio signal current will supply throughout the solenoid coil to generate a magnetic
field.
Sometimes, the vibration diaphragm will vibrate & generates sound under the magnet &
solenoid coil interaction. The frequency range of this ranges from 2 kHz to 4kHz.

Dept. Of Electronics Communication Engineering Page 25


Driver Safety System 2023

 Mechanical
These types of buzzers are subtypes of electromagnetic, so the components used in this
type are also similar. But the main difference is that the vibrating buzzer is placed on the
outside instead of the inside.
 Electromechanical
The designing of these types of buzzers can be done with a bare metal disc & an
electromagnet. The working principle of this is similar to magnetic and electromagnetic.
It generates sound throughout the disc movement & magnetism.

 Magnetic
Like a piezo type, magnetic is also used to generate a sound but they are different due to
core functionality. The magnetic type is more fixed as compared to the piezo type
because they work through a magnetic field.

Magnetic buzzers utilize an electric charge instead of depending on piezo materials to


generate a magnetic field, after that it permits another element of the buzzer to vibrate &
generate sound.
The applications of magnetic buzzers are similar to the piezo type in household devices,
alarms such as watches, clocks & keyboards.

3.6.4 Working Principle


The working principle of a buzzer depends on the theory that, once the voltage is given
across a piezoelectric material, then a pressure difference is produced. A piezo type
includes piezo crystals among two conductors.

Once a potential disparity is given across these crystals, then they thrust one conductor &
drag the additional conductor through their internal property. So this continuous action
will produce a sharp sound signal.

Dept. Of Electronics Communication Engineering Page 26


Driver Safety System 2023

3.6.5 Buzzer Circuit Diagram

Fig. 3.16 – Buzzer Circuit Diagram

3.7 RESISTOR:

A resistor is a passive two-tenninal electrical component that implernents electrical


resistance as a circuit element. In elecffonic circuits, resistors are used to reduce
crrrent flow, adjust signal levels, to divide voltages, bias active elements, and
terminate transmission lines, among other uses. High-power resistors that can
dissipate many watts of electrical power as heat, may be used as part of motor
controls, in power distribution systems, or as test loads for generators. Fixed
resistors have resistances that only change slightly with temperature, time or
operating voltage. Variable resistors can be used to adjust circuit elements (such as a
volume confrol or a lamp dimmer), or as sensing devices for heat, light, hurnidity,
force, or chemical activitv. Resistors are comtnon elements of elecffical nefworks
and elecffonic circuits and are ubiquitous in electronic equipment. Practical resistors
as discrete components can be composed of various compounds and forms.
Resistors are also implonented within integrated circuits. The electrical function of a
resistor is specified by its resistance: common comlnercial resistors are
Inanufactured over a range of more than nine orders of magnitude. The nominal
value of the resistance falls within the manufacturing tolerance, indicated on the
component.

Dept. Of Electronics Communication Engineering Page 27


Driver Safety System 2023

Fig . 3.17 – Resistors

3.8 JUMP WIRES:

A jump wire (also known as jurnper, jumper wire, jumper cable, DuPont wire, or DuPont
cable - named for one manufacttrer of thern) is an electrical wire, or group of them in a
cable' with a connector or pin at each epd 1or sometimes withont them - simply
"tiruted"), which is normally used to interconnect the components of a breadboard or
other prototvpe or test circuit, internally or with other equipntent or components, without
soldering.t t I lndividual jump wires are fitted by inserting tlreir "end connectors" into the
slots provided in a breadboard, the header connector of a circuit board, or a piece of test
equipment.

Jump wires at the end of a mtrlti-colored ribbon cable are used to connect the pin header
at the left side of a blue USB2Serial board to a white breadboard below. Anotherjumper
cable ending in a tlSB rnicro male connector mates to the riglrt side of the USB2Serial
board. Red and black tinned jurnp wires can be seen on the breadboard.

There are different types ofjumper wires. Some have the same type of electrical
connector at both ends, while others have different connectors. Some common connectors
are:

 Solid tips - are used to connect on/with a breadboard or fernale header


connector. The arrangement of the elements and ease of insertion on a
breadboard allows increasing the mounting density of both components and
jurnp wires without fear of short-circuits. The jurnp wires vary in size atrd
colors to distingrrish the different working signals.
Dept. Of Electronics Communication Engineering Page 28
Driver Safety System 2023

 Crocodile clips - are used, among other applications, to temporadly bridge


sensors, buttons and other elernents of prototypes with components or
equipment that have arbitrary connectors, wires, screw terminals, etc.
 Banana connectors - are commonly used on test equipment for DC and low-
frequency AC signals.
 Registered jack (RJnn) - are commonly used in telephone (RI I I ) and
computer networking (R.r45 ).
 RCA connectons - are often used for audio, low-resolution cornposite video
signals, or other low-frequency applications requiring a shielded cable.
 RF connectors - are used to carry radio frequency signals between circuits,
test equipment, and antennas.

Dept. Of Electronics Communication Engineering Page 29


Driver Safety System 2023

CHAPTER 4

Software Requirement

Dept. Of Electronics Communication Engineering Page 30


Driver Safety System 2023

4.1 Arduino IDE


The Arduino IDE (Integrated Development Environment) is a software platform used to
write and upload code to Arduino boards. It provides a user-friendly interface for
programming microcontrollers and allows users to easily create, debug, and upload
code to their boards. The IDE is available for Windows, macOS, and Linux, and is free
to download and use.

Some of the key features of the Arduino IDE include:

a) A code editor that allows users to write and edit their code in a variety of
languages, including C++, Java, and Python.
b) A built-in simulator that allows users to test their code without a physical board.
c) A debugger that helps users identify and fix errors in their code.
d) A library manager that allows users to easily install and manage libraries.
e) A file manager that allows users to manage their project files.
f) A waveform viewer that allows users to visualize the output of their code.
g) A serial monitor that allows users to communicate with their board and view the
output of their code in real-time.

the Arduino IDE is a powerful and versatile software platform that makes it easy for
users to program and control a wide range of microcontrollers.

4.1.1 Uploading
Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. On the Mac, the serial
port is probably something like /dev/tty.usbmodem241 (for an UNO or Mega2560 or
Leonardo) or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-
Serial adapter). On Windows, it's probably COM1 or COM2 (for a serial board)
or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB
serial device in the ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial port
and board, press the upload button in the toolbar or select the Upload item from
the Sketch menu. Current Arduino boards will reset automatically and begin the upload.

Dept. Of Electronics Communication Engineering Page 31


Driver Safety System 2023

With older boards (pre-Diecimila) that lack auto-reset, you'll need to press the reset
button on the board just before starting the upload. On most boards, you'll see the RX
and TX LEDs blink as the sketch is uploaded. The Arduino Software (IDE) will display
a message when the upload is complete, or show an error.

When you upload a sketch, you're using the Arduino bootloader, a small program that
has been loaded on to the microcontroller on your board. It allows you to upload code
without using any additional hardware. The bootloader is active for a few seconds when
the board resets; then it starts whichever sketch was most recently uploaded to the
microcontroller. The bootloader will blink the on-board (pin 13) LED when it starts (i.e.
when the board resets).

4.2 Fritzing

4.2.1 What is Fritzing?

Fritzing is a great open source tool for anyone to teach, share, and prototype their
electronic projects! It allows you to design a schematic, and thus a part, which can then
be added to very professional-looking wiring diagrams. You can even design your own
PCBs and have them fabricated from the files you design. Here at SparkFun, we use
Fritzing in the classrooms, our hook-up guides, and any other place we need to show how
to hook-up our boards to other hardware.

Fritzing is a free and open-source software tool used to create schematics and
breadboard layouts for electronic projects. It is a graphical interface that
allows users to create and modify digital circuits, connect components, and
simulate their behavior.

Fritzing is a powerful tool that is used by electronics hobbyists, students, and


professionals alike. It is particularly useful for prototyping and testing electronic circuits
before implementing them in a physical project. The software allows users to create
custom circuit boards, test their designs, and share their work with others.

Dept. Of Electronics Communication Engineering Page 32


Driver Safety System 2023

Some of the key features of Fritzing include:

a) A drag-and-drop interface that allows users to easily add and connect components.
b) A library of pre-built components that can be used in designs.
c) A variety of tools for creating and modifying schematics and layouts.
d) A built-in simulation tool that allows users to test their designs without a physical
board.
e) A library of tutorials and guides to help users learn about electronics and circuit
design.
f) A community of users who share their projects and knowledge.

Overall, Fritzing is a powerful and user-friendly software tool that makes it easy for users
to create and modify digital circuits. It is a valuable resource for anyone interested in
electronics and circuit design.

Dept. Of Electronics Communication Engineering Page 33


Driver Safety System 2023

4.2.2 Desktop View

Fig . 4.1 – Desktop view of fritzing

Dept. Of Electronics Communication Engineering Page 34


Driver Safety System 2023

CHAPTER 5
Circuit Design And Working

Dept. Of Electronics Communication Engineering Page 35


Driver Safety System 2023

5.1 Circuit Diagram

Fig5.1 - Circuit Diagram Of Project

Dept. Of Electronics Communication Engineering Page 36


Driver Safety System 2023

5.2 Working of Driver Safety Sytem

Step 1: Initialize the vehicle (DC Motor)


Step 2: DC Motor initiates to begin rotation.
Step 3: Detection of the alcohol level through the MQ3 Sensor. and detection of
the blinking eye by Eye blink Sensor
Step 4: If the alcohol is above the predefined threshold, then analog inputs send to
Arduino-uno which performs the conversion to outputs.
Step 4.1: If step 4 is true then it will go to step 5.
Step 4.2: If step 4 is false it will go to step 3.
Step 5: if Alcohol Detected’ then , LED and Buzzer will be turned on.
Step 6: If the Eye is close for 5 second , then analog inputs send to Arduino-uno
which performs the conversion to outputs.
Step 6.1: If step 4 is true then it will go to step 7.
Step 6.2: If step 4 is false it will go to step 3
Step 7: If eye is closed ,more than 5 Second then , LED and Buzzer will be turned
on .
Step 8: DC Motor terminates the rotation.
Step 9: Stop.

Dept. Of Electronics Communication Engineering Page 37


Driver Safety System 2023

CHAPTER 6
Program
6.1 Program or code

#define sensor 3

#define dsensor 4

#define buz 13

#define led1 9

#define led2 8

#define relay 7

void setup()

Serial.begin(9600);

pinMode(sensor, INPUT);

pinMode(dsensor, INPUT);

pinMode(buz, OUTPUT);

pinMode(relay, OUTPUT);

pinMode(led1, OUTPUT);

Dept. Of Electronics Communication Engineering Page 38


Driver Safety System 2023

pinMode(led2, OUTPUT);

void loop()

Serial.print(analogRead(sensor));

float adcValue=0;

for(int i=0;i<10;i++)

adcValue+= analogRead(sensor);

delay(10);

float v= (adcValue/10) * (5.0/1024.0);

float mgL= 0.67 * v;

Serial.print("BAC:");

Serial.print(mgL);

Serial.print(" mg/L");

// if(mgL > 1.80)

if(digitalRead(dsensor)== LOW)

Dept. Of Electronics Communication Engineering Page 39


Driver Safety System 2023

Serial.println(" Drunk");

digitalWrite(buz, HIGH);

digitalWrite(relay, HIGH);

digitalWrite(led1, HIGH);

digitalWrite(led2, LOW);

else

Serial.println(" Normal");

digitalWrite(buz, LOW);

digitalWrite(relay, LOW);

digitalWrite(led1, LOW);

digitalWrite(led2, HIGH);

Dept. Of Electronics Communication Engineering Page 40


Driver Safety System 2023

CHAPTER 7
CONCLUSION AND FUTURE SCOPE

Dept. Of Electronics Communication Engineering Page 41


Driver Safety System 2023

7.1 Conclusion

In this project we have built up areal time model that can automatically lock the motor engine
when a drunken driver tries to drive a car. These days, car collisions are mostly observed. By
fitting this alcohol sensor into the car, we can save the life of the driver and furthermore the
rest of the travelers. The life time of the task is high. It has low or zero support cost and
obviously low power utilization. This is a developed system to check drunken driving. By
executing this outline a safe car travel is possible decreasing the mishap rate because of
drinking. By executing this outline, drunken drivers can be controlled so are the mishaps
because of drunken driving.

7.2 Future Works

The future scope of alcohol detection and eye blink detection systems in vehicles is likely to
be significant as the world continues to focus on improving road safety. Alcohol impairment
is a major contributor to traffic accidents, and the use of technology to detect and prevent it
has the potential to save thousands of lives.

Alcohol detection systems use a variety of methods to measure a driver's blood alcohol
content (BAC), including breath analysis, blood sampling, and even saliva analysis. Some
systems are designed to detect alcohol in real-time, while others can measure BAC over a
longer period of time. The accuracy of these systems varies, but many are able to detect
alcohol levels with a high degree of accuracy.

Eye blink detection systems, on the other hand, are designed to measure a driver's alertness
by analyzing their eye movements. A person's ability to blink is a good indicator of their
level of alertness, and these systems can detect when a driver's blinks become irregular,
which may indicate drowsiness or alcohol impairment.

Both of these technologies have the potential to significantly reduce the number of
alcohol-related accidents on the road. However, there are also concerns about their
accuracy, privacy, and potential for misuse. For example, some people may be reluctant to
have their blood alcohol content measured by a device in their vehicle, and there are
concerns about the potential for false positives or false negatives.

In the future, it is likely that both alcohol detection and eye blink detection systems will
continue to improve and become more widely adopted. As these technologies become

Dept. Of Electronics Communication Engineering Page 42


Driver Safety System 2023

more sophisticated, they may also be used in conjunction with other safety systems, such
as lane departure warning and collision avoidance systems, to create a more
comprehensive and effective approach to improving road safety.

Overall, the future scope of alcohol detection and eye blink detection systems in vehicles
is bright, and they have the potential to significantly reduce the number of alcohol-related
accidents on the road. However, it is important to carefully consider the potential benefits
and risks of these technologies and to ensure that they are implemented in a way that
respects the privacy and autonomy of drivers.

Government must authorize laws to introduce such circuit in each car and must manage all
car organizations to preinstall such systems while manufacturing the car itself. If it is
achieved, the death rate because of drunken drivers can be brought to least level. In this kind
of system, securely landing of car aside without disturbing other vehicles can also be added
as a future extension.

Dept. Of Electronics Communication Engineering Page 43


Driver Safety System 2023

CHAPTER 8

REFRENCES

Dept. Of Electronics Communication Engineering Page 44


Driver Safety System 2023

8.1 REFRENCES

1 Dr. Charles Kim,Embedded computing with pic16F877A.

2. Martin Jawitz,Printed circuit board materials hand book.

3. 8051 Microcontroller Complete Reference, 3rd Edition Handbook on

different displays.

4. Electronic Device and Circuits, Millman.

5. Electronic Circuit Analysis, K.Srirnivasan.

6. Lee, Assessing the Feasibility of Vehicle-Based Sensors To Detect Alcohol


Impairment. 2010, National Highway Traffic Safety Administration: Washington,
DC

Dept. Of Electronics Communication Engineering Page 45

You might also like