









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This document delves into the design and implementation of an arduino-based alcohol detection system, focusing on the use of the mq-3 alcohol sensor. It explores the working principles of the sensor, its sensitivity to alcohol vapors, and its applications in various contexts, including breathalyzers, automotive safety systems, and environmental monitoring. The document also discusses the calibration process and the importance of accurate alcohol detection for safety and regulatory purposes.
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!
ABSTRACT
. In this context, an Arduino-based alcohol detector is an example of a device that has the potential to detect the presence of alcohol in the surrounding environment. It is possible to use this tool to check the results of individuals who have drank alcohol while operating a motor vehicle. A MQ- alcohol sensor is utilized by the device in order to ascertain whether or not alcohol is readily available. The component that constitutes the sensor is the component that heats the layer of conducting material while simultaneously measuring the resistance of the substrate. There is a change in the resistance of the MQ-3 sensor whenever it is subjected to scents or vapors of alcohol. Signals of both digital and analogue types can be obtained from the sensor. A distinction can be made between the two in a very plain way. There are only two conceivable states that digital output can take while communicating with a microcontroller. These states are high and low, which means that they represent the values 1 and 0, respectively. An analog signal, on the other hand, is received by the microcontroller, and it provides an indication of the amount of alcohol present in the environment by utilizing a wide range of values, ranging from 0 to 1023. An LED, a MQ-3 alcohol sensor, and an Arduino Uno are two of the components that are required to construct the device. In confined areas or for showing straightforward applications on a small scale, this device performs admirably. The process of installing the gadget in vehicles is yet another approach that may be used to lessen the number of accidents that are caused by drunk driving. In addition to being user-friendly and easy to repair, the device has a high level of sensitivity to alcohol Keywords: Arduino- based alcohol detector; MQ-3 alcohol sensor; Microcontroller; Sensitivity; Alcohol. ░ 1. Introduction An alcohol detector is a piece of equipment that has the capability of determining whether or not alcohol is present in the bloodstream or in the breath. It is often used to reduce the number of accidents that are caused by drun k driving and other mishaps related to alcohol. An effective method for constructing an alcohol detector is to make use of an Arduino microcontroller in conjunction with a MQ-3 alcohol sensor. The MQ-3 sensor is an example of a portable, low-cost gadget that is capable of detecting ethanol in the air [1]. Heating a layer of conductive material and continuously monitoring its resistance is the method that is utilized in this procedure. The resistance of the MQ-3 sensor is altered when scents or vapours containing alcohol are inhaled. Signals of both digital and analogue types can be obtained from the sensor. It is possible to successfully connect the MQ-3 sensor to the Arduino board in a short amount of time and with only a few jumper wires. The sensor is capable of providing both digital and analog readings of the data [2]. Digital output, on the other hand, can only send binary values of 1 or 0 to the microcontroller [3]. This is in contrast to analog outputs, which may send a greater range of values to the microcontroller, ranging from 0 to 1023. This range corresponds to the amount of alcohol that is present in the atmosphere around the microcontroller. A board for microcontrollers known as the Arduino Uno is built on top of the ATmega328P, which acts as its foundation. A USB port, a power connector, a reset button, a quartz crystal operating at 16MHz, six analog inputs, and fourteen digital input/output pins are just some of the numerous features that it possesses. The presence of alcohol can be determined by attaching a MQ-3 alcohol sensor to an Arduino Uno. This allows for the detection of alcohol. The MQ-3 sensor is able to detect gasses because it is able to identify chemical reactions [4]. The 133
A reduction in the number of accidents that are brought on by drunk driving is the primary objective of the construction of an alcohol detector that is based on Arduino. Getting behind the wheel after having consumed alcohol is a serious offense that can result in accidents that are quite destructive. This gadget can be used to determine whether or not a person has consumed alcohol prior to driving, as well as to ensure that these individuals do not drink and drive [6]. Electronic components like as LEDs, an Arduino board, and a MQ-3 alcohol sensor are required in order to construct the device. Through the utilization of the MQ-3 sensor, one can easily and inexpensively determine whether or not there is alcohol present in the atmosphere. Signals of both digital and analogue types could be produced by the sensor. An alcohol detection system that is based on Arduino has the primary purpose of identifying the presence of alcohol in the breath that is exhaled by a person and then notifying the user of this discovery [7]. The adoption of this technology has the potential to lessen the number of accidents that are brought on by alcohol, including those that include drunk driving. A MQ-3 alcohol sensor is utilized by the device in order to ascertain whether or not alcohol is present in the atmosphere. A board made of Arduino is utilized in order to link the sensor and do data analysis. The activation of an alert will occur if the concentration of alcohol is greater than a predetermined threshold [8]. The incorporation of an alcohol detection system that is based on Arduino will assist in accomplishing a greater number of important goals. Developing an alcohol detection gadget is the primary objective, and the Arduino technology, which is based on a breath analyzer, will be used to accomplish this. By providing assistance to law enforcement in the process of quickly identifying and apprehending drunk drivers, the purpose of this technology is to improve the safety of the roads. Also, we want to make sure that our alcohol detector is dependable and functions properly so that we can reduce the number of accidents that are caused by drivers who are under the influence of alcohol. To facilitate speedy decision-making, the system is designed to provide accurate alcohol level assessments in a timely manner [9]. In addition, the objective is to develop a device that is simple to operate, requires little training, can be finished in a predetermined amount of time, and takes into account the user's financial constraints. In conclusion, in order to guarantee the achievement of high-quality results, the performance of the system will be evaluated in accordance with the requirements established by ISO/IEC 9126. The functionality, dependability, usability, efficiency, maintainability, and portability of the system will all be evaluated through the applications of these standards. An alcohol sensor is one method that can be utilized to analyze the quantity of alcohol gas present in the atmosphere. The voltage that it produces as an output is an analog voltage. As long as the 5V power source is less than 150 mA, the sensor can be operated in temperatures ranging from -10 to 50 degrees Celsius. Its sensitivity 134
disengage the power supply to the car. In an effort to lessen the number of accidents that are caused by drunk driving and to minimize the number of accidents that are caused by drunk driving, the author developed a method for preventing car accidents that incorporates an alcohol detector [18]. In this study, the authors offer an alcohol sensor device and system, which is widely recognized as one of the most effective methods for determining the blood alcohol concentration (BAC) of humans. Another piece of equipment has the capability to determine the amount of alcohol that the driver has ingested and notify the appropriate authorities if the driver's blood alcohol content (BAC) is higher than a predetermined threshold. After detecting the presence of alcohol, the gadget will immediately reduce the speed of the DC motor as a precautionary measure [19]. According to the findings of a recent study, a device that can identify whether a driver is puffing on their breath and disables the vehicle if the blood alcohol concentration is sufficiently high has been developed. These examples are representative of a limited number of literature reviews that focus on devices that detect alcohol. In order to determine the amount of alcohol that is present in the air that someone breathes in, an alcohol detection device that is based on Arduino is a straightforward and cost-effective method. Within the framework of the system is a well-known and exceptionally precise alcohol vapor detector known as the MQ-3 [20]. When the sensor detects the presence of alcohol vapors, it will flash both its status LED and its power LED, both of which are built into the gadget itself. Signals of both digital and analogue types could be produced by the sensor. All the way from 0 to 1023 is the extensive range of values that are communicated by the analog signal, which is correlated to the alcohol concentration in the surrounding environment [21]. A few straightforward components, such as an Arduino Uno board, a MQ-3 alcohol sensor, and a red LED, are all that are required to construct the system if you choose to do so. A conducting layer is heated with a heating element in order to provide the MQ-3 sensor with the ability to monitor the resistance of the layer in real time. The resistance of the MQ-3 sensor is altered when scents or vapours containing alcohol are inhaled. You have the ability to modify the level of amplification using the potentiometers that are included with the sensor. ░ 3. Proposed System It is possible to build an alcohol detector by utilizing an Arduino and a MQ-3 alcohol sensor both together. It is the MQ-3 metal oxide semiconductor (MOS) sensor that is responsible for adjusting its electrical resistance in response to the amount of alcohol that is present in the air. Signals of both digital and analogue types could be produced by the sensor. A microcontroller receives only binary values (1 or 0) from digital output, whereas an analog signal offers a wide range of values (0 to 1023) that reflect the various amounts of alcohol in the environment. This is the primary distinction between digital output and analog signal. Digital output only transmits binary values to a microcontroller. Arduino, along with a variety of other components, can be utilized in the construction of an alcohol detector. The Arduino Uno is the ideal option for beginners because of how simple it is to use and how man y resources are available to them. They include every type of microcontroller, but the Arduino Uno is the best option. Moreover, a MQ-3 alcohol sensor is necessary in order to provide accurate detection of the level of alcohol present. In addition, a red light-emitting diode (LED) that serves as a visual signal will light up if the sensor detects the presence of alcohol. The first step in constructing an alcohol detector using Arduino is to put all of these 136
components together for assembly. This simple project may be finished by using only fundamental components like as an Arduino, an LED, and alcohol sensors that are readily available. Additionally incorporated into the sensor are a power LED as well as a status LED. An intermittent blinking of the status LED will occur whenever the sensor detects the presence of alcohol vapors. 3.1. Flowchart In order for the MQ-3 sensor to detect gasses, it must first undergo a chemical reaction. The MOS sensor goes through a chemical reaction that causes it to change its electrical resistance when it is exposed to the fumes of alcohol that are present in the atmosphere. After then, the sensor will transmit a signal to a microcontroller, which can then be utilized to initiate a process or an alarm, depending on the situation. 137
is equipped with this capability. It is possible to adjust the levels of amplification by using the potentiometers that are included in the sensor. Because of its extraordinary sensitivity to ethanol and alcohol, the sensor is particularly user-friendly and simple to use. 3.5. Circuit Diagram of the Proposed Design 3.5.1. Circuit Diagram 139 3.5.2. Block Diagram
(a) Arduino UNO The Arduino Uno is an example of an open-source microcontroller board that makes use of the ATmega328P microprocessor from Microchip. It was constructed by Arduino, and it operates on the Harvard architecture, which means that the data and the code are stored in various locations within the memory. Data memory and program memory are the two types of memory that are utilized in this architecture. Program memory is responsible for storing the code located in flash memory. The most important characteristics of the device are as follows: An ATmega328P is the type of microcontroller that is being used, and its clock speed is 16 MHz. 32 KB of flash memory, 2 KB of SRAM, and 1 KB of EEPROM are all included in its system. Some 0.5 KB of these are utilized by the bootloader. Due to the fact that it is so simple to use and has such a wide range of applications, the Arduino Uno is a board that is favored by all users, from novices to seasoned professionals. This is due to the fact that it is rather versatile and has an interface that is easy to use, both of which make it suitable for a wide range of projects and jobs. As a result of its user-friendly design, which stimulates both experimentation and learning, this product has become an indispensable instrument in the maker community as well as in other sectors. With the Arduino Uno, users are able to bring their inventive concepts to life by utilizing a large selection of compatible sensors, actuators, and shields. This is true regardless of whether they are working on a simple LED project or constructing complicated robotic systems and applications for the Internet of Things. As a result of the platform's active community, which encourages collaboration and the exchange of information, enthusiasts have access to a plethora of tools, tutorials, and discussion forums that can assist them in honing their talents and discovering potential that has not yet been exploited. While the hardware features of the Arduino Uno are substantial, the software environment that comes with the Arduino Uno is also rather rich. Among these is the Arduino Integrated Development Environment (IDE), which, because to its user-friendly interface and rich library support, makes it possible for users of varying skill levels to program. With the assistance of the Arduino Uno, a versatile and essential instrument in the field of embedded systems and do-it-yourself electronics, anyone can confidently construct and develop for educational, prototype, and commercial applications. This is because the Arduino Uno is widely used. Creators, educators, and innovators from all over the world prefer this platform due of its low cost, user-friendliness, and the potential to be customized at their own discretion. Because of this, we now live in a culture that places a high value on creativity and innovation, and the rate at which technical improvements have occurred has been unprecedented. 140 It is widely utilized for the development of interactive electronic prototypes due to the fact that it has a sizable community that facilitates the sharing of projects and resources, as well as an environment that is simple to use for
component. The MOS sensor goes through a chemical reaction that causes it to change its electrical resistance when it is exposed to the fumes of alcohol that are present in the atmosphere. Applications of MQ-3 Sensor A wide variety of applications can be found for the MQ-3 Alcohol Sensor, which is a multi-functional device. When alcohol concentration levels reach specified thresholds, it acts in a manner that is analogous to that of a gas level alarm, thereby warning users of the potential dangers that may be present. Because of its little size and low weight, it is ideally suited for use as a portable alcohol detector, which enables screening to be carried out expeditiously and easily in a variety of environments. When the sensor is included into breathalyzers, it is able to offer accurate readings of the blood alcohol concentration (BAC) in breath samples. This information is helpful for both official investigations and the monitoring of an individual's health. Using different sensor modules, the system may be modified to detect alcohol vapor in real time in a variety of environments. This is made possible by the fact that the system is modular. In addition, the MQ-3 sensor allows for the determination of air quality and the detection of ethanol emissions, both of which contribute to environmental monitoring. It is able to determine whether passengers are under the influence of alcohol and discourage them from operating motor vehicles, which results in an increase in the overall safety of automotive passengers. Due to the fact that it is dependable and versatile, the MQ-3 Alcohol Sensor is an essential component in the process of enhancing safety, effectiveness, and welfare in a variety of different areas. For the purpose of measuring different kinds of gases for a variety of purposes, a number of different gas sensors have been developed. Methane, butane, LPG, and smoke are all able to be detected by the MQ-2 sensor. On the other hand, the MQ-3 sensor is primarily focused on detecting alcohol, ethanol, and smoke above the other substances. When it comes to detecting gases, the MQ-5 is specifically designed to identify natural gas and propane, whilst the MQ-4 is utilized for identifying methane and compressed natural gas with its specialized capabilities. In spite of the fact that the MQ-7 is specifically designed for CO detection, the MQ-6 is also capable of detecting LPG and butane. In contrast to the MQ-9 sensor, which is capable of detecting combustible gases in addition to carbon monoxide, the MQ-8 sensor is only capable of detecting hydrogen gas. It is also important to note that the MQ135 sensor is responsible for monitoring the overall air quality, whereas the MQ sensor is responsible for testing specific gases such as ozone. Ammonia can be recognized by the MQ137 sensor, whereas hydrogen sulphide gas can be detected by the MQ136 sensor. Both sensors are able to detect gases. Hydroxygen, formaldehyde gas, benzene, toluene, alcohol, and propane are all substances that can be detected by the MQ138 sensor. Additionally, the MQ214 sensor is able to detect natural gas as well as methane, but the MQ sensor is specifically designed to detect both natural gas and coal gas without any interference. The MQ303A, MQ306A, MQ307A, and MQ309A sensors are designed to detect flammable gases, alcohol, smoke, LPG, butane, and carbon monoxide. Additionally, they are able to detect carbon monoxide. These sensors have the potential to be useful in a wide variety of applications with respect to the environment, industry, and safety. 142 (c) 16×2 LCD Display
Polarizers and the light-modulating properties of liquid crystals are utilized in optical devices; examples of such devices include liquid crystal displays (LCDs). Due to the fact that liquid crystals do not directly emit light, they require a backlight or reflector in order to produce images that are either color or monochrome. The construction of an alcohol detector can be accomplished by combining an Arduino microcontroller with a MQ-3 alcohol sensor system. One option for displaying the alcohol level in a visible manner is to utilize a 16x LCD panel. When it comes to alcohol detection, the MQ-3 sensor is an excellent choice because it has both digital and analog output. When compared to digital output, analog signals have the ability to transmit a greater range of values to a microcontroller. These values can vary from 0 to 1023, which is correlated with the amount of alcohol present in the environment. On the other hand, digital output can only transmit binary values of either 1 or 0. Features of 16X2 LCD One of its many notable characteristics is that it has an operating voltage range that goes from 4.7V to 5.3V, which ensures that it will function in a consistent and trustworthy manner. The display is composed of two rows, and each row has the capacity to display sixteen characters. Data can be displayed here since there is sufficient space. A low current consumption of 1 milliampere (mA) and the absence of a backlight are two factors that contribute to the device's power efficiency. It is possible to create each character by utilizing a box that is 5 by 8 pixels in size. This allows the letters and numbers to stand out and is simple to read. Because it has two different modes of operation —four-bit and eight-bit — the liquid crystal display (LCD) is compatible with and versatile for a wide variety of applications. The choice between blue and green lights allows one to personalize it in accordance with their preferences and the settings they have chosen. In addition to that, the LCD may display characters that are determined by the user, which means that it is able to display information that is individualized to meet the requirements and preferences of each individual. 3.6. Observation If Alcohol Level is High, the Buzzer will Alarm, LED will glow according to LED Colour and Measure the Level of Alcohol. If Alcohol Level is Low, The Buzzer will not Alarm and LED will not glow. 143 MQ-3 Sensor Buzzer LED Status Alcohol Level High ON ON HIGH Alcohol Level Low OFF OFF LOW
lcd.setCursor (0,0); lcd.print(" Welcome To "); lcd.setCursor (0,1); lcd.print("Alcohol Detector"); delay(2000); lcd.clear(); } void loop() { adcValue=0; for(int i=0;i<10;i++){ adcValue+= analogRead(sensor_pin); delay(10); } val = (adcValue/10) * (5.0/1024.0); mgL = 0.67 * val; lcd.setCursor(0, 0); lcd.print(" BAC: "); lcd.print(mgL,3); lcd.print("mg/L "); lcd.setCursor(0, 1); if(mgL>0.8){ lcd.print(" Drunk "); digitalWrite(buzzer, HIGH); digitalWrite(G_led, LOW); // Turn LED off. digitalWrite(R_led, HIGH); // Turn LED on. delay(300); } else { lcd.print(" Normal "); 145 digitalWrite(G_led, HIGH); // Turn LED on. digitalWrite(R_led, LOW); // Turn LED off. } digitalWrite(buzzer, LOW); delay(100);
To begin, use the programming cable to connect the Uno board to the computer. Ensure that the USB side of the cable is firmly connected into the computer. The next step is to launch the Arduino Integrated Development Environment (IDE) and proceed to insert the code that has been provided. It is important to make sure that the correct board is selected before beginning the upload process. To do this, go to the "Tools" menu and pick "Arduino Uno." In the same manner, using the "Tools" menu, select the appropriate port in order to confirm the appropriate port number. When you have finished verifying these criteria, you should next proceed to click the upload button. Immediately following the completion of the upload, the USB cord should be disconnected from the Uno board. The Arduino Uno is currently capable of being powered by an external battery. This feature is available to it. It is important to note that there is no requirement for an additional resistor when utilizing a 3.7V battery. Regarding batteries that have a higher voltage, however, it is possible that appropriate resistors will be required depending on the voltage levels. This strategy has the ability to reduce the number of accidents that are brought on by the consumption of alcohol in the future. This system improves the safety and well-being of individuals within the population. This will allow for substantial breakthroughs to be made in the automotive industry with the goal of reducing the number of accidents that are caused by alcohol. The investigation of alcohol detection with the use of Arduino is a fascinating field. In the development of an alcohol detection system, this technology demonstrates a great deal of potential as a prospective application. This technology has the potential to reduce the number of accidents that are caused by drivers who are under the influence of alcohol or drugs, hence reducing the number of incidents that would otherwise occur. It is currently in the beginning stages of development that alcohol detection systems that make use of Arduino technology are being developed. This leaves a significant amount of potential for additional research and inquiry in this area. The enhancement of the system's precision, the reduction of the system's size, and the development of innovative applications for the technology are all potential areas within which research might be conducted. ░ 4. Results and Discussion Within the guide, you will find a breadboard, an Arduino board, a red LED, a MQ-3 alcohol sensor, and a complete inventory of all the components that are required for the project. Additionally, the tutorial provides a detailed, step-by-step guidance on how to construct the circuit, in addition to providing a schematic illustration of the MQ- sensor. From the MQ3 sensor's features to its pinout configuration and the instructions on how to connect it to an Arduino, this article covers every single component of the MQ3 sensor. Through the use of a MQ-2 sensor module, the author of this article explains how to construct a portable, battery-operated gadget that is capable of detecting 146 alcohol and displaying the results on an LCD screen. In the instructions, the components that are required for the project are specified as follows: an integrated circuit with the model number LM358; a 16x2 liquid crystal display; a buzzer; and a MQ3 sensor. 4.1. Designed Model Alcohol detectors that are based on Arduino are a straightforward device that can determine whether or not alcohol is present in the air that is inhaled. The research makes use of a MQ-3 alcohol sensor in order to determine whether or not there are any traces of alcohol present. An LCD or LED screen is used to display the results of the processing of the data that is received from the sensor by an Arduino board, which then displays the results. It is possible for the
transmits a signal to the Arduino board in order to receive the information. The signal is then processed by the circuit, and if it determines that alcohol is present, it activates either a warning light or an LED. Authors searched over the entire internet for a definitive response to this assignment, but authors were unable to locate one. On the other hand, authors were able to locate a Techatronic guide that provides a comprehensive explanation of everything that is required to construct an alcohol detector using an Arduino and a MQ3 sensor. Through the course of the presentation, you will be presented with in-depth explanations of the components, the circuit diagram, and the
Submitted to:- Dr. Shiv Kumar Goel (Assistant Professor) Ms. KUSUM (Assistant Professor) Submitted by:- AYUSH SINGHAL (2021200206) HIMANSHU PATLAN (2021200211) MOHIT KUMAR (2021200217)