Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 48

ALCOHOL SENSING ALERT WITH ENGINE

LOCKING PROJECT

ALCOHOL SENSING ALERT WITH ENGINE LOCKING PROJECT


BY

Rathod Janki A. (146140311079)

Raychur Kirti L. (146140311081)

UNDER THE GUIDENCE OF:

Internal Guide External Guide

MS URJA SHAH MR.VATSAL JETHVA


(DECE,GGP,AHMEDABAD) 3RD FLOOR,
SHREE VARDHMAN COMPLEX,
NEAR VIJAY CROSS ROAD

PROJECT REPORT SUBMITTED TO

ELECTRONIC & COMMUNICATION ENGINEERING


Government polytechnic for Girls,

Ahmadabad

October-2016

DEPARTMENT OF ELECTRONIC & COMMUNICATION


ENGINEERING
Government polytechnic for Girls, Ahmadabad

( Affiliated to Gujrat Technological University , Ahmedbad )

1
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CERTIFICATE

This is to certify that Miss Rathod janki a. from GOVERNMENT POLYTECHNIC FOR
GIRLS,AHEMDABAD having Enrolment No:146140311079 have completed report on Final
project report having title "Alcohol sensing alert with engine locking project", in a group
consisting of 2 persons under the guidance of the guide Ms. Urja shah.

The mentor from the industry for the project :

Name : Mr. VATSAL JETHVA


Industry : Archtech Automation
3rd floor, shree vardhman complex,
Vijay cross road
Ahmedabad-3800061
Contact : 9033082352

Institute Guide Head of department

(Ms.Urja shah) (Mr. Sanjay S. Patel)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


Government Polytechnic for Girls, Ahmadabad

2
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CERTIFICATE

This is to certify that Miss Raychur kirti l. from GOVERNMENT POLYTECHNIC FOR
GIRLS,AHEMDABAD having Enrolment No:146140311081 have completed report on Final
project report having title "Alcohol sensing alert with engine locking project", in a group
consisting of 2 persons under the guidance of the guide Ms.Urja shah.

The mentor from the industry for the project :

Name : Mr. VATSAL JETHVA


Industry : Archtech Automation
3rd floor, shree vardhman complex,
Vijay cross road
Ahmedabad-3800061
Contact : 9033082352

Institute Guide Head of department

(Ms.Urja shah) (Mr. Sanjay S. Patel)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


Government Polytechnic for Girls, Ahmadabad

3
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

ACKNOWLEDGEMENT
It is my privilege to express my sincerest regards to my project
coordinators, Ms.Vatsal jethva for their valuable inputs, able guidance,
encouragement, whole hearted cooperation and constructive criticism
throughout the duration of my project.

I deeply express my sincere thanks to our internal guide Mrs.Urja


shah i for encouraging and allowing us to present the project on "Alcohol
Sensing Alert with engine locking system " at our department
premises for partial fulfillment of the requirements leading to the award of
diploma degree.

I take this opportunity to think all our lecturers who have directly or
indirectly helped my project.

I pay my respects and love to my parents and all other family


members and friends for their love and encouragement in my project. Last
but not least we express our thanks to our friends for their cooperation
and support.

RATHOD JANKI A. (146140311079)

RAYCHUR KIRTI L. (146140311081)

Government polytechnic for girls, Ahmadabad

4
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

INDEX
CONTENTS PAGE NO.
Title Page .........................................................................................................1

Certificate .2
Acknowledgment...4
Index...5
Index of figure6
Abstract...7

CHAPTER-1 INTRODUCTION 8
1.1 Industry Introduction9
1.2 Introduction of project..11

CHAPTER-2 BLOCK DIAGRAM 12


2.1 Block diagram of project..13
2.2 Explanation of block diagram..13

CHAPTER-3 CIRCUIT DIAGRAM 16


3.1 Circuit diagram of project.17
3.2 Description of Circuit diagram..18
3.3 Component list..19

CHAPTER-4 SOFTWARE TESTING 32


4.1 Introduction of embedded c. 33
4.2 Flow Chart.35
4.3 Programming in embedded c.36
4.4 Result of program...37

CHAPTER-5 SIMULATION,LAYOUT AND HARDWARE TESTING 38


5.1 Introduction of PROTEUS.....39
5.2 Schematic of Circuit Diagram.39
5.3 Layout.39
5.4 Hardware Implementation & Testing..40
5.5 Result...40

CHAPTER-6 CONCLUSION 41
6.1 Conclusion42
6.2 Reference..43

DATA SHEET

5
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

INDEX OF FIGURE
CONTENTS PAGE NO.

3.1 CIRCUIT DIAGRAM OF PROJECT 17


1.ATmega328 Fig : 3.4.1 20
2.Voltage regulator IC LM7805 Fig:3.4.2 21
3. Bridge Rectifier Fig :3.4.3 22
4.LED Fig:3.4.4 23
5.Alcohol Sensor Fig :3.4.5 24
6.DC Motor Fig:3.4.6 25
7. Resistor Fig:3.4.7 26
8. Capacitor Fig : 3.4.8 27
9.USB to UART converter Fig :3.4.9 28
10. Motor Driver L293D Fig :3.4.10 29
11.Crystal Fig:3.4.11 30
12. Push Button Fig :3.4.11 31
4.4 Result of program 37
5.2 Simulation 39
5.3 Layout 39
5.4 Hardware Implementation & Testing 40

6
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

ABSTRACT
We usually come across drink and driving cases where drunk drivers crash their cars
under the influence of alcohol causing damage to property and life. So here we propose
an innovative system to eliminate such cases. The main aim of this embedded application
is to detect the alcohol drunken people. We are developing an embedded kit which will be
placed in vehicle. Now the vehicle will be under the control of the kit. If a driver is drunk
and tries to drive the system detects alcohol and presence in her/him breath and locks the
engine so that the vehicle fails to start. In another case if the driver is not drunk while
he/she start the vehicle and engine is started but he/she drinks while driving the sensor
still detects can stop it to roadside. When alcohol sensor detects, the buzzer will buzz and
engine will be locked.

7
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER-1
INTRODUCTION

8
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

1.1 INDUSTRY INTRODUCTION


COMPANY PROFILE

Welcome to Divolqa Group

As the name suggests, we at Divolqa constantly make an efforts to achieve the goals
set out by virtue of being innovative and creative. Our motto is to dream, innovate, and smart
work. We aim to promote the commitment towards the excellence in services.

Introduction

Divolqa Group is diversified in different sectors according to technology and market


requirements.

Divolqa group believes in providing superior market need. Divolqa group offers a
complete set of solutions, across manufacturing functions and process. Divolqa Group end-
to-end manufacturing solutions drives innovation and help for improving business processes,
increase responsiveness, control costs and reduce time to market.

About Us :

D i
v
o l
D i v o l q qa
I n d u s t rai a
l & G
H o s p i trDao il v
T r a i n io
nu lgq a
Tpe c
h n o
n i c s
Divolqa Technonics offers Automation & control based solutions, Manufacturing of
Interfacing Board, Controller Development Board.

9
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

Divolqa Industrial & Hospital Training provides Hospital Visit, Hospital Training and
Company Training.

Divolqa group ensures that each services becomes more


Accurate, Reliable and capable of managing global business. We
create innovative projects for our Students/Clients by our
Business Expertise along with a complete range of services.

MANUFACTURING DIVISION:

We manufacture all kind of Microcontrollers Development Board & Interfacing


Board.
We also deal with Sensors & Modules used in Automation Industry.
Dealer of LED Lights & Home Automation Products.

EDUCATIONAL AREAS:

We have already conducted college campus workshop in different areas of Electronics


at following colleges.

1. BABARIA INSTITUTE OF TECHNOLOGY, VADODARA


2. LDRP-ITR, GANDHINAGAR
3. ADIT, NEW V.V.NAGAR

We have also provided Controller Development Board & Interfacing Board to above
mentioned colleges for student practising.

OUR ASSOCIATE COMPANIES:

1. NIRAV ELECTRONICS
2. HISPEED TECHNOLOGIES
3. SPARK TECHNOLOGIES
4. ENKI ROBOTICS AND AUTOMATION
5. VARNINDRA ELECTRONICS TECHNOLOGY

CONTACT PERSON:

Mr. Nikunj Kothari

+91 90330 82352

Mr. Apurva Patel

+91 96623 58110

10
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

1.2 INTRODUCTION OF PROJECT


The project is basically used for controlling and locking by monitoring devices
connected through controller from anywhere. Due to such kind of technology it is very easy
to control and monitor different devices.

In this project we used Transformer which provides input 230 volt. Here, we
use a step down transformer which converts the signal into electrical energy. We also used
Rectifier which converts the 230V ac signal into dc signal. Here, Regulator gives constant
voltage at output. We used arduino (microcontroller) and signal gives between arduino and
buzzer. Here, we use a MQ-6 alcohol sensor. If alcohol sensor sense the signal and this signal
gives to the arduino. Arduino will control the signal and buzzer becomes on and dc motor
becomes off either alcohol sensor is not sense the signal hence, buzzer is at off condition and
dc motor is at off condition. Here, dc motor acts as a vehicle engine.

11
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER-2
BLOCK DIAGRAM

12
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

2.1 BLOCK DIAGRAM OF PROJECT

TRANSFOR RECTIFIER REGULATOR


MER

ALCOHOL BUZZER

SENSOR ARDUINO

DC MOTOR

2.2 BLOCK DIAGRAM DISCRIPTION IN DETAIL

Description :
Description of each block is shown below: In the block diagram of alcohol
sensing alert with engine locking project. There are main blocks are Transformer, Rectifier,
Regulator, Alcohol sensor, Buzzer, Dc motor are connecting with Arduino. Transformer
provides input 230 volt. Here, we use a step down transformer which converts the signal into
electrical energy and this signal is given to the rectifier. Rectifier converts the 230V ac signal
into dc signal. Here, we use a bridge rectifier. Bridge rectifier gives the signal to regulator.
Regulator gives constant voltage at output. Here, we use a 7805voltage regulator IC which is
covert the 230V dc signal into the 5 voltage dc signal at output. This signal gives to the
arduino and also gives between arduino and buzzer. Here, we use a MQ-6 alcohol sensor. If
alcohol sensor sense the signal and this signal gives to the arduino. Arduino will control the
signal and buzzer becomes on and dc motor becomes off either alcohol sensor is not sense the
signal hence, buzzer is at off condition and dc motor is at off condition.

TRANSFORMER:
A device that step up or step down the ac voltage provided by the wall outlet
desired amplitude through the action of a magnetic field. An ac device used to change high
voltage low current ac and vice-versa without changing the frequency.

13
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

In brief, Transfers electric power from one circuit to another. It does so without a change of
frequency. It accomplishes this by electromagnetic induction. Where the two electric circuits
are in mutual inductive influence of each other.

Principle of operation, It is based on principle of mutual induction. According to which an


electro motive force is induced in a coil when current in the neighboring coil changes. Here a
step down transformer is coverts 230 volts ac into 12 volts ac. Its current rating is 4 amperes.

Rectifier:
Rectifier is a device with the help of which the alternating current is converted in to
the direct current and the rectification is the process in which the alternating is converted in to
the direct current.

Here we use a bridge rectifier. Which convert the 230v ac signal into 230v dc signal.

RECTIFIER
Ac supply dc supply

Regulator:
Here we use a LM7805 IC as a voltage regulator. It gives a 5volts at output. The
voltage output by the LM78xx series of voltage regulators is the last two digits of the number.
A LM7805 ends with 05 thus, it outputs 5 volts. The 78 part is just the convention that the
chip makers use to denote the series of regulators that outputs positive voltage. The other
series of regulators, the LM79XX is the series the output negative voltage.

So,

LM78XX: voltage regulator that output positive voltage, XX= voltage output

LM79XX: voltage regulator that output negative voltage, XX=voltage output.

Input voltage Vin 1 7805 VOLTAGE 3 Vout Output voltage


REGULATOR

2 Ground

Alcohol sensor:
Here we use a MQ-135 semiconductor sensor for LPG as a alcohol sensor.Sensitive
material of MQ-135 gas sensor is Sno2 which with lower conductivity in clean air. When the
target combustible gas exist, the sensor conductivity is more higher along with the gas

14
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

concentration rising. MQ-135 gas sensor has high sensitivity to propane, butane and LPG,
also response to natural gas. The sensor could be used to detect different combustible gas,
especially methane, it is with low cost and suitable for different application.

Arduino :
Arduino is a tool for making computers that can sense and control more of the
physical world than your desktop computer.The arduino programming language is an
implementation of wiring , a similar physical computing platform , which is based on the
processing multimedia programming environment.There are many other microcontrollers
and microcontroller platforms available for physical computing. Parallax basic stamp,
netmedias bx-24,phidgets , mits handyboard , and many others offer similar
functionality.

Buzzer :
A magnetic effect is produced when a battery is connected to a buzzer s circuitry
and the button is pressed. This causes electricity to flow through through the coils which
attracts the armature and produces a sound. The current breaks at the device contact screw ,
thereby collapsing the magnetic , field until the buzzer button is pressed.

Dc motor :
When a current carrying conductor is placed in a magnetic field , it experiences a
torque and has a tendency to move. This is known as motoring. If the direction of current
is the wire is reversed , the direction of rotation also reverse.When a magnetic field and
electric field interact they procedure a mechanical force , and based on that the working
principle of dc motor is established.

15
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER-3
CIRCUIT DIAGRAM

3.1 CIRCUIT DIAGRAM OF PROJECT

16
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

17
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

3.2 DESCRIPTION OF CIRCUIT DIAGRAM

This is circuit of alcohol sensing alert with engine locking system which consist
of microcontroller ATMEGA328 , motor , buzzer , MQ-135 sensor and power supply.

Power supply is made with the help of 7805 IC. 9volts is supplied to the circuit
through battery. LED is kept for indication whether the circuit is working or not.

MQ-135 sensor is three pin sensor. This is connected with microcontroller


ATMEGA328 at pin 14 ,15 and 16.the alcohol sensor senses the alcohol level in the air. The
sensed level depends upon the sensitivity of the alcohol level. It senses the alcohol level in
human breath.

UART connected with at 2 and 3 pin microcontroller. In this circuit diagram dc


motor drive LM293D is used. This motor driver IC is used for improving the current level

DC motor is connected with LM293D and this motor drive connected with
microcontroller at pin 23 and 24. Here a DC motor used as a vehicle , which is ON and OFF
as per sensing.

Buzzer is connected with microcontroller in pin 17 and 19 as shown in circuit


diagram. Buzzer is also become ON and OFF as per sensing and it also defines the level of
alcohol.

18
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

3.3COMPONENT LIST :

1. Microcontroller ATMEGA328
2. Voltage regulator IC LM7805
3. Bridge rectifier
4. LED
5. Alcohol sensor MQ-135
6. DC Motor
7. Resistor
8. Capacitor
9. USB to UART converter
10. Motor driver IC L293D
11. Crystal
12. Push button

19
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

3.4 DESCRIPTION OF ALL COMPONENTS :

1.ATmega328:-

Fig : 3.4.1
The ATmega328 is a single chip micro-controller created by Atmel and belongs to the
megaAVR series. The Atmel 8-bit AVR RISC-based microcontroller combines 32 KB ISP
flash memory with red-while-write capabilities, 1KB EEPROM, 2 KB SRAM, 23 general
purpose I/O lines, 32 general purpose working register, three flexible timer/counter with
compare modes, internal and external interrupts, serial programmable USART, a byte-
oriented 2-wire serial interface, SPI serial port, 6 channel 10-bit A/D converter,
programmable watchdog timer with internal oscillator. The device operates between 1.8-5.5
volts.

ATmega328 is the ATMEL Microcontroller on which Arduino UNO is based. This


product let you to realize your small project without using a full size Arduino board. To make
this microcontroller working with the Arduino IDE you need a16 MHz crystal, a 5 V power
supply and a serial connection. Atmel's ATMega328 8-Bit Processor in 28 pin DIP package.
It's like the ATmega168, with double the flash space. 32K of program space. 23 I/O lines, 6 of
which are channels for the 10-bit ADC. Runs up to 20MHz with external crystal.

Today the ATmega328 is commonly used in many projects and autonomous systems
where a simple, low-powered, low cost micro-controller is needed. Perhaps the most
common implementation of this chip is on the popular Arduinodevelopment platform,
namely the Arduino Uno and Arduino Nano models.

20
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

2.Voltage regulator IC LM7805:


The 78xx is a family of self-contained fixed linear integrated circuits. the 78xx family
is commonly used in electronic circuits requiring a regulated power supply due to their
ease-of-use and low cost.

Fig : 2

For ICs within the family, the XX is replaced with two digits, indicating the output
voltage (for example, the 7805 has a 5-volt output, while the 7812 produces 12 volts). The
78xx lines are positive voltage regulators: they produces a voltage that is positive relative
common ground.

There is a related line of 79xx devices which are complementary negative voltage
regulators. 78xx lines and 79xx ICs can be used in combination to provide positive and
negative supply voltages in the same circuit. 78xx ICs have three terminals and are
commonly found in the TO-220 from factor, although they are available in surface-mount,
TO-92, and TO-3 packages.

These devices support an input voltage anywhere from around 2.5 volts over the
intended output voltage up to maximum of 35 to 40 volts depending on the model, and
typically provide 1 or 1.5 amperes of current (though smaller or larger packages may hsve a
lower or higher current rating).

21
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

3.Bridge rectifier :

Fig : 3
A bridge rectifier is an arrangement of four or more diodes in a bridge circuit
configuration which provides the same output polarity for either input polarity. It is used for
converting an alternating current input into a direct current output.

A bridge rectifier provides full wave rectification from a two wire ac input, therefor
resulting in a lower weight and cost when compared to a rectifier with a three wire input from
a transformer with a center tapped secondary winding.

There are many types of bridge rectifier and at future electronics we stock many of the
most common type categorized by maximum average rectified current, maximum reverse
voltage, maximum peak current, forward voltage, packaging type and maximum reverse
current.

The parametric filters on our website can help refined your search results depending on
the required specifications. The most common size for maximum average rectified current are
1A, 1.5A, 4A, 25A and 35A.

We also carry bridge rectifiers with maximum average rectified current as high as
1000A. Forward voltage can range from 450mv to 1.1kv, with the most common bridge
rectifier semiconductor chips having a forward voltage of 1.1v or 1v.

22
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

4.LED:

Fig : 4
A light emitting diode is a two lead semiconductor light source. It is ap-n junction
diode, which emits light when activated. When a suitable voltage is applied to the leads,
electrons are able to recombine with electrons holes within the device, releasing energy in the
form of photons. This effect is called electroluminescence, the color of the light
(corresponding to the energy of the photons) is determined by the energy band gap of the
semiconductor.

An LED is often small in area (less than 1mm square) and integrated optical
components may be used to shape its radiation pattern. Infrared LEDs are still frequently
used as transmitting elements in remote control circuits, such as those in remote controls for a
wide verity of consumer electronics. The first visible light LEDs were also of low intensity,
and limited to red. Modern LEDs are available across the visible, ultraviolet and infrared
wavelengths, with very high brightness.

Recent developments in LEDs permit them to be used in environmental and task


lighting LEDs have many advantages over incandescent light sources including lower energy
consumption, lower lifetime improved physical robustness, smaller size and faster switching.
Light emitting diodes are now used in application as diverse as aviation lighting, automotive
headlamps, advertising, general lighting, traffic signal, camera flashes and lighted wallpaper.

23
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

5.Alcohol sensor MQ-135:

Fig : 5
In current technology scenario, monitoring of gases produces is very important. From
home appliances such as air conditioners to electric chimneys and safety systems at industries
monitoring of gases is very crucial.

Gas sensors are very important of such systems. Small like a nose, gas sensors
spontaneously react to the gas present, thus keeping the system updated about any
alternations that occur in the concentration of molecules at gaseous state.

Gas sensors are available in wide specification depending on the sensitivity levels,
type of gas to be sensed, physical dimensions and numerous other factors. This insight covers
a methane gas sensor that can sense gases such as ammonia which might get produced from
methane.

When a gas interacts with this sensor, it is first ionized into its constituents is then
absorbed by sensing element. This adsorption creates a potential difference on the element
which is conveyed to the processor unit through output pins in form of current.

The gas sensor module consist of a steal exoskeleton under which a sensing element is
housed. This sensing subjected to current through connecting leads. This current is known as
heating current through it, the gases coming close to the sensing element get ionized and are
absorbed by the sensing element. This changes the resistance of the sensing elements which
alerts the value of the current going out of it.

24
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

25
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

6.DC MOTOR:
A DC motor is nay of a class of electrical machines that converts direct current
electrical power into mechanical power. The most common type rely on the forces 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.

Fig : 6
Most types produce rotary motion, a linear motor directly produces force and motion
in a straight line. DC motors were the first type widely used, since they could be powered
from existing direct-current lighting power distribution systems.

A DC motor speed can be controlled over a wide range, using either a variable supply
voltage or by changing the strength of current is its field windings. Small DC motors are used
in tools,toys,and appliances.

The universal motor can operater on direct current but is a lightweight motor used for
portable power tools and appliances. Larger DC motors are used in propulation of electric
vehicles, elevator and hoists, or in drives for steel rolling mills. The advent of power
electronics has made replacement of DC motors with AC motorspossible in many
applications.

A simple DC motor has a stationary set of megnets in the stator and an armature with
one or more windings of insulated wire wrapped around a soft iron core that concentrates the
magnetic field.

The windings usually have multiple turns around the core, an d in large motors there
can be several parallel current paths. The ends of the wire winding are connected to a
commutator. The commutator allows each armature coil to be energized in turn and connects
the rotating coils with the external power supply through brushes.

26
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

7.RESISTOR:

Fig : 7
A resistor is a passive two-terminal electrical component that implementselectrical
resistances as a circuit element. Resistors act to reduces current flow and, at the same time,
act to lower voltage levels within circuits. In electronic circuits, resistors are used to limit
current flow to adjust single levels, 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 control or a
lamp dimmer), or as sensing device for heat, light, humidity, force, or chemical activity.

Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in electronic equipment.

Practical resistors as discrete components can be composed of various compounds and


forms. Resistors are also implemented within integrated circuits.

The electrical function of a resistor is specified by its resistance: common commercial


resistors are manufactured over a range of more than nine orders of magnitude. The nominal
value of the resistive will fall within a manufacturing tolerance.

27
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

8.CAPACITOR;

Fig : 8
A capacitor is a passive two-terminal electrical component used to electrical energy
temporarily in an electric field. The forms of practical capacitors vary widely, but all contain
at least two electrical conductors (plates) separated by a dielectric.

The conductors can be thin films, foils or sintered beads of metal or conductive
electrolyte, etc. The non conducting dielectric acts to increase the capacitor charge capacity.
Materials commonly used as dielectrics include glass, ceramic, plastic, film, air, vacuum,
paper, mica, and oxide layers.

Capacitors are widely used as parts of electrical circuit in many common electrical
devices. Unlike a resister, an ideal capacitor does not dissipate energy. Instead, a capacitor
stores energy in the form of an electrostatic field between its plates.

If a battery has been attached to a capacitor for a sufficient amount of time, no current
can flow through the capacitor. However, if a time-varying voltage is applied across the leads
of the capacitor, a displacement current can flow. An ideal capacitor is characterized by a
single constant value, its capacitance.

Capacitance is defined as the ratio of the electric charge Q on each conductor to the
potential difference V between them. The SI unit of capacitance is the farad (f), which is
equal to the coulomb per volt (1c/v). The larger the surface area of the plates and the
narrower gap between them, the greater the capacitance is.

In practice, the dielectric between the plates passes a small amount of leakage current
and also has an electric field strength limit, known as the breakdown voltage. The conductors
and leads introduce an undesired inductance and resistance.

28
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

9.USB TO UART CONVERTER:

Fig : 9
Serial communication is most popular interface between device and this applies to
microcontroller and computer. UART is one of those serial interfaces. Classically, most serial
interface from microcontroller to computer is done through serial port. However since
computer serial port used RS232 protocol and microcontroller used TTL UART, a level
shifter is needed between this interfaces.

Recently, serial port of computer have been phase out, it have been replaced with USB,
of course most developer chooses USB to serial converter to obtain virtual serial port. The
level shifter is still necessary for UART interface.

Thus, circuit decided to develop a USB to UART converter which offers USB plug and
play. Direct interface with microcontroller and it provide low current 5V supply from USB
port.This is a USB to serial UART (TTL level) converter module. It is allow you to connect
your computer through USB port and use it as a regular serial communication.

All USB protocol is handled within the module. There is no other device or programming
required. This board features innovations that set it apart from other USB to serial converter
boards. Innovations feature like 256 byte receive buffer and 128 byte transmit buffer utilize
new buffer smoothing technology to allow for high data throughput.

The TX and RX pins from the USB SER can be connected directly to RX and TX pins of
your preferred microcontroller or serial application for a simple serial cable replacement
connection.

The board attaches directly to the USB bus via a standard type min B receptacle
connector. It shows up on any windows computer as a standard serial COM port. Any
applications that to this COM port is automatically convert to USB and back to UART to
your target board.

29
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

10.MOTOR DRIVER L293d :

Fig : 10
L293D is a motor driver integrated circuit which is used to drive DC motor rotating in
either direction. It is a 16-pin IC which can control asset of two DC motor simultaneously.
The L293D uses 5V for its own power and external power source is needed to drive the
motors. Which can be up to 36V and draw up to 600MA

There are two drive pins on L293D. pin 1 (left H-bridge) and pin 9 (right H-bridge). To
turn ON the corresponding motor, pin 1 or 9 need to be set to high. If either pin 1 or 9 goes
low then the motor in the corresponding section will go off(high impedance). These
inputs(1and 9)are the ones that should br used to control motor START/STOP and motor
speed under PWM, sine there would be high impedance output during low semi-period of
PWM,it would not provoke overload of the L293D when the motor is turning.

Thus, PWM or motor ON/OFF control should never be input to pins 2,7,15,10, which should
only be used to control direction (clock wise-counter clockwise).the direction-defining four
input pins for the L293D are pin 2 and 7 on the left and pin 15 and 10 on the right as shown
on the pin diagram. Left input pins will determine the rotation of motor connected on the left
side and right input for motor on the right hand side. The motors are rotated on the basis of
the inputs provided at the input pins as LOGIC 1 or LOGIC 0.

30
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

11.CRYSTAL:

Fig : 11

A crystal oscillator is an electronic oscillator circuit that uses the mechanicalresonance of


a vibrating crystal of piezoelectric material to create an electrical signal with a precise
frequency.

This frequency is commonly used to keep track of time, as in quartz wristwatches, to


provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for
radio transmitters and receivers.

The most common type of piezoelectric resonator used is the quartz crystal, so oscillator
circuits incorporating them became known as crystal oscillators, but other piezoelectric
materials including polycrystalline ceramics are used in similar circuits.

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds
of megaheartz. More than two billion crystals are manufactured annually.

Most are used for consumer devices such as wristwatches, clocks, radios, computers, and
cell phones. Quartz crystals are also found inside test and measurement equipment, such as
counters, signal generators, and oscilloscopes.

31
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

12.PUSH BUTTON :

Fig : 12
A push button (also spelled pushbutton ) or simply button is a simple switchmechanism
for controlling some aspect of a machine or a process. Buttons are typically made out of hard
material, usually plastic or metal

The surface is usually flat or shaped to accommodate the human finger or hand, so as to
be easily depressed or pushed. Buttons are most often biased switches, through even many
unbiased buttons (due their physical nature) require a spring to return to their un-pushed state.

Different people use different terms for the pushing of the button, such as press, depress,
mass, hit and punch. The push-button has been utilized in calculators, pushbutton telephone,
kitchen appliances, and various other mechanical and electronic devices, home and
commercial.

In industrial and commercial applications, push buttons can be connected together by a


mechanical linkage so that the act of pushing one button causes the other button to be
released.

In this way, a stop button can force a start button to be released. This method of
linkage is used in simple manual operations in which the machine or process have no
electrical circuits for control.

32
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER-4
SOFTWARE TESTING

33
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

4.1 INTRODUCTION OF EMBEDDED C


Embedded C is a set of language extensions for the C Programming language by
the C Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as fixed-point
arithmetic, multiple distinct memory banks, and basic I/O operations.

NECESSITY

During immature years of microprocessor based systems, programs were


developed using assemblers and fused into the EPROMs. There used to be no mechanism to
find what the program was doing. LEDs, switches, etc. were used to check for correct
execution of the program. Only a select few developers had In-Circuit Emulator's (ICE's), but
they were too costly and were not very reliable.

As time progressed, use of microprocessor-specific assembly-only as the


programming language reduced and embedded systems moved onto C as the embedded
programming language of choice. C is the most widely used programming language for
embedded processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are prime
requirements.

As assembly language programs are specific to a processor, assembly language


didnt offer portability across systems. To overcome this disadvantage, several high level
languages, including C, came up. Some other languages like PLM, Modula-2, Pascal, etc.
also came but could not find wide acceptance. Amongst those, C got wide acceptance for not
only embedded systems, but also for desktop applications. Even though C might have lost its
sheen as a mainstream language for general purpose applications, it still has a strong-hold in
embedded programming.

Due to the wide acceptance of C in embedded systems, various kinds of support


tools like compilers and cross-compilers, ICE, etc. came up, and all this facilitated
development of embedded systems using C. Assembly language seems to be an obvious
choice for programming embedded devices. However, use of assembly language is restricted
to developing efficient codes in terms of size and speed. Also, assembly codes lead to higher
software development costs and code portability is not there. Developing small codes are not
much of a problem, but large programs/projects become increasingly difficult to manage in
assembly language. Finding good assembly programmers has also become difficult.

Hence high level languages are preferred for embedded systems programming.

ADVANTAGES

- It is small and simpler to learn, understand, program and debug.

34
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

- Compared to assembly language, C code written is more reliable and scalable, more
portable between different platforms.
- C compilers are available for almost all embedded devices in use today, and there is a
large pool of experienced C programmers
- Unlike assembly, C has advantage of processor independence and is not specific to
any particular microprocessor/microcontroller or any system. This makes it
convenient for user to develop programs that can run on most of the systems.
- It supports access to I/O and provides ease of management of large embedded
projects.
- Java is also used in many embedded systems but Java programs require the Java
Virtual Machine (JVM), which consumes a lot of resources. Hence it is not used for
smaller embedded devices.
- In Embedded applications there is a need to read/write data on a given address, and in
C it is easy to access and modify addresses, because of the pointers which are a
language feature.
- As C combines functionality of assembly language and features of high level
languages, C is treated as a middle-level computer language or high level assembly
language.
- It is fairly efficient.

DISADVANTAGE

- Requires object oriented programming.


- Little existing data in object form
- Nonexistent (or poor) query and reporting tools.
- Limited con currency control and transaction management.
- Unproven performance.
- Substantial change and lemming required

Key features of embedded c.

- It is easy and less time consuming to write in c than assembly.


- C is easier to modify and update..
- You can use code available in function libraries.
- C code is portable to other microcontroller with little or no modification.
- A good understanding of c data types for 8051 can help programmers to create smaller
hex files.

35
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

4.2 FLOW CHART

START

INPUT SENSOR MQ6

IF ALCOHOL IS DETECT?

NO YES

DC MOTOR IS DC MOTOR IS
ON AND OFF AND
BUZZER IS OFF BUZZER IS ON

STOP

36
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

4.3 PROGRAMMING IN EMBBEDED C

int v=0;

void setup() {

Serial.begin(115200);//sets the baud rate

pinMode(Apin

, INPUT);//defining the pin modes

pinMode(8,OUTPUT);

pinMode(9,OUTPUT);

Serial.println("start");

void loop()

Serial.print("Alcohol value: ");

v= analogRead(Apin); // reading

37
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

Serial.println(v);

delay(50);

if (v<= 250)

Serial.println("no");

delay(50);

v=0;

digitalWrite(9,1);

digitalWrite(8,0);

Serial.flush();

else if(v>=400)

Serial.println("yes");

delay(50);

v=0;

digitalWrite(9,0);

digitalWrite(8,1);

Serial.flush();

38
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

else

Serial.println("nothing");

4.5RESULT OF PROGRAM

39
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

40
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER 5

STIMULATION, LAYOUT AND HARDWARE TESTING

5.1 INTRODUTION OF PROTEUS

WHAT IS PROTEUS?
PROTEUS is best simulation software for various designs with microcontroller. It is
mainly popular because of availability of almost all microcontrollers in it. So it is a handly
tool to test programs and embedded designs for electronic hobbyist. You can simulate your
programming of microcontroller in Proteus simulation software.

41
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

After simulating your circuit in Proteus you can directly make PCB design with it so it
could be an all in one package for students and hobbyist.

5.2 SCHEMATIC OF CIRCUIT DIGRAM

5.3 LAYOUT

42
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

5.4HARDWARE IMPLEMENTATION AND TESTING

5.5 RESULT

43
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

CHAPTER 6

CONCLUSION

44
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

6.1 CONCLUSION
The project ALCOHOL SENSING ALERT WITH ENGINE LOCKING SYSTEM has
been successfully designed and tested. It has been developed by integrating features of all the
hardware components used. Presence of every module has been reasoned out and placed
carefully thus contributing to the best working of the unit.

Secondly, using highly advances ICs and with the help of growing technology the project
has been successfully implemented.

45
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

This system has resulted designing, analysis, and building a prototype of a smart drink and
drunken driver detection and safety system for vehicles. The sensor used for detecting alcohol
for breath of the human. The smart alcohol detection and safety system for vehicles prototype
has been built and test runs have been carried out for the analysis of the system and the
evolutions for the prototype have been carried out with its sensor, controller and the
communication modules compared and evaluated.

Finally we conclude that EMBEDDED SYSTEM is an emerging field and there is a huge
scope for research and development.

6.2 REFERANCE
BOOKS :

1. Arduino handbook

2. Getting started with arduino 3rd edition

3. Electronics 2nd edition.

46
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

REFERENCE WEBSITE:

1. www.embedtronics.com

2. www.arduino.cc

3. www.arduino.org

4. www.nevonproject.com

5. www.circuit.com

6. www.wikipedia.com

7. www.hwsensor.com

47
ALCOHOL SENSING ALERT WITH ENGINE
LOCKING PROJECT

DATA SHEETS

48

You might also like