Home Automation Using Nodemcu 4Relay Channel by Raju Sunagar




   




Abstract-The internet of things (IOT) is the communication between all the devices with each other over the internet. Its control loads with internet connection via Wireless Fidelity WIFI connection. In this we have created systems using C programming. actually the simplified definition of IOT is smart home to operates devices it can be used as a security system. System programming. Making a program using the Arduino IDE and the Blynk android application. then android smart phone with Blynk application installed to be used as control panel. ESP8266 microcontroller kit in other side as a controller that receives control commands via WIFI signal.

Keywords— Blynk, Ethernet, IoT, Wi-Fi,ESP8266.

 I.Introduction

A load controlled by computer systems has many advantages compared with manual controlled loads. Nowadays there are many programs and applications help to control things better using codes or python algorithms in artificial intelligence projects. In order to save energy and make loads monitored easily, this research suggests smart home project based on IoT technology. This smart home is an Internet of Things (IoT) project that controls loads with internet connection via Wireless Fidelity WIFI connection. A smart phone connected to internet with Blynk application as a control panel, and Nodemcu microcontroller kit in other side as a controller that receives control commands via WIFI signal. Nodemcu kit is built with ESP8266 WIFI receiver that able to process and analyze WIFI signal to input the microcontroller. The WIFI receiver and microcontroller are built in one kit to be used as IoT project. It’s called Nodemcu.

To connect the system to the Internet, needs a WiFi receiver. In my case I used ESP8266 that is connected as built-in in the Nodemcu board that contains a firmware runs with the ESP8266. The firmware is a low-level control computer software.

The Nodemcu is coded via Arduino Integrated Development Environment (IDE) with the Universal Serial Bus port (USB) to tell the Nodemcu what to do, I want to make the Nodemcu controls four-channel relay kit by Blynk hand phone application.

Parts used to create the project:

1)     Nodemcu board. Open source internet of things platform.

2)     AC-DC step down converter. Switch mode power supply to provide the project with power. This project needs 5 volts.

3)     DC-DC is the step down converter as a regulator to convert the 12 V output of the power supply into regulated 5 V.

4)     Four-channel relay kit. To drive loads from digital Nodemcu output pins.  

5)     Computer with Arduino (IDE) program installed to code the Nodemcu once.

6)     Android smart phone with Blynk application installed to be used as control panel. 

    II. Methodology

This research is conducted based on the important steps that are done by orienting on the success indicators in connecting the NodeMCU ESP8266 module and other devices so that it can be used to solve multi-objective problems. To achieve these indicators, the stages of this research are as follows:

1)     Analysis of the problem. Analyze the problems to be studied regarding smart home.

2)     Analysis of needs. In this case all needs in researching both from journals, literature books, tools, and materials. 

3)     System design. Designing tools to be built using the Nodemcu ESP8266 module, and the sensors used.

4)     System programming. Make a program using the Arduino IDE and the Blynk android application.

5)     Testing tools. Testing tools with program codes created and internet connections.

6)     Making reports and summarizing the results of the experiment. See system responsiveness to commands given to smart home.


a) The Flow of The System

This system mainly depends on ESP8266 WIFI Bord  with the internet of things(IOT) system. The ESP8266 is linked with internet from the WIFI or hotspots of the smart phone via WIFI connection as the ESP8266 has Nodemcu circuit to connect with the internet.

 

ESP8266(Nodemcu) has to be connected to the WIFI of the smart phone, needs to recognize the name of hotspot, the blynk server connects the both password and token code. We have to need the computer for uploading programme(code) from Arduino Software to the ESP8266. Figure 1 shows that the server of Blynk application will process the smart phone Nodemcu connection. Blynk libraries are ZIP files can be downloaded from Git hub website to be imported to the Arduino IDE library.

Blynk will recognize the internet connection,               ESP8266 with android WIFI, the ESP8266 programme having the token code, the name of WIFI and its security password. The data includes to the programme should be match with the WIFI data or information to allows Nodemcu connect with the hotspot to be as a channel to inter exchange commands between android phone and ESP8266. 

b) The Block Diagram  


      The Power Supply will provide energy to the system through the relay and Nodemcu ESP8266 modules, so that all equipment can work and function properly.  Nodemcu ESP8266 microcontroller will read the temperature by the Temperature sensor LM35, and then send the data to the Blynk server in TCP / IP format for display on the smart phone. Nodemcu ESP8266 microcontroller will also read commands that have been sent by the Blynk Server in TCP / IP format which will then be changed by giving the logic "HIGH" or "LOW" on certain pins by relay to regulate the on / off of the home lights. Cloud (internet) by utilizing Wi-Fi becomes the central connection between Blynk application and Nodemcu project.

 c) Blynk application and Arduino IDE Preparation and Running  

This project is running by Blynk application. Down load the application to a smart phone from Google play store and then create a project on it with four switches and one gauge to be as a temperature scale. Set buttons to be switches on D1, D2, D3 and D4. Then set gauge on A0 because the sensor output is on A0 in Nodemcu board.   

d) Nodemcu Code via Arduino IDE

To code Nodemcu via Arduino IDE, the Nodemcu needs to be added to Arduino IDE library first by adding this address to Arduino IDE preferences. After this reference is added to Arduino IDE, download Nodemcu to boards manager and then select NodeMCU 1.0 (ESP12E Module). After Nodemcu is added to Arduino IDE library, upload this code with changing hotspot name and password also token code. 


the Nodemcu code or program. The code includes the hotspot name and password match with the android. The code does not need to identify the relay input, as it is included in [Blynk.run();].

When auth (autho token) is given by Blynk application sent as email and SSID is the name of smart phone hotspot.

 

e) The Hardware of the System 

As mentioned above, components used to build the circuit, Nodemcu needs 5VDC as a supply voltage Vin pin, AC to DC converter ( step down ) 12V and DC to DC converter (step down ) 5V, in case using AC to DC converter (step down) 5 volt. Output voltage of the power supply is connected to Vin Nodemcu. When the ground is common. D1,D2,D3 and D4 are outputs



Used:

1)     Vin is connected to power supply output 5VDC.

2)     GND is ground.                                                             

3)     D1, D2, D3 and D4 are used as digital outputs.

   Conclusion 

Based on the results of analysis of all data obtained by testing the home automation with the IOT based Nodemcu ESP6288 module, the below conclusions are:

1)     Smart Home with Internet of Things (IoT) based Nodemcu ESP8266 Module can be designed with various components hardware and software support so that it can be arranged into a smart home system that is controlled with the Blynk android application according to what is intended. 

The Smart Home with this Internet of Things (IoT) based Nodemcu ESP8266 Module can be implemented to control some of the home electronics performance including lighting controls, fan control, temperature monitoring, early warning systems and etc.