• No results found

IoT based automation system for smart home

N/A
N/A
Protected

Academic year: 2021

Share "IoT based automation system for smart home"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)

IOT BASED

AUTOMATION SYSTEM FOR SMART HOME

TEE KOK KIAN

Bachelor of Engineering Technology

(Electrical) With Honors

(2)

SUPERVISOR’S DECLARATION

We hereby declare that we have checked this thesis and in our opinion, this thesis is adequate in terms of scope and quality for the award of the Bachelor Degree of Engineering Technology in Electrical with Honors.

_______________________________ (Supervisor‘s Signature)

Full Name : DR. WAHEB ABDUL JABBAR SHAIF ABDULLAH Position : SENIOR LECTURER, FACULTY OF ENGINEERING

TECHNOLOGY, UNIVERSITY MALAYSIA PAHANG Date :

_______________________________ (Co-supervisor‘s Signature)

Full Name : EN. WAN HASSAN BIN WAN HAMAT

Position : LECTURER, FACULTY OF ENGINEERING TECHNOLOGY, UNIVERSITY MALAYSIA PAHANG

(3)

STUDENT’S DECLARATION

I hereby declare that the work in this thesis is based on my original work except for quotations and citations which have been duly acknowledged. I also declare that it has not been previously or concurrently submitted for any other degree at Universit y Malaysia Pahang or any other institutions.

_______________________________ (Student‘s Signature)

Full Name : TEE KOK KIAN ID Number : TB 15031

(4)

IOT BASED

AUTOMATION SYSTEM FOR SMART HOME

TEE KOK KIAN

Thesis submitted in fulfillment of the requirements for the award of the

Bachelor of Engineering Technology (Electrical) With Honors

Faculty of Engineering Technology UNIVERSITI MALAYSIA PAHANG

(5)

ACKNOWLEDGEMENTS

This dissertation would not have been possible without the guidance and the guidance of several individuals who contributed and extended their valuable assistance in the preparation and the completion of this study. I am deeply indebted to my supervisor, DR. Waheb Abdul Jabbar Shaif Abdullah and En. Wan Hassan bin Wan Hamat for his patiently guidance, assistance, stimulating suggestions, support and encouragement along the way to complete my thesis.

I also like to convey thanks to the faculty (FTEK) for providing the chemistry laboratory facilities for this research. My sincere appreciation also extends to all my friends, lecturers, teaching engineers and others who provided solutions when I faced problem in the research. It is their assistance that leads to be success of this research.

Besides, I would also like to drop a million thanks to my family for their support, both financially and emotionally throughout the completion of this thesis. My deepest gratitude goes to my family for their patience, love and trust during my study. Last but not least, I would like to thank everyone who helped in this study either directly or indirectly.

(6)

iii ABSTRACT

Due to communications technology advancement, home automation system has grown in popularity. Smart Home (SH) is one of the Internet of Things (IoT) applications that allow the users to control and real time monitor the home appliances through internet connection. Most existing systems are not affordable for most users due to high cost and difficult in maintenance. In addition, the existing systems are either locally or remotely controlled. Last but not the least is the lack of user-friendly interface. To overcome these limitations, this project proposes a cost effective and hybrid (local and remote) IoT-based home automation system which monitors and controls home appliances easily and efficiently via a user-friendly interface using smartphones and/or laptops. The project aims at enhancing the design and fabrication of an existing SH prototype to utilizing the IoT technology. The proposed system will integrate both technologies; Wi-Fi for local control and the IoT for enabling remote control and monitoring via an IoT platform and check ubiquitously if something is happening. This allows the system support the independence of both mobile provider and user location. NodeMCU act as a microcontroller and WIFI as a communication protocol. The messages sent from the WI-FI connected microcontroller managed system can be received by the users on smartphone or computer from any distance by making sure that the electronic devices are connected to the internet. The software used to program the NodeMCU is the Arduino software (IDE). This software helps to write and upload the program into the chip in the microcontroller. The system then can merged to the switches and sensor of home appliances to prove efficient control. Several sensors will be attached to under controlled household appliances and placed throughout the home to track activities and events, and then send the sensed data wirelessly to a gateway. The system will be integrated with alert devices to detect any threats for safety and security purposes. The proposed system will be an enabler for easier, safer, and more comfortable life especially for elderly and disabled people.

(7)

ABSTRACK

Oleh kerana kemajuan teknologi komunikasi, sistem automasi rumah telah berkembang dengan populariti. Smart Home (SH) adalah salah satu aplikasi Internet Things (IoT) yang membolehkan pengguna mengawal dan memantau masa nyata peralatan rumah melalui sambungan internet. Kebanyakan sistem yang sedia ada tidak mampu dimiliki oleh kebanyakan pengguna kerana kos yang tinggi dan kesulitan dalam penyelenggaraan. Di samping itu, sistem yang sedia ada sama ada secara tempatan atau dikawal dari jauh. Yang terakhir tetapi tidak sedikit adalah kekurangan antara muka mesra pengguna. Untuk mengatasi batasan ini, projek ini mencadangkan sistem automasi rumah berasaskan IoT yang berkesan dan hibrid (tempatan dan terpencil) yang memantau dan mengawal peralatan rumah dengan mudah dan cekap melalui antara muka yang mesra pengguna menggunakan telefon pintar dan atau komputer riba. Projek ini bertujuan untuk meningkatkan reka bentuk dan fabrikasi prototaip SH yang sedia ada untuk menggunakan teknologi IoT. Sistem yang dicadangkan akan mengintegrasikan kedua-dua teknologi; Wi-Fi untuk kawalan tempatan dan IoT untuk membolehkan kawalan jauh dan pemantauan melalui platform IoT dan semak di mana-mana jika berlaku. Ini membolehkan sistem menyokong kebebasan penyedia mudah alih dan lokasi pengguna. NodeMCU bertindak sebagai mikrokontroler dan WIFI sebagai protokol komunikasi. Mesej-mesej yang dihantar dari sistem pengurusan mikrokontroler yang disambungkan WI-FI boleh diterima oleh pengguna pada telefon pintar atau komputer dari jarak jauh dengan memastikan peranti elektronik disambungkan ke internet. Perisian yang digunakan untuk program NodeMCU ialah perisian Arduino (IDE). Perisian ini membantu untuk menulis dan memuat naik program ke dalam cip dalam mikrokontroler. Sistem itu kemudiannya boleh digabungkan ke suis dan sensor peralatan rumah untuk membuktikan kawalan yang cekap. Beberapa sensor akan dilampirkan di bawah peralatan rumah terkawal dan ditempatkan di seluruh rumah untuk menjejaki aktiviti dan peristiwa, dan kemudian menghantar data yang dirasakan tanpa wayar ke pintu masuk. Sistem ini akan disepadukan dengan peranti amaran untuk mengesan sebarang ancaman untuk tujuan keselamatan dan keselamatan. Sistem yang dicadangkan akan menjadi penyumbang untuk kehidupan yang lebih mudah, selamat, dan lebih selesa terutama untuk warga tua dan orang kurang upaya.

(8)

v TABLE OF CONTENT DECLARATION TITLE PAGE ACKNOWLEDGEMENTS ii ABSTRACT iii ABSTRACK iv TABLE OF CONTENT v LIST OF TABLES ix LIST OF FIGURES x LIST OF ABBREVIATIONS xi CHAPTER 1 INTRODUCTION 1 1.1 Project Background 1 1.2 Problem Statement 2 1.3 Objectives 3 1.4 Scope of Dissertation 4 1.5 Thesis Organisation 4

CHAPTER 2 LITERATURE REVIEW 5

2.1 Overview of Internet of Things 5

2.2 Overview of Smart Home 6

2.2.1 How Does Smart Home Works? 6

2.2.2 Advantages of Smart Home 7

(9)

2.3.1 Energy Efficiency 8

2.3.2 Entertainment 8

2.3.3 Security 9

2.4 Controlled Device 9

2.5 Components in Smart Home 10

2.5.1 What Is Sensors? 10

2.5.2 Relay Module 10

2.5.3 Motion Sensor 12

2.5.4 Light Bulb 13

2.5.5 Gas Sensor 14

2.5.6 Radio Frequency Identification (RFID) 15

2.5.7 Cloud 16

2.6 Wireless Communication Technology 16

2.7 Related work 17

CHAPTER 3 METHODOLOGY 21

3.1 Introduction 21

3.2 General Methodology 21

3.3 Selection of the Material 23

3.3.1 New Microcontroller 23

3.3.2 Relay 25

3.3.3 Ultrasonic Sensor 25

3.3.4 Temperature Sensor DHT11 25

3.3.5 PIR Motion Sensor 25

3.3.6 Mini Fan 26

(10)

vii

3.3.8 DC Motor 26

3.3.9 Gas Sensor 26

3.3.10 Radio Frequency Identification (RFID) 26 3.3.11 Brushless Submersible Water Pump 27

3.4 Software Development 27

3.4.1 Adafruit.IO 27

3.4.2 MQTT 28

3.4.3 IFTTT 28

3.4.4 Arduino IDE 29

3.5 Test Phase on New Microcontroller 29

3.6 Design of Home Prototype 31

3.6.1 Hardware Design and Wire Connection 33 3.6.2 Implementation, Enhancement and Optimization of New Design 34 3.7 System Architecture and System Flow 36

3.8 Testing and Final Product 37

CHAPTER 4 RESULTS AND DISCUSSION 38

4.1 Results 38

4.2 Discussion 41

4.2.1 Sensor Performance 41

4.2.2 RFID and Relay Performance 41 4.2.3 Microcontroller Performance 41 4.2.4 Motor Speed Control Performance 42

4.2.5 Smartphone Monitoring 43

(11)

CHAPTER 5 CONCLUSION 45

5.1 Conclusion 45

5.2 Recommendation 46

REFERENCES 47

APPENDIX A GANTT CHART 49

APPENDIX B COST ANALYSIS 50

(12)

ix

LIST OF TABLES

(13)

LIST OF FIGURES

Figure 2.1 Internet of Things 6

Figure 2.2 5V DC relay module 10

Figure 2.3 Passive Infrared (PIR) Sensor 13

Figure 2.4 LED bulb 14

Figure 2.5 MQ2 Gas Sensor 15

Figure 2.6 Radio Frequency Identification (RFID) 16 Figure 3.1 Flow chart of methodology 22

Figure 3.2 NodeMCU 23

Figure 3.3 NodeMCU Pin Diagram 24

Figure 3.4 Brushless Submersible Water Pump 27

Figure 3.5 Adafruit.IO 27

Figure 3.6 IFTT Platform 28

Figure 3.7 Arduino IDE 29

Figure 3.8 Testing with NodeMCU and Sensor 30 Figure 3.9 Components Circuit Diagram 30

Figure 3.10 Water Tank design 31

Figure 3.11 Smart Home Prototype 32

Figure 3.12 3D view of the prototype 32 Figure 3.13 Previous wiring connection 33 Figure 3.14 Making wire more arrangement 33

Figure 3.15 Plant Layout 34

Figure 3.16 Prototype of Smart Home 35 Figure 3.17 Making of Wiring Part For The Prototype 35 Figure 3.18 Portable box for microcontroller 35

Figure 3.19 System Architecture 36

Figure 3.20 Final prototype for project 37 Figure 4.1 Final smart home prototype 38

Figure 4.2 Adafuit IO platform 39

Figure 4.3 Notification from IFTT 39

Figure 4.4 Switching and monitoring Smart Home using MQTT Dash Application 40 Figure 4.5 Switching and monitoring Smart Home using Google Assistant 40 Figure 4.7 MQTT DASH Application with GUI 43

(14)

xi

LIST OF ABBREVIATIONS

MQTT Message Queuing Telemetry Transport IoT Internet of Things

NODEMCU Node-Microcontroller Unit

IDE Integrated Development Environment M2M Machine-to-machine

GSM Global System for Mobile Communications LCD Liquid-crystal Display

(15)

CHAPTER 1

INTRODUCTION

1.1 Project Background

In this modern world, technology has become a vital part of our daily life. Home automation, home environment automation, intelligent house, smart home, and control, systems integration, home network, home area network, management of home from any locations or domestics all refer to one thing which is a system uses various technologies to equip home parts for easy monitoring and remote control and enabling them for influential harmonic interaction among them such that the everyday house works and activities that he or she is engaged with (Alkar & Buhur, 2005). The system allows interaction with the inhibitors in order to provide convenience, comfort, safe living and energy efficiency at all the times. After many years, Smart Home (SH) has only become practical since the early 20th Century following the widespread introduction of electricity into the home, and the rapid advancement of information technology (Humphries, Rasmussen, Voita, & Pritchett, 1997). During 1960s, American hobbyists built up the first ―wired homes‖. However, there were limited by the technology of the times. The term "smart house" was first coined by the American Association of House builders in 1984. With the invention of the microcontroller, the cost of electronic control dropped rapidly and during the 1990s home automation rose to prominence. Despite interest in home automation, by the end of the 1990s there was not a widespread uptake - with such systems still considered the domain of hobbyists or the rich.

Majority of the homes already have some of the "smartness" because countless devices already have built-in sensors or electronic appliance controllers. Devices of smart home system are linked with each other and reachable through one main point,

(16)

2

which are tablet, smartphone or laptop. Light, thermostat, televisions, door locks, home monitors and cameras and the other home appliances such as the washing machine, refrigerator and television can be monitored via a smart home system. The smart home system is installed on internet-access devices (Woodford, 2018). Smart home appliances appear with self-learning expert by which the users can study the homeowner‘s schedules and timetables and arrange as needed. Smart homes enabled the lighting control and allow the users to reduce the electric consumption and thus it saves energy-consumption cost. Another example is home automation systems will notify homeowners if any motion is detected at home while they are not around, and some of the appliances can even report to fire station if in case of fire situations. These are actually the example of Internet of Things (IoT) technology. The Internet of Things (IoT) is an approach that takes all t hings a step forward by introducing a main control. The most leading form of smart home system is there are gadgets used by the homeowners and it can be controlled by them. It is a constant system at which it controls the home in all aspects such as switches appliances on and off. The gadgets which had been commonly used are android. Android is a well-known brand. The prove is it had been used over 328 million shipped worldwide, the system has a great monopolized the smartphone industries. According to Strategy Analytics, android managed to hold a record of 88% of the worldwide market in 2016, meanwhile for Apple‘s IOS devices, the share dropped to 12.1% from 13.6% the previous year (Bhattacharya, 2016). There are some of the source system for the smart home which are Linux and Kernel. Linux is the well-known and the common used as an open source operating system. It is software that is crucial for all of the software on a computer, receiving requests from the programs and communicates the requests to the computer‘s hardware. Kernel is a great piece of the system that monitors the CPU hardware, allocates memory, accesses data and runs the applications. It is the first program will on the computer screen when the it starts up (Halvens, 2018).

1.2 Problem Statement

Nowadays, there is a lot of the home automation systems exists in the market. This home automation system can be categorized into two main categories which is local control and remotely controlled systems. The different between local control and remotely control systems is the way for operation (Demiris et al., 2004). Basically, the

(17)

remotely control can use internet connection by using their electronic devices for long distance while the local control using in-home controller with a stationary or wireless communication technology to connect to the central hub or gateway. There are several issues that increase the difficulty for designing home automation systems.

Most of the existing home automation systems had limitation with the range of the connectivity. The existing prototype has limitation in its connectivity, sensor, and automation of windows and door (Möller et al., 2004). This limitation brings the smart home not user-friendly and this project will overcome this limitation by using NodeMCU. Besides, some existing smart home provides insufficient features and functionality because the original installer may not have adequate knowledge of how to install and commission the system. Furthermore, there is less of prototype in existing project such as door and window. The automatic door and window will apply in this project to ensure the systems more smart. In addition, the existing smart home is lacking in security element such as gas leakage alertness. This safety element is important in any smart home to avoid any incident.

In summary, the home automation system should provide a user-friendly interface to allow setting up, monitoring and controlling home appliances more efficiently. To overcome these design issues and minimize the shortcomings of home automation systems, this project will integrate locally and remotely controlled home automation systems. This project also adds some safety and security element by connecting sensor to home appliances. In this project, the low cost NodeMCU and mobile apps will use that related to the Internet of Things (IoT). The IoT allows individuals to control their appliance and devices over the Internet connection.

1.3 Objectives

The main objective of this project is to develop a cost effective and IoT-enabled system for Smart Home to monitor home and control its appliances easily and efficiently. To achieve the aim of the project, several objectives are needed:

 To fabricate a Smart Home prototype that facilitates the monitoring and control of home appliances over an IoT platform and support home safety by utilizing NodeMCU as a gateway to connect the system to the Internet.

(18)

47

REFERENCES

Aldrich, F. K. (2003). Smart homes: past, present and future. In Inside the smart home (pp. 17– 39). Springer.

Alkar, A. Z., & Buhur, U. (2005). An Internet based wireless home automation system for multifunctional devices. IEEE Transactions on Consumer Electronics, 51(4), 1169– 1174.

Anandhavalli, D., Mubina Noorul, S., & Bharathi, P. (2015). Smart Home Automation Control Using Bluetooth And GSM. International Journal of Informative & Futuristic

Research, 2620–2624.

Arduino, S. A. (2015). Arduino. Arduino LLC.

Ashton, K. (2009). That ―Internet of Things‖ Thing. RFiD Journal, 4986. https://doi.org/10.1145/2967977

Brown, D. M., Garfinkel, M., & Laurent, J. A. (1980, October 7). Solid state relay. Google Patents.

David, N., Chima, A., Ugochukwu, A., & Obinna, E. (2015). Design of a home automation system using arduino. International Journal of Scientific & Engineering Research, 6(6), 795–801.

Davidovic, B., & Labus, A. (2015). A smart home system based on sensor technology. Facta Universitatis, Series: Electronics and Energetics, 29(3), 451–460.

Demiris, G., Rantz, M. J., Aud, M. A., Marek, K. D., Tyrer, H. W., Skubic, M., & Hussam, A. A. (2004). Older adults‘ attitudes towards and perceptions of ‗smart home‘technologies: a pilot study. Medical Informatics and the Internet in Medicine, 29(2), 87–94.

ElShafee, A., & Hamed, K. A. (2012). Design and implementation of a WIFI based home automation system. World Academy of Science, Engineering and Technology, 68, 2177–2180.

Harper, R. (2006). Inside the smart home. Springer Science & Business Media.

Humphries, L. S., Rasmussen, G., Voita, D. L., & Pritchett, J. D. (1997, April 15). Home automation system. Google Patents.

Hunkeler, U., Truong, H. L., & Stanford-Clark, A. (2008). MQTT-S—A publish/subscribe protocol for Wireless Sensor Networks. In Communication systems software and middleware and workshops, 2008. comsware 2008. 3rd international conference on (pp. 791–798). IEEE.

Jyothi, V., Krishna, M. G., Raveendranadh, B., & Rupalin, D. (n.d.). IOT Based Smart Home System Technologies.

Kodali, R. K., & Soratkal, S. (2016). MQTT based home automation system using ESP8266. In Humanitarian Technology Conference (R10-HTC), 2016 IEEE Region 10 (pp. 1–5). IEEE.

Kurniawan, A. (2010). NodeMCU development workshop. PE Press. Lodhie, P. (2003, July 29). LED light bulb. Google Patents.

Micko, E. S. (2007, February 27). PIR motion sensor utilizing sum and difference sensor signals. Google Patents.

Möller, S., Krebber, J., Raake, A., Smeele, P., Rajman, M., Melichar, M., … Vovos, A. (2004). INSPIRE: Evaluation of a smart-home system for infotainment management and device control. ArXiv Preprint Cs/0410063.

Nath, B., Reynolds, F., & Want, R. (2006). RFID technology and applications. IEEE Pervasive Computing, (1), 22–24.

Parikh, P. P., Kanabar, M. G., & Sidhu, T. S. (2010). Opportunities and challenges of wireless communication technologies for smart grid applications. In Power and Energy Society General Meeting, 2010 IEEE (pp. 1–7). IEEE.

Ramya, V., & Palaniappan, B. (2012). Embedded system for Hazardous Gas detection and Alerting. International Journal of Distributed and Parallel Systems (IJDPS) Vol, 3, 287–300.

(19)

Sarath, K., Kotcherlakota, C., Bharadwaj, V., & Chinta, R. (2016). SMART HOME

AUTOMATION BASED ON IoT USING ARDUINO MEGA. Journal of Engineering Research and Application, 6(5), 77–80.

Surbatovich, M., Aljuraidan, J., Bauer, L., Das, A., & Jia, L. (2017). Some recipes can do more than spoil your appetite: Analyzing the security and privacy risks of ifttt recipes. In Proceedings of the 26th International Conference on World Wide Web (pp. 1501– 1510). International World Wide Web Conferences Steering Committee.

Tarun Agarwal. (2015). Zigbee Home Automation Project with Explanation. Retrieved from https://www.efxkits.co.uk/zigbee-home-automation-project/

Warren, J.-D., Adams, J., & Molle, H. (2011). Arduino for robotics. In Arduino robotics (pp. 51–82). Springer.

Xiao-Yuan, W., Fitch, A. L., Iu, H. H. C., Sreeram, V., & Wei-Gui, Q. (2012). Implementation of an analogue model of a memristor based on a light-dependent resistor. Chinese Physics B, 21(10), 108501.

Yano, K., Noda, M., Ono, H., & Fujita, H. (2011, March 22). Electromagnetic relay. Google Patents.

References

Related documents

{Please note that you may choose, at the time of cancellation, to apply the withheld admin- istrative fee to a future AHI Travel program that will operate in the current calendar

Rhodesian social, political and cultural experience.. 1975) Lotter records an account of a possible mutiny by black RAR (Rhodesian African Rifles) troops in 1973.. His words

The record and replay service is the core component of EnviroLog. It responds to stage control commands to switch between different stages, logs data into flash during recording,

Therefore the current I 1 is in the clockwise direction producing a positive magnetic flux (into the plane of Figure 10.10.3), opposing the positive decreasing flux due to

We find that a majority of both Happy and Unhappy social media users will experience a significant Popularity and Happiness Paradox, i.e.. they will be less popular and less happy

Figure 3 Illustrative representation of Pin1 binding models. A) The catalysis-first binding model: The PPIase domain of Pin1 binds to a pSer/Thr-Pro motif in the cis isoform

Additionally, 33.3% of the respondents from the age group 36-45 somewhat agree that they were frustrated by having to take frequent medications for acid reflux and heartburn