synopsis for alcohol detection with vehicle controlling (1)

29
. PROJECT SYNOPSIS ON Alcohol detection through Automatic Motor locking system Under the guidance of: - Er.Navendu Nitin SUBMITTED BY:- Santosh Kumar (13BTECE011) Rahul Gupta (13BTECE022) Pankaj Singh (13BTECE029) Naval Kumar (13BTECE039) ELECTRONICS AND COMMUNICATION ENGINEERING DEPARTMENT SHEPHERD SCHOOL OF ENGINEERING AND TECHNOLOGY SAM HIGGINBOTTOM UNIVERSITY OF AGRICULTURE,

Upload: pankaj-singh

Post on 12-Apr-2017

574 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Synopsis for alcohol detection with vehicle controlling (1)

.

PROJECT SYNOPSIS ON Alcohol detection through Automatic Motor locking system

Under the guidance of: - Er.Navendu Nitin

SUBMITTED BY:-

Santosh Kumar (13BTECE011)

Rahul Gupta (13BTECE022)

Pankaj Singh (13BTECE029)

Naval Kumar (13BTECE039)

ELECTRONICS AND COMMUNICATION ENGINEERING DEPARTMENT

SHEPHERD SCHOOL OF ENGINEERING AND TECHNOLOGY

SAM HIGGINBOTTOM UNIVERSITY OF AGRICULTURE,

TECHNOLOGY AND SCIENCES

Naini , Allahabad-211007

2013-2017

Page 2: Synopsis for alcohol detection with vehicle controlling (1)

.

INDEX

S.N0. TOPICS PAGE NO.

01. INTRODUCTION 01

02. BLOCK DIAGRAM 02

03. CIRCUIT DIAGRAM 03

04. WORKING OPERATION 04

05. COMPONENTS USED 05

06. ESTIMATE COST OF THE PROJECT 06

07. ADVANTAGES AND APPLICATIONS 07

08. RELATED WORK HAS BEEN IN PAST 08 09. PCB LAYOUT 09 10 PROGRAMMING 10

Page 3: Synopsis for alcohol detection with vehicle controlling (1)

.

1.0 INTRODUCTION

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 contries

all over 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.

Now-a-days we hear about lot of accidents due to drunken driving. Drunken drivers will not

be in stable condition and so the rash driving is the inconvenience for other road users and

also question of life and death for the drunken drivers, also for others. In this project, we are

developing an Auto Lock System. The input for the system is from Detection Sensors either

from Alcohol Breath or any other mechanism. The controller keeps looking for the output

from these sensors. If there are any traces of Alcohol above the set limit, then the system will

lock the Engine. Here a simulating process is activated using a DC motor through the relay

and the complete process is under the supervision of an intelligent AT89c51 microcontroller.

Even though efficient set up of requirements have been adopted for the traditional methods it

may not be sufficient and that much protective for such a complex method, whereas here in

this process this could be a better idea of inserting the complete state of art design into the

system. Most of the traditional systems are likely to be more dependent on the operator and it

may fail due to various factors like the battery life, power consumption as well as the

unavoidable external disturbances.Thus Drunk driving is a major reason of accidents in

almost all countries all over 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.In this project, we are developing an Auto Lock System. Alcohol sensor will be

attached with our microcontroller. While alcohol wafers smelled by the sensor. Sensor sends

the input voltage to microcontroller. If there are any traces of Alcohol above the set limit,

then the system will lock the Engine at the same time will automatically gives a buzzer We

can avoid accidents by checking the driving people on the roads. So that we can avoid

accidents.The system uses a compact circuitry built around Flash version of AT89S52

microcontroller with a non-volatile memory capable of retaining the password data for over

ten years. Programs are developed in embedded C.  ISP is used to dump the code into the

microcontroller. 

Page 4: Synopsis for alcohol detection with vehicle controlling (1)

.

2.0 Block Diagram

Fig.1.0:- functional block diagram

2.1 Explanation of Block diagram:-

1) Alcohol sensor:-Alcohol sensor is the sensor that measures the amount of alcohol that is present in

surrounding environment. There are contact and non-contact type of sensors. As the

output signal of sensor is smaller in amplitude the signal power is also low therefore

amplifiers are used. The weak signals are amplified using amplifiers.

Page 5: Synopsis for alcohol detection with vehicle controlling (1)

.

2) MICRO-CONTROLLER (8051):-It is the major part of the system. It maintains the temperature, humidity and light

intensity to the desired value. The 8051 has one serial port that receives and transmits

data. Transmission and reception can take place simultaneously. The four

communication modes possible with 8051 present the system designer and

programmer with opportunities to conduct very sophisticated data communication

network. It is the heart of the system which controls all the inputs and the controlling

action to be taken at the output. Microcontroller used here is the AT89S51.

3) LCD DISPLAY:-Liquid Crystal Display which is commonly known as LCD is an Alphanumeric

Display it means that it can display Alphabets, Numbers as well as special symbols

thus LCD is a user friendly Display device which can be used for displaying various

messages unlike seven segment display which can display only numbers and some of

the alphabets. The only disadvantage of LCD over seven segment is that seven

segment is robust display and be visualized from a longer distance as compared to

LCD. Here we have used 16 x 2 Alphanumeric Display which means on this display

we can display two lines with maximum of 16 characters in one line.

4) Relay for CONTROLLER:-The error between the reference and present value is given to the temperature

controller, which responds correspondingly to the error and gives the feedback to the

sensors. The temperature controlling depends on whether the temperature needs to be

increased or decreased. The temperature controlling can be done through fans.

5) DC Motor:-A DC motor is a mechanically commutated electric motor powered from direct

current (DC). In DC 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. Opposite (North and

Page 6: Synopsis for alcohol detection with vehicle controlling (1)

.

South) polarities of magnet 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.

6) Serial INTERFACE:-Serial interface is the additional feature provided for this system. It is used as a future

enhancement. In this the present readings taken through the sensors are given to the

computer for further manipulations and calculations.

3.0 CIRCUIT DIAGRAM

Page 7: Synopsis for alcohol detection with vehicle controlling (1)

.

Page 8: Synopsis for alcohol detection with vehicle controlling (1)

.

4.0 WORKING

This application is in the area of embedded systems. An embedded system is some

combination of computer hardware and software, either fixed in capability or programmable,

that is specifically designed for a particular function. The Keil C51 C Compiler for the 8051

microcontroller is the most popular 8051 C compiler in the world. It provides more features

than any other 8051 C compiler available today. The C51 Compiler translates C source files

into reloadable object modules which contain full symbolic information for debugging with

the µVision Debugger or an in-circuit emulator. In addition to the object file, the compiler

generates a listing file which may optionally include symbol table and cross reference

information.

Embedded C is an extension for the programming language C to support embedded

processors, enabling portable and efficient application programming for embedded systems.

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes

of Flash programmable and erasable read only memory (EPROM). The device is

manufactured using Atmel’s high-density nonvolatile memory technology and is compatible

with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the

program memory to be reprogrammed in-system or by a conventional nonvolatile memory

programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel

AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective

solution to many embedded control applications. The main aim of this embedded application

is to detect the alcohol drunken people. We are developing an embedded kit which will be

placed in a vehicle. Now, the vehicle will be under the control of the kit .If any drunken

person enter in to the vehicle it gives a buzzer sound immediately , and now the car will be

under the control of the hardware used. We run the vehicle by using wireless communication

i.e. from Control section (acts as transmitter) we are ejecting the control signals, then the

vehicle receives (acts as receiver) the signals, according to the signals it will give a alarm or

buzzer. It aims at designing and executing the vehicle controlling using RF. By using the RF

communication, whenever alcohol is detected using the alcohol detector, the micro controller

sends the information to the encoder and the encoder encodes the values and is received by

the RF Transmitter. RF Receiver receives the information from the RF Transmitter and

decoder decodes the serial input and sends the output to the micro controller and according to

Page 9: Synopsis for alcohol detection with vehicle controlling (1)

.

the information received by the micro controller the robot will move in that particular

direction. The robot movement is driven with the help of L293D as driver IC.

4.1 COMPONENTS THAT ARE USED IN THE PROJECT

Name Quantity

8051 microcontroller 1

IC base (40 pin) 1

MQ sensor 1

LCD 1

Push Button 2

PCB Plate “6*6 inch” 1

Zero size PCB 1

BUS Strip (1*40) male to male 3

BUS Strip (1*40) female to female 2

LED 1.5mm 2

Resistance 10 k 4

330ohm 3

220 0hm 3

Ceramic Capacitor 22nf 4

Crystal 11.5mhz 1

Connecting wire(single thread) .5m 1

Soldering wire 50 gm 1

Soldering iron 1

Paste( flux) 1

Capacitor 1000uf /50 v 1

Diode N4007 4

Voltage regulator 7805 1

7812 1

Transformer 12-0-12 (1amp) 1

Variable resistor (preset) 10k 1

Page 10: Synopsis for alcohol detection with vehicle controlling (1)

.

Relay Switch 1

Capacitor 470uf/25v 1

DC motor 1

Motor driver IC L293 1

Transistor (NPN) 2N1711 1

COMPONENTS REQUIRED AND THEIR BUDGET

S.NO. COMPONENTS QUANTITY PRICE 1. Motor IC L293 1 Rs. 75 2. LCD 1 Rs. 180 3. Microcontroller 1 Rs. 90 4. Capacitor 6 Rs. 30 5. Resistor 9 Rs. 15 6. Relay 1 Rs. 118 7. Alcohol sensor 1 Rs. 250 8. Diode( IN4007) 5 Rs. 10 9. Transistor( NPN) 1 Rs.10 10. Switch 1 Rs.10 11. LED ,Button 2 Rs. 8 12. DCMotor 1 Rs. 50 13. Voltage Regulator 2 Rs. 15 14. Transformer 1 Rs. 35

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.

Page 11: Synopsis for alcohol detection with vehicle controlling (1)

.

Advantages

1) “Alcohol Detection System in Cars” provides an automatic safety system for cars and other vehicles as well.

2) Low cost.3) Automated operation.4) Low Power consumption.5) It provides an automatic safety system for cars and other vehicles as well.

5.0 RELATED WORK THAT HAS BEEN DONE IN PAST

S/N Name YEAR MACHANISM

1. Ritesh Agrawal 2003Toxic Gas detection using GSM technology

2. Jenson- mortain 2004Vehicle tracking system using GPS & GSM modem

3. Akshay Ahuja 2011Vehicle Accident detection with GPS & GSM modem

4. Henry ford 2013Password based lock for Bike security with ignition key

5. S. Dharmadhikari 2015SMS based Alcohol detection with vehicle controlling using GSM technology

Page 12: Synopsis for alcohol detection with vehicle controlling (1)

.

6.0 PCB LAYOUT

Page 13: Synopsis for alcohol detection with vehicle controlling (1)

.

7.0 PROGRAMMING

C51 COMPILER V9.56.0.0 MAIN 03/21/2017 18:41:33 PAGE 1

C51 COMPILER V9.56.0.0, COMPILATION OF MODULE MAINOBJECT MODULE PLACED IN .\Objects\main.objCOMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listings\main -.lst) TABS(2) OBJECT(.\Objects\main.obj)

line level source

1 #include <reg51.h> 2 3 void delay(unsigned int del) 4 { 5 1 6 1 unsigned int i,j ; 7 1 8 1 for(i=0;i<del;i++) 9 1 for(j=0;j<1275;j++); 10 1 11 1 } 12 13 14 #define LCD_PORT P2 15 16 sbit RS = P2^0; 17 sbit RW = P2^1; 18 sbit EN = P2^2;

Page 14: Synopsis for alcohol detection with vehicle controlling (1)

.

19 20 sbit SENSE = P1^0; 21 sbit SW = P1^1; 22 sbit RLY = P1^2; 23 24 void lcd_command(unsigned int cmd) 25 { 26 1 LCD_PORT = (cmd & 0xF0); 27 1 RS = 0; 28 1 RW = 0; 29 1 EN = 1; 30 1 delay(1); 31 1 EN = 0; 32 1 33 1 LCD_PORT = ((cmd<<4) & 0xF0); 34 1 RS = 0; 35 1 RW = 0; 36 1 EN = 1; 37 1 delay(1); 38 1 EN = 0; 39 1 } 40 41 void lcd_data(unsigned int dat) 42 { 43 1 LCD_PORT = (dat & 0xF0); 44 1 RS = 1; 45 1 RW = 0; 46 1 EN = 1; 47 1 delay(1); 48 1 EN = 0; 49 1 50 1 LCD_PORT = ((dat<<4) & 0xF0); 51 1 RS = 1; 52 1 RW = 0; 53 1 EN = 1; 54 1 delay(1);

Page 15: Synopsis for alcohol detection with vehicle controlling (1)

.

C51 COMPILER V9.56.0.0 MAIN 03/21/2017 18:41:33 PAGE 2

55 1 EN = 0; 56 1 57 1 } 58 59 void lcd_string(unsigned char *str) 60 { 61 1 62 1 unsigned char i = 0; 63 1 64 1 while(str[i] != '\0') 65 1 { 66 2 67 2 lcd_data(str[i]); 68 2 i++; 69 2 70 2 } 71 1 } 72 73 void lcd_init() 74 { 75 1 76 1 lcd_command(0x02); 77 1 lcd_command(0x28); 78 1 lcd_command(0x06); 79 1 lcd_command(0x0C); 80 1 81 1 82 1 } 83 void lcd_num(unsigned int num) 84 { 85 1 86 1 unsigned int d = 0; 87 1 88 1 lcd_command(0x04);

Page 16: Synopsis for alcohol detection with vehicle controlling (1)

.

89 1 90 1 if(num==0) 91 1 { 92 2 93 2 lcd_data(48); 94 2 95 2 } 96 1 97 1 while(num>0) 98 1 { 99 2 d = num%10; 100 2 101 2 lcd_data(d+48); 102 2 103 2 num = num/10; 104 2 105 2 } 106 1 107 1 lcd_command(0x06); 108 1 109 1 } 110 111 void main() 112 { 113 1 unsigned char flag = 0; 114 1 P2 = 0; 115 1 SW = 1; 116 1 SENSE = 1;

Page 17: Synopsis for alcohol detection with vehicle controlling (1)

.

C51 COMPILER V9.56.0.0 MAIN 03/21/2017 18:41:33 PAGE 3

117 1 RLY = 0; 118 1 119 1 lcd_init(); 120 1 lcd_command(0x80); 121 1 lcd_string("ALCOHOL DETECT"); 122 1 123 1 delay(400); 124 1 125 1 while(1) 126 1 { 127 2 128 2 lcd_command(0x01); 129 2 lcd_command(0x80); 130 2 lcd_string("ALCOHOL DETECT"); 131 2 132 2 lcd_command(0xC0); 133 2 lcd_string("SENSING......"); 134 2 135 2 delay(300); 136 2 137 2 if(SENSE==0) 138 2 { 139 3 140 3 lcd_command(0xC0); 141 3 lcd_string(" "); 142 3 143 3 lcd_command(0xC0); 144 3 145 3 lcd_string("DETECTED !!!!!"); 146 3 147 3 delay(500); 148 3 149 3 150 3 flag=1;

Page 18: Synopsis for alcohol detection with vehicle controlling (1)

.

151 3 152 3 } 153 2 154 2 else 155 2 { 156 3 157 3 lcd_command(0xC0); 158 3 lcd_string(" "); 159 3 160 3 lcd_command(0xC0); 161 3 162 3 lcd_string("CHECK OK !!!"); 163 3 164 3 delay(500); 165 3 166 3 167 3 flag=0; 168 3 169 3 170 3 } 171 2 172 2 lcd_command(0x01); 173 2 lcd_command(0x80); 174 2 lcd_string("ENGINE START"); 175 2 176 2 delay(100); 177 2 178 2 while(SW==1);

Page 19: Synopsis for alcohol detection with vehicle controlling (1)

.

C51 COMPILER V9.56.0.0 MAIN 03/21/2017 18:41:33 PAGE 4

179 2 180 2 181 2 if(flag==0) 182 2 { 183 3 RLY = 1; 184 3 185 3 delay(800); 186 3 187 3 RLY = 0; 188 3 189 3 flag=0; 190 3 } 191 2 192 2 delay(800); 193 2 194 2 } 195 1 196 1 197 1 198 1 } 199 200 201 202 203 204 205

MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 472 ---- CONSTANT SIZE = 89 ---- XDATA SIZE = ---- ---- PDATA SIZE = ---- ----

Page 20: Synopsis for alcohol detection with vehicle controlling (1)

.

DATA SIZE = ---- 9 IDATA SIZE = ---- ---- BIT SIZE = ---- ----END OF MODULE INFORMATION.

C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)