Implementation of IOT based Smart Security and Home Automation System

— Home automation has become more and more commercial and marketable in recent years. The goal of this project is to develop a home automation system with full security and controlling the home appliances using wireless communication as internet from both inside and outside of home. This offered project represents an actual model implementation that uses IOT (internet of things) technology as a network infrastructure connecting its parts of new home automation system. The recommended system consists of two main components-the first part is the server (web server), which presents system core that manages, controls, and monitors users home and outside of city. This system can be operate locally (LAN) or remotely (via internet) manage and control system code users and system administrator etc. Rest of the part is hardware interface module which has a WI-FI module, inside it a microcontroller is present which provides appropriate interface to sensors and notion of home automation system.


I. INTRODUCTION
Home automation system offers a reliable life for mankind. It is one of the major applications of IOT technology. The system is used for controlling and handling the home appliances like Lights, Fans, AC etc. The fundamental idea of home automation is controlling each device using the internet and collect data from the sensors in a home network. Other side Home Automation is a well organizing method to utilize in every field such that to reduce manpower, energy consumption, manipulation and also for improving the quality and efficiency of any system. Figure 1 is showing the basic diagram of home automation. The wireless devices work using the internet to operate the home appliances through a residential gateway. The principle objective of this project is to build up a home automation system utilizing Arduino and ESP8266 WIFI module to guarantee the client complete control of the remotely controllable electronic machines at home. On the other hand, using IOT system, the module ensures a safe home security system.

II. SECNARIO
IOT based home security systems have attracted people's attention mostly because of its global coverage. For example, a user can check his or her house while being on a vacation outside the country. All that is needed is an internet connection. Until now there are more IOT company headquarters in USA than in UK. France, India, Canada, Japan and China are the only other countries which have more than 20 IOT companies. In July 2016, the Netherlands had a national network specifically for IOT traffic and became the first country to possess such a system[2]. They used a network system named LoRa which acts as an alternate version of 4G or Wi-Fi. This system offered more security and is being operated in more than 56 countries[3]. On average, 3 out of 5 people buy smart products to observe their home through their smartphones. Commonly used smart home products are Locks and Alarms, Termostats and Fan, Lighting and CO detectors as shown in the figure. It is expected that by 2020 over 477 million smart home products will be delivered all over the world. This may result in creating a global network of automated home system where one can access their home from anywhere in the world and allow everyone to create a more secured and power saving system.

A. Overview of the System
This project's proposal will hold the prototype accomplishment of an improved home automation arrangement that utilizes IOT technology and microcontroller as a network system connecting its wedges. To develop a home automation system which will be controlled by an ESP8266 Wi-Fi application with IOT. A servo motor have been used for controlling the door lock system. By this system the user can be connected to different devices wirelessly through Wi-Fi module and provide command in server. Nowadays, technology have become so advanced that modern houses get the facilities of home automation, but with high cost which is often not affordable for many people. The goal of this project is to introduce a system that is more effective, reliable, low cost and can operate from anywhere without any hazard.

B. System Convenience
This system introduces an advance home automation system technology using ESP8266 Wi-Fi and servo motor SG90. A server account is established, which will connect with the ESP8266 Wi-Fi and provide the command on the web page. This introduces a new embedded system, which may reduce manual efforts of opening a lock with a key, as well as the errors done by humans for example, accidentally leaving the door keys at home. This system can be used even in the remote areas by simply connecting to the internet. Additionally, if any device is left on by mistake, this system allows the user to turn off those devices remotely which reduce losses of electricity.

IV. PROPOSED SYSTEM
The main operational block diagram of this project is provide below Fig 4(i). To control home appliance from any remote place with sending command to the internet. The load can be controlled and checked utilizing a website page with user configurable front end. The complete block diagram is shown in Fig 4(i) where, the ESP Wi-Fi module plays the role of main controlling unit. The user can send command through the assigned IP and these command are nourished to the Wi-Fi module. This module is designed to access internet using any nearby wireless connection. The commands received by a Wi-Fi module are executed by a program within the Wi-Fi module. The Wi-Fi module is interfaced to TRIAC and Opt coupler through which the loads are turned ON and OFF based on the command. The load status (ON or OFF) will be shown on the page. In fig 4(ii), The above flowchart is showing how a controlling system would work here. The system is connected to the Wi-Fi. Then the user will log in to the web page and send a command to the server. This command is processed in the ESP module. The command is then read by the microcontroller. Both ESP module and microcontroller runs on DC. The relays are turned on and off accordingly by the microcontroller. Since the output devices run on AC, the relays act like channels which provides AC power when the command is ON and turns OFF supply when it is OFF (according to fig 4 (i)). The coding and simulation has been done based on the flowchart shown in fig4(ii).

A. AC-DC Power Adapter Converter
An AC/DC adapter is a type of outer power supply. AC/DC connectors are connected with direct power supplies and it contains a transformer to change the mains power voltage to a lower voltage [5]. +V ADJ: It is used to adjust the output voltage. Using a multimeter to find out whether the unit is supplying significantly more or less than 12 volts, then adjust the voltage accordingly.

B. Buck Converter
A buck converter is a DC-to-DC control converter which ventures down voltage from its input to its output. Buck converter is used to step down the voltage. As input power supply gives constant 12V DC but esp8266 Node MCU can operate at 3V. Here 12V is converted by buck converter and stepped down the voltage at 5V. This 5V is fed into esp8266 Node MCU. A multimeter is used on the buck converter's output to regulate the voltage at 5V to 3V. This 3V is applied as power supply on ESP8266 Node MCU (Wi-Fi Module) since the ESP8266 can take a maximum 3V-3.6V.

C. ESP8266 NODE MCU(WI-FI MODULE)
The Node MCU (Node Microcontroller Unit) is an open source programming and equipment improvement condition that is worked around an exceptionally modest System-on-a-Chip (SoC) called the ESP8266 [6]. It is a gigantic weight for specialists, programmers, or understudies who need to try different things with it in their own IOT ventures [6]. This ESP 8266 WI-FI modulator has two part: one is internet interface part and the other is the microcontroller. The server connects with ESP8266 Node MCU. The server can be restrained by WI-FI or cellular connection. From server when the command is provided ESP8266's receiver receives it and delivers the command to the microcontroller. The NOT gate (7404) is connected with ESP8266 Node MCU. All Loads can operate at minimum 5V which is connected with ESP8266 module for controlling purpose but ESP8266 Node MCU accepts maximum 3V so here a NOT gate have been used to provide the relay 5V as the relay driver is connected with loads. Only NOT gate have below specification_ When Vin = 3V then Vout = 0 (Gate voltage becomes open) When Vin = 0 then Vout = 5V (Gate voltage is +5V which is show in Vout)

D. Solenoid Lock
A "solenoid" lock is a sort of electronic-mechanical locking instrument. It is also a nonexclusive term for a loop of wire utilized as an electromagnet [7]. Solenoid works similar to relay. It connects with the output of relay module and ground (common). There has steel rod inside the solenoid. When Solenoid gets 12V from relay output, the rod is magnetized by high current and immediately passing it on the forward direction.

E. Servo Motor SG90
The servo motor is most generally utilized for high innovation instrument in the manufactured application such as home automation. It is an independent electrical device, the part of the machine rotate with a specific angle [8]. Servo motor is tiny and lightweight with low input voltage (5V) and high output voltage (12V). As it can rotate approximately 180 degrees (90 in each direction) using this operation, door can be locked by command. Servo motor connects with power supply (5V), D8 PIN of microcontroller and ground (common).When the door gets ON command from server, the solenoid and servo motor senses the command, but first the solenoid gets pulse and opens, after 5sec delay servo motor turns on. But when the door gets OFF command, the servo motor closes first, then the solenoid closes.

F. Arduino Uno
Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button

H. Five Load (Operating Devices)
Five loads are two fan, two light and a door (in figure  12 provides respectively one door, one fan and one light). Two light and fan connect with individual channel of relay module and the door connects with solenoid & servo motor, finally each loads connect with ground (common).

VI. WORKING PRINCIPLE
The working procedure of the project can be described from the following figure. In the following figure power supply adapter is used in order to step down the voltage from 220V to 12V. This 12V dc is directly connected to reduce the voltage from 12V to 2.5V. Because the Node MCU module is operated in 3.5V. This Node MCU module is connected with 6 channel relay module. An inverter have been used to invert the voltage from 3.5V to 5V. Then, log into the web page and to give command to turn off or on to the corresponding load. By logging in the web page, the current status of the load can be observed. With the 5 load (2 fan, 2 light and solenoid door lock). An LM2596 dc adjustable buck converter was used. The result have been described in this chapter by two method -one is hardware another way is simulation based. Proteus software is used for this project simulation. In this simulation, the servo motor SG30 rotates clockwise direction when door commanded to open and anticlockwise direction when door commanded to close. As in simulation, different loads are provided, such as light, fan, tv and door which connect with 4 channel relay driver. Loads get direct 5V from relay as binary logic 1 then turn ON, when logic 0 then it turns OFF. For this operation a code is provided which is related to the project performance in the Arduino Uno. This IOT system enable users to picture and examine live information streams in the cloud. Thing Speak gives moment perceptions of information presented by user device on Thing Speak. User can perform online analysis and preparing of the information as it comes in Thing Speak. A portion of the highlights of Thing Speak incorporate the capacity to: Sending data to Thing Speak using popular IoT protocols the devices can be easily configured. Sensor data in real-time can be easily observed. IoT analytics can be run automatically based on particular schedules or events.

B. Hardware Analysis •
Light 1&2 By logging into the web page. A command is sent to the server to turn on light 1 and light 2. Then the server read the command and send corresponding signal to the Wi-Fi module receive the signal and send response to the relay driver. This table shows the cost analysis of the proposed IOT based smart security and home automation system. The analysis is based on the lowest individual cost of each equipment used in this project while taking consideration quality, in order to reduce the cost of the development of the system. This in turns makes the system economical and affordable for domestic use. This analysis is about the prices of equipment used in this project. According to the results from the simulation and hardware implementation and based on the study about this project, a new automation system with an online features is done for home automation. The IOT based home automation as stated can provide solution to the difficulties of traditional home automation. With the execution of the IOT network system which is as of now accessible it is en route to eventually achieving the advantages of remote automation and control of an electrical system. The system has been tried and observed to be solid and dependable. In future, with advanced AI systems, it will permit automatic judgment and secure the home. Therefore it avoids human intervention, reduce wasting electricity, provide an efficient controlling system and also helps to decrease the maintenance cost.