VIETNAM NATIONAL UNIVERSITY, HANOI INTERNATIONAL SCHOOL GRADUATION PROJECT PROJECT NAME: Gas leak measurement and warning Student’s name: Nguyen Viet Anh Hanoi - Year 2021 1 VIETNAM NATIONAL UNIVERSITY, HANOI INTERNATIONAL SCHOOL GRADUATION PROJECT PROJECT NAME: Gas leak measurement and warning SUPERVISOR: Associate Professor Ph. Nguyen Thanh Tung (Academic title, academic degree, full name) STUDENT: Nguyen Viet Anh STUDENT ID: 17071377 MAJOR: Informatics and Computer Engineering Hanoi - Year 2021 2 LETTER OF DECLARATION I hereby declare that the Graduation Project: “Gas leak measurement and warning” is the result of my research and has never been published in any work of others. During the implementation process of this project, I have seriously taken research ethics; all findings of this project are results of my research and surveys; all references in this project are cited according to regulations. I take full responsibility for the fidelity of the number and data and other contents of my graduation project.
Hanoi, 24 December 2021 Student (Signature and Full name) Viet Anh Nguyen Viet Anh 3 ACKNOWLEDGEMENT Firstly, I am using this opportunity to express my deepest gratitude and special thanks to Associate Professor Ph. Nguyen Thanh Tung for his instructions and guidance during the graduation project. And for giving me participate in helpful decisions and providing necessary advice, guidance, and arranging all amenities to make life easier. Without the teacher's instructions, I think my graduation project is very difficult to accomplish.
I would like to express my sincere thanks to the teachers and lecturers of the major of Informatics and Computer Engineering - International School for teaching and imparting valuable and useful knowledge as well as a passion for the major science and technology so that I can have the foundational knowledge to carry out this graduation project as well as the foundation to develop myself in the future. The process of completing my graduation project was a great opportunity for me to learn and grow professionally. Therefore, I consider myself lucky to have been allowed to be a part of it. During the implementation of this graduation project, I have supplemented and learned a lot of knowledge and experience about the design, implementation, and construction of the equipment "Gas leak measurement and warning".
Due to limited time and knowledge, my topic is limited to research, design, and simulation by model. During the implementation of the project, I consulted with the instructors, read the documents, and received support and suggestions from the lecturers as well as friends and predecessors. However, due to my limited knowledge, mistakes will inevitably be made. I would like to receive suggestions from teachers and friends so that my project can be more complete, to create for me a basis of the perception of abilities and knowledge, from which to have a better direction in the future.
Once again, I would like to thank the teachers! 4 Table of Contents LETTER OF DECLARATION. 4 TABLE OF NOTATIONS AND ABBREVIATIONS. 9 CHAPTER I: Introduction to the topic .1 Why was this topic chosen? .2 Scope and Project Objectives .3 Organization of thesis. 15 Chapter 2: Theoretical basis.1 Internet of Things (IoT) .2 Advantages and disadvantages of the Internet of Things.
Hardware theoretical basis. 22 Chapter 3: Hardware Modelling and setup .2 Block diagram of the proposed system. Setting up the system. Downloading and installing and Blynk application on the smartphone.
Setting up the Thingspeak web server. Driver installation for hardware interfacing. Interfacing NodeMCU with Arduino IDE. 54 Chapter 4: Logic and operation:.
Structure and measurement of the value from the MQ-2 gas sensor.2 Calculate the values. 59 Chapter 5: Conclusion and Future scope.1 Result of project .3 Further enhancement and future scope. 67 TABLE OF NOTATIONS AND ABBREVIATIONS Abbreviation Meaning DC Direct Current AC Alternating Current BLE Bluetooth Low Energy Wi-Fi Wireless Fidelity PCB Printed Circuit Board LCD Liquid Crystal Display API Application Programming Interface UART Universal Asynchronous Receiver /Transmitte SPI Serial Peripheral Interface SDIO Serial Digital Input/Output IDE Integrated Development Environment GSM Global System for Mobile Communication JSON JavaScript Object Notation IoT Internet of things PPM Part Per Million GPRS General Packet Radio Service TCP Transmission Control Protocol SoC System on a Chip USB Universal Serial Bus MQTT Message Queue Telemetry Transport NLP Natural Language Processing NodeMCU Node Micro Controller Unit RF Comm Radio Frequency Communication DIP Dual In-line Package GPIO General Purpose Input/Output SSH Secure Socket Shell HAS Home Automation System 6 LIST OF FIGURE Figure 1: Overview IoT system. 16 Figure 2: IoT general model.
19 Figure 3: LUA ESP8266 CP2102 Nodemcu Wifi Module. 23 Figure 4: NodeMCU Pinout. 26 Figure 5: Part of NodeMCU ESP8266. 28 Figure 6: MQ-2 Gas sensor.
31 Figure 7: An-ti explosion network and claim ring. 32 Figure 8: Star-shaped structure. 32 Figure 9: A sensing element. 33 Figure 10: Tubular sensing element.
33 Figure 11: MQ2 semiconductor particles work. 34 Figure 12: Gas concentration and output voltage. 35 Figure 13: MQ2 Sensitivity Adjustment. 35 Figure 14: MQ2 pinout.
36 Figure 15: LCD2004 Blue. 38 Figure 17; I2C data transmit. 39 Figure 18: Module SIM900A GSM GPRS. 40 Figure 19: Servo SG90.
41 Figure 20: Relay 2-channel 5V. 42 Figure 21: Connection diagram of the system. 44 Figure 22: Block diagram of the system. 45 Figure 23: Layout of the project module.
46 Figure 24: Actual operation diagram. 47 Figure 25: Realistic simulated hardware model. 48 Figure 26: Inside hardware model. 48 Figure 27: Working principle of Blynk application.
50 Figure 28: Setting up Blynk application. 51 Figure 29; Setting up Thingspeak web server. 53 Figure 30: Arduino IDE Preferences. 54 Figure 31: Install ESP8266 board in Arduino IDE.
55 Figure 32: Assigning communication port on Arduino IDE. 56 Figure 33: MQ-2 gas sensor circuit. 57 Figure 34: Sensitivity characteristics of the MQ-2. 58 Figure 35: Code to calculate Ro.
62 Figure 36; Ro results in Serial Monitor. 63 Figure 37: Code to calculate LPG ppm. 63 Figure 38: Test results of LPG ppm. 63 7 LIST OF TABLE Table 1: NodeMCU index with GPIO mapping.
23 Table 2: Pinout description of NodeMCU ESP8266. 27 Table 3: System components list. 44 8 ABSTRACT This project presents the overall design of a Gas Sensor with a low-cost and wireless system. It specifically focuses on the development of an IOT based home automation system that can control various components via the internet or be automatically programmed to operate from ambient conditions.
In this project, I design the development of firmware for smart control which can successfully be automated minimizing human interaction to preserve the integrity within whole electrical devices in the home. I used Node MCU via the Arduino IDE compiler, a popular open-source IOT platform, to execute the process of automation. Different components of the system will use different transmission modes that will be implemented to communicate the control of the devices by the user through Node MCU to the actual appliance. The main control system implements wireless technology to provide remote access from smartphones.
I am using a cloud server-based communication that would add to the practicality of the project by enabling unrestricted access of the appliances to the user irrespective of the distance factor. I provided a data transmission network to create stronger automation. The system is intended to control electrical appliances and devices in a gas sensor system with a relatively low-cost design, user-friendly interface, and ease of installation. The status of the appliance would be available, along with the control on an Android/IOS platform.
This system is designed to assist and provide support to 1fulfil the needs of anyone at home. Also, the smart home concept in the system improves the standard of living at home. 9 CHAPTER I: Introduction to the topic 1.1 Why was this topic chosen? In the current era of industrialization and modernization, with the continuous development of science and technology with the applications of advanced science and technology, our world has been changing day by day, becoming more civilized and modern. The development of electronic technology has created a series of devices with outstanding features such as high accuracy, fast speed, and compactness, which are essential elements for human activities to achieve high efficiency.
One of the important applications in electronic technology is the technique of controlling equipment and monitoring the environment remotely. It is these things that have greatly contributed to helping people have more and more intelligent devices and warn people to avoid dangers that are not detected and handled in time. Besides, along with the strong development of science and technology, many energy sources such as atomic energy, fossil energy, oil, gas, etc. have been created along with the development.
The development of all forms of energy is the danger that these forms of energy cause to us, including gas, which is an energy source used in industry, agriculture, etc. If the standard conditions are not met when using gas in daily life, it will be very dangerous to the user's life. With the knowledge learned through useful specialized subjects during university and the help of lecturers, subject experts as well as my passion for science and technology, I also have the desire to contribute somewhat to the development of society by learning and offering useful products for life. I would like to introduce a very practical product for our lives: " Gas leak measurement and warning ".
With the above idea, I want to contribute to the safety of families, groups, or businesses that use gas. The gas leak detection circuit will warn us when there is gas leaking out of the container or duct into the air or the environment to avoid unfortunate accidents.2 Topic overview Due to the increasing demand for gas energy sources, so the incidents that occur when using gas are also increasing, so the current urgent need when using gas today is how to reduce the Unnecessary incidents of gas caused to users. To solve the above problem, we should use and use safe gas at the same time to limit gas problems such as locking the valve when finished, checking the valve, the gas stove periodically reporting when there is a gas leak. and install a warning device when gas is leaked into the environment.
in which the installation and use of gas warning systems are given priority, put to the forefront in detecting gas leaks when using gas, with simple structure, convenient and reasonable price. If you are sensitive to gas, the gas warning device is the first choice for consumers in terms of installation and leak detection equipment when using gas. Realizing the seriousness and urgency of installing gas leak warning devices in buildings, hotels, and households, I chose this topic to learn and research deeply about gas warning devices. gas to design a product that minimizes the problems when using gas caused in buildings, hotels, and factories.1 Background Internet of Things (IoT) is a concept where each device is assigned to an IP address and through that IP address, anyone makes that device identifiable on the internet.
The mechanical and digital machines are provided with unique identifiers and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction. It started as the “Internet of Computers.” Research studies have forecast explosive growth in the number of “things” or devices that will be connected to the Internet. The resulting network is called the “Internet of Things” (IoT). The recent developments in technology that permit the use of wireless controlling environments like Bluetooth and Wi- Fi have enabled different devices to have the capability of connecting.