SlideShare ist ein Scribd-Unternehmen logo
1 von 54
1
MAJOR PROJECT REPORT
ON
VEHICLE ACCIDENT AND ALCOHOL SENSING
ALERT WITH ENGINE LOCKING SYSTEM
Submitted towards the partial fulfillment for the award of the degree of
BACHELOR OF TECHNOLOGY
In
Electronics & Communication Engineering
(Session 2015-2019)
SUBMITTED BY SUPERVISED BY
PRABHAT MISHRA (11151105) DR. SHARAD SHARMA
HITESH KUMAR SINGH(11151111) PROF. & HEAD
ECE DEPARTMENT
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
MAHARISHI MARKANDESHWAR ENGINEERING COLLEGE, MULLANA
MAHARISHI MARKANDESHWAR (Deemed to be University),
MULLANA-133207
DEC 2018
2
MAHARISHI MARKANDESHWAR ENGINEERING COLLEGE
MULLANA-133207
DEPARTMENT: ELECTRONICS AND COMMUNICATION
ENGINEERING
CERTIFICATE
Certified that major project work entitled “VEHICLE ACCIDENT AND ALCOHOL
SENSING ALERT WITH ENGINE LOCKING SYSTEM” is a bonafide work carried out in
the seventh semester by “ PRABHAT MISHRA( 11151105 ) & HITESH KUMAR SINGH(
11151111 ) ” in partial fulfilment for the award of Bachelor of Technology in “
ELECTRONICS AND COMMUNICATION ENGINEERING ” from MAHARISHI
MARKANDESHWAR (DEEMED TO BE UNIVERSITY) during the academic year 2018-
2019, who carried out the project work under the guidance and no part of this work has been
submitted earlier for the award of any degree
PROJECT COORDINATOR
DR. SHARAD SHARMA
PROF. & HEAD ECE DEPARTMENT
3
ABSTRACT
The main purpose behind this project is “Drunk driving detection”. Now a days, many accidents
are happening because of the alcohol consumption of the driver or the person who is driving the
vehicle. Thus, Drunk driving is a major reason of accidents in almost all the countries in the
world. Alcohol Detector in Car project is designed for the safety of the people seating inside the
car. This project should be fitted / installed inside the vehicle. If any Accident occurs then engine
goes off and Alarm goes on. If there is no alcohol / no accident, then the Engine remains on and
Alarm remains off. Even, if the Alcohol is detected, the engine goes off Alarm starts beeping.
4
ACKNOWLEDGEMENT
This is an acknowledgement of the intensive drive and success of our project is indeed without
mentioning of all those encouraging people who genuinely supported and encouraged me
throughout the project.
First and fore most ,we wish to take this opportunity to express our sincere thanks to the DR.
ASHOK KUMAR, Director, Maharishi Markandeshwar Engineering College for providing all
the facilities required for the project presentation.
We also thankful to our coordinator DR. SHARAD SHARMA, Prof., Head of the Department
ECE for the interest, technical support and suggestions during the project leading to our success.
We wish to express our healthy gratitude to my guide Mr. SHAMSHER, Lab Attendant, ECE
Department for patience & for gratuitous cooperation extended by him & who has given valuable
suggestions. We had the privilege to accomplish this project report on “VEHICLE ACCIDENT
AND ALCOHOL SENSING ALERT WITH ENGINE LOCKING SYSTEM”. We desire to
convey our heartful thanks to all the staff members & friends those who have directly or
indirectly involved in completing this project work.
5
Table of Contents
Title 1
Certificate 2
Abstract 3
Acknowledgement 4
Table of Content 5
List of Figure 7
List of Abbreviations 8
1. Introduction 9
1.1 Objective 9
1.2 Problem Statement 9
1.3 Motivation 9
2. Hardware Description 10
2.1 Circuit Diagram 10
2.2 Component List 11
2.2.1 Resistor 11
2.2.2 Capacitor 12
2.2.3 Microcontroller AT89S52 14
2.2.4 Alcohol Sensor 17
2.2.5 LM324 Comparator 19
2.2.6 LCD 20
2.2.7 LED 22
2.2.8 DC Motor 24
2.2.9 Power Supply 27
2.2.10 Keil Software 30
2.2.11 ISP Flash Microcontroller Programmer 42
2.2.12 Software Code 43
6
3. Hardware Implementation 49
3.1 Basic Concept 49
3.2 Working of Circuit 49
3.3 Application 50
4. Result 51
4.1 Circuit Front View 51
4.2 Circuit when not detecting any alcohol/accident 51
4.3 Circuit after detecting alcohol/accident 52
5. Conclusion/Future Scope 53
5.1 Conclusion 53
5.2 Future Scope 53
6. Reference 54
7
LIST OF FIGURES
2.1 Circuit diagram
2.2 Components List
2.2.1 Resistor
2.2.2 Capacitor
2.2.3 Microcontroller AT89S52
2.2.4 Alcohol Sensor
2.2.5 LM324 Comparator
2.2.6 LCD
2.2.7 LED
2.2.8 DC Motor
2.2.9 Power Supply
2.2.9.1 Transformer
2.2.9.2 Rectifier
2.2.9.3 Filter Capacitor
2.2.9.4 IC 7805 Voltage Regulator
2.2.10 Keil Software
2.2.11 ISP Flash Microcontroller Programmer
2.2.12 Software Code
3.1 Basic Concept
3.2 Working of Circuit
3.3 Applications
4.1 Circuit when not detected any alcohol or accident
4.2 Circuit after detecting accident or alcohol
5.1 Conclusion
5.2 Future Scope
2.2.2 Modern capacitors, by a cm rule.
8
LIST OF ABBREVIATION
LED Light Emitting Diode
BJT Bipolar Junction Transistor
UJT Unipolar Junction Transistor
JFET Junction Field Effect Transistor
MOSFET Metal Oxide Semiconductor Field Effect Transistor
CMOS Complementary Metal Oxide Semiconductor
TTL Transistor-Transistor Logic
OP-AMP Operational Amplifier
UHF Ultra High Frequency
9
CHAPTER-1
Introduction
1.1 Overview
As increase in the consumption of alcohol by the vehicle drivers, there has been hike in the
accidents being taken place. Even with development of the latest technology to stop these, there
are still cases of such happening. To avoid this, we are introducing a project called VEHICLE
ACCIDENT AND ALCOHOL SENSING ALERT WITH ENGINE LOCING SYSTEM.
This handy, easy to implement project sense the presence the alcohol (consumed by the driver) in
the vehicle, and immediately stops the engine and starts the alarms. Not only this, in the case of
any accident happening also, the circuit stops the engine and the starts off the alarm to allow the
other people travelling on the same road can know about the accident and they can help. So, it
can be used to prevent consumption of alcohol in vehicle. The circuit can sense the alcohol after
particular level thus minimizing the chances of accident. The moment the accident takes place or
alcohol is detected by the sensor, it sends the signal to the Microprocessor which in turn sends
the signal to the engine to stop and to the alarm to start off. This takes place until the alcohol is
not below the critical level.
1.2 Problem Statement
Previously, there was no technology to lock the engine of the vehicle after sensing the alcohol
consumption by the driver, which was considered to the main cause of the accidents. There was
manual checking after particular distance on the roads or the highways but still these checks
were not sufficient to stop the happening of the mishaps. So, to avoid these problems, this project
vehicle detection and alcohol sensing alert with engine locking system is developed.
1.3 Motivation
Vehicles are considered to the key element in this era. They are being developed on regular basis
to make them more and more safe. But, the one thing that makes people to feel afraid of seating
in the vehicle is accident. These accidents mostly take place under the influence of alcohol, and
there is no technology to minimize the chances of accident happening.
To avoid this problem, the Vehicle accident and alcohol sensing alert with engine locking system
is introduced.
10
CHAPTER-2
Hardware Description
2.1 CIRCUIT DIAGRAM
Figure 2.1 Circuit diagram
11
2.2 COMPONENTS LIST
 Resistor – 100K, 15K, 12K
 Capacitor- 22pF, 0.22µF, 0.1µF
 Microcontroller AT89S52
 Alcohol sensor
 LM324 comparator
 Buzzer
 LCD Display (16x2)
 LED’s
 DC motor(ignition)
 Driver IC
 Accident sensor /switch
 Software – Embedded C, Keil Microvision3, Express PCB
2.2.1 Resistor
Electronic Symbol
US Europe
A resistor is a two-terminal electronic component that produces a voltage across its terminals that
is proportional to the electric current through it in accordance with Ohm's law:
12
V = IR
Resistors are elements of electrical networks and electronic circuits and are ubiquitous in most
electronic equipment. Practical resistors can be made of various compounds and films, as well as
resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).The primary
characteristics of a resistor are the resistance, the tolerance, maximum working voltage and the
power rating. Other characteristics include temperature coefficient, noise, and inductance. Less
well-known is critical resistance, the value below which power dissipation limits the maximum
permitted current flow, and above which the limit is applied voltage. Critical resistance depends
upon the materials constituting the resistor as well as its physical dimensions; it's determined by
design. Resistors can be integrated into hybrid and printed circuits, as well as integrated circuits.
Size and position of leads (or terminals) are relevant to equipment designers; resistors must be
physically large enough not to overheat when dissipating their power.
2.2.2 Capacitor
Figure 2.2.2 Modern capacitors,by a cm rule
A capacitor or condenser is a passive electronic component consisting of a pair of conductors
separated by a dielectric. When a voltage potential difference exists between the conductors, an
electric field is present in the dielectric. This field stores energy and produces a mechanical force
between the plates. The effect is greatest between wide, flat, parallel, narrowly separated
conductors.
An ideal capacitor is characterized by a single constant value, capacitance, which is measured in
farads. This is the ratio of the electric charge on each conductor to the potential difference
between them. In practice, the dielectric between the plates passes a small amount of leakage
current. The conductors and leads introduce an equivalent series resistance and the dielectric has
an electric field strength limit resulting in a breakdown voltage.
Capacitors are widely used in electronic circuits to block the flow of direct current while
allowing alternating current to pass, to filter out interference, to smooth the output of power
supplies, and for many other purposes. They are used in resonant circuits in radio frequency
equipment to select particular frequencies from a signal with many frequencies.
13
Ceramic capacitor
In electronics ceramic capacitor is a capacitor constructed of alternating layers of metal and
ceramic, with the ceramic material acting as the dielectric. The temperature coefficient depends
on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the class 2) often
has high dissipation factor, high frequency coefficient of dissipation.
Figure 2.2.2 Ceramic capacitors
A ceramic capacitor is a two-terminal, non-polar device. The classical ceramic capacitor is the
"disc capacitor". This device pre-dates the transistor and was used extensively in vacuum-tube
equipment (e.g., radio receivers) from about 1930 through the 1950s, and in discrete transistor
equipment from the 1950s through the 1980s. As of 2007, ceramic disc capacitors are in
widespread use in electronic equipment, providing high capacity & small size at low price
compared to other low value capacitor types.
Ceramic capacitors come in various shapes and styles, including:
 disc, resin coated, with through-hole leads
 multilayer rectangular block, surface mount
 bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF
applications
 tube shape, not popular now
Electrolytic capacitor
Figure 2.2.2 Axial lead (top) and radial lead (bottom) electrolytic capacitors
An electrolytic capacitor is a type of capacitor that uses an ionic conducting liquid as one of its
plates with a larger capacitance per unit volume than other types. They are valuable in relatively
14
high-current and low-frequency electrical circuits. This is especially the case in power-supply
filters, where they store charge needed to moderate output voltage and current fluctuations in
rectifier output. They are also widely used as coupling capacitors in circuits where AC should be
conducted but DC should not.
Electrolytic capacitors can have a very high capacitance, allowing filters made with them to have
very low corner frequencies.
2.2.3 Microcontroller AT89S52
The AT89S52 comes from the popular 8051 family of Atmel Microcontrollers. It is an 8-bit
CMOS microcontroller with 8K as Flash memory and 256 bytes of RAM. Since it is similar to
the trust worthy 8051 architecture these microcontrollers are as per industry standard. It has 32
I/O pins comprising of three 16-bit timers, external interrupts, full-duplex serial port, on-chip
oscillator and clock circuitry.
The Microcontroller also has Operating mode, Idle Mode and Power down mode which makes it
suitable for battery operated applications. Few considerable drawbacks of the microcontroller are
that it does not have in-built ADC and does not support SPI or I2C protocols. However, you can
utilise external modules for the same.
Features
 Compatible with MCS-51 Products
 8K Bytes of In-System Reprogrammable Flash Memory
 Fully Static Operation: 0 Hz to 33 MHz
 Three-level Program Memory Lock
 256 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Three 16-bit Timer/Counters
 Eight Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes
 4.0V to 5.5V Operating Range
 Full Duplex UART Serial Channel
 Interrupt Recovery from Power-down Mode
 Watchdog Timer
 Dual Data Pointer
15
 Power-off Flag
 Fast Programming Time
 Flexible ISP Programming (Byte and Page Mode)
Pin Diagram
Pin Description
Pin Number Pin Name Description
1 P1.0 (T2) Timer/Counter or 0th GPIO pin of PORT 1
2 P1.1 (T2.EX) Timer/Counter/External Counter or 1st GPIO pin of PORT 1
3 P1.2 2nd GPIO pin of PORT 1
4 P1.3 3rd GPIO pin of PORT 1
5 P1.4 4th GPIO pin of PORT 1
6 P1.5 (MOSI) MOSI for in System Programming or 5th GPIO pin of PORT 1
16
7 P1.6 (MISO) MISO for in System Programming or 6th GPIO pin of PORT 1
8 P1.7 (SCK) SCK for in System Programming or 7th GPIO pin of PORT 1
9 RST Making this pin high will reset the Microcontroller
10 P3.0 (RXD) RXD Serial Input or 0th GPIO pin of PORT 3
11 P3.1 (TXD) TXD Serial Output or 1st GPIO pin of PORT 3
12 P3.2 (INT0’) External Interrupt 0 or 2nd GPIO pin of PORT 3
13 P3.3 (INT1’) External Interrupt 1 or 3rd GPIO pin of PORT 3
14 P3.4 (T0) Timer 0 or 4th GPIO pin of PORT 3
15 P3.5 (T1) Timer 1 or 5th GPIO pin of PORT 3
16 P3.6 (WR’) Memory Write or 6th GPIO pin of PORT 3
17 P3.7 (RD’) Memory Read or 7th GPIO pin of PORT 3
18 XTAL2 External Oscillator Output
19 XTAL1 External Oscillator Input
20 GND Ground pin of MCU
21 P2.0(A8) 0th GPIO pin of PORT 2
22 P2.1 (A9) 1st GPIO pin of PORT 2
23 P2.2 (A10) 2nd GPIO pin of PORT 2
24 P2.3 (A11) 3rd GPIO pin of PORT 2
25 P2.4 (A12) 4th GPIO pin of PORT 2
26 P2.5 (A13) 5th GPIO pin of PORT 2
27 P2.6 (A14) 6th GPIO pin of PORT 2
17
28 P2.7 (A15) 7th GPIO pin of PORT 2
29 PSEN’ Program store Enable used to read external program memory
30 ALE / PROG’ Address Latch Enable / Program Pulse Input
31 EA’ / VPP External Access Enable / Programming enable Voltage
32 P0.7 (AD7) Address / Data pin 7 or 7th GPIO pin of PORT 0
33 P0.6 (AD6) Address / Data pin 6 or 6th GPIO pin of PORT 0
34 P0.5 (AD5) Address / Data pin 5 or 5th GPIO pin of PORT 0
35 P0.4 (AD4) Address / Data pin 4 or 4th GPIO pin of PORT 0
36 P0.3 (AD3) Address / Data pin 3 or 3rd GPIO pin of PORT 0
37 P0.2 (AD2) Address / Data pin 2 or 2nd GPIO pin of PORT 0
38 P0.1 (AD1) Address / Data pin 1 or 1st GPIO pin of PORT 0
39 P0.0 (AD0) Address / Data pin 0 or 0th GPIO pin of PORT 0
40 VCC Positive pin of MCU (+5V)
2.2.4 Alcohol Sensor
Alcohol Sensor – Analog Out
This alcohol sensor is suitable for detecting alcohol concentration on your breath, just like your
common breathalyzer. It has a high sensitivity and fast response time. Sensor provides an analog
output based on alcohol concentration
18
Applications
· Breath Analyzer
· Blood Alcohol Concentration Checker
· Alcohol Gas Sensor
Features
· High sensitivity to alcohol and small sensitivity to Benzine
· Fast response and High sensitivity
· Stable and long life
· Simple drive circuit of 5V DC with analog output
· Operation Temperature: -10 to 70 degrees C
19
2.2.5 LM324 Comparator
The LM324 operational amplifier IC can be worked as a comparator. This IC has 4 independent
operational amplifiers on a single chip. This a Low Power Quad Operational Amplifier and it has
high stability, bandwidth which was designed to operate from a single power supply over a wide
range of voltages. The quad amplifier can operate at supply voltages as low as 3.0 V or as high
as 3.2 V with quiescent currents about one fifth of those associated with the MC174.
The LM324 comparator circuit consists of sensor voltage, reference voltage, Vcc, ground and
output pins. The following circuit shows the LM324 IC circuit and here we are explaining about
the each pin of LM324 comparator.
Pin Description
Pin No. Function of the Pin
1 Output of the first comparator
2 Inverting input of the first comparator
3 Non-inverting input of the first comparator
4 Supply voltage 5V
5 Non-inverting input of the second comparator
20
6 Inverting input of the second comparator
7 Output of the second comparator
8 Output of the third comparator
9 Inverting input of the third comparator
10 Non-inverting input of the third comparator
11 Ground
12 Non-inverting input of the fourth comparator
13 Inverting input of the fourth comparator
14 Output of the fourth comparator
2.2.6 LCD
Liquid crystal display, a type of display used in digital watches and many portable computers.
LCD displays utilize two sheets of polarizing material with a liquid crystal solution between
them. An electric current passed through the liquid causes the crystals to align so that light
cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass
through or blocking the light.
The liquid crystals can be manipulated through an applied electric voltage so that light is allowed
to pass or is blocked.
By carefully controlling where and what wavelength (color) of light is allowed to pass, the LCD
monitor is able to display images. A back light provides LCD monitor’s brightness.
Other advances have allowed LCD’s to greatly reduce liquid crystal cell response times.
Response time is basically the amount of time it takes for a pixel to “change colors”. In reality
response time is the amount of time it takes a liquid crystal cell to go from being active to
inactive
Here the LCD is used at both the Transmitter as well as the receiver side.
The input which we give to the microcontroller is displayed on the LCD of the transmitter side
and the message sent is received at the receiver side which displays at the receiver end of the
LCD and the corresponding operation is performed
21
They make complicated equipment easier to operate. LCDs come in many shapes and sizes but
the most common is the 16 character x 4 line display with no backlight.
It requires only 11 connections – eight bits for data (which can be reduced to four if necessary)
and three control lines (we have only used two here). It runs off a 5V DC supply and only needs
about 1mA of current.
The display contrast can be varied by changing the voltage into pin 3 of the display.
Pin Description
From this description, the interface is a parallel bus, allowing simple and fast reading/writing of
data to and from the LCD. This waveform will write an ASCII Byte out to the LCD's screen.
While Vcc and Vss provide +5V and ground respectively, Vee is used for controlling LCD
contrast.
PIN SYMBOL I/O DESCRIPTION
1 Vss -- Ground
2 Vcc -- +5V power supply
3 Vee -- Power supply to
control contrast
4 RS I RS=0 to select
command register
RS=1 to select data
register
5 R/W I R/W=0 for write
R/W=1 for read
22
6 EN I/O Enable
7 DB0 I/O The 8-bit data bus
8 DB1 I/O The 8-bit data bus
9 DB2 I/O The 8-bit data bus
10 DB3 I/O The 8-bit data bus
11 DB4 I/O The 8-bit data bus
12 DB5 I/O The 8-bit data bus
13 DB6 I/O The 8-bit data bus
14 DB7 I/O The 8-bit data bus
The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits
at a time.
If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an
"E" Clock pulse with each nibble) are sent to make up a full eight bit transfer.
The "E" Clock is used to initiate the data transfer within the LCD.
Deciding how to send the data to the LCD is most critical decision to be made for an LCD
interface application.
Eight-bit mode is best used when speed is required in an application and at least ten I/O pins are
available.
The "R/S" bit is used to select whether data or an instruction is being transferred between the
microcontroller and the LCD.
If the Bit is set, then the byte at the current LCD "Cursor" Position can be reader written.
When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the
last instruction is read back.
2.2.7 LED
A light-emitting diode (LED) is a semiconductor diode that emits incoherent narrow spectrum
light when electrically biased in the forward direction of the pn-junction, as in the common LED
circuit. This effect is a form of electroluminescence
23
While sending a message in the form of bits such as 1,the data is sent to the receiver side
correspondingly the LED glows representing the data is being received simultaneously when we
send 8 as a data the LED gets off .
Color Coding
Color Potential Difference
Infrared 1.6 V
Red 1.8 V to 2.1 V
Orange 2.2 V
Yellow 2.4 V
Green 2.6 V
Blue 3.0 V to 3.5 V
White 3.0 V to 3.5 V
Ultraviolet 3.5V
24
ADVANTAGES
• LEDs have many advantages over other technologies like lasers. As compared to laser
diodes or IR sources
• LEDs have several advantages over conventional incandescent lamps. For one thing, they
don't have a filament that will burn out, so they last much longer. Additionally, their small plastic
bulb makes them a lot more durable. They also fit more easily into modern electronic circuits.
• The main advantage is efficiency. In conventional incandescent bulbs, the light-
production process involves generating a lot of heat (the filament must be warmed). This is
completely wasted energy, unless you're using the lamp as a heater, because a huge portion of
the available electricity isn't going toward producing visible light.
• LEDs generate very little heat. A much higher percentage of the electrical power is going
directly to generating light, which cuts down on the electricity demands considerably.
• LEDs offer advantages such as lower cost and longer service life. Moreover LEDs have
very low power consumption and are easy to maintain. Many functions can be assigned to a
robot easily using different colors of LEDs availible.
DISADVANTAGES OF LEDS
• LED performance largely depends on the ambient temperature of the operating
environment.
• LEDs must be supplied with the correct current.
• LEDs do not approximate a "point source" of light, so cannot be used in applications
needing a highly collimated beam.
But the disadvantages are quite negligible in this project as the negative properties of LEDs do
not apply and the advantages far exceed the limitations. So we prefer to use the LED as our light
source.
2.2.8 DC Motor
DC motors are configured in many types and sizes, including brush less, servo, and gear motor
types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic field is
maintained using either permanent magnets or electromagnetic windings. DC motors are most
commonly used in variable speed and torque.Motion and controls cover a wide range of
components that in some way are used to generate and/or control motion. Areas within this
category include bearings and bushings, clutches and brakes, controls and drives, drive
components, encoders and resolves, Integrated motion control, limit switches, linear actuators,
linear and rotary motion components, linear position sensing, motors (both AC and DC motors),
25
orientation position sensing, pneumatics and pneumatic components, positioning stages, slides
and guides, power transmission (mechanical), seals, slip rings, solenoids, springs.
Motors are the devices that provide the actual speed and torque in a drive system. This family
includes AC motor types (single and multiphase motors, universal, servo motors, induction,
synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well
as linear, stepper and air motors, and motor contactors and starters.
In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational
motion.
Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or
winding with a "North" polarization, while green represents a magnet or winding with a "South"
polarization).
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field
magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external
magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part
of the motor -- this includes the motor casing, as well as two or more permanent magnet pole
pieces. The rotor (together with the axle and attached commutator) rotates with respect to the
stator. The rotor consists of windings (generally on a core), the windings being electrically
connected to the commutator. The above diagram shows a common motor layout -- with the
rotor inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are such that when power
is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and
the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches
alignment, the brushes move to the next commutator contacts, and energize the next winding.
Given our example two-pole motor, the rotation reverses the direction of current through the
rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to continue rotating.
26
In real life, though, DC motors will always have more than two poles (three is a very common
number). In particular, this avoids "dead spots" in the commutator. You can imagine how with
our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned
with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a
moment where the commutator shorts out the power supply (i.e., both brushes touch both
commutator contacts simultaneously). This would be bad for the power supply, waste energy,
and damage motor components as well. Yet another disadvantage of such a simple motor is that
it would exhibit a high amount of torque” ripple" (the amount of torque it could produce is cyclic
with the position of the rotor).
So since most small DC motors are of a three-pole design, let's tinker with the workings of one
via an interactive animation (JavaScript required):
You'll notice a few things from this -- namely, one pole is fully energized at a time (but two
others are "partially" energized). As each brush transitions from one commutator contact to the
next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this
occurs within a few microsecond). We'll see more about the effects of this later, but in the
meantime you can see that this is a direct result of the coil windings' series wiring
27
There's probably no better way to see how an average dc motor is put together, than by just
opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a
perfectly good motor.
2.2.9 Power Supply
All digital circuits require regulated power supply. In this article we are going to learn how to get
a regulated positive supply from the mains supply.
2.2.9.1 Transformer
A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &
SECONDARY.
They are linked together through inductively coupled electrical conductors also called as CORE.
A changing current in the primary causes a change in the Magnetic Field in the core & this in
turn induces an alternating voltage in the secondary coil. If load is applied to the secondary then
an alternating current will flow through the load. If we consider an ideal condition then all the
energy from the primary circuit will be transferred to the secondary circuit through the magnetic
field.
28
The secondary voltage of the transformer depends on the number of turns in the Primary as well
as in the secondary.
2.2.9.2 Rectifier
A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use
a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode
of the diode is positive with respect to the cathode also called as forward biased condition &
blocks current in the reversed biased condition.
They are of two types depending on the cycle which they convert AC to DC into.
 Half Wave Rectifier
 Full Wave Rectifier
 Bridge Rectifier
2.2.9.3 Filter Capacitor
Even though half wave & full wave rectifier give DC output, none of them provides a constant
output voltage. For this we require to smoothen the waveform received from the rectifier. This
can be done by using a capacitor at the output of the rectifier this capacitor is also called as
“FILTER CAPACITOR” or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”.
Even after using this capacitor a small amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will charge to the peak
voltage during each half cycle then will discharge its stored energy slowly through the load while
the rectified voltage drops to zero, thus trying to keep the voltage as constant as possible.
29
If we go on increasing the value of the filter capacitor then the Ripple will decrease. But then the
costing will increase. The value of the Filter capacitor depends on the current consumed by the
circuit, the frequency of the waveform & the accepted ripple.
Where,
Vr = accepted ripple voltage.( should not be more than 10% of the voltage)
I = current consumed by the circuit in Amperes.
F = frequency of the waveform. A half wave rectifier has only one peak in one cycle so F=25hz
Whereas a full wave rectifier has Two peaks in one cycle so F=100hz.
2.2.9.4 IC 7805 Voltage Regulator
7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input
voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp
although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also
has a built-in current limiter as a safety feature. 7805 is manufactured by many companies,
including National Semiconductors and Fairchild Semiconductors.
The 7805 will automatically reduce output current if it gets too hot.The last two digits represent
the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators is
designed to work in complement with the 79xx series of negative voltage regulators in systems
that provide both positive and negative regulated voltages, since the 78xx series can't regulate
negative voltages in such a system.
The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's
small component count and medium-power regulated 5V make it useful for powering TTL
devices.
Table 2.1. Specifications of IC7805
SPECIFICATIONS IC 7805
Vout 5V
Vein - Vout Difference 5V - 20V
Operation Ambient Temp 0 - 125°C
30
In our project, we have used9 volts transformer power supply. Why we are using this is to
continuously provide power to the circuit. Otherwise, if we use a battery chances are there when
current will completely loss. A.C transformer gives the input to Bridge Rectifier. Bridge
Rectifier converts A.C to D.C. After that we are using one filter capacitor 1000uf/25v
electrolytic capacitor. We are connecting this capacitor in parallel section. The main purpose of
this capacitor comes when there is any alternate peaks and this capacitor reduces those peaks. It’s
simply filtering that repull’s. After that we are using LM7805 Regulator. Most digital logic
circuits and processors need a 5 volt power supply. To make a 5 volt power supply, the LM7805
is simply an option. First connect the positive lead of our unregulated DC power supply to Input
pin, connect the negative lead to the Common. Also, we are using one red color led to indicate
the power.
2.2.10 Keil Software
Many companies provide the 8051 assembler, some of them provide shareware version of their
product on the Web, Kiel is one of them. We can download them from their Websites. However,
the size of code for these shareware versions is limited and we have to consider which assembler
is suitable for our application.
Kiel uVision2 is an IDE (Integrated Development Environment) that helps you write, compile,
and debug embedded programs. It encapsulates the following components:
. A project manager.
. A make facility.
. Tool configuration.
. Editor.
. A powerful debugger.
To help you get started, follow the given steps to write Embedded C program in Keil Software.
Output Imax 1A
31
Step-1:
Install Keil MicroVision-2 in your PC, Then after Click on that “Keil UVision-2” icon. After
opening the window go to toolbar and select Project Tab then close previous project.
Step-2:
Next select New Project from Project Tab.
32
Step-3:
Then it will open “Create New Project” window. Select the path where you want to save project
and edit project name.
Step-4:
Next it opens “Select Device for Target” window, It shows list of companies and here you can
select the device manufacturer company.
33
Step-5:
For an example, for your project purpose you can select the chip as 89c51/52 from Atmel Group.
Next Click OK Button, it appears empty window here you can observe left side a small window
i.e, “Project Window”. Next create a new file.
Step-6:
From the Main tool bar Menu select “File” Tab and go to New, then it will open a window, there
you can edit the program.
34
Step-7:
Here you can edit the program as which language will you prefer either Assembly or C.
Step-8:
After editing the program save the file with extension as “.c” or “.asm”, if you write a program in
Assembly Language save as “.asm” or if you write a program in C Language save as “.c” in the
selected path. Take an example and save the file as “test.c”.
35
Step-9:
Then after saving the file, compile the program. For compilation go to project window select
“source group” and right click on that and go to “Add files to Group”.
Step-10:
Here it will ask which file has to Add. For an example here you can add “test.c” as you saved
before.
36
Step-11:
After adding the file, again go to Project Window and right click on your “c file” then select
“Build target” for compilation. If there is any “Errors or Warnings” in your program you can
check in “Output Window” that is shown bottom of the Keil window.
Step-12:
Here in this step you can observe the output window for “errors and warnings”.
37
Step-13:
If you make any mistake in your program you can check in this slide for which error and where
the error is by clicking on that error.
Step-14:
After compilation then next go to Debug Session. In Tool Bar menu go to “Debug” tab and select
“Start/Stop Debug Session”.
38
Step-15:
Here a simple program for “Leds Blinking”. LEDS are connected to PORT-1. you can observe
the output in that port.
Step-16:
To see the Ports and other Peripheral Features go to main toolbar menu and select peripherals.
39
Step-17:
In this slide see the selected port i.e, PORT-1.
Step-18:
Start to trace the program in sequence manner i.e, step by step execution and observe the output
in port window.
40
Step-19:
After completion of Debug Session Create an Hex file for Burning the Processor. Here to create
an Hex file go to project window and right click on Target next select “Option for Target”.
Step-20:
It appears one window; here in “target tab” modify the crystal frequency as you connected to
your microcontroller.
41
Step-21:
Next go to “Output’ tab. In that Output tab click on “Create HEX File” and then click OK.
Step-22:
Finally, once again compile your program. The Created Hex File will appear in your path folder.
42
2.2.11 ISP Flash Microcontroller Programmer(8.0.1)
Introduction
In-System Programming allows programming and reprogramming of any AVR microcontroller
Positioned inside the end system. Using a simple three-wire SPI interface, the In-System
Programmer communicates serially with the AVR microcontroller, reprogramming all non-
volatile memories on the chip.
In-System Programming eliminates the physical removal of chips from the system.
This will save time, and money, both during development in the lab, and when updating
The software or parameters in the field. This application note shows how to design the system to
support In-System Programming. It also shows how a low-cost In-System Programmer can be
made, that will allow the target AVR microcontroller to be programmed from any PC equipped
with a regular 9-pin serial port. Alternatively, the entire In-System Programmer can be built into
the system allowing it to reprogram itself.
Programming Interface
For In-System Programming, the programmer is connected to the target using as few wires as
possible. To program any AVR microcontroller in any target system, a simple Six-wire interface
is used to connect the programmer to the target PCB. Below shows the connections needed.
The Serial Peripheral Interface (SPI) consists of three wires: Serial Clock (SCK), Master In –
Slave Out (MISO) and Master Out – Slave In (MOSI). When programming the AVR, the In-
System Programmer always operate as the Master, and the target system Always operate as the
Slave.
43
The In-System Programmer (Master) provides the clock for the communication on the SCK
Line. Each pulse on the SCK Line transfers one bit from the Programmer (Master) To the Target
(Slave) on the Master out – Slave in (MOSI) line. Simultaneously, Each pulse on the SCK Line
transfers one bit from the target (Slave) to the Programmer (Master) on the Master in – Slave out
(MISO) line.
Features
 Complete In-System Programming Solution for AVR Microcontrollers
 Covers All AVR Microcontrollers with In-System Programming Support
 Reprogram Both Data Flash and Parameter EEPROM Memories
 Complete Schematics for Low-cost In-System Programmer
 Simple Three-wire SPI Programming Interface
2.2.12 Software Code
CODE
#include<reg52.h>
#include<string.h>
#include <STDIO.H>
//////////////////////////////////////////////////////////////////
#define LCD P0
///////////////////////////////////////////////////////////////////
void init_lcd(void);
void cmd_lcd(unsigned char);
void data_lcd(unsigned char);
void display_lcd(unsigned char *);
void delay_ms(int);
////////////////////////////////////////////////////////
sbit ALCOHAL=P2^7;
sbit motor=P1^4;
sbit buzzer=P1^3;
sbit accident=P2^0;
int aa=0;
int bb=0;
44
sbit orange =P3^7;
sbit green =P3^0;
////////////////////////////////////////////////////////////////////
void main(void)
{
motor=0;
buzzer=0;
orange =1;
green =1;
init_lcd();
cmd_lcd(0x80);
display_lcd("vehicle accident");
cmd_lcd(0xC0);
display_lcd("& Alcohol Sensing");
delay_ms(2000);
cmd_lcd(0x01);
cmd_lcd(0x80);
display_lcd("Alert with Engine");
cmd_lcd(0xC0);
display_lcd("Locking system");
delay_ms(2000);
cmd_lcd(0x01);
while(1)
{
////////////////////////////////////
if(ALCOHAL==0)
{
45
aa=1;
cmd_lcd(0xC0);
display_lcd("ALCOHAL DETECTED");
delay_ms(200);
}
if(ALCOHAL==1)
{
aa=0;
cmd_lcd(0xC0);
display_lcd("NO ALCOHAL ");
delay_ms(200);
}
//////////////////////////////////////
if(accident==1)
{
bb=0;
cmd_lcd(0x80);
display_lcd("NO ACCIDENT ");
delay_ms(200);
}
if(accident==0)
{
bb=1;
cmd_lcd(0x01);
cmd_lcd(0x80);
display_lcd("ACCIDENT DETECTED");
cmd_lcd(0xC0);
display_lcd("AIR BAG OPEN");
delay_ms(300);
46
}
///////////////////////////////
if((aa==0) & (bb==0))
{
motor=1;
buzzer=0;
orange =1;
green =0;
}
/////////////////////
if((aa==1) & (bb==0))
{
orange=0;green=1;motor=0;
buzzer=1; delay_ms(2000);
}
/////////////////////
if((aa==0) & (bb==1))
{
orange=0;green=1;motor=0;
buzzer=1;delay_ms(2000);
}
/////////////////////
if((aa==1) & (bb==1))
{
orange=0;green=1;motor=0;
buzzer=1; delay_ms(2000);
}
/////////////////////
}
47
}
////////////////////////////////////////////////////////////////////////
void init_lcd(void)
{
cmd_lcd(0x28);
cmd_lcd(0x28);
cmd_lcd(0x28);
cmd_lcd(0x0C);
cmd_lcd(0x06);
cmd_lcd(0x01);
}
void cmd_lcd(unsigned char var)
{
LCD = ((var & 0xF0) | 0x08);
LCD = 0;
LCD = ((var << 4) | 0x08);
LCD = 0;
delay_ms(2);
}
void data_lcd(unsigned char var)
{
LCD = ((var & 0xF0) | 0x0A);
LCD = 0;
LCD = ((var << 4) | 0x0A);
LCD = 0;
delay_ms(2);
}
void display_lcd(char *str)
{
while(*str)
data_lcd(*str++);
48
}
void delay_ms(int cnt)
{
int i;
while(cnt--)
for(i=0;i<100;i++);}
49
CHAPTER – 3
Hardware Implementation
3.1 BASIC CONCEPT
Purpose of the circuit
Vehicle accident and alcohol sensing alert with engine locking system is introduced to minimize
the accidents happening around under the influence of Alcohol. The circuit detects the presence
of alcohol and immediately switches off the engine and starts the alarm thus eliminating the risk
of any accident happening.
CONCEPT
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. Our proposed system would be constantly monitoring the driver
breath by placing it on the driver wheel or somewhere the driver’s breath can be constantly
monitored by it. So, if a driver is drunk and tries to drive the system detects alcohol presence in
his/her breathe and locks the engine so that the vehicle fails to start. In another case if the driver
is not drunk while he starts the vehicle and engine is started but he/she drinks while driving the
sensor still detects alcohol in his breath and stops the engine so that the car would not accelerate
any further and driver can steer it to roadside. In this system we use an AVR family
microcontroller interfaced with an alcohol sensor along with an LCD screen and a dc motor to
demonstrate the concept. So here the alcohol sensor is used to monitor uses breath and constantly
sends signals to the microcontroller.
3.2 WORKING OF CIRCUIT
The below block diagram illustrates the automatic vehicle engine locking system through an
alcohol detection. The Microcontroller (AT89S52), alcohol detector (MQ-3), relay motor driver
IC (ULN2003) are the major prerequisites for the system construction. The Alcohol detector
sensor will be attached with our Microcontroller.
50
The input for the Microcontroller is identified by the alcohol detector sensor through the breath
of a human. In the next scenario the levels of alcohol measured by the sensor and compared with
the set-in limits. If the set limit of consumption of alcohol is less than the alcohol consumed by
the person, the system of activating relay is initiated which in turn activates the automatic lock
on the vehicle, i.e. it stops the motor rotation if it is in running state or it is unable to start. The
system will lock the Engine at the same time will automatically give a buzzer. By this, we can
avoid accidents by checking the driving people on the roads. Software Program for the system
developed in embedded C. ISP is used to dump the code into the Microcontroller.
3.3 Applications
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.
51
CHAPTER – 4
RESULT
The moment the circuit detects the presence of alcohol in car/vehicle or any accident via
switch/sensor, the microcontroller controlling the whole system immediately stops the engine
and makes the siren to beep.
Figure 4.1 Circuit Front View
Figure 4.2 Circuit when not detecting any Alcohol/Accident
52
Figure 4.3 Circuit when detecting the Alcohol/Accident
53
CHAPTER – 5
CONCLUSION/ FUTURE SCOPE
5.1 Conclusion
This vehicle accident and alcohol sensing alert with engine locking system project can sense if
the person is drunk or not which is the main cause of the accidents these days, thus making
minimal chances of accident happening. The project can further alert the people around the
vehicle if any accident has taken place, so that they can help the person seating in the vehicle.
Not only this, the project is very cost effective and very easy to implement in any type of vehicle.
5.2 Future Scope
1) We can implement GSM technology to inform the relatives or owners of the vehicle about the
alcohol consumption.
2) We can implement GPS technology to find out the location of the vehicle.
54
Reference
1.8051 Microcontroller Architecture, programming and application by KENNETH JAYALA
2. ATMEL 89S52 Data sheets
3. Hand book for Digital IC’s from Analogic Devices
4. Microcontroller and Embedded systems by MOHAMMED ALI MAZIDI
5. www.atmel.com
6. www.beyondlogic.org
7. www.dallassemiconductors.com
8. www.maxim-ic.com
9. www.ijtimes.com

Weitere ähnliche Inhalte

Was ist angesagt?

Microcontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversMicrocontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversVinny Chweety
 
Final report obstacle avoiding roboat
Final report obstacle avoiding roboatFinal report obstacle avoiding roboat
Final report obstacle avoiding roboatShubham Thakur
 
IRJET- Automatic Engine Locking System through Alcohol Detection in Ardui...
IRJET-  	  Automatic Engine Locking System through Alcohol Detection in Ardui...IRJET-  	  Automatic Engine Locking System through Alcohol Detection in Ardui...
IRJET- Automatic Engine Locking System through Alcohol Detection in Ardui...IRJET Journal
 
Density based traffic signal control using microcontroller
Density based traffic signal control using microcontrollerDensity based traffic signal control using microcontroller
Density based traffic signal control using microcontrollerkrity kumari
 
anti theft alarm for bikes by vinod and venu
anti theft alarm for bikes by vinod and venuanti theft alarm for bikes by vinod and venu
anti theft alarm for bikes by vinod and venuvenu13
 
Gas Leakage Detector using Arduino with SMS Alert - Engineering Project
Gas Leakage Detector using Arduino with SMS Alert - Engineering ProjectGas Leakage Detector using Arduino with SMS Alert - Engineering Project
Gas Leakage Detector using Arduino with SMS Alert - Engineering ProjectCircuitsToday
 
Microcontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversMicrocontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversVinny Chweety
 
Present existed Driver alert system
Present existed Driver alert systemPresent existed Driver alert system
Present existed Driver alert systemkrishna495ECE
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking systemArjun Singh
 
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...Vignesh C
 
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMAUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMJOLLUSUDARSHANREDDY
 
Automatic Irrigation System Project Report
Automatic Irrigation System Project ReportAutomatic Irrigation System Project Report
Automatic Irrigation System Project ReportEr Gupta
 
Anti theft security system for vehicle
Anti theft security system for vehicleAnti theft security system for vehicle
Anti theft security system for vehicleabhinandanyadavg
 
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGY
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGYALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGY
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGYOodit Jethwa
 
Vehicle Speed detecter By PRAGYA AGARWAL
Vehicle Speed detecter By PRAGYA AGARWALVehicle Speed detecter By PRAGYA AGARWAL
Vehicle Speed detecter By PRAGYA AGARWALiamtheone5
 

Was ist angesagt? (20)

Alchol detection
Alchol detectionAlchol detection
Alchol detection
 
Vehicle security system final report
Vehicle security system final reportVehicle security system final report
Vehicle security system final report
 
Microcontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversMicrocontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken drivers
 
Drowsy Driver detection system
Drowsy Driver detection systemDrowsy Driver detection system
Drowsy Driver detection system
 
Final report obstacle avoiding roboat
Final report obstacle avoiding roboatFinal report obstacle avoiding roboat
Final report obstacle avoiding roboat
 
IRJET- Automatic Engine Locking System through Alcohol Detection in Ardui...
IRJET-  	  Automatic Engine Locking System through Alcohol Detection in Ardui...IRJET-  	  Automatic Engine Locking System through Alcohol Detection in Ardui...
IRJET- Automatic Engine Locking System through Alcohol Detection in Ardui...
 
Density based traffic signal control using microcontroller
Density based traffic signal control using microcontrollerDensity based traffic signal control using microcontroller
Density based traffic signal control using microcontroller
 
anti theft alarm for bikes by vinod and venu
anti theft alarm for bikes by vinod and venuanti theft alarm for bikes by vinod and venu
anti theft alarm for bikes by vinod and venu
 
Gas Leakage Detector using Arduino with SMS Alert - Engineering Project
Gas Leakage Detector using Arduino with SMS Alert - Engineering ProjectGas Leakage Detector using Arduino with SMS Alert - Engineering Project
Gas Leakage Detector using Arduino with SMS Alert - Engineering Project
 
Microcontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken driversMicrocontroller based automatic engine locking system for drunken drivers
Microcontroller based automatic engine locking system for drunken drivers
 
ppt
pptppt
ppt
 
Present existed Driver alert system
Present existed Driver alert systemPresent existed Driver alert system
Present existed Driver alert system
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking system
 
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...
Drowsiness State Detection of Driver using Eyelid Movement- IRE Journal Confe...
 
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMAUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
 
Automatic Irrigation System Project Report
Automatic Irrigation System Project ReportAutomatic Irrigation System Project Report
Automatic Irrigation System Project Report
 
smart helmet
smart helmetsmart helmet
smart helmet
 
Anti theft security system for vehicle
Anti theft security system for vehicleAnti theft security system for vehicle
Anti theft security system for vehicle
 
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGY
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGYALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGY
ALCOHOL DETECTION SYSTEM USING GSM TECHNOLOGY
 
Vehicle Speed detecter By PRAGYA AGARWAL
Vehicle Speed detecter By PRAGYA AGARWALVehicle Speed detecter By PRAGYA AGARWAL
Vehicle Speed detecter By PRAGYA AGARWAL
 

Ähnlich wie Project report on Vehicle accident and Alcohol sensing alert with Engine Locking System

8 sem final report print copy (1)
8 sem final report print copy (1)8 sem final report print copy (1)
8 sem final report print copy (1)Jha Bhargav
 
Railway gate cct project report-Diploma Project
Railway gate cct project report-Diploma ProjectRailway gate cct project report-Diploma Project
Railway gate cct project report-Diploma ProjectSubhash Kumar Yadav
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report9951081577
 
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT Stephen Achionye
 
Home Automation & Security
Home Automation & SecurityHome Automation & Security
Home Automation & SecurityRoshan Mani
 
Design and Implementation of Car Black box for Evidence Collection System to ...
Design and Implementation of Car Black box for Evidence Collection System to ...Design and Implementation of Car Black box for Evidence Collection System to ...
Design and Implementation of Car Black box for Evidence Collection System to ...IJMTST Journal
 
FINAL REPORT_B.tech
FINAL REPORT_B.techFINAL REPORT_B.tech
FINAL REPORT_B.techafzal usmani
 
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESAdrija Chowdhury
 
Wireless Speed Control of AC/DC motor
Wireless Speed Control of AC/DC motorWireless Speed Control of AC/DC motor
Wireless Speed Control of AC/DC motorVAIBHAV GHATOL
 
vehicle safety.pptx
vehicle safety.pptxvehicle safety.pptx
vehicle safety.pptxthiru17270
 
IRJET- Automotive Collision Avoidance System
IRJET-  	  Automotive Collision Avoidance SystemIRJET-  	  Automotive Collision Avoidance System
IRJET- Automotive Collision Avoidance SystemIRJET Journal
 
Advanced Anti-Collision Vehicle
Advanced Anti-Collision VehicleAdvanced Anti-Collision Vehicle
Advanced Anti-Collision VehicleIRJET Journal
 
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink Sensor
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink SensorDrowsiness Detected For Vehicle Using Smart Glass With Eye Blink Sensor
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink SensorIRJET Journal
 
Mobile Battery charger on Coin Insertion
Mobile Battery charger on Coin InsertionMobile Battery charger on Coin Insertion
Mobile Battery charger on Coin InsertionIRJET Journal
 
Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iaetsd Iaetsd
 
Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iaetsd Iaetsd
 

Ähnlich wie Project report on Vehicle accident and Alcohol sensing alert with Engine Locking System (20)

8 sem final report print copy (1)
8 sem final report print copy (1)8 sem final report print copy (1)
8 sem final report print copy (1)
 
Railway gate cct project report-Diploma Project
Railway gate cct project report-Diploma ProjectRailway gate cct project report-Diploma Project
Railway gate cct project report-Diploma Project
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report
 
final report
final reportfinal report
final report
 
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT
THE DESIGN AND IMPLEMENTATION OF A FOUR – WAY TRAFFIC LIGHT
 
Home Automation & Security
Home Automation & SecurityHome Automation & Security
Home Automation & Security
 
Design and Implementation of Car Black box for Evidence Collection System to ...
Design and Implementation of Car Black box for Evidence Collection System to ...Design and Implementation of Car Black box for Evidence Collection System to ...
Design and Implementation of Car Black box for Evidence Collection System to ...
 
FINAL REPORT_B.tech
FINAL REPORT_B.techFINAL REPORT_B.tech
FINAL REPORT_B.tech
 
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
 
Alcohol report
Alcohol reportAlcohol report
Alcohol report
 
Wireless Speed Control of AC/DC motor
Wireless Speed Control of AC/DC motorWireless Speed Control of AC/DC motor
Wireless Speed Control of AC/DC motor
 
PROJECT.pptx
PROJECT.pptxPROJECT.pptx
PROJECT.pptx
 
vehicle safety.pptx
vehicle safety.pptxvehicle safety.pptx
vehicle safety.pptx
 
IRJET- Automotive Collision Avoidance System
IRJET-  	  Automotive Collision Avoidance SystemIRJET-  	  Automotive Collision Avoidance System
IRJET- Automotive Collision Avoidance System
 
Advanced Anti-Collision Vehicle
Advanced Anti-Collision VehicleAdvanced Anti-Collision Vehicle
Advanced Anti-Collision Vehicle
 
Obstacle avoiding robot.doc
Obstacle avoiding robot.docObstacle avoiding robot.doc
Obstacle avoiding robot.doc
 
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink Sensor
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink SensorDrowsiness Detected For Vehicle Using Smart Glass With Eye Blink Sensor
Drowsiness Detected For Vehicle Using Smart Glass With Eye Blink Sensor
 
Mobile Battery charger on Coin Insertion
Mobile Battery charger on Coin InsertionMobile Battery charger on Coin Insertion
Mobile Battery charger on Coin Insertion
 
Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...
 
Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...Iirdem design and analysis of a smart helmet gsm based system against drunken...
Iirdem design and analysis of a smart helmet gsm based system against drunken...
 

Mehr von Hitesh Kumar Singh

Mehr von Hitesh Kumar Singh (7)

Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...
Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...
Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Microsoft Hololens Seminar Report
Microsoft Hololens Seminar ReportMicrosoft Hololens Seminar Report
Microsoft Hololens Seminar Report
 
Cell Phone Detector Presentation
Cell Phone Detector Presentation Cell Phone Detector Presentation
Cell Phone Detector Presentation
 
IoT(Internet of Things) Report
IoT(Internet of Things) ReportIoT(Internet of Things) Report
IoT(Internet of Things) Report
 
BitCoin report
BitCoin reportBitCoin report
BitCoin report
 
IoT Basics
IoT BasicsIoT Basics
IoT Basics
 

Kürzlich hochgeladen

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Project report on Vehicle accident and Alcohol sensing alert with Engine Locking System

  • 1. 1 MAJOR PROJECT REPORT ON VEHICLE ACCIDENT AND ALCOHOL SENSING ALERT WITH ENGINE LOCKING SYSTEM Submitted towards the partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY In Electronics & Communication Engineering (Session 2015-2019) SUBMITTED BY SUPERVISED BY PRABHAT MISHRA (11151105) DR. SHARAD SHARMA HITESH KUMAR SINGH(11151111) PROF. & HEAD ECE DEPARTMENT DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING MAHARISHI MARKANDESHWAR ENGINEERING COLLEGE, MULLANA MAHARISHI MARKANDESHWAR (Deemed to be University), MULLANA-133207 DEC 2018
  • 2. 2 MAHARISHI MARKANDESHWAR ENGINEERING COLLEGE MULLANA-133207 DEPARTMENT: ELECTRONICS AND COMMUNICATION ENGINEERING CERTIFICATE Certified that major project work entitled “VEHICLE ACCIDENT AND ALCOHOL SENSING ALERT WITH ENGINE LOCKING SYSTEM” is a bonafide work carried out in the seventh semester by “ PRABHAT MISHRA( 11151105 ) & HITESH KUMAR SINGH( 11151111 ) ” in partial fulfilment for the award of Bachelor of Technology in “ ELECTRONICS AND COMMUNICATION ENGINEERING ” from MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY) during the academic year 2018- 2019, who carried out the project work under the guidance and no part of this work has been submitted earlier for the award of any degree PROJECT COORDINATOR DR. SHARAD SHARMA PROF. & HEAD ECE DEPARTMENT
  • 3. 3 ABSTRACT The main purpose behind this project is “Drunk driving detection”. Now a days, many accidents are happening because of the alcohol consumption of the driver or the person who is driving the vehicle. Thus, Drunk driving is a major reason of accidents in almost all the countries in the world. Alcohol Detector in Car project is designed for the safety of the people seating inside the car. This project should be fitted / installed inside the vehicle. If any Accident occurs then engine goes off and Alarm goes on. If there is no alcohol / no accident, then the Engine remains on and Alarm remains off. Even, if the Alcohol is detected, the engine goes off Alarm starts beeping.
  • 4. 4 ACKNOWLEDGEMENT This is an acknowledgement of the intensive drive and success of our project is indeed without mentioning of all those encouraging people who genuinely supported and encouraged me throughout the project. First and fore most ,we wish to take this opportunity to express our sincere thanks to the DR. ASHOK KUMAR, Director, Maharishi Markandeshwar Engineering College for providing all the facilities required for the project presentation. We also thankful to our coordinator DR. SHARAD SHARMA, Prof., Head of the Department ECE for the interest, technical support and suggestions during the project leading to our success. We wish to express our healthy gratitude to my guide Mr. SHAMSHER, Lab Attendant, ECE Department for patience & for gratuitous cooperation extended by him & who has given valuable suggestions. We had the privilege to accomplish this project report on “VEHICLE ACCIDENT AND ALCOHOL SENSING ALERT WITH ENGINE LOCKING SYSTEM”. We desire to convey our heartful thanks to all the staff members & friends those who have directly or indirectly involved in completing this project work.
  • 5. 5 Table of Contents Title 1 Certificate 2 Abstract 3 Acknowledgement 4 Table of Content 5 List of Figure 7 List of Abbreviations 8 1. Introduction 9 1.1 Objective 9 1.2 Problem Statement 9 1.3 Motivation 9 2. Hardware Description 10 2.1 Circuit Diagram 10 2.2 Component List 11 2.2.1 Resistor 11 2.2.2 Capacitor 12 2.2.3 Microcontroller AT89S52 14 2.2.4 Alcohol Sensor 17 2.2.5 LM324 Comparator 19 2.2.6 LCD 20 2.2.7 LED 22 2.2.8 DC Motor 24 2.2.9 Power Supply 27 2.2.10 Keil Software 30 2.2.11 ISP Flash Microcontroller Programmer 42 2.2.12 Software Code 43
  • 6. 6 3. Hardware Implementation 49 3.1 Basic Concept 49 3.2 Working of Circuit 49 3.3 Application 50 4. Result 51 4.1 Circuit Front View 51 4.2 Circuit when not detecting any alcohol/accident 51 4.3 Circuit after detecting alcohol/accident 52 5. Conclusion/Future Scope 53 5.1 Conclusion 53 5.2 Future Scope 53 6. Reference 54
  • 7. 7 LIST OF FIGURES 2.1 Circuit diagram 2.2 Components List 2.2.1 Resistor 2.2.2 Capacitor 2.2.3 Microcontroller AT89S52 2.2.4 Alcohol Sensor 2.2.5 LM324 Comparator 2.2.6 LCD 2.2.7 LED 2.2.8 DC Motor 2.2.9 Power Supply 2.2.9.1 Transformer 2.2.9.2 Rectifier 2.2.9.3 Filter Capacitor 2.2.9.4 IC 7805 Voltage Regulator 2.2.10 Keil Software 2.2.11 ISP Flash Microcontroller Programmer 2.2.12 Software Code 3.1 Basic Concept 3.2 Working of Circuit 3.3 Applications 4.1 Circuit when not detected any alcohol or accident 4.2 Circuit after detecting accident or alcohol 5.1 Conclusion 5.2 Future Scope 2.2.2 Modern capacitors, by a cm rule.
  • 8. 8 LIST OF ABBREVIATION LED Light Emitting Diode BJT Bipolar Junction Transistor UJT Unipolar Junction Transistor JFET Junction Field Effect Transistor MOSFET Metal Oxide Semiconductor Field Effect Transistor CMOS Complementary Metal Oxide Semiconductor TTL Transistor-Transistor Logic OP-AMP Operational Amplifier UHF Ultra High Frequency
  • 9. 9 CHAPTER-1 Introduction 1.1 Overview As increase in the consumption of alcohol by the vehicle drivers, there has been hike in the accidents being taken place. Even with development of the latest technology to stop these, there are still cases of such happening. To avoid this, we are introducing a project called VEHICLE ACCIDENT AND ALCOHOL SENSING ALERT WITH ENGINE LOCING SYSTEM. This handy, easy to implement project sense the presence the alcohol (consumed by the driver) in the vehicle, and immediately stops the engine and starts the alarms. Not only this, in the case of any accident happening also, the circuit stops the engine and the starts off the alarm to allow the other people travelling on the same road can know about the accident and they can help. So, it can be used to prevent consumption of alcohol in vehicle. The circuit can sense the alcohol after particular level thus minimizing the chances of accident. The moment the accident takes place or alcohol is detected by the sensor, it sends the signal to the Microprocessor which in turn sends the signal to the engine to stop and to the alarm to start off. This takes place until the alcohol is not below the critical level. 1.2 Problem Statement Previously, there was no technology to lock the engine of the vehicle after sensing the alcohol consumption by the driver, which was considered to the main cause of the accidents. There was manual checking after particular distance on the roads or the highways but still these checks were not sufficient to stop the happening of the mishaps. So, to avoid these problems, this project vehicle detection and alcohol sensing alert with engine locking system is developed. 1.3 Motivation Vehicles are considered to the key element in this era. They are being developed on regular basis to make them more and more safe. But, the one thing that makes people to feel afraid of seating in the vehicle is accident. These accidents mostly take place under the influence of alcohol, and there is no technology to minimize the chances of accident happening. To avoid this problem, the Vehicle accident and alcohol sensing alert with engine locking system is introduced.
  • 10. 10 CHAPTER-2 Hardware Description 2.1 CIRCUIT DIAGRAM Figure 2.1 Circuit diagram
  • 11. 11 2.2 COMPONENTS LIST  Resistor – 100K, 15K, 12K  Capacitor- 22pF, 0.22µF, 0.1µF  Microcontroller AT89S52  Alcohol sensor  LM324 comparator  Buzzer  LCD Display (16x2)  LED’s  DC motor(ignition)  Driver IC  Accident sensor /switch  Software – Embedded C, Keil Microvision3, Express PCB 2.2.1 Resistor Electronic Symbol US Europe A resistor is a two-terminal electronic component that produces a voltage across its terminals that is proportional to the electric current through it in accordance with Ohm's law:
  • 12. 12 V = IR Resistors are elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).The primary characteristics of a resistor are the resistance, the tolerance, maximum working voltage and the power rating. Other characteristics include temperature coefficient, noise, and inductance. Less well-known is critical resistance, the value below which power dissipation limits the maximum permitted current flow, and above which the limit is applied voltage. Critical resistance depends upon the materials constituting the resistor as well as its physical dimensions; it's determined by design. Resistors can be integrated into hybrid and printed circuits, as well as integrated circuits. Size and position of leads (or terminals) are relevant to equipment designers; resistors must be physically large enough not to overheat when dissipating their power. 2.2.2 Capacitor Figure 2.2.2 Modern capacitors,by a cm rule A capacitor or condenser is a passive electronic component consisting of a pair of conductors separated by a dielectric. When a voltage potential difference exists between the conductors, an electric field is present in the dielectric. This field stores energy and produces a mechanical force between the plates. The effect is greatest between wide, flat, parallel, narrowly separated conductors. An ideal capacitor is characterized by a single constant value, capacitance, which is measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. In practice, the dielectric between the plates passes a small amount of leakage current. The conductors and leads introduce an equivalent series resistance and the dielectric has an electric field strength limit resulting in a breakdown voltage. Capacitors are widely used in electronic circuits to block the flow of direct current while allowing alternating current to pass, to filter out interference, to smooth the output of power supplies, and for many other purposes. They are used in resonant circuits in radio frequency equipment to select particular frequencies from a signal with many frequencies.
  • 13. 13 Ceramic capacitor In electronics ceramic capacitor is a capacitor constructed of alternating layers of metal and ceramic, with the ceramic material acting as the dielectric. The temperature coefficient depends on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the class 2) often has high dissipation factor, high frequency coefficient of dissipation. Figure 2.2.2 Ceramic capacitors A ceramic capacitor is a two-terminal, non-polar device. The classical ceramic capacitor is the "disc capacitor". This device pre-dates the transistor and was used extensively in vacuum-tube equipment (e.g., radio receivers) from about 1930 through the 1950s, and in discrete transistor equipment from the 1950s through the 1980s. As of 2007, ceramic disc capacitors are in widespread use in electronic equipment, providing high capacity & small size at low price compared to other low value capacitor types. Ceramic capacitors come in various shapes and styles, including:  disc, resin coated, with through-hole leads  multilayer rectangular block, surface mount  bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF applications  tube shape, not popular now Electrolytic capacitor Figure 2.2.2 Axial lead (top) and radial lead (bottom) electrolytic capacitors An electrolytic capacitor is a type of capacitor that uses an ionic conducting liquid as one of its plates with a larger capacitance per unit volume than other types. They are valuable in relatively
  • 14. 14 high-current and low-frequency electrical circuits. This is especially the case in power-supply filters, where they store charge needed to moderate output voltage and current fluctuations in rectifier output. They are also widely used as coupling capacitors in circuits where AC should be conducted but DC should not. Electrolytic capacitors can have a very high capacitance, allowing filters made with them to have very low corner frequencies. 2.2.3 Microcontroller AT89S52 The AT89S52 comes from the popular 8051 family of Atmel Microcontrollers. It is an 8-bit CMOS microcontroller with 8K as Flash memory and 256 bytes of RAM. Since it is similar to the trust worthy 8051 architecture these microcontrollers are as per industry standard. It has 32 I/O pins comprising of three 16-bit timers, external interrupts, full-duplex serial port, on-chip oscillator and clock circuitry. The Microcontroller also has Operating mode, Idle Mode and Power down mode which makes it suitable for battery operated applications. Few considerable drawbacks of the microcontroller are that it does not have in-built ADC and does not support SPI or I2C protocols. However, you can utilise external modules for the same. Features  Compatible with MCS-51 Products  8K Bytes of In-System Reprogrammable Flash Memory  Fully Static Operation: 0 Hz to 33 MHz  Three-level Program Memory Lock  256 x 8-bit Internal RAM  32 Programmable I/O Lines  Three 16-bit Timer/Counters  Eight Interrupt Sources  Programmable Serial Channel  Low-power Idle and Power-down Modes  4.0V to 5.5V Operating Range  Full Duplex UART Serial Channel  Interrupt Recovery from Power-down Mode  Watchdog Timer  Dual Data Pointer
  • 15. 15  Power-off Flag  Fast Programming Time  Flexible ISP Programming (Byte and Page Mode) Pin Diagram Pin Description Pin Number Pin Name Description 1 P1.0 (T2) Timer/Counter or 0th GPIO pin of PORT 1 2 P1.1 (T2.EX) Timer/Counter/External Counter or 1st GPIO pin of PORT 1 3 P1.2 2nd GPIO pin of PORT 1 4 P1.3 3rd GPIO pin of PORT 1 5 P1.4 4th GPIO pin of PORT 1 6 P1.5 (MOSI) MOSI for in System Programming or 5th GPIO pin of PORT 1
  • 16. 16 7 P1.6 (MISO) MISO for in System Programming or 6th GPIO pin of PORT 1 8 P1.7 (SCK) SCK for in System Programming or 7th GPIO pin of PORT 1 9 RST Making this pin high will reset the Microcontroller 10 P3.0 (RXD) RXD Serial Input or 0th GPIO pin of PORT 3 11 P3.1 (TXD) TXD Serial Output or 1st GPIO pin of PORT 3 12 P3.2 (INT0’) External Interrupt 0 or 2nd GPIO pin of PORT 3 13 P3.3 (INT1’) External Interrupt 1 or 3rd GPIO pin of PORT 3 14 P3.4 (T0) Timer 0 or 4th GPIO pin of PORT 3 15 P3.5 (T1) Timer 1 or 5th GPIO pin of PORT 3 16 P3.6 (WR’) Memory Write or 6th GPIO pin of PORT 3 17 P3.7 (RD’) Memory Read or 7th GPIO pin of PORT 3 18 XTAL2 External Oscillator Output 19 XTAL1 External Oscillator Input 20 GND Ground pin of MCU 21 P2.0(A8) 0th GPIO pin of PORT 2 22 P2.1 (A9) 1st GPIO pin of PORT 2 23 P2.2 (A10) 2nd GPIO pin of PORT 2 24 P2.3 (A11) 3rd GPIO pin of PORT 2 25 P2.4 (A12) 4th GPIO pin of PORT 2 26 P2.5 (A13) 5th GPIO pin of PORT 2 27 P2.6 (A14) 6th GPIO pin of PORT 2
  • 17. 17 28 P2.7 (A15) 7th GPIO pin of PORT 2 29 PSEN’ Program store Enable used to read external program memory 30 ALE / PROG’ Address Latch Enable / Program Pulse Input 31 EA’ / VPP External Access Enable / Programming enable Voltage 32 P0.7 (AD7) Address / Data pin 7 or 7th GPIO pin of PORT 0 33 P0.6 (AD6) Address / Data pin 6 or 6th GPIO pin of PORT 0 34 P0.5 (AD5) Address / Data pin 5 or 5th GPIO pin of PORT 0 35 P0.4 (AD4) Address / Data pin 4 or 4th GPIO pin of PORT 0 36 P0.3 (AD3) Address / Data pin 3 or 3rd GPIO pin of PORT 0 37 P0.2 (AD2) Address / Data pin 2 or 2nd GPIO pin of PORT 0 38 P0.1 (AD1) Address / Data pin 1 or 1st GPIO pin of PORT 0 39 P0.0 (AD0) Address / Data pin 0 or 0th GPIO pin of PORT 0 40 VCC Positive pin of MCU (+5V) 2.2.4 Alcohol Sensor Alcohol Sensor – Analog Out This alcohol sensor is suitable for detecting alcohol concentration on your breath, just like your common breathalyzer. It has a high sensitivity and fast response time. Sensor provides an analog output based on alcohol concentration
  • 18. 18 Applications · Breath Analyzer · Blood Alcohol Concentration Checker · Alcohol Gas Sensor Features · High sensitivity to alcohol and small sensitivity to Benzine · Fast response and High sensitivity · Stable and long life · Simple drive circuit of 5V DC with analog output · Operation Temperature: -10 to 70 degrees C
  • 19. 19 2.2.5 LM324 Comparator The LM324 operational amplifier IC can be worked as a comparator. This IC has 4 independent operational amplifiers on a single chip. This a Low Power Quad Operational Amplifier and it has high stability, bandwidth which was designed to operate from a single power supply over a wide range of voltages. The quad amplifier can operate at supply voltages as low as 3.0 V or as high as 3.2 V with quiescent currents about one fifth of those associated with the MC174. The LM324 comparator circuit consists of sensor voltage, reference voltage, Vcc, ground and output pins. The following circuit shows the LM324 IC circuit and here we are explaining about the each pin of LM324 comparator. Pin Description Pin No. Function of the Pin 1 Output of the first comparator 2 Inverting input of the first comparator 3 Non-inverting input of the first comparator 4 Supply voltage 5V 5 Non-inverting input of the second comparator
  • 20. 20 6 Inverting input of the second comparator 7 Output of the second comparator 8 Output of the third comparator 9 Inverting input of the third comparator 10 Non-inverting input of the third comparator 11 Ground 12 Non-inverting input of the fourth comparator 13 Inverting input of the fourth comparator 14 Output of the fourth comparator 2.2.6 LCD Liquid crystal display, a type of display used in digital watches and many portable computers. LCD displays utilize two sheets of polarizing material with a liquid crystal solution between them. An electric current passed through the liquid causes the crystals to align so that light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass through or blocking the light. The liquid crystals can be manipulated through an applied electric voltage so that light is allowed to pass or is blocked. By carefully controlling where and what wavelength (color) of light is allowed to pass, the LCD monitor is able to display images. A back light provides LCD monitor’s brightness. Other advances have allowed LCD’s to greatly reduce liquid crystal cell response times. Response time is basically the amount of time it takes for a pixel to “change colors”. In reality response time is the amount of time it takes a liquid crystal cell to go from being active to inactive Here the LCD is used at both the Transmitter as well as the receiver side. The input which we give to the microcontroller is displayed on the LCD of the transmitter side and the message sent is received at the receiver side which displays at the receiver end of the LCD and the corresponding operation is performed
  • 21. 21 They make complicated equipment easier to operate. LCDs come in many shapes and sizes but the most common is the 16 character x 4 line display with no backlight. It requires only 11 connections – eight bits for data (which can be reduced to four if necessary) and three control lines (we have only used two here). It runs off a 5V DC supply and only needs about 1mA of current. The display contrast can be varied by changing the voltage into pin 3 of the display. Pin Description From this description, the interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD. This waveform will write an ASCII Byte out to the LCD's screen. While Vcc and Vss provide +5V and ground respectively, Vee is used for controlling LCD contrast. PIN SYMBOL I/O DESCRIPTION 1 Vss -- Ground 2 Vcc -- +5V power supply 3 Vee -- Power supply to control contrast 4 RS I RS=0 to select command register RS=1 to select data register 5 R/W I R/W=0 for write R/W=1 for read
  • 22. 22 6 EN I/O Enable 7 DB0 I/O The 8-bit data bus 8 DB1 I/O The 8-bit data bus 9 DB2 I/O The 8-bit data bus 10 DB3 I/O The 8-bit data bus 11 DB4 I/O The 8-bit data bus 12 DB5 I/O The 8-bit data bus 13 DB6 I/O The 8-bit data bus 14 DB7 I/O The 8-bit data bus The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an "E" Clock pulse with each nibble) are sent to make up a full eight bit transfer. The "E" Clock is used to initiate the data transfer within the LCD. Deciding how to send the data to the LCD is most critical decision to be made for an LCD interface application. Eight-bit mode is best used when speed is required in an application and at least ten I/O pins are available. The "R/S" bit is used to select whether data or an instruction is being transferred between the microcontroller and the LCD. If the Bit is set, then the byte at the current LCD "Cursor" Position can be reader written. When the Bit is reset, either an instruction is being sent to the LCD or the execution status of the last instruction is read back. 2.2.7 LED A light-emitting diode (LED) is a semiconductor diode that emits incoherent narrow spectrum light when electrically biased in the forward direction of the pn-junction, as in the common LED circuit. This effect is a form of electroluminescence
  • 23. 23 While sending a message in the form of bits such as 1,the data is sent to the receiver side correspondingly the LED glows representing the data is being received simultaneously when we send 8 as a data the LED gets off . Color Coding Color Potential Difference Infrared 1.6 V Red 1.8 V to 2.1 V Orange 2.2 V Yellow 2.4 V Green 2.6 V Blue 3.0 V to 3.5 V White 3.0 V to 3.5 V Ultraviolet 3.5V
  • 24. 24 ADVANTAGES • LEDs have many advantages over other technologies like lasers. As compared to laser diodes or IR sources • LEDs have several advantages over conventional incandescent lamps. For one thing, they don't have a filament that will burn out, so they last much longer. Additionally, their small plastic bulb makes them a lot more durable. They also fit more easily into modern electronic circuits. • The main advantage is efficiency. In conventional incandescent bulbs, the light- production process involves generating a lot of heat (the filament must be warmed). This is completely wasted energy, unless you're using the lamp as a heater, because a huge portion of the available electricity isn't going toward producing visible light. • LEDs generate very little heat. A much higher percentage of the electrical power is going directly to generating light, which cuts down on the electricity demands considerably. • LEDs offer advantages such as lower cost and longer service life. Moreover LEDs have very low power consumption and are easy to maintain. Many functions can be assigned to a robot easily using different colors of LEDs availible. DISADVANTAGES OF LEDS • LED performance largely depends on the ambient temperature of the operating environment. • LEDs must be supplied with the correct current. • LEDs do not approximate a "point source" of light, so cannot be used in applications needing a highly collimated beam. But the disadvantages are quite negligible in this project as the negative properties of LEDs do not apply and the advantages far exceed the limitations. So we prefer to use the LED as our light source. 2.2.8 DC Motor DC motors are configured in many types and sizes, including brush less, servo, and gear motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic field is maintained using either permanent magnets or electromagnetic windings. DC motors are most commonly used in variable speed and torque.Motion and controls cover a wide range of components that in some way are used to generate and/or control motion. Areas within this category include bearings and bushings, clutches and brakes, controls and drives, drive components, encoders and resolves, Integrated motion control, limit switches, linear actuators, linear and rotary motion components, linear position sensing, motors (both AC and DC motors),
  • 25. 25 orientation position sensing, pneumatics and pneumatic components, positioning stages, slides and guides, power transmission (mechanical), seals, slip rings, solenoids, springs. Motors are the devices that provide the actual speed and torque in a drive system. This family includes AC motor types (single and multiphase motors, universal, servo motors, induction, synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well as linear, stepper and air motors, and motor contactors and starters. In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization). Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to continue rotating.
  • 26. 26 In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque” ripple" (the amount of torque it could produce is cyclic with the position of the rotor). So since most small DC motors are of a three-pole design, let's tinker with the workings of one via an interactive animation (JavaScript required): You'll notice a few things from this -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few microsecond). We'll see more about the effects of this later, but in the meantime you can see that this is a direct result of the coil windings' series wiring
  • 27. 27 There's probably no better way to see how an average dc motor is put together, than by just opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a perfectly good motor. 2.2.9 Power Supply All digital circuits require regulated power supply. In this article we are going to learn how to get a regulated positive supply from the mains supply. 2.2.9.1 Transformer A transformer consists of two coils also called as “WINDINGS” namely PRIMARY & SECONDARY. They are linked together through inductively coupled electrical conductors also called as CORE. A changing current in the primary causes a change in the Magnetic Field in the core & this in turn induces an alternating voltage in the secondary coil. If load is applied to the secondary then an alternating current will flow through the load. If we consider an ideal condition then all the energy from the primary circuit will be transferred to the secondary circuit through the magnetic field.
  • 28. 28 The secondary voltage of the transformer depends on the number of turns in the Primary as well as in the secondary. 2.2.9.2 Rectifier A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode of the diode is positive with respect to the cathode also called as forward biased condition & blocks current in the reversed biased condition. They are of two types depending on the cycle which they convert AC to DC into.  Half Wave Rectifier  Full Wave Rectifier  Bridge Rectifier 2.2.9.3 Filter Capacitor Even though half wave & full wave rectifier give DC output, none of them provides a constant output voltage. For this we require to smoothen the waveform received from the rectifier. This can be done by using a capacitor at the output of the rectifier this capacitor is also called as “FILTER CAPACITOR” or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”. Even after using this capacitor a small amount of ripple will remain. We place the Filter Capacitor at the output of the rectifier the capacitor will charge to the peak voltage during each half cycle then will discharge its stored energy slowly through the load while the rectified voltage drops to zero, thus trying to keep the voltage as constant as possible.
  • 29. 29 If we go on increasing the value of the filter capacitor then the Ripple will decrease. But then the costing will increase. The value of the Filter capacitor depends on the current consumed by the circuit, the frequency of the waveform & the accepted ripple. Where, Vr = accepted ripple voltage.( should not be more than 10% of the voltage) I = current consumed by the circuit in Amperes. F = frequency of the waveform. A half wave rectifier has only one peak in one cycle so F=25hz Whereas a full wave rectifier has Two peaks in one cycle so F=100hz. 2.2.9.4 IC 7805 Voltage Regulator 7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also has a built-in current limiter as a safety feature. 7805 is manufactured by many companies, including National Semiconductors and Fairchild Semiconductors. The 7805 will automatically reduce output current if it gets too hot.The last two digits represent the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators is designed to work in complement with the 79xx series of negative voltage regulators in systems that provide both positive and negative regulated voltages, since the 78xx series can't regulate negative voltages in such a system. The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's small component count and medium-power regulated 5V make it useful for powering TTL devices. Table 2.1. Specifications of IC7805 SPECIFICATIONS IC 7805 Vout 5V Vein - Vout Difference 5V - 20V Operation Ambient Temp 0 - 125°C
  • 30. 30 In our project, we have used9 volts transformer power supply. Why we are using this is to continuously provide power to the circuit. Otherwise, if we use a battery chances are there when current will completely loss. A.C transformer gives the input to Bridge Rectifier. Bridge Rectifier converts A.C to D.C. After that we are using one filter capacitor 1000uf/25v electrolytic capacitor. We are connecting this capacitor in parallel section. The main purpose of this capacitor comes when there is any alternate peaks and this capacitor reduces those peaks. It’s simply filtering that repull’s. After that we are using LM7805 Regulator. Most digital logic circuits and processors need a 5 volt power supply. To make a 5 volt power supply, the LM7805 is simply an option. First connect the positive lead of our unregulated DC power supply to Input pin, connect the negative lead to the Common. Also, we are using one red color led to indicate the power. 2.2.10 Keil Software Many companies provide the 8051 assembler, some of them provide shareware version of their product on the Web, Kiel is one of them. We can download them from their Websites. However, the size of code for these shareware versions is limited and we have to consider which assembler is suitable for our application. Kiel uVision2 is an IDE (Integrated Development Environment) that helps you write, compile, and debug embedded programs. It encapsulates the following components: . A project manager. . A make facility. . Tool configuration. . Editor. . A powerful debugger. To help you get started, follow the given steps to write Embedded C program in Keil Software. Output Imax 1A
  • 31. 31 Step-1: Install Keil MicroVision-2 in your PC, Then after Click on that “Keil UVision-2” icon. After opening the window go to toolbar and select Project Tab then close previous project. Step-2: Next select New Project from Project Tab.
  • 32. 32 Step-3: Then it will open “Create New Project” window. Select the path where you want to save project and edit project name. Step-4: Next it opens “Select Device for Target” window, It shows list of companies and here you can select the device manufacturer company.
  • 33. 33 Step-5: For an example, for your project purpose you can select the chip as 89c51/52 from Atmel Group. Next Click OK Button, it appears empty window here you can observe left side a small window i.e, “Project Window”. Next create a new file. Step-6: From the Main tool bar Menu select “File” Tab and go to New, then it will open a window, there you can edit the program.
  • 34. 34 Step-7: Here you can edit the program as which language will you prefer either Assembly or C. Step-8: After editing the program save the file with extension as “.c” or “.asm”, if you write a program in Assembly Language save as “.asm” or if you write a program in C Language save as “.c” in the selected path. Take an example and save the file as “test.c”.
  • 35. 35 Step-9: Then after saving the file, compile the program. For compilation go to project window select “source group” and right click on that and go to “Add files to Group”. Step-10: Here it will ask which file has to Add. For an example here you can add “test.c” as you saved before.
  • 36. 36 Step-11: After adding the file, again go to Project Window and right click on your “c file” then select “Build target” for compilation. If there is any “Errors or Warnings” in your program you can check in “Output Window” that is shown bottom of the Keil window. Step-12: Here in this step you can observe the output window for “errors and warnings”.
  • 37. 37 Step-13: If you make any mistake in your program you can check in this slide for which error and where the error is by clicking on that error. Step-14: After compilation then next go to Debug Session. In Tool Bar menu go to “Debug” tab and select “Start/Stop Debug Session”.
  • 38. 38 Step-15: Here a simple program for “Leds Blinking”. LEDS are connected to PORT-1. you can observe the output in that port. Step-16: To see the Ports and other Peripheral Features go to main toolbar menu and select peripherals.
  • 39. 39 Step-17: In this slide see the selected port i.e, PORT-1. Step-18: Start to trace the program in sequence manner i.e, step by step execution and observe the output in port window.
  • 40. 40 Step-19: After completion of Debug Session Create an Hex file for Burning the Processor. Here to create an Hex file go to project window and right click on Target next select “Option for Target”. Step-20: It appears one window; here in “target tab” modify the crystal frequency as you connected to your microcontroller.
  • 41. 41 Step-21: Next go to “Output’ tab. In that Output tab click on “Create HEX File” and then click OK. Step-22: Finally, once again compile your program. The Created Hex File will appear in your path folder.
  • 42. 42 2.2.11 ISP Flash Microcontroller Programmer(8.0.1) Introduction In-System Programming allows programming and reprogramming of any AVR microcontroller Positioned inside the end system. Using a simple three-wire SPI interface, the In-System Programmer communicates serially with the AVR microcontroller, reprogramming all non- volatile memories on the chip. In-System Programming eliminates the physical removal of chips from the system. This will save time, and money, both during development in the lab, and when updating The software or parameters in the field. This application note shows how to design the system to support In-System Programming. It also shows how a low-cost In-System Programmer can be made, that will allow the target AVR microcontroller to be programmed from any PC equipped with a regular 9-pin serial port. Alternatively, the entire In-System Programmer can be built into the system allowing it to reprogram itself. Programming Interface For In-System Programming, the programmer is connected to the target using as few wires as possible. To program any AVR microcontroller in any target system, a simple Six-wire interface is used to connect the programmer to the target PCB. Below shows the connections needed. The Serial Peripheral Interface (SPI) consists of three wires: Serial Clock (SCK), Master In – Slave Out (MISO) and Master Out – Slave In (MOSI). When programming the AVR, the In- System Programmer always operate as the Master, and the target system Always operate as the Slave.
  • 43. 43 The In-System Programmer (Master) provides the clock for the communication on the SCK Line. Each pulse on the SCK Line transfers one bit from the Programmer (Master) To the Target (Slave) on the Master out – Slave in (MOSI) line. Simultaneously, Each pulse on the SCK Line transfers one bit from the target (Slave) to the Programmer (Master) on the Master in – Slave out (MISO) line. Features  Complete In-System Programming Solution for AVR Microcontrollers  Covers All AVR Microcontrollers with In-System Programming Support  Reprogram Both Data Flash and Parameter EEPROM Memories  Complete Schematics for Low-cost In-System Programmer  Simple Three-wire SPI Programming Interface 2.2.12 Software Code CODE #include<reg52.h> #include<string.h> #include <STDIO.H> ////////////////////////////////////////////////////////////////// #define LCD P0 /////////////////////////////////////////////////////////////////// void init_lcd(void); void cmd_lcd(unsigned char); void data_lcd(unsigned char); void display_lcd(unsigned char *); void delay_ms(int); //////////////////////////////////////////////////////// sbit ALCOHAL=P2^7; sbit motor=P1^4; sbit buzzer=P1^3; sbit accident=P2^0; int aa=0; int bb=0;
  • 44. 44 sbit orange =P3^7; sbit green =P3^0; //////////////////////////////////////////////////////////////////// void main(void) { motor=0; buzzer=0; orange =1; green =1; init_lcd(); cmd_lcd(0x80); display_lcd("vehicle accident"); cmd_lcd(0xC0); display_lcd("& Alcohol Sensing"); delay_ms(2000); cmd_lcd(0x01); cmd_lcd(0x80); display_lcd("Alert with Engine"); cmd_lcd(0xC0); display_lcd("Locking system"); delay_ms(2000); cmd_lcd(0x01); while(1) { //////////////////////////////////// if(ALCOHAL==0) {
  • 45. 45 aa=1; cmd_lcd(0xC0); display_lcd("ALCOHAL DETECTED"); delay_ms(200); } if(ALCOHAL==1) { aa=0; cmd_lcd(0xC0); display_lcd("NO ALCOHAL "); delay_ms(200); } ////////////////////////////////////// if(accident==1) { bb=0; cmd_lcd(0x80); display_lcd("NO ACCIDENT "); delay_ms(200); } if(accident==0) { bb=1; cmd_lcd(0x01); cmd_lcd(0x80); display_lcd("ACCIDENT DETECTED"); cmd_lcd(0xC0); display_lcd("AIR BAG OPEN"); delay_ms(300);
  • 46. 46 } /////////////////////////////// if((aa==0) & (bb==0)) { motor=1; buzzer=0; orange =1; green =0; } ///////////////////// if((aa==1) & (bb==0)) { orange=0;green=1;motor=0; buzzer=1; delay_ms(2000); } ///////////////////// if((aa==0) & (bb==1)) { orange=0;green=1;motor=0; buzzer=1;delay_ms(2000); } ///////////////////// if((aa==1) & (bb==1)) { orange=0;green=1;motor=0; buzzer=1; delay_ms(2000); } ///////////////////// }
  • 47. 47 } //////////////////////////////////////////////////////////////////////// void init_lcd(void) { cmd_lcd(0x28); cmd_lcd(0x28); cmd_lcd(0x28); cmd_lcd(0x0C); cmd_lcd(0x06); cmd_lcd(0x01); } void cmd_lcd(unsigned char var) { LCD = ((var & 0xF0) | 0x08); LCD = 0; LCD = ((var << 4) | 0x08); LCD = 0; delay_ms(2); } void data_lcd(unsigned char var) { LCD = ((var & 0xF0) | 0x0A); LCD = 0; LCD = ((var << 4) | 0x0A); LCD = 0; delay_ms(2); } void display_lcd(char *str) { while(*str) data_lcd(*str++);
  • 48. 48 } void delay_ms(int cnt) { int i; while(cnt--) for(i=0;i<100;i++);}
  • 49. 49 CHAPTER – 3 Hardware Implementation 3.1 BASIC CONCEPT Purpose of the circuit Vehicle accident and alcohol sensing alert with engine locking system is introduced to minimize the accidents happening around under the influence of Alcohol. The circuit detects the presence of alcohol and immediately switches off the engine and starts the alarm thus eliminating the risk of any accident happening. CONCEPT 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. Our proposed system would be constantly monitoring the driver breath by placing it on the driver wheel or somewhere the driver’s breath can be constantly monitored by it. So, if a driver is drunk and tries to drive the system detects alcohol presence in his/her breathe and locks the engine so that the vehicle fails to start. In another case if the driver is not drunk while he starts the vehicle and engine is started but he/she drinks while driving the sensor still detects alcohol in his breath and stops the engine so that the car would not accelerate any further and driver can steer it to roadside. In this system we use an AVR family microcontroller interfaced with an alcohol sensor along with an LCD screen and a dc motor to demonstrate the concept. So here the alcohol sensor is used to monitor uses breath and constantly sends signals to the microcontroller. 3.2 WORKING OF CIRCUIT The below block diagram illustrates the automatic vehicle engine locking system through an alcohol detection. The Microcontroller (AT89S52), alcohol detector (MQ-3), relay motor driver IC (ULN2003) are the major prerequisites for the system construction. The Alcohol detector sensor will be attached with our Microcontroller.
  • 50. 50 The input for the Microcontroller is identified by the alcohol detector sensor through the breath of a human. In the next scenario the levels of alcohol measured by the sensor and compared with the set-in limits. If the set limit of consumption of alcohol is less than the alcohol consumed by the person, the system of activating relay is initiated which in turn activates the automatic lock on the vehicle, i.e. it stops the motor rotation if it is in running state or it is unable to start. The system will lock the Engine at the same time will automatically give a buzzer. By this, we can avoid accidents by checking the driving people on the roads. Software Program for the system developed in embedded C. ISP is used to dump the code into the Microcontroller. 3.3 Applications 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.
  • 51. 51 CHAPTER – 4 RESULT The moment the circuit detects the presence of alcohol in car/vehicle or any accident via switch/sensor, the microcontroller controlling the whole system immediately stops the engine and makes the siren to beep. Figure 4.1 Circuit Front View Figure 4.2 Circuit when not detecting any Alcohol/Accident
  • 52. 52 Figure 4.3 Circuit when detecting the Alcohol/Accident
  • 53. 53 CHAPTER – 5 CONCLUSION/ FUTURE SCOPE 5.1 Conclusion This vehicle accident and alcohol sensing alert with engine locking system project can sense if the person is drunk or not which is the main cause of the accidents these days, thus making minimal chances of accident happening. The project can further alert the people around the vehicle if any accident has taken place, so that they can help the person seating in the vehicle. Not only this, the project is very cost effective and very easy to implement in any type of vehicle. 5.2 Future Scope 1) We can implement GSM technology to inform the relatives or owners of the vehicle about the alcohol consumption. 2) We can implement GPS technology to find out the location of the vehicle.
  • 54. 54 Reference 1.8051 Microcontroller Architecture, programming and application by KENNETH JAYALA 2. ATMEL 89S52 Data sheets 3. Hand book for Digital IC’s from Analogic Devices 4. Microcontroller and Embedded systems by MOHAMMED ALI MAZIDI 5. www.atmel.com 6. www.beyondlogic.org 7. www.dallassemiconductors.com 8. www.maxim-ic.com 9. www.ijtimes.com