A
Project Report
on
Alcohol Detection Using Arduino
Submitted to
CHHATTISGARH SWAMI VIVEKANAND TECHNICAL UNIVERSITY
BHILAI
in partial fulfilment of requirement for the award of degree
of
Bachelor of Engineering
in
Electronics and Instrumentation
by
Rituparna Das
Tarni Verma
Department of Electronics and Instrumentation
Faculty of Engineering and Technology
Shri Shankaracharya Technical Campus, Junwani, Bhilai
Session: 2013-2017
i
Appendix-I
Project Report
on
Alcohol Detection Using Arduino
Submitted to
CHHATTISGARH SWAMI VIVEKANAND TECHNICAL UNIVERSITY
BHILAI
in partial fulfilment of requirement for the award of degree
of
Bachelor of Engineering
in
Electronics and Instrumentation
by
Rituparna Das
Tarni Verma
Department of Electronics and Instrumentation
Faculty of Engineering and Technology
Shri Shankaracharya Technical Campus, Junwani, Bhilai
Session: 2013-2017
ii
Appendix-II
DECLARATION
I the undersigned solemnly declare that the report of the project work entitled “Alcohol
Detection using Arduino”, is based my own work carried out during the course of my study
under the supervision of Mr. Chandrahas Sahu.
I assert that the statements made and conclusions drawn are an outcome of the project
work. I further declare that to the best of my knowledge and belief that the report does not
contain any part of any work which has been submitted for the award of any other
degree/diploma certificate in this university or any other university
Signature of the Candidate
RITUPARNA DAS
Roll No: - 3142713033
Enrollment No: - AN7616
Signature of the Candidate
TARNI VERMA
Roll No: - 3142713046
Enrollment No: - AN7629
iii
Appendix-II
iv
Appendix-III
CERTIFICATE
This is to certify that the report of the project submitted is an outcome of the project work
entitled “ALCOHOL DETECTION USING ARDUINO” carried out by RITUPARNA DAS
bearing Roll No: - 3142713033 & Enrollment No: - AN7616 and TARNI VERMA bearing
Roll No: - 3142713046 & Enrollment No: - AN7629 carried out under our guidance and
supervision for the award of degree in Bachelor and Engineering in Electronics and
Instrumentation of Chhattisgarh Swami Vivekanand Technical University, Bhilai (C.G.),
India.
To the best of my knowledge the report
i) Embodies the work of candidate himself/herself
ii) Has duly been completed
iii) Fulfills the requirement of the ordinance relating to the BE degree of the
university and
iv) Is up to the desired standard for the purpose of which is submitted
Signature of the Guide
Mr. Chandrahas Sahu
Senior Assistant Professor
E&I Department
Shri Shankaracharya Group of Institutions
SSTC Campus, Junwani, Bhilai (C.G.)
The project work as mentioned above is hereby being recommended and forwarded for
examination and evaluation
Signature of Head of the Department with Seal
v
Appendix-IV
CERTIFICATE BY THE EXAMINERS
This is to certify that the project work entitled
ALCOHOL DETECTION USING ARDUINO
Submitted by
Rituparna Das, Roll No: - 3142713033, Enrollment No: - AN7616
Tarni Verma, Roll No: - 3142713046, Enrollment No: - AN7629
Has been examined by the undersigned as a part of the examination for the award of Bachelor
of Engineering Degree in Electronics & Instrumentation of Chhattisgarh Swami Vivekananda
Technical University, Bhilai.
Internal Examiner External Examiner
Date: - Date:-
vi
Appendix-V
ACKNOWLEDGEMENT
In performing our project, we had to take the help and guideline of some respected persons,
who deserve our greatest gratitude. The completion of this assignment gives us much
pleasure. We would like to show our gratitude Mr. Chandrahas Sahu, Project Guide,
Chhattisgarh Swami Vivekananda Technical University for giving us a good guideline for as
project throughout numerous consultations. We would also like to expand our deepest
gratitude to all those who have directly and indirectly guided us in writing this assignment.
Many people, especially our classmates and team members itself, have made valuable
comment suggestions on this proposal which gave us an inspiration to improve our
assignment. We thank all the people for their help directly and indirectly to complete our
assignment.
Signature of the Student Signature of the Student
Name: - Rituparna Das Name: - Tarni Verma
Shri Shankaracharya Group of Institutions
SSTC Campus, Junwani, Bhilai, (C.G.)
vii
Appendix-VI
Table of Content
Chapter Title Page No
I Introduction 1
II Literature Review 2
III Problem Identification 5
IV Methodology 7
4.1 Components Required
4.1.1 Arduino Board Microcontroller 9
4.1.2 Alcohol Sensor MQ-3 10
4.1.3 Liquid Crystal Display 11
V Results and Discussion 13
VI Conclusion and Scope of Further Work 15
viii
Appendix-VI
ix
ABSTRACT
The main aim of the project is to make vehicle safe under drunken people. The vehicle will
be under the control of the hardware. Normally, we should use a buzzer but in place of buzzer
we used some led’s to get the level of the alcohol present. The level of the concentration will
signify or rather will alarm how much safe is to drive the car.
We used C programming to get the work done. The arduino UNO works on C programming.
Also we used 16*2 LCD (Liquid Crystal Display) to display the message” alcohol detected”.
The sensor MQ-3 plays a vital role in this project as it detects the or sense the alcohol content
present in the atmosphere.
x
LIST OF TABLES:
FEATURES OF ARDUINO UNO TABLE 4.1
FEATURES OF MQ-3 TABLE 4.2
FEATURES OF LCD DISPLAY TABLE 4.3
xi
LIST OF FIGURES:
BLOCK DIAGRAM FIG 4.1
ARDUINO UNO FIG 4.2
MQ-3 ALCOHOL SENSOR FIG 4.3
16*2 LCD DISPLAY FIG 4.4
xii
LIST OF ABBREVIATIONS:
LCD LIQUID CRSTAL DISPLAY
IR INFRARED
A/D ANALOG/DIGITAL
PPM PARTS PER MILLION
BAC BLOOD ALCOHOL CONTENT
DC DIRECT CURRENT
LED LIGHT EMITTING DIODE
GPS GLOBAL POSITIONING SYSTEM
USB UNIVERSAL SERIAL BUS.
PWM PULSE WIDTH MODULATION
AC ALTERNATING CURRENT
ICSP IN-CIRCUIT SERIAL PROGRAMMING
SRAM STATIC RANDOM ACCESS MEMORY
EEPROM ELECTRICALLY ERASABLE
PROGRAMMABLE READ-ONLY MEMORY
ATMEL ADVANCED TECHNOLOGY FOR
MEMORY AND LOGIC
GSM GLOBAL SYSTEM FOR MOBILE
COMMUNICATIONS
xiii
LIST OF SYMBOLS:
V Volts
MHz Megahertz
mA milliampere
KB Kilobyte
Mm millimeter
xiv
CHAPTER-I
INTRODUCTION
1
The main aim of this project is to design an electronic system for implementing an efficient
alcohol detection system that will be useful to avoid accidents. There are many different types of
accidents which occur in daily life. Accidents may cause due to many reasons it may be due to
brake fail. Most often accidents occur due to over drunken person. Though there are laws to
punish drunken drivers they cannot be fully implemented because traffic police cannot stand on
every road to check each and every car driver whether he/she has drunk or not. This can be a
major reason for accidents. So there is a need for an effective system to check drunken drivers.
Therefore in order to avoid these accidents we have implemented a prototype project. In our
project, initially we check whether the person has drunken or not by using the MQ3 GAS sensor.
In this system, sensor circuit is used to detect whether the alcohol was consumed by driver or not.
To this end, we have designed such a system that when alcohol concentration is detected alarm is
raised.
2
CHAPTER-II
LITERATURE REVIEW
3
NAME OF YEAR OF REMARKS
JOURNAL PUBLISHING
International Journal of Mar-Apr 2015 The designed system would finish the
Engineering Trends and function of communicating with the
Applications (IJETA) base station via GPS, GSM and control
of various parameters.
International Journal of January- 2014 Alcohol sensor is embedded on the
Research in Computer and steering of the car. Whenever the driver
Communication Technology starts the ignition the sensor measures
the content of alcohol in his breath and
automatically switches off the car if he
is drunk.
4
CHAPTER-III
PROBLEM IDENTIFICATION
5
There were many problems so far discovered while designing of alcohol detector…..they are-
1. Readings are Not Averaged Correctly: When the software takes a series of readings,
it first averages the first two readings. Then, it averages the third reading with the
average just computed. Then the fourth reading is averaged with the new average, and
so on. There is no comment or note detailing a reason for this calculation, which
would cause the first reading to have more weight than successive readings.
Nonetheless, the comments say that the values should be averaged, and they are not.
2. Results Limited to Small, Discrete Values: The A/D converters measuring the IR
readings and the fuel cell readings can produce values between 0 and 4095. However,
the software divides the final average(s) by 256, meaning the final result can only
have 16 values to represent the five-volt range (or less), or, represent the range of
alcohol readings possible. This is a loss of precision in the data; of a possible twelve
bits of information, only four bits are used. Further, because of an attribute in the IR
calculations, the result value is further divided in half. This means that only 8 values
are possible for the IR detection, and this is compared against the 16 values of the fuel
cell.
3. Catastrophic Error Detection Is Disabled: An interrupt that detects that the
microprocessor is trying to execute an illegal instruction is disabled, meaning that the
Alcohol test software could appear to run correctly while executing wild branches or
invalid code for a period of time. Other interrupts ignored are the Computer Operating
Property (a watchdog timer), and the Software Interrupt.
6
CHAPTER-IV
METHADOLOGY
7
The alcohol sensor circuit will detect the alcohol PPM in atmosphere depends on human
breath and the signal will send data to LM358 (OP-Amp) to other circuits. The result of
human breath contains alcohol that has detected from alcohol sensor circuit will changed into
digital form. The alcohol sensor MQ-3 is selected in this system due to its sensitivity in
detection the small value of BAC. Has high sensitivity to alcohol and small sensitivity to
benzene. The sensor is able to detect BAC with different concentration and classified the
range of BAC detected into a few level. In our system we are detecting alcohol level in air by
alcohol sensor MQ3. This sensor is directly connected to OP-Amp. Sensor analog values are
given to LM358 as Comparator which calculate PPM value of Alcohol sensor and compare it
with present value. Here in our application we need a 5v DC power supply for all electronics
involved in the project. When the measured value reaches the threshold, the desired message
in displayed in the LCD screen
5V
POWER LEDS
SUPPLY
ALCOHOL
ARDUINO
SENSOR
UNO LCD
MQ-3
DISPLAY
Fig 4.1 Block Diagram
8
COMPONENTS REQUIRED
Arduino Board Microcontroller
The Arduino Uno is a microcontroller board based on the ATmega328. It is a
programmable micro controller for prototyping electromechanical devices. You can
connect Digital and Analog electronic signals:
Sensors (Gyroscopes, GPS Locators, accelerometers)
Actuators (LEDS or electrical motors)
it has 14 digital Input / output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz ceramic Resonator, a USB connection, a power jack, an
ICSP header and a reset button as shown in figure 2. It contains everything needed to
support the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.
Fig 4.2 Arduino Uno
9
FEATURES:
Microcontroller Atmega328
Operating Voltage 5V
Input Voltage Recommended 7-12V
Input Voltage (Limits) 6-20V
Digital I/O Pins 14 (Of Which 6 Provide PWM Output)
Analog Input Pins 6
DC Current Per I/O Pin 14mA
DC Current For 3.3V Pin 50mA
Flash Memory 32 Kb (Atmega328) Of Which 0.5 Kb
Used By Boot Loader
SRAM 2 Kb (Atmega328)
EEPROM 1 Kb (Atmega328)
Clock Speed 16mhz
TABLE 4.1
Alcohol Sensor MQ-3
The analog gas sensor - MQ3 is suitable for detecting alcohol, this sensor can be used
in a Breathalyzer. It has a high sensitivity to alcohol and small sensitivity to Benzene.
The sensitivity can be adjusted by the potentiometer. Sensitive material of MQ-3 gas
sensor is SnO2, which with lower conductivity in clean air. When the target alcohol
gas exist, the sensor’s conductivity is higher along with the gas concentration rising,
use of simple electro circuit, Convert change of conductivity to correspond output
signal of gas concentration.
10
Fig4.3 MQ3 Sensor
FEATURES:
Power Supply Needs 5V
Interface Type Analog
Pin Definition 1-Output 2-Gnd 3-Vcc
High Sensitivity To Alcohol And Small Sensitivity To Benzene
Fast Response And High Sensitivity
Stable And Long Life
Simple Drive Circuit With Size 40x20mm
Table 4.2
LIQUID CRYSTAL DISPLAY
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other
multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have
no limitation of displaying special & even custom characters (unlike in seven segments),
animations and so on. A 16x2 LCD means it can display 16 characters per line and there are
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two
registers, namely, Command and Data
11
Fig 4.416*2 LCD Display
FEATURES:
5 x 8 dots with cursor
Built-in controller (KS 0066 or Equivalent)
+ 5V power supply (Also available for + 3V)
1/16 duty cycle
B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED)
N.V. optional for + 3V power supply
TABLE 4.3
12
CHAPTER-V
RESULTS AND DISCUSSIONS
13
Our project Alcohol Detection System was implemented successfully. This device provides
much advanced facilities in now a day’s life as it can be easily implemented in vehicles. Thus
we can reduce alcohol related road accidents and hence these kinds of detectors have a great
relevance. It can also be used in schools, colleges, offices and some public places such as
hospitals, libraries etc. Through this project we present simple hardware interfacing. The
whole Control system has the advantage of small volume and high reliability. Future scope of
this system is to control the accidents and providing useful details about the accidental
vehicle, thereby reducing the rate of accidents taking place due to drunken driving. This
system brings innovation to the existing technology in the vehicles and also improves the
safety features, hence proving to be an effective development in the automobile industry.
14
CHAPTER- VI
CONCLUSION AND SCOPE OF FURTHER WORK
15
We presented a handy kit to carry anywhere we go. This will help to increase security and
also well aware about others. By increasing the use of the small kit we can decrease the rate
of accidents which go day by day.
There are many scopes or rather extensions we could give in this circuit. Like adding a GSM
module used by cell phones provides a low cost, long range, wireless communication channel
for applications that need connectivity rather than high data rates.
Also we could make our display more effective or descriptive if we add the value of the
alcohol consumed by the person
One of the disadvantages of the project is the spontaneous action of alcohol sensor mq-3.
Maybe sometimes it fails to detect the alcohol gas present in the atmosphere
Another disadvantage would be if we use the GSM module as it needs a continuous network
and high speed net which is possibly not available everywhere.
16
Appendix-VIII
BIBLIOGRAPHY
PERIODICALS:
1. Pratiksha Bhuta, Karan Desai, Archita Keni ,Alcohol Detection and Vehicle
Controlling, International Journal of Engineering Trends and Applications (IJETA),
Volume 2 Issue 2, Mar-Apr 2015
2. Nimmy James, Aparna C, Teena P John, Alcohol Detection System, International
Journal of Research in Computer and Communication Technology, Vol 3, Issue 1,
January- 2014
WEBSITE:
1. [Link]
2. [Link]
3. [Link]
4. [Link]
3-and-arduino/
17
APPENDICES
Appendix-I Cover Page
Appendix-II Declaration
Appendix-II Certificate
Appendix-IV Certificate by examiners
Appendix-V Acknowledgement
Appendix-VI Table of Contents
Appendix-VII Headings
Appendix-VIII Bibliography
18
19