SSRN Id4043898

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1

Design and Development of an Alcohol Detector


employing a MQ-3 Gas Sensor and an 8051
Micro-Controller
Deep Khatri, Kevin Gladstone, Yash Joysar, Pragya Gupta and Ninad Mehendale

Abstract—This paper presents a cost-effective and reliable


solution for detecting alcohol vapors in the air using an MQ3
gas sensor and an 8051 microcontroller. The system is powered
by a 9V DC power supply and is programmed using the Keil
µVision IDE and C language. It is calibrated using a known
concentration of alcohol and the calibration data is stored in the
microcontroller’s memory. The system can be used in various
applications, such as industries where the use of alcohol is
prohibited, vehicles to detect drunk driving, and hospitals to
monitor the alcohol intake of patients. It is small, portable, and
easy to use, making it suitable for a wide range of applications.
Index Terms—8051 Microcontroller, MQ-3 sensor, Gas Sensor.
Fig. 1. Block Diagram of Alcohol Detector employing a
MQ-3 Gas Sensor and an 8051 Micro-Controller
I. I NTRODUCTION
LCOHOL consumption is a major cause of accidents
A and fatalities worldwide, and the need for effective
alcohol detection systems has become increasingly important.
To address this need, this paper presents the development of
an alcohol detector system using an MQ3 gas sensor and an
8051 microcontroller. The system is designed to detect the
concentration of alcohol vapors in the air and provide an
audible and visual warning when the concentration exceeds
a preset threshold.
The use of alcohol detection systems has become cru-
cial in various industries, such as aviation, transportation,
and healthcare, where alcohol consumption is prohibited. In
addition, the use of alcohol detection systems in vehicles
has become more prevalent in recent years to reduce drunk
driving incidents. Traditional methods of alcohol detection,
such as breathalyzers, can be expensive and require specialized
training to operate, making them less practical for everyday
use.
In this context, the use of an alcohol detector system that
is small, portable, and easy to use has become increasingly
important. The system presented in this paper utilizes an MQ3
gas sensor to detect the presence of alcohol vapors in the air
and an 8051 microcontroller to process the data and provide
a warning when the concentration exceeds a preset threshold.
This paper will detail the design and development of the
alcohol detector system, including the hardware and soft-
ware implementation. Additionally, the paper will discuss the
system’s calibration process and its potential applications in
various industries. The system’s ability to provide a cost- Fig. 2. Flowchart of the Working of Alcohol Detector
effective and reliable solution for detecting alcohol vapors employing a MQ-3 Gas Sensor and an 8051 Micro-Controller
in the air makes it an attractive option for a wide range of
applications.

Electronic copy available at: https://ssrn.com/abstract=4043898


2

II. L ITERATURE S URVEY

1) Biker safety helmet with alcohol detection and theft


control

[1] Dangeti Anu Preetham, Mukundala Sai Rohit, Arun G.


Ghontale, Jasmine Pemeena Priyadarshini. (2017) put breath
alcohol ignition interlock technology in motorbikes to avoid
drunk driving. The findings demonstrated that the approach
was efficient in lowering the number of alcohol-impaired
driving occurrences among motorbike riders. The technology, Fig. 3. Diagram Simulation of Alcohol Detector employing a
however, was not incorporated into a safety helmet, limiting MQ-3 Gas Sensor and an 8051 Micro-Controller
its mobility and usefulness.
3) The Subtle Wearable IoT Sensor for Continuous
[2] Another work by Vijayan, Sudharsana, Vineed T. Transdermal Alcohol Monitoring
Govind, Merin Mathews, Simna Surendran, and Muhammed [6] Salim, A., Lim. S. (2019). Recent advances in nonin-
Sabah. ”Alcohol detection using smart helmet system.” vasive flexible and wearable wireless biosensors. Biosensors
IJETCSE 8, no. 1 (2014). The helmet had an alcohol sensor and Bio electronics. This paper suggests a continuous TAM
that could detect alcohol on the rider’s breath and inform the system based on a wearable biosensor that detects alcohol con-
rider and the owner’s phone if the rider was inebriated. The centrations via sweat. For remote monitoring, the system also
results demonstrated that the helmet was successful in avoiding includes wireless data transfer. The study’s findings indicate
drunk driving and bike theft. that the suggested technology is dependable and accurate in
detecting alcohol levels in sweat.
2) Design of an Alcohol Detection System for Drivers [7] Allès, Benjamin, Camille Pouchieu, Anne Gruber, Pierre
Using an Iris Recognition Pattern and the Wavelet Trans- Lebailly, Hugues Loiseau, Pascale Fabbro-Peray, Luc Leten-
form neur et al (2016). This paper suggests a TAM wearable biosen-
sor that monitors alcohol content via sweat. The biosensor
[3] S. C. Maitra and S. C. Bera’s ”Alcohol Detection
is intended to be both discrete and pleasant to wear for
System Using Iris Recognition” (2012). The paper offers an
extended periods of time. The study’s findings indicate that the
iris recognition-based alcohol detection device. The system
suggested biosensor is accurate and dependable in detecting
collects the driver’s iris picture and analyses it using the
alcohol levels in sweat.
wavelet transform. The retrieved attributes are then utilised to
identify the motorist and calculate their alcohol consumption 4) Engine Locking System Based on Alcohol Detection
level. The study’s findings indicate that the suggested approach Using MQ-3 Sensor
is accurate and dependable in identifying the presence of [8] Shukla, Srivastava, Utkarsh, Singh, Sridhar, Tri-
alcohol in drivers. pathi Rakesh. published ”Automatic Engine Locking System
Through Alcohol Detection” (2020). This paper suggests an
[4] K. S. Reddy and B. S. S. Prasad’s ”Alcohol Detection alcohol detection system that measures the alcohol content in
System Using Iris Recognition with Fuzzy Logic” (2013). the driver’s breath using the MQ-3 sensor. In addition, the
This research suggests an alcohol detection system based on system has an engine locking device that prevents the car
iris recognition and fuzzy logic. The technology records the from starting if the alcohol content exceeds the safe level. The
driver’s iris picture and use fuzzy logic to determine the study’s findings reveal that the suggested technology detects
amount of alcohol intake. The study’s findings indicate that alcohol levels in the breath accurately and reliably, hence
the suggested method is successful in detecting the presence avoiding drunk driving.
of alcohol in drivers. [9] S. B. Gadekar et al. ”Design and Development of Alco-
hol Detection System with Engine Locking Using Arduino”
[5] M. M. Ghosh and A. Basu’s ”Alcohol Detection System (2017). The MQ-3 sensor and the Arduino microcontroller
Using Wavelet Transform” (2016). The wavelet transform is are used in this study to assess the alcohol content in the
used in the study to suggest an alcohol detection system. The driver’s breath and operate the engine locking mechanism.
system takes the driver’s voice signal and analyses it using the The technology is intended to be inexpensive and simple to
wavelet transform. The retrieved attributes are then utilised to install in various automobiles. The study’s findings reveal that
identify the motorist and calculate their alcohol consumption the suggested technology detects alcohol levels in the breath
level. The study’s findings indicate that the suggested method accurately and reliably, hence avoiding drunk driving.
is successful in detecting the presence of alcohol in drivers. [10]H. Wakana and M. Yamada, ”Portable Alcohol
Detection System for Driver Monitoring,” (2019). In order to

Electronic copy available at: https://ssrn.com/abstract=4043898


3

determine the amount of alcohol in the driver’s breath and The system is tested using a test chamber with a controlled
operate the engine locking mechanism, this study suggests concentration of alcohol vapors in the air. The system’s
an alcohol detection system that employs the MQ-3 sensor response time and accuracy are evaluated, and any necessary
and Raspberry Pi microprocessor. Different types of drivers adjustments are made.
and vehicles may easily operate the system because it is Once the system is designed, calibrated, and tested, it
portable. The study’s findings demonstrate how the suggested is ready for implementation. The system can be used in
technology may accurately and dependably measure breath various applications, such as in industries where alcohol use is
alcohol content and stop drunk driving. prohibited, in vehicles to detect drunk driving, and in hospitals
to monitor the alcohol intake of patients.
Overall, the presented alcohol detector system provides a
cost-effective and reliable solution for detecting alcohol vapors
in the air. The paper discusses the system’s hardware and
software design, calibration process, and testing procedure in
detail, along with potential applications in various industries.
The system offers a small and portable alternative to traditional
alcohol detection methods, making it an attractive option for
many applications.

Fig. 4. Circuit Diagram of Alcohol Detector employing a


MQ-3 Gas Sensor and an 8051 Micro-Controller

III. M ETHODOLOGY Fig. 4: Code Snippet from Alcohol Detector employing a


MQ-Gas Sensor and an 8051 Micro-Controller
The development of an alcohol detector system is essential
in many industries where alcohol use is prohibited, such A. Code Summary
as aviation, transportation, and healthcare. However, the tra-
The code detects alcohol using the MQ-05 gas sensor and
ditional method of alcohol detection using breathalyzers is
shows the result on a 16 x 2 LM016L LCD display with
expensive and requires specialized training to operate, making
an LED indication. The lcdinit function sets up the relevant
it impractical for everyday use. Therefore, a small, portable,
pins and sends the necessary commands to initialise the LCD
and easy-to-use alcohol detector system using an MQ3 gas
display. The lcdwrite method displays a single character,
sensor and an 8051 microcontroller has been presented in this
whereas the lcdprint function displays a null-terminated string.
paper.
The main function begins by invoking the lcdinit function,
The hardware design of the alcohol detector system includes
which is used to initialise the LCD display and show a title
an MQ3 gas sensor, an 8051 microcontroller, a power supply,
message. It then waits a few seconds before clearing the
an LCD display, and other electronic components. The MQ3
display. The code examines the condition of the MQ-05 gas
sensor is connected to the microcontroller’s analog input, and
sensor within the infinite loop.
the LCD display is connected to its digital output pins. The
power supply is designed to provide a stable 12V DC voltage IV. H ARDWARE C IRCUIT I MPLEMENTATION
to power the system.
The software development for the system is done using
the Keil µVision IDE and written in C language. The pro-
gram consists of two main sections: sensor interfacing and
warning generation. In the sensor interfacing section, the
microcontroller reads the analog output of the MQ3 sensor
and processes the data. In the warning generation section,
the microcontroller compares the sensor data with the preset
threshold and generates an audible and visual warning if
the concentration of alcohol vapors in the air exceeds the
threshold.
The system is calibrated using a known concentration of
alcohol vapors in the air. The calibration process involves
setting the threshold value and adjusting the sensitivity of the Fig. 5: Hardware Circuit of Alcohol Detector employing a
MQ3 sensor. MQ-Gas Sensor and an 8051 Micro-Controller

Electronic copy available at: https://ssrn.com/abstract=4043898


4

V. C ONCLUSION to revolutionise several sectors and raise the standard of living


for countless people.
Finally, the construction of an alcohol detector system based
Advancement Sensors that are integrated with gas
on a MQ3 gas sensor and an 8051 microprocessor gives a low-
sensing technologies: Innovative methods for identifying and
cost and dependable method for detecting alcohol vapours in
keeping track of gas concentrations in varied situations have
the air. This article described the hardware and software design
been developed as a result of the combination of sensors
of the system, as well as the calibration and testing procedures
and gas sensing technologies. Advanced gas sensors can
and prospective applications in various industries.
offer real-time data on gas concentrations and are capable
The device provides a tiny, portable, and simple alternative of detecting a broad variety of gases, including dangerous
to established alcohol detection technologies, making it an and combustible gases. Gas sensors may offer a thorough
appealing solution for a wide range of applications. The picture of the environment when combined with other sensors,
accuracy and response time of the system have been assessed such temperature and humidity sensors, allowing the creation
and found to be adequate for practical application. By select- of complex environmental monitoring systems. Applications
ing the threshold value and modifying the sensitivity of the for this technology are significant in the fields of healthcare,
MQ3 sensor, the calibration procedure assures the system’s environmental monitoring, and industrial safety.
dependability and accuracy.
This alcohol detector system has numerous applications,
VII. R ESULTS
ranging from industries where alcohol use is prohibited to ve-
hicles for detecting drunk driving and hospitals for monitoring The designed alcohol detector system, which included a
patient alcohol intake. It may be used in a variety of scenarios MQ3 gas sensor and an 8051 microprocessor, demonstrated
where alcohol detection is necessary, making the environment acceptable accuracy and reaction time. By selecting the thresh-
safer and lowering the chance of alcohol-related events. old value and changing the sensitivity of the MQ3 sensor,
Overall, the alcohol detector system shown here offers a the calibration procedure assured the system’s dependability
practical, dependable, and cost-effective method for detecting and accuracy. The device offered a tiny, portable, and simple
alcohol vapours in the air. More research and development alternative to established alcohol detection technologies, mak-
can be carried out to improve the system’s performance and ing it an appealing option for a wide range of applications.
to investigate new applications. It has a wide range of uses, ranging from businesses where
alcohol is outlawed to automobiles for detecting drunk driving
and hospitals for monitoring patient alcohol consumption. The
VI. F UTURE W ORK system proved to be a viable, dependable, and cost-effective
Detecting combustible gases before getting into any method of detecting alcohol vapours in the air.
vehicle: Detecting flammable gases before entering any ve-
hicle is a critical safety precaution that can help to avoid R EFERENCES
accidents caused by gas leaks. Flammable gases like methane [1] Dangeti Anu Preetham, Mukundala Sai Rohit, Arun
and propane are routinely utilised as car fuel, but they can G. Ghontale, Jasmine Pemeena Priyadarshini . Safety helmet
be hazardous if they leak and build up in confined places. with alcohol detection and theft control for bikers. (2017)
Gas sensors can detect these gases and inform drivers and International Conference on Intelligent Sustainable Systems
passengers to possible risks, allowing them to take proper [2] Vijayan, Sudharsana, Vineed T. Govind, Merin Mathews,
action and avert accidents. Simna Surendran, and Muhammed Sabah. ”Alcohol detection
Engine locking is accomplished by the use of sensors: using smart helmet system.” IJETCSE 8, no. 1 (2014).
Engine locking sensing is a mechanism used in modern [3] S. C. Maitra and S. C. Bera’s ”Alcohol Detection
automobiles to prevent vehicle theft and unauthorised use. The System Using Iris Recognition”. 2012 5th IAPR International
system detects the presence of a key fob or other authorised Conference on Biometrics, ICB 2012
devices in the car using sensors. If the device is not recognised, [4] K. S. Reddy and B. S. S. Prasad’s ”Alcohol Detection
the system locks the engine, making it impossible for it to start. System Using Iris Recognition with Fuzzy Logic” (2013).
This function improves vehicle security and reduces car theft, International Journal of Computer Science and Mobile Com-
making it an important addition to current vehicles. puting, March 2013
Improvements in sensor and microprocessor technolo- [5] M. M. Ghosh and A. Basu’s ”Alcohol Detection System
gies: Many industries, including robotics, home automation, Using Wavelet Transform” (2016). 2016 7th International
and the Internet of Things (IoT), have undergone revolutionary Conference on Intelligent Systems, Modelling and Simulation
change as a result of advancements in microcontroller and [6] Salim, A., Lim, S. (2019). Recent advances in nonin-
sensing technology. Microcontrollers are now more compact, vasive flexible and wearable wireless biosensors. Biosensors
affordable, and potent, making them suited for a variety of and Bioelectronics, 141, 111422.
applications. Sensors have become more precise, effective, and [7] Allès, Benjamin, Camille Pouchieu, Anne Gruber, Pierre
dependable thanks to advances in sensing technology. This has Lebailly, Hugues Loiseau, Pascale Fabbro-Peray, Luc Leten-
made it possible to create new applications that rely on in- neur et al. ”New Zealand Applied Neurosciences Conference.
the-moment sensing and data analysis, such smart homes and Auckland, New Zealand, November 24-26, 2016: Abstracts.”
wearable technology. These developments have the potential Neuroepidemiology 47, no. 3-4 (2016): 125-144.

Electronic copy available at: https://ssrn.com/abstract=4043898


5

[8] Shukla, Dr Srivastava, Utkarsh Singh, Sridhar Tripathi, N inad Dileep Mehendale is an Associate Professor
Rakesh. (2020). Automatic Engine Locking System Through in the Electronics Department at K. J. Somaiya
College of Engineering.He holds a post-doctoral
Alcohol Detection. International Journal of Engineering Re- degree from the Karlsruhe Institute of Technology
search. in Germany and has a Ph.D. in Microfabrication
[9] S. B. Gadekar et al. ”Design and Development of Al- and Image Processing from the Indian Institute of
Technology Bombay. He has expertise in various
cohol Detection System with Engine Locking Using Arduino” fields such as sound signal processing, machine
(2017). vision, embedded systems, microfluidics and mi-
[10] H. Wakana and M. Yamada, ”Portable Alcohol Detec- crofabrication, robotics, deep learning, and AR-VR
technology. He has won several awards, including
tion System for Driver Monitoring,” 2019 IEEE SENSORS, a gold medal during his M-Tech. at NMIMS University and a Ratan Tata
Montreal, QC, Canada, 2019, pp. 1-4 scholarship for being the highest-scoring student in MSBTE diploma exams.

D eep Khatri is a Third Year engineering student


pursuing a Btech in Electronics Engineering in KJ
Somaiya College of Engineering.He is well versed
in the concepts of coding of 8051.His hardworking,
dedicated and passsionate attitude towards his aca-
demics has earned him the respect of his peers and
teachers alike. He has been part of many technical
related council and is a huge asset to the college
both in scholastic and co-scholastic areas.

K evin Gladstone is a Third Year engineering student


pursuing a Btech in Electronics Engineering in KJ
Somaiya College of Engineering. He has expertise
in the concepts of circuits and has a good grasp
on the 8051 and PIC programming language. He
is hardworking, passionate, dedicated and has an
interest to always keep learning. He is well revered
and respected by his colleagues He is an asset to the
college and a very useful resource for many future
projects to come.

Y ash Joysar is a Third Year engineering student


pursuing a Btech in Electronics Engineering in KJ
Somaiya College of Engineering. He has expertise
in the concepts of PCB design and soldering. He
is well versed in the 8051 programming language .
He is hardworking, passionate, dedicated and always
keen to upgrade his knowledge about his subject. He
is vert useful asset in technical projects.

P ragya Gupta is working as faculty is Department


of Electronics Engineering since July 2016. She has
done B.E in Electronics Engineering from University
of Pune in 2002 and M.E in Electronics Engineering
from University of Mumbai in 2013. She has 8
years of industry experience and 5 years of teaching
experience.

Electronic copy available at: https://ssrn.com/abstract=4043898

You might also like