Professional Documents
Culture Documents
INTRODUCTION
Drinking and driving is already a serious public health problem ,which is likely to emerge as one of
the most significant problems in near future .the system implemented by us aims at reducing the
road accident in the near future due to drunken and drive . This paper present the progress in using
the alcohol detector ,a device that senses a change in the alcoholic gas content of the surrounding air
these device is more commonly referred to as a breath analysis, as it analysis the alcohol content
from person’s breath. The system detects the presence of alcohol in the vehicle and immediately
locks the engine of the vehicle.
ADVANTAGES:
Low cost
. Automated operation.
.
Applications and Advantages:
1) “Alcohol Detector project” can be used in the various vehicles for detecting
whether the driver has consumed alcohol or not.
3. Block diagram
4.WORKING
MQ3 sensor is basic sensing element used for alcohol detection. When alcohol
is detected it gives logic high(1) as per the program and remaining circuit run
simultaneously.
When MQ3 sensor goes to logic 1, it sends an high signal to micro controller
89S52. The micro controller send this signal to engine circuit driving through
LM293D driver IC , i.e., as per the program and our aim is that when alcohol is
detected then the engine speed starts decreasing ultimately and engine stops
through this process i.e., engine is locked.
Along with this operation 16X2 Lcd connected to micro controller , it displays
the engine status as well as sensor status w.r.t above operation when alcohol
detected the buzzer starts ringing at the same time.
The power supply requirement are arranged along with a reset switch is places at
pin.9 of micro controller 89S52 to reset the process.
If the sensor is in condition logic low(0) then Lcd displays no alcohol detected.
So engine is in unlocked state and runs by the above process.
HARDWARE COMPONENTS DESCRIPTION
MQ3 sensor (4 pin)
40 pin IC base
Capacitors
Resistors
Ignition lock
BC 547 transistor
Red LED
16×2 LCD
IC Regulator (7805)
LM 293D
Buzzer
MICROCONTROLLER AT89S52
Microcontrollers are "embedded" inside some other device. They can control the
features or actions of the product. Another name for a microcontroller is
"embedded controller”. Microcontrollers are dedicated to one task and run one
specific program. The program is stored in ROM (read-only memory) and
generally does not change. Microcontrollers are often low-power devices. A
microcontroller has a dedicated input device and has a small LED or LCD
display for output. A microcontroller also takes input from the device it is
controlling and controls the device by sending signals to different components in
the device.
FEATURES:
Watchdog Timer.
Power-off Flag.
GND: Ground.
PORT 0:
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin
sink eight TTL inputs.
When 1s are written to port 0 pins, the pins can be used as High impedance
inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this
mode P0 has internal pull-ups.
PORT 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they
are pulled high by the internal pull-ups and can be used as inputs.
PORT 2:
Port 2 is a 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs,
Port 2 pins that externally being pulled low will source current During accesses
to external data memory that uses (IIL) because of the internal pull-ups.
PORT 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs,
Port 3 pins that are externally being pulled low will source current (IIL) because
of the pull-ups.
RESET:
Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input
(PROG) during Flash programming. In normal operation ALE is emitted at a
constant rate of 1/6 the
External Access Enable must be strapped to GND in order to enable the device
to fetch code from external program memory locations starting at 0000H up to
FFFFH.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2:
OSCILLATOR CHARACTERISTICS:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator. A quartz
crystal or ceramic resonator may be used.
To drive the device from an external clock source, XTAL2 should be left
unconnected while XTAL1 is driven.
Alcohol Gas Sensor MQ3:
It is a low cost semiconductor sensor which can detect the presence of alcohol
gases at concentrations from 0.05 mg/L to 10 mg/L. The sensitive material used
for this sensor is SnO2, whose conductivity is lower in clean air. It’s
conductivity increases as the concentration of alcohol gases increases. It has
high sensitivity to alcohol and has a good resistance to disturbances due to
smoke, vapor and gasoline. This module provides both digital and analog
outputs. MQ3 alcohol sensor module can be easily interfaced with
Microcontrollers, Arduino Boards, Raspberry Pi etc.
o
Features :
Digital output: 0V or 5V
Application
BC547 is a NPN transistor hence the collector and emitter will be left open
(Reverse biased) when the base pin is held at ground and will be closed
(Forward biased) when a signal is provided to base pin. BC547 has a gain value
of 110 to 800, this value determines the amplification capacity of the transistor.
The maximum amount of current that could flow through the Collector pin is
100mA, hence we cannot connect loads that consume more than 100mA using
this transistor. To bias a transistor we have to supply current to base pin, this
current (IB) should be limited to 5mA.
When this transistor is fully biased then it can allow a maximum of 100mA to
flow across the collector and emitter. This stage is called Saturation Region
and the typical voltage allowed across the Collector-Emitter (VCE) or Base-
Emitter (VBE) could be 200 and 900 mV respectively. When base current is
removed the transistor becomes fully off, this stage is called as the Cut-off
Region and the Base Emitter voltage could be around 660 mV.
The output current of this IC can go up to 1.5A. But, the IC suffers from heavy
heat loss hence a Heat sink is recommended for projects that consume more
current. For example if the input voltage is 12V and you are consuming 1A, then
(12-5) * 1 = 7W. This 7 Watts will be dissipated as heat.
Ground
2 Connected to Ground
(Gnd)
The L293D is a famous 16-Pin Motor Driver IC. As the name suggests it is
mainly used to drive motors. A single L293D IC is capable of running two DC
motors at the same time; also the direction of these two motors can be controlled
independently. So if you have motors which has operating voltage less than 36V
and operating current less than 600mA, which are to be controlled by digital
circuits like Op-Amp, 555 timers, digital gates or even Micron rollers like
Arduino, PIC, ARM etc.. this IC will be the right choice for you. Using this
L293D motor driver IC is very simple. The IC works on the principle of Half H-
Bridge.
Features
There are two types are buzzers that are commonly available. The one shown
here is a simple buzzer which when powered will make a Continuous
Beeeeeeppp.... sound, the other type is called a readymade
buzzer which will look bulkier than this and will produce a Beep. Beep. Beep.
Sound due to the internal oscillating circuit present inside it. But, the one shown
here is most widely used because it can be customised with help of other circuits
to fit easily in our application.
This buzzer can be used by simply powering it using a DC power supply ranging
from 4V to 9V. A simple 9V battery can also be used, but it is recommended to
use a regulated +5V or +6V DC supply. The buzzer is normally associated with
a switching circuit to turn ON or turn OFF the buzzer at required time and
require interval.
frequency…
Description on LCD modules
LCD modules are vey commonly used in most embedded projects, the reason
being its cheap price, availability and programmer friendly. Most of us would
have come across these displays in our day to day life, either at PCO’s or
calculators. The appearance and the pinouts have already been visualized above
now let us get a bit technical.
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot
of combinations available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one
is the 16×2 LCD. So, it will have (16×2=32) 32 characters in total and each
character will be made of 5×8 Pixel Dots. A Single character with all its Pixels
is shown in the below picture.
Features of 16×2 LCD module
An ignition interlock interrupts the signal from the ignition to the starter until a
valid breath sample is provided that meets minimal alcohol guidelines in that
state. At that point, the vehicle can be started as normal. At random times after
the engine has been started, the IID will require another breath sample, referred
to as a rolling retest. The purpose of the rolling retest is to prevent someone
other than the driver from providing a breath sample. If the breath sample isn't
provided, or the sample exceeds the ignition interlock's preset blood alcohol
level, the device will log the event, warn the driver, and then start up an alarm in
accordance to state regulations (e.g., lights flashing, horn honking) until the
ignition is turned off, or a clean breath sample has been provided. A common
misconception is that interlock devices will simply turn off the engine if alcohol
is detected; this would, however, create an unsafe driving situation and expose
vehicle off manufacturers to considerable liability. Ignition interlock devices do
not have an automatic engine shut off feature.
Resistors :
A resistor is a passive two-terminal electrical component that implements
electrical resistance as a circuit element. In electronic circuits, resistors are used
to reduce current flow, adjust signal levels, to divide voltages, bias active
elements, and terminate transmission lines, among other uses. High-power
resistors that can dissipate many watts of electrical power as heat, may be used
as part of motor controls, in power distribution systems, or as test loads for
generators. Fixed resistors have resistances that only change slightly with
temperature, time or operating voltage. Variable resistors can be used to adjust
circuit elements (such as a volume control or a lamp dimmer), or as sensing
devices for heat, light, humidity, force, or chemical activity.
devices).
capacitor:
sbit D0 = P2^0;
sbit D1 = P2^1;
sbit D2 = P2^2;
//including sfr
sbit mp = P1^0;
sbit mn = P1^1;
void Delay(int a)
int j;
int i;
for(i=0;i<a;i++)
for(j=0;j<100;j++)
{
void main()
int i;
buz=0;
ac=0;
mp=1;
mn=0;
Lcd8_init();
Lcd8_Set_Cursor(1,1);
Lcd8_Write_String("Alcohol sensor");
Lcd8_Set_Cursor(2,6);
Lcd8_Write_String("system");
for(i=0;i<15;i++)
Delay(100);
}
While(1)
if(ac==1)
buz=1;
mp=mn=0;
Lcd8_Set_Cursor(1,0);
Lcd8_Write_String("Alcohol : YES. ");
Lcd8_Set_Cursor(2,0);
Lcd8_Write_String("Engine : locked");
else
mp=1;
mn=0;
buz=0;
Lcd8_Set_Cursor(1,0);
Lcd8_Set_Cursor(2,0);
Lcd8_Write_String("Engine :Unlocked");
}
part 2
void Lcd_Delay(int a)
int j;
int i;
for(i=0;i<a;i++)
{
for(j=0;j<100;j++)
void Lcd8_Port(char a)
{
if(a & 1)
D0 = 1;
else
D0 = 0;
if(a & 2)
D1 = 1;
else
D1 = 0;
if(a & 4)
D2 = 1;
else
D2 = 0;
if(a & 8)
D3 = 1;
else
D3 = 0;
if(a & 16)
D4 = 1;
else
D4 = 0;
D5 = 1;
else
D5 = 0;
if(a & 64)
D6 = 1;
else
D6 = 0;
D7 = 1;
else
D7 = 0;
}
void Lcd8_Cmd(char a)
RS = 0; // => RS = 0
EN = 1; // => E = 1
Lcd_Delay(5);
EN = 0; // => E = 0
8.FEATURES
7.1 ADVANTAGES:
Low cost.
Automated operation.
Low Power consumption.
System configuration:
In this project we have developed a real time model that can automatically lock
the engine when a drunken driver tries to drive a car. Now-a-days car accidents
are mostly seen. By fitting this alcohol sensor into the car, we can save guard the
life of the driver and also the remaining passengers. It is very simple application.
The life time of the project is high. It has low or zero maintenance cost and of
course low power consumption.
Government must enforce laws to install such circuit in every car and must
regulate all car companies to preinstall such mechanisms while manufacturing
the car itself. If this is achieved the deaths due to drunken drivers can be brought
to minimum level. In this type of system, future scope can be safely landing of
car aside without disturbing other vehicles.
11. BIBILOGRAPHY
1. www.wikipedia.org
2. www.atmel.com
5. http://www.atmel.com/Images/doc1919.pdf