Design and Implementation of an Internet of Things

17 downloads 0 Views 558KB Size Report
Hoong, “Smart GSM Based Home Automation System”,. 2013 IEEE Conference on Systems, Process & Control. (ICSPC2013), 13-15 December 2013, Kuala ...
Design and Implementation of an Internet of Things Based Prototype for Smart Home Automation System Kshirod Kumar Rout

Samuchita Mallick

Sivkumar Mishra

IIIT Bhubaneswar [email protected] Odisha, India

IIIT Bhubaneswar [email protected] Odisha, India

IIIT Bhubaneswar sivkumar @iiit-bh.ac.in Odisha, India

Abstract: The concept of automation coupled with advancement in technology and Android based smart phones have resulted in refined and smart lifestyles. When automation as a concept gets implemented via internet of things (IoT) which is concerned with accumulation /aggregation of connectivity, it gives rise to a smarter home network. In this paper, an IoT based prototype of a smart home automation is designed and implemented. The proposed prototype smart home system along with its Android App and ATmega16 as its main controller is successfully implemented and the results of the implementation are presented. Keywords— Internet of things, home automation, ATmega16

I. INTRODUCTION With citizens becoming netizens, IoT has become a major driving force in moulding living simple and technologically superior. In the recent years, there has been a growing interest among consumers in the smart home concept [1]. IoT stands for the abbreviation of Internet of Things referring to the idiosyncratically identifiable objects and their virtual representation in a cyberspace. IoT is a pristine information processing and accretion method encompassing RFID, sensor machinery, smart technology, nano-technology and other technological advancements. IoT is not a lone noble technology instead, circumvents considerable complementary technical development provide capabilities which appropriated together aid to bridge the gap between the virtual and physical world [2]. The above mentioned capabilities include: communication and coadjuvancy, admissibility, identification sensing, incitation, embedded information processing, localization and user interface. This consociates the key electrical devices along with the services and permits them to be remotely controlled, tracked and accessed. The hybridized concept developed via coupling between IoT and several home automation system schemes has resulted in Smart Homes [1].

The pivot element in realization of Smart Home system is the Home gateway responsible for transferring different protocols and connecting inner network to internet [3]. With the ongoing research, various smart home system schemes have been proposed where controlling actions have been implemented via Bluetooth [4], GSM-based [5], Android Application [6], Internet [7-8], SMS [9] while some researchers are focusing over implementations via Speech Recognition [10] and Microcontroller based Voice Recognition [11]. Many techniques dealing with reduction of the concussion of wireless interference on a Smart Home control network[12], minimization of energy consumption of Smart Home [13], mapping devices with RFID tags [14], embedding intelligence into sensors and actuators using Arduino platform, networking smart entities using Zigbee technology, improving data exchange efficiency using JSON data format [15] and optimizing the number of sensors used for collecting data from the physical devices which is used in monitoring and control of a Smart Home[16]. The decentralization of information is widening the scope of research in service computing based on component and service oriented architecture (SOA), a key element in IoT, an amalgamation of computation, communication, intelligent algorithm [17], web-services and cloud computing[18], hence resulting in advancements in remote home management [19]. In the light of above developments, this paper presents an IoT based prototype of a smart home automation system (SHAS). The results of the implementations along with the architecture incorporated in designing is elaborated. II.

PROPOSED IOT BASED SHAS

The basic architecture of a IoT based system contains four different layers where each layer has its own defined task to be performed. These layers are :

Fig. 1. Basic Architecture of SHAS

Fig. 2. Detailed description of the control unit of the SHAS

a. b. c. d.

Perception Layer Interface Layer Network Layer Application layer

Theses layers can be seen in the proposed SHAS. The schema of the proposed SHAS prototype is shown in Fig.1. The Perception Layer consists of all the connected physical devices and appliances in the

smart home networks which are supposed to be monitored and controlled in a typical home. The data collected from the perception layer is corresponded to the control unit which forms the Interface Layer. This control unit mainly consists of a ATmega16 [20] processor connected to the NodeMCU [21] for transmitting and receiving of data bi-directionally. NodeMCU is an open source IoT platform with its hardware based on ESP-12 module. This layer acts as the mediating layer between physical or Perception layer and Application Layer and forms processing unit of the Layered Architecture. The processing unit leads the accumulated data into the Network Layer, which provides two way communication and connectivity pathway via Cloud infrastructure, after which the data finally reaches the Application Layer. The Application Layer via which control and monitoring of the appliances, installed at home, takes place from anywhere in the world. This SHAS also includes an Android based control and monitor of the home appliances using an Android (Blynk App) [22]. The main controller is ATmega16. This prototype uses the Internet as the interoperable layer.

The proposed SHAS prototype has the following functionalities: a. b. c.

d. e.

It focuses on monitoring of status (ON/OFF) of the appliances at home. GUI interface helps in viewing of the status used for screening purposes. It can control variables defining the Home Automation System, hence helping in optimal energy usage. It can provide home surveillance features which helps in human identification. Alarm system

The master controller based on ATmega16 along with the complementary hardware helps inter communication and coordination of activities between different nodes for intra-home network and the interoperable layer. The main theme of control and status monitoring project is concerning implementation of Machine-To-Machine (M-2-M) as the prominent feature.

Fig. 3. Proteus implementation for the SHAS prototype

III. A.

IMPLENMENTATION OF THE PROPOSED SHAS Hardware Implementation:

For the hardware implementation of the proposed SHAS, the basic schema of fig. 1 is followed. The detailed description of the control unit (Fig.1) is presented in Fig.2. The unit mainly consists of an ATmega16 microcontroller chip consisting of 40 pins. Atmega16 is an 8-bit high performance microcontroller with low power consumption. The NodeMCU module and application devices (Laptop and Smartphone) interact via wireless communication channel. The NodeMCU] module sends the data to application devices via cloud infrastructure and receives command of control from the smart application devices, based on which the monitoring of the light 2, light 3 , light 4, and light 5 and control of the speed of a fan and intensity of a light 1is achieved. The NodeMCU voltage levels are at ±3.3 V whereas the microcontroller voltage level is at +5 V. NodeMCU includes firmware which runs on the ESP8266 Wi-Fi (system on a chip) SoC and hardware which is based on ESP-12 module. It is an opensource firmware and development kit that helps to prototype IoT product within a few Lua script lines. The ESP8266 WiFi module is a low cost standalone wireless trans-receiver which enables internet connectivity. It uses TCP/UDP communication protocol to connect with server/client. In this set up, the status of the appliances (ON/OFF or HIGH/LOW) is continuously monitored in the dashboard when logged in. To control any device/appliance in the home, high/low button in the dashboard is pressed and to increase/ decrease the speed of a fan or intensity of a lamp the scroll bar is varied in the dash board. When a high/low button in the dashboard is pressed NodeMCU will get the corresponding signal via WiFi and it will communicate to ATmega16 microcontroller. Then, the respective input/output pins of the ATmega16 will be made high/low and it will trigger the respective relay. Again to control the speed of a fan or intensity of the light 1, the scroll bar in the dashboard is varied and is sent to ATmega16 via NodeMCU then the ATmega16 microprocessor will set the corresponding firing angle via its inbuilt timer and zero crossing detection (ZCD) circuit is given

through interrupt pin of ATmega16 micro-controller. The corresponding firing pulse is given to the Triac through opto-isolator to get necessary speed or intensity by controlling the AC voltage. To have two way communications between the ESP8266 WiFiModule and microcontroller (ATmega16) the Rx pin of the NodeMCU is connected with the Tx pin of the ATmega16 and Tx pin of the NodeMCU with Rx pin of the ATmega16. Fig.3 shows the Proteus implementation of the SHAS control unit as described in Fig.2. Fig. 4 shows the physical implemented model of the SHAS prototype.

Fig. 4. Physical model of the SHAS prototype

B. Software Implementation: The working starts with creation of the graphic interface based application. The application is developed in Blynk platform and the interface is as shown in Fig.5. The interface provides the user with three dominant functionalities: a. Status monitoring (ON / OFF control) b. Regulating or controlling the speed of the respective appliances. c. Monitoring temperature and humidity via DHT11 sensor and controlling status based on the monitored data as well as M-2-M feature. It provides with an interface with two predominant options: a. b.

Registered user Create a Dashboard

Clicking on the “Registered user” redirects to dashboard with all the appliances which have been added into the application for monitoring and control process. This feature helps the user to have a customized dashboard according to one’s preference related to control and monitoring application with a volatile schema. Second option, “Create a Dashboard” facilitates the user in building a graphic interface by simply clicking on “Add Devices” push-button which redirects to an interface where the user can add features specific to the control and monitoring of a particular device or appliance. For instance, if one is adding a new device like Fan or Air Conditioner, the application provides the user with functionalities like controlling its speed and monitoring its timely status. Fig.5 shows controlling the light intensity in the LED which is a registered device added under the specific user credentials. The control of the intensity of the LED is through message queuing telemetry transport (MQTT) protocol [23] which can be controlled from anywhere in the world via ESP8266 module. The authentication and authorization layer of schema for ESP8266 module maps a particular user under a specific account to the devices added under its credentials for the control and monitoring purposes. The credentials required are namely; SSID and userdefined password. The next stage is predominantly related to communication layer of the schema which is sending notifications from the ESP8266 via text message and E-mail. IoT devices constantly alert users when something is happening or simply at regular intervals, for example to report data. ESP8266 is used to send e-mail as well as text messages. IFTTT web service is used that can put two web services in

contact via “recipes” that are activated by a trigger which in return triggers an action. A simple WiFi temperature and humidity sensor based on ESP8266 was also included using freeboard.io [24], an opensource dashboard framework. It was configured to automatically log data onto dweet.io [25] service displaying the measurements in an online dashboard as shown in Fig. 6. IV.

CONCLUSION

In this paper, a SHAS prototype along with its Android App has been successfully implemented. Features like remote status observation and actuating of devices, data communication through cloud infrastructure as well as an operational and physically employed prototype has been developed. This proposed prototype has been implemented with 6 loads, 4 of which are used for the status monitoring purpose and the remaining two has been used for demonstration of controlling action. The design uses ATmega16 as its master controller because of its costeffective feature as well as the number of pins available with Atmega16 is more when compared with Arduino Uno in the context of home automation application. For the control of speed of fan or intensity of light, three timers are required , two for generating firing pulse and one to read the command from the dashboard, which is provided in the ATmega16 micro-controller. The scheme, discussed above in the context of small scale domestic application which uses an open source dashboard, can be scaled up for commercial application by designing a customized dashboard application. In the future work, it can control the status of the fan or AC, according to the humidity and temperature of the room.

Fig 5. Interface of Application for SHAS

Fig 6. Temperature and Humidity indicator for SHAS

V.

REFERENCES

G. Lobaccaro, S. Carlucci, E. Löfström, “A Review of Systems and Technologies for Smart Homes and Smart Grids” Energies, vol.9, pp 348, 2016. [2] K.K.Rout, S.Mishra and A.Routray, “Development of an internet of things(IoT) based introductary laboratory for under graduate engineering students” 16th Inernational Conference on Information Technology (ICIT), Bhubaneswar, India,2017. [3] V. Knivett, “Home Smart Home,” New Electronics, vol.34, pp.16-18, 2001. [4] S. Kumar and S. Ro Lee, “Android Based Smart Home System with Control via Bluetooth and Internet Connectivity”, Consumer Electronics (ISCE 2014), The 18th IEEE International Symposium on Consumer Electronics (ISCE 2014). [5] R. Teymourazadeh, S. Addin Ahmed, K. C. Chan and M.V. Hoong, “Smart GSM Based Home Automation System”, 2013 IEEE Conference on Systems, Process & Control (ICSPC2013), 13-15 December 2013, Kuala Lumpur, Malaysia. [6] R. Piyare and M. Tazil, "Bluetooth based home automation system using cell phone," in IEEE 15th International Symposium on Consumer Electronics, Singapore, 2011, pp. 192 - 195. [7] S. Kumar, "Ubiquitous Smart Home System Using Android Application," International Journal of Computer Networks & Communications, vol. 6, pp. 33-43, January 2014. [8] R. Piyare, "Ubiquitous Home Control and Monitoring System using Android based Smart Phone," International Journal of Internet of Things, vol. 2, pp. 5-11, 2013. [9] M. S. H. Khiyal, A. Khan, and E. Shehzadi, "SMS Based Wireless Home Appliance Control System (HACS) for Automating Appliances and Security," Issues in Informing Science and Information Technology, vol. 6, pp. 887-894, 2009. [10] M. R. Kamarudin, M. A. F., and M. Yusof, "Low Cost Smart Home Automation via Microsoft Speech Recognition," International Journal of Engineering & Computer Science, vol. 13, pp. 6-11, June 2013. [11] K. P. Dutta, P. Rai, and V. Shekher, "Microcontroller Based Voice Activated Wireless Automation System," VSRD Internationl Journal of Electrocal, Electronics & Communication Engineering, vol. 2, pp. 642- 649, 2012. [1]

[12] Mingfu Li, Hung-Ju Lin, “Design and Implementation of Smart Home Control Systems Based on Wireless Sensor Networks and Power Line Communications.”, 10. 1109/TIE.2014.2379586, IEEE Transactions on Industrial Electronics [13] Yin Jie, Ji Yong Pei, Li Jun, Guo Yun, Xu Wei, "Smart Home System based on IOT Technologies", 2013 International Conference on Computational and Information Sciences. [14] Luigi Atzori, Antonio Iera, Giacomo Morabito. “The Internet of Things: A survey,” Computer Networks, vol.54, pp.2787– 2805, 2010. [15] Jiang Li, Liu Da-You, Yang Bo, “Smart home research,” Proceedings of 2004 International Conference on Machine Learning and Cybernetics, vol.2, pp.659-663, 2004. [16] Jiuyang Tang, Guoming Tang and Kui Wu*,"MinNet: toward more intelligent smart home energy management systems with fewer sensors",Int. J. Sensor Networks, Vol. 20, No. 4, 2016. [17] Baoan Lia, Jianjun Yub,"Research and application on the smart home based on component technologies and Internet of Things". [18] Moataz Soliman1, Tobi Abiodun1, Tarek Hamouda1, Jiehan Zhou1,2, Chung-Horng Lung1,"Smart Home: Integrating Internet of Things with Web Services and Cloud Computing",2013 IEEE International Conference on Cloud Computing Technology and Science. [19] B.I. Ahmad, F. Yakubu, M. A. Bagiwa and U.I. Abdullahi, ”Remote Home Management: An alternative for working at home while away”, World of Computer Science and Information Technology Journal(WCSIT), 1(4),pp. 144-147, 2011. [20] ATmega16: www.electronicsforu.com/ resources/ learnelectronics/atmega16-pin-diagram-description accessed in March 2018. [21] NodeMCU: www.nodemcu.com/index_en.html accessed on March 2018. [22] BlynkApp: www.blynk.cc/ accessed in March 2018. [23] MQTT:www.mqtt.org/ accessed in March 2018. [24] freeboard.io : www. freeboard.io/ accessed in March 2018. [25] dweet.io : www. dweet.io/ accessed in March 2018.