MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATION PROJECT COMPUTER ENGINEERING TECHONOLOGY DESIGN AND IMPLEMENT OF HOUSE MONITORING AND CONTROL APPLIANCE SYSTEM THROUGH A WEBSITE ADVISOR: ME. HUYNH HOANG HA STUDENT: TRUONG CHI LONG PHAM HOANG NAM SKL 0 1 0 5 9 8 Ho Chi Minh City, December, 2022 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATION PROJECT DESIGN AND IMPLEMENT OF HOUSE MONITORING AND CONTROL APPLIANCE SYSTEM THROUGH A WEBSITE TRUONG CHI LONG_18119027 PHAM HOANG NAM_18119031 ADVISOR: M. HUYNH HOANG HA Major: COMPUTER ENGINEERING Ho Chi Minh City, December 2022 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING GRADUATION PROJECT DESIGN AND IMPLEMENT OF HOUSE MONITORING AND CONTROL APPLIANCE SYSTEM THROUGH A WEBSITE TRUONG CHI LONG_18119027 PHAM HOANG NAM_18119031 ADVISOR: M. HUYNH HOANG HA Major: COMPUTER ENGINEERING Ho Chi Minh City, December 2022 THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, December 23, 2022 GRADUATION PROJECT ASSIGNMENT Student name: Truong Chi Long Student ID: 18119027 Student name: Pham Hoang Nam Student ID: 18119031 Major: Computer Engineering Class: 18119CLA Advisor: M.
Huynh Hoang Ha Phone number: Date of assignment: Date of submission: 1. Project title: Design monitoring and controlling system through a website 2. Initial materials provided by the advisor: 3. Content of the project: • Refer to the document, research, and summarize.
• Design block diagrams. • Design, calculate and simulate the system and implement the system on the test board. • Design and construction of hardware with many sensors and relays. • Programing microcontroller and website.
• Complete the system and construct the PCB. • System test on the PCB. Final product: The IoT system can monitor the house and control household electronic devices through a website. The features pair nodes for the user to expand the number of nodes in the system.
CHAIR OF THE PROGRAM ADVISOR (Sign with full name) (Sign with full name) i THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, January 23, 2022 ADVISOR’S EVALUATION SHEET Student name: Truong Chi Long Student ID: 18119027. Student name: Pham Hoang Nam Student ID: 18119031. Major: Computer Engineering Project title: Design and implement of house monitor and control appliances system through a website. Huynh Hoang Ha EVALUATION 1.
Content of the project: The thesis has 6 chapters and is complete with a design of the IT system. The system uses the ESP-NOW protocol to establish the communication between nodes and gateway to control the appliances remotely or manually and track the parameters of the surrounding environment via the website. In addition, the system has a fire or gas leak warning with its location and the feature to expand the node in the system. Strengths: - The system runs stably.
- Achieve the proposed goal. Weaknesses: - System is simple, need to upgrade more features. Approval for oral defense? (Approved or denied) - Approved 5. Overall evaluation: (Excellent, Good, Fair, Poor) - Fair.5 (in words: Seven point five) Ho Chi Minh City, Dec 23, 2022 ADVISOR (Sign with full name) ii HO CHI MINH CITY OF UNIVERSITY OF SOCIALIST REPUBLIC OF VIETNAM TECHNOLOGY AND EDUCATION Independence – Freedom – Happiness FACULTY OF HIGH QUALITY TRAINING Ho Chi Minh City, January 10, 2023 MODIFYING EXPLANATION OF THE GRADUATION PROJECT MAJOR: COMPUTER TECHNOLOGY ENGINEERING 1.
Project title: Design and implementation of house monitoring and control appliance system through website 2. Student name: Truong Chi Long ID: 18119027 Student name: Pham Hoang Nam ID: 18119031 3. Huynh Hoang Ha 4. Defending council: Council 2, Room: A3-404, 3rd January 2023 5.
Modifying explanation of the graduation project: No Council comments Editing results Note Bullets should be consistent in 1 The bullets have been fixed in the overall report the whole report. Figures in chapter 2: if figures are copied from other sources, 2 The reference source has been cited authors need to quote the reference sources.1: authors need to re- state whether the 2 modes are The manual and remote has been fixed by the 3 “automatic and remote” or authors in section 3.1 “manual and remote”. Cite the references for the 4 Cite the references in reference section whole report. Add the number of the chapter The number of chapters has been added to the 5 to the number of figures.
number of figures. Added the figure of system model in section 6 Finish the system model 5.2 Head of department Advisor Students (Sign with full name) (Sign with full name) (Sign with full name) iii THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, January 23, 2022 PRE-DEFENSE EVALUATION SHEET Student name: Truong Chi Long Student ID: 18119027. Student name: Pham Hoang Nam Student ID: 18119031. Major: Computer Engineering Project title: Design and implement of house monitor and control appliances system through a website.
Advisor: Lê Minh EVALUATION 1. Content of the project: Design and implement a system to monitor the indoor environment and control household electronic devices. The system has 2 modes: manual control and remote-Website control with the capability of adding new nodes. Approval for oral defense? (Approved or denied) Approved 5.
Comments and suggestion - Bullets should be consistent in the whole report. - Figures in chapter 2: if figures are copied from other sources, authors need to quote the reference sources.1: authors need to re-state whether the 2 modes are “automatic and remote” or “manual and remote”. Ho Chi Minh City, Dec 23, 2022 ADVISOR (Sign with full name) iv THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, January 23, 2022 PRE-DEFENSE EVALUATION SHEET Student name: Trương Chí Long Student ID: 18119027. Student name: Phạm Hoàng Nam Student ID: 18119031.
Major: Computer Engineering Project title: Design and implementation of house monitoring and control appliances system through a website Advisor: Truong Quang Phuc EVALUATION 1. Contents and workload of the project The author designed and implemented the monitoring and control system for smart home. Particularly, there are 2 modes; automation mode and manual mode in the user interface. Strengths: The project has 1 website interface.
Weaknesses: The system model still has not been finished yet. Approval for oral defense? (Approved or denied) Approved 5. Comments and suggestion + Cite the references for the whole report. + Add number of the chapter to the number of figures.
+ Finish the system model. Ho Chi Minh City, Jan 01, 2023 ADVISOR (Sign with full name) v THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER Student name:. Name of Defense Committee Member:. Content and workload of the project .) Ho Chi Minh City, Dec 23, 2022 COMMITTEE MEMBER (Sign with full name) vi GRATITUDE Firstly, our group would like to express our thanks to all the teachers at the Ho Chi Minh City University of Technology and Education, especially the lecturers in the Faculty of Electrical – Electronics and Faculty for High-Quality Training for the solid theoretical basis, the opportunity of researching, learning through every course so that we can gain enough knowledge to finish this thesis project.
Secondly, to complete this project our group would like to express our sincere thanks to the advisor – M. Huynh Hoang Ha for his enthusiasm and detailed guidance. While doing this project, our team made some errors but we still manage to fix them as soon as possible thanks to him. Besides, our group would like to give thanks to our friends for the help and support they gave us to finish this thesis as well.
Finally, our group wishes all the best goes to M. Huynh Hoang Ha and our friends. vii GUARANTEE This thesis was made completely by our group based on researching and referring documents on previous work, not copied from any individual project. Authors Pham Hoang Nam Truong Chi Long viii ABSTRACT Human life is enhanced day by day thanks to the continuous development of technology.
Its purpose is convenience in daily life. Since then, intelligent systems, and automatic systems were gradually invented to serve the needs of people's lives. However, in addition to serving human needs, these systems must also be easy to use and have a user-friendly interface. To make the house more convenient, our team chose the topic "DESIGN AND IMPLEMENTATION MONITORING AND CONTROL APPLIANCE SYSTEM USING WEBSITE".
The system uses Node MCU ESP32, rain sensor, PIR sensor, flame sensor, smoke sensor, gas sensor, temperature, humid sensor, relay, and website. The system will be very convenient for checking the surrounding environment, as well as controlling electrical appliances remotely for each room. The user cannot watch the environment by any display device but through a website. In the end, the result our group got was that the model performed exactly what the team had designed.
All the devices worked stably and consistently throughout time. The basic function is to control the appliances in response with a low delay. ix TABLE OF CONTENTS CHAPTER 1. The Home Automation System.
Smart wearable device:. Fire Alarm System:. Introduction of Monitor and Control System. Media Access Control (MAC).
ESP-NOW protocol:. DESIGN AND IMPLEMENTATION. DETAIL HARDWARE DESIGNS. The microcontroller for node and gateway.
Flowchart of Node and Gateway. Flowchart of node pairing process. Discussion and test execution. CONCLUSIONS AND FUTURE WORKS.
48 LIST OF FIGURES Figure 2-1: Broadcast Communication. 6 Figure 2-2: ESP-NOW Architecture. 7 Figure 2-3: ESP-NOW communication. 8 Figure 2-4: Firebase Database.
9 Figure 2-5: HTML Markup Language. 10 Figure 2-6: CSS Language. 10 Figure 2-7: JavaScript Programming Language. 11 Figure 2-8: Block building website.
11 Figure 3-1: Block diagram of the system. 12 Figure 3-2: ESP32 Microcontroller. 14 Figure 3-3: Node's Schematic. 15 Figure 3-4: Rain Sensor.
18 Figure 3-6: MQ2 Sensor. 19 Figure 3-7: Flame Sensor. 20 Figure 3-8: Touch Sensor. 21 Figure 3-9: Light Intensity Sensor.
24 Figure 3-12: Schematic of Relay. 25 Figure 3-13: AC-to-DC Power Supply. 28 Figure 3-14: Gateway Process. 30 Figure 3-15: Nodes Process.
31 Figure 3-16: Nodes Pairing Process. 33 Figure 3-17: Gateway Pairing Process. 34 Figure 4-1: Print Circuit Board. 36 Figure 4-2: Broadcast Configuration.
36 Figure 4-3: Real-time Database. 37 Figure 4-4: The dataflow of Firebase. 38 Figure 5-1: Nodes Circuit Board. 39 Figure 5-2: The node and gateway.
40 Figure 5-3: Website System. 41 Figure 5-4: Gas Leakage Alert. 42 Figure 5-5: Fire Alert. 42 Figure 5-6: Pairing Process.
43 Figure 5-7: Pairing Success. 44 Figure 5-8: Pairing Failed. 44 Figure 5-9: Test Execution. 45 LIST OF TABLES Table 1.
Pinouts of Relays. Pinouts of Sensors. Power Consumption of Components. Table of Components.
35 LIST OF ABBREVIATIONS Abbreviations Definitions IOT Internet of things MCU Microcontroller unit GPIO General purpose input output CHAPTER 1. INTRODUCTION Technology has been changing our world in different ways. It forces life standards to improve better and better day after day. As a result, when people are searching for and developing a system to make a home in comfortable circumstances, they want to improve the convenience of their home as much as they can.
But if the house or building has a ton of room, the owner cannot turn the household electronic appliance on/off every time if they are not in the same place and they cannot manage all the appliances in every room. This is where the problem appears. One of the biggest advantages of a system controlling household electronic appliances is that the owner can control every appliance remotely without any concern. This provides comfort and delight as the owner can.
The next advantage is that the environmental context needs to be tracked every time. Environmental conditions are one of the problems causing sickness in any season, especially for the baby and the elderly. For this reason, an adjustable appliance for the environment is essential too.