(Đồ án hcmute) design and implement of house monitoring and control appliance system through a website

67 2 0
(Đồ án hcmute) design and implement of house monitoring and control appliance system through a website

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

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 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.E 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.E 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.E Huynh Hoang Ha Phone number: Date of assignment: Date of submission: Project title: Design monitoring and controlling system through a website Initial materials provided by the advisor: 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 • Write a report • Thesis defense 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 Advisor: M.E Huynh Hoang Ha EVALUATION Content of the project: The thesis has 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 Overall evaluation: (Excellent, Good, Fair, Poor) - Fair Mark: 7.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 TECHNOLOGY AND EDUCATION FACULTY OF HIGH QUALITY TRAINING SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom – Happiness Ho Chi Minh City, January 10, 2023 MODIFYING EXPLANATION OF THE GRADUATION PROJECT MAJOR: COMPUTER TECHNOLOGY ENGINEERING Project title: Design and implementation of house monitoring and control appliance system through website Student name: Truong Chi Long ID: 18119027 Student name: Pham Hoang Nam ID: 18119031 Advisor: M.E Huynh Hoang Ha Defending council: Council 2, Room: A3-404, 3rd January 2023 Modifying explanation of the graduation project: No Council comments Editing results Bullets should be consistent in The bullets have been fixed in the overall report the whole report Figures in chapter 2: if figures are copied from other sources, The reference source has been cited authors need to quote the reference sources Section 3.1: authors need to restate whether the modes are The manual and remote has been fixed by the “automatic and remote” or authors in section 3.1 “manual and remote” Cite the references for the Cite the references in reference section whole report Add the number of the chapter The number of chapters has been added to the to the number of figures number of figures Finish the system model Head of department (Sign with full name) Note Added the figure of system model in section 5.2.2 Advisor (Sign with full name) iii Students (Sign with full name) 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 Content of the project: Design and implement a system to monitor the indoor environment and control household electronic devices The system has modes: manual control and remote-Website control with the capability of adding new nodes Strengths: Weaknesses: Approval for oral defense? (Approved or denied) Approved 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 - Section 3.1: authors need to re-state whether the 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 Contents and workload of the project The author designed and implemented the monitoring and control system for smart home Particularly, there are modes; automation mode and manual mode in the user interface Strengths: The project has website interface Weaknesses: The system model still has not been finished yet Approval for oral defense? (Approved or denied) Approved 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: Student ID: Student name: Student ID: Student name: Student ID: Major: Project title: Name of Defense Committee Member: EVALUATION Content and workload of the project Strengths: Weaknesses: Overall evaluation: (Excellent, Good, Fair, Poor) Mark:……………….(in words: ) 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.E 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.E Huynh Hoang Ha and our friends vii CHAPTER SYSTEM CONSTRUCTION 4.1 INTRODUCTION The group will describe how to build, assemble, and inspect hardware in this chapter as well as how to create algorithmic and software schematics for the system 4.2 PCB Construction Following the design in chapter 3, our group can construct the list of components show in Table into a print circuit board Table Table of Components Components Amount Note ESP32 Microcontroller Rain sensor Detect rain Gas sensor Detect gas leak Temperature and Detect humidity and Humidity sensor temperature Light sensor Light sensing Relay Switch Resistor 220 Ω Buzzer The Proteus software allows the user to create the print circuit board in a paper file The output of the print circuit board is present in figure 26 35 Figure 4-1: Print Circuit Board 4.3 Network connection The ESP-NOW protocol has a configuration to broadcast mode By doing this, the gateway can establish communication with different nodes without recognizing the destination MAC address The pairing of the new node into the network is based on the features of the ESP-NOW protocol The figure below indicates the configuration of the gateway to broadcast mode Figure 4-2: Broadcast Configuration 36 4.4 Firebase Figure 4-3: Real-time Database In this figure 28 shows the parameters of nodes including: • ID: node identifies • Sensor parameters: the parameters of each sensor in node • Socket: the status of outlet • Newnode: the number of nodes paired in the network The API to connect MCU and Firebase, Website and Firebase need to be set to communicate with each other The API of those two is provided by Firebase 37 Figure 4-4: The dataflow of Firebase Firebase is a bridge for this project The ESP32 sends the data reading from each sensor, the state of GPIOs, to the database of Firebase The Website which is linked will take the sensor from the database and display it on the website and control the output of ESP32 nodes 38 CHAPTER RESULT 5.1 Introduction In this chapter, our group presents the result of the system based on the calculation, implementation, and test execution The result consists of hardware design, function, website design and the performance of the system 5.2 Finished Product 5.2.1 The node Based on the calculation and design from chapter 3, the group can make the PCB and assemble the components into the board It contains a light sensor, touch sensor, buzzer, flame sensor, ESP32 Node MCU, relay, rain sensor, and the power source to power up the node Instead of connecting directly, our group decided to make a jumper for each component By doing this, the broken component can be replaced easily Figure 5-1: Nodes Circuit Board 39 The system has operated consistently throughout time The size of the PCB board is small and suits the IOT product The minus point is some time appear the delay of the sensor while transferring the parameters to website The XH-M299 with a 5V DC out connects straight through to the power source to supply all the power for all components in the circuit 5.2.2 The gateway The ESP-Now protocol needs one ESP32 board only to become a gateway Due to that feature, our group decided to pick one ESP32 to become a gateway as well as connecting with the Firebase Figure 5-2: The node and gateway Because the ESP-NOW needed only one independent board to become a gateway, our group decided not to the print circuit board to avoid the time consuming for this gateway but supply the 5V for it 40 5.3 Website Figure 5-3: Website System The website is constructed and finished based on the algorithm flow chart designed in chapter Each board is separated for identification The figure 32 shows that there are three main frames for the website: • The main function of the green frame presents the number of Nodes The name of the node can be renamed depending on the user • The blue frame shows the “New node” This is the adding node function button of the website • The yellow frame has displayed the parameters of each node The basic function of the system is tracking the environment surrounding, controlling the household appliance, and adding new nodes Users can choose the on/off of the relay within the button in the socket frame and come with a status for each button 41 Figure 5-4: Gas Leakage Alert In the figure 33 and 34, if there is a gas leak or flame in the surrounding area, the popup appears and informs the user, the alarm activates at the same time Besides that, the name of the node tracking the circumstance is displayed also to quickly identify the location Figure 5-5: Fire Alert 42 The new node button represents the function pairing This process is shown in figure 35 Figure 5-6: Pairing Process This process happens when the user clicks on the “New node” button The pairing process appears and displays on the website to notify the user There are two scenarios for this process: • The system is adding success before the timeout The new frame of the new node appears which is shown in figure 36 43 Figure 5-7: Pairing Success • The system is adding failure and the popup to notify the process fails to appear on the website which is shown in figure 37 Figure 5-8: Pairing Failed 44 5.4 Discussion and test execution After completion, the function of the system our group has achieved is followed as: • Controlling the household electronic devices manually or remotely on the website • Tracking the parameters of the environment surrounding • Warning of a gas leak or flame in a specific area The system is tested with the power supply from the test board Our group has performed many tests for the system including: • Start up the system in over 20 hours to test the communication • Pairing different nodes to the system • Test the stability of the relays when controlling from the website and manual with the touch sensor • Overheating test Figure 5-9: Test Execution After the test, our group realizes the system is stable and has a minor delay but it does not affect the entire system The sensor is well working and giving the exact parameters to the Firebase 45 CHAPTER CONCLUSIONS AND FUTURE WORKS 6.1 CONCLUSIONS The project “DESIGN AND IMPLEMENTATION MONITORING AND CONTROL APPLIANCE SYSTEM USING WEBSITE” has been completed and worked well at the design The hardware components used in this are light sensor, rain sensor, flame sensor, gas sensor, temperature and humidity sensor, touch sensor, buzzer, relays, and microcontroller ESP32 are assembled completely and work stably The software designed in the flowchart matches the function of the system at the beginning for controlling the electronic household appliance, adding new nodes into the system, and monitoring the environment and surroundings on the website The objective from the beginning has been satisfied with all functions mentioned The system worked stably for a long time and the temperature of all the components was not overheating The parameters of each sensor from each node can be seen through the website, also the status of all outlets itself Besides the advantage, there are some limitations to the project In the case of power loss, there is no backup battery to avoid damage from sudden power cuts The data transfer between nodes is 250 bytes 6.2 FUTURE WORKS For the project to be capable of working effectively in the future, the need of improvement is very necessary • Backup battery to avoid damage from sudden power cuts • Expand the number of nodes instead of 20 devices • Reduce the power anticipated in the system • Develop a mobile app 46 REFERENCE [1] "What is a Smart Home?," 2013 [Online] Available: https://smarthomeenergy.co.uk/what-smart-home/ [2] E E S V Karwan Muheden, "Design and implementation of the mobile fire alarm system using wireless sensor networks," IEEE, Budapest, Hungary, 2017 [3] F Corporation, "Địa MAC gì? Phân biệt địa MAC với địa IP," [Online] Available: https://wifi.fpt.net/dia-chi-mac-la-gi-phan-biet-dia-chimac-va-dia-chi-ip/ [4] wujiangang, "ESP-NOW," 2022 [Online] Available: https://github.com/espressif/esp-now [5] F Cloud, "Firebase gì? Ưu nhược điểm & Các dịch vụ Firebase," 2022 [Online] Available: https://fptcloud.com/firebase-la-gi/ [6] N N Thiện, "HTML gì? Bố cục trang web tổ chức sao?," [Online] Available: https://lamvt.vn/html-la-gi-bo-cuc-trang-web-duoc-chucra-sao/ [7] KienTT, "Kinh nghiệm tiếp cận CSS nhanh," 2020 [Online] Available: https://codelearn.io/sharing/kinh-nghiem-tiep-can-css-nhanh [8] Geekboots, "Importance of JavaScript in web development," [Online] Available: https://www.geekboots.com/story/importance-of-javascript-inweb-development [9] D Bhalla, "ADD JAVASCRIPT AND CSS IN SHINY," [Online] Available: https://www.listendata.com/2018/12/javascript-shiny-r.html [10] "Connect ESP32 and ESP8266 Send and receive data," 2020 [Online] Available: https://wirandle.com/connect-esp32-and-esp8266-send-andreceive-data/ 47 APPENDIX 48 S K L 0

Ngày đăng: 06/10/2023, 09:56

Tài liệu cùng người dùng

Tài liệu liên quan