MINI PROJECT REPORT
ON
CONTENTS :
INTRODUCTION |
CHAPTER 1: INTERNET OF THINGS |
1.1 Introduction |
1.2 Microcontroller |
CHAPTER 2: ESP8266 NODEMCU |
2.1 Introduction to Arduino IDE |
2.2 Overview |
2.3 History |
CHAPTER 3: ARDUINO IDE |
3.1 Introduction |
3.2 Integrated Development Environment |
3.3 Blynk Application |
CHAPTER 4: HOME AUTOMATION |
4.1 Block Diagram |
4.2 Circuit Diagram |
4.3 Components |
4.4 Working Principle |
4.5 Software |
4.6 Program |
4.7 Advantages |
4.8 Disadvantages |
4.9 Applications |
RESULT |
FUTURE SCOPE OF THE PROJECT |
CONCLUSION |
REFERENCE |
LIST OF FIGURES :
Sl.No |
Figure Number |
Figure Name |
1. |
1.1 |
Microcontroller |
2. |
2.1 |
ESP8266 NODEMCU |
3. |
3.1 |
ARDUINO LOGO |
4. |
3.2 |
IDE Environment |
5. |
3.3 |
BLYNK APPLICATION LOGO |
6. |
3.4 |
Smart Home Architecture |
7. |
4.1 |
BLOCK DIAGRAM OF
HOMEAUTOMATION |
8. |
4.2 |
CIRCUIT DIAGRAM OF HOME AUTOMATION |
9. |
4.3 |
NODEMCU ESP8266 PINOUT |
10. |
4.4 |
ESP-12E MODULE WITH ESP8266 CHIP |
11. |
4.5 |
RELAY MODULE |
12. |
4.6 |
5V SINGLE CHANNEL RELAY MODULE |
13. |
4.7 |
WORKING OF RELAY |
14. |
4.8 |
RELAY MODULE BASIC SCHEMATIC |
15. |
4.9 |
POWERED LOAD AND UNPOWERED LOAD |
16. |
4.10 |
RELAY CONNECTED TO MICROCONTROLLER AND MAIN SOURCE |
17. |
4.11 |
MICROUSB CABLE |
18. |
4.12 |
To create new project in blynk app |
19. |
4.13 |
To add button and labels with output pin |
20. |
4.14 |
Installation of NodeMCU board |
21. |
4.15 |
Installation of ESP-12E Module |
22. |
4.16 |
Installation of Blynk Library |
23. |
4.17 |
Selection of NodeMCU Board |
24. |
4.18 |
Final Project Picture |
LIST OF TABLES :
Sl.No |
Table Number |
Table Name |
1. |
4.1 |
NodeMCU Board Pinout Configuration |
2. |
4.2 |
Single – Channel Relay Module Pin Description |
The Internet of Things (
IoT ), is a system of interrelated computing devices, mechanical and digital
machines, objects, or people that are provided with unique identifiers (UIDs)
and the ability to transfer data over a network without requiring
human-to-human or human-to-computer interaction. We can control the home
electronic devices using the internet as the main platform. The data which is
obtained by testing the Smart Home with Internet of Things 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 App android application. The Smart Home with the Internet of Things ( IoT
) based NodeMCU ESP8266 module can be implemented to control some of the home
electronic performance including lighting controls, fan controls, temperature
monitoring, early warning systems and etc., In this project the light will be
controlled by internet as main source and we can operate it by mobile phones.
CHAPTER
1
INTERNET
OF THINGS
INTRODUCTION
:
The Internet of Things ( IoT ), is a system of interrelated computing devices, mechanical and digital machines, objects, or people that are provided with unique identifiers ( UID’s ) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction. An IoT ecosystem consists of web-enabled smart devices that use embedded systems, such as processors, sensors and communication hardware, to collect, send and act on data they acquire from their environments. IoT devices share the sensor data they collect by connecting to an IoT gateway or other edge device where data is either sent to the cloud to be analyzed locally. Sometimes, these devices communicate with other related devices and act on the information they get from one another. The devices do most of the work without human intervention, although people can interact with the devices for instance, to set them up, give them instructions or access the data. The connectivity, networking and communication protocols used with these web-enabled devices largely depend on the specific IoT applications deployed. IoT allows objects to be sensed and controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems, and resulting in improved efficiency, accuracy and economic benefit. The present generation has been experiencing high speed internet by using 4G LTE cellular technology, which allows evolution of swifter IoT-based home automation systems. When IoT is augmented with sensors and actuators, the technology becomes an instance of the more general class of cyber-physical systems, which encompasses technologies like controlling of different home appliances like light, fan, water pump and many more. A system has been designed to connect sensor data with user’s daily life. There are already many smartphone oriented remote controller products. However current products always have platform compatibility problems and additionally ( GUI ) in such systems is complex. This work proposes an approach to enhance and simplify the controlling and monitoring experience. With the use of sensors in home environment the appliances can be controlled remotely based on environmental conditions known from sensor data. The sensor data are processed by a microcontroller and delivered to mobile application through WEB server. The results of implementation and experimentation have shown the proposed system and platform that can provide more IoT application possibilities in daily life. Increasing reliability on the mobile phone applications to deal within daily life scenarios has paved the way of modelling a system which will integrate sensors and actuators. This also allows users to observe data and send commands by using the mobile phone application. With the advancement of technology controlling and monitoring of electronics appliances using android application with the help of internet connection has become possible. It gives us the opportunity to have the full control over a particular place even being far away from it. IoT allows us to control many devices simultaneously and reduces human efforts.
This process is done in low cost and controlling of many devices in a simple circuit is possible. Our user-friendly interface allows a user to easily control home appliances through the internet. Relays are used to switch loads. The entire system is run by mains power using a step-down transformer, rectifier, filter and a linear dc regulator. After receiving user’s commands over the internet, microcontroller processes these instructions to operate these loads accordingly and display the system status on mobile application. Besides monitoring sensor data and controlling household devices, the proposed system provides additional features of emergency notification and automatic turn-off of an appliance to prevent wastage of power. Thus, this system allows efficient home automation over the internet.
MICROCONTROLLER
:
A
microcontroller ( MCU for microcontroller unit ) is a small computer on a
single metal-oxide-semiconductor ( MOS ) integrated circuit ( IC ) chip. A
microcontroller contains one or more CPU’s ( processor core ) along with memory
and programmable input / output peripherals. Microcontrollers are designed for
embedded applications, in contrast to the microprocessors used in personal
computers or other general purpose applications. In modern terminology, a
microcontroller is similar to the system on a chip ( SoC ). This may include
microcontroller as one of its components, but usually integrates with the advanced peripherals like graphics
processing unit ( GPU ), Wi-Fi module or co-processors.
Microcontrollers are used in
automatically controlled products and devices, such as automobile engine
control systems, implantable medical devices, remote controls, office machines,
appliances, power tools, toys and other embedded systems. By reducing size
and cost compared to a design that uses a separate microprocessor, memory, and
input/output devices, microcontrollers make it economical to digitally control
even more devices and processes. Nodemcu is brand name of board that has Wi-Fi Module ESP8266 and some associated circuit. ESP8266 module have a micro-controller with Wi-Fi.
CHAPTER
2
ESP8266
NODEMCU
INTRODUCTION
:
The NodeMCU is an open-source based software and development board specially targeted for IoT based Applications. NodeMCU development board consist of ESP8266 Wi-Fi enabled chip. The ESP8266 is Wi-Fi chip developed by Espressif Systems with TCP / IP protocol. Expressive Systems Smart Connectivity Platform ( ESCP ) of high performance wireless SOC’s, for mobile platform designers, provides unsurpassed ability to embed Wi-Fi capabilities within other systems, at the lowest cost with the greatest functionality. It includes software that runs on ESP8266 Wi-Fi ( SoC ) from Espressif Systems, and hardware which is based on ESP - 12 module. It is a low-cost open source IoT platform. It is a low cost solution for developing IoT applications. It is a single board microcontroller. The ESP - 12E is a miniature Wi-Fi module present in the market and is used for establishing a wireless network connection for microcontroller or processor. The core of ESP - 12E is ESP8266EX, which is a high integration wireless SoC ( System on Chip ). It features the ability to embed with Wi-Fi capabilities to systems or to function as application. Since it is open-source platform, their hardware design is open for edit, modify and build. It is featured with Wi-Fi capability, analog pin, digital pins and serial communication protocols. The NodeMCU board has Arduino like Analog ( A0 ) and Digital ( D0 - D8 ) pins on its board. The best way to develop quickly an IoT application with in less Integrated Circuits to add is to choose this circuit “ NodeMCU ”. It supports serial communication protocols i.e., UART, SPI, I2C etc., using such serial protocols we can connect it with serial devices like I2C enabled LCD display, Magnetometer, RTC chips, GPS modules, touch screen displays, SD cards etc.
OVERVIEW
:
NodeMCU is an open-source
firmware for which the open-source prototyping board designs are
available. The name " NodeMCU " combines "node" and "MCU" (micro-controller unit). The term "
NodeMCU " strictly speaking refers to the firmware rather than the
associated development kit. Both the firmware and prototyping
board designs are open source.
The firmware uses the Lua
scripting language. The firmware is based on the eLua project, and built on the
Espressif Non-OS SDK for ESP8266. It uses many open-source projects, such as
lua-cjson and SPIFFS. Due to resource constraints, users need to
select the modules relevant for their project and build a firmware tailored to
their needs. Support for the 32-bit ESP-32 has also been
implemented.
The prototyping hardware typically used is a
circuit board functioning as a dual-in line package (DIP) which integrates a USB
controller with a smaller surface-mounted board containing the MCU and antenna.
The choice of the DIP format allows for easy prototyping on breadboards. The design was initially
based on the ESP-12 module of the ESP8266, which is a Wi-Fi SoC
integrated with a Tensilica Xtensa LX106 core, widely used
in IoT applications.
HISTORY
:
The NodeMCU was created shortly after the “ ESP8266 “ came out. On December 30th 2018, Espressif Systems began their production of the “ ESP8266 ” . Then later NodeMCU started on 13th of October 2015, when the Hong committed the first file of NodeMCU firmware to the GitHub. Two months later, when the project expanded to include in an open - hardware platform, when the developer Huang R committed the gerber file of an ESP8266 board, which is named as devkit v0.9.
Later that month, Tuan PM when ported MQTT client library from Contiki to the ESP8266 SoC (Socket) platform, and then
committed to NodeMCU project, then the NodeMCU was able to support the MQTT IoT
protocol, using Lua to access the MQTT broker. Another important update was
made on 30th January 2015, when Devsaurus ported the u8glib to
the NodeMCU project, enabling the NodeMCU to easily drive LCD, Screen, OLED and
even VGA displays.
In the summer of 2015, the
original creators abandoned the firmware project and then a group of
independent contributors took over it. By the summer of 2016 the NodeMCU
included more than 40 different modules.
CHAPTER 3
ARDUINO
IDE
3.1 INTRODUCTION TO ARDUINO IDE :
In any programming
language, a program for Arduino hardware can be written with compilers that
generate binary machine code for the target processor. For their 8-bit AVR and
32-bit ARM Cortex-M based microcontrollers, Atmel offers a production
environment: AVR Studio (older) and Atmel Studio (newer).
Fig.3.1 : ARDUINO LOGO
INTEGRATED DEVELOPMENT
ENVIRONMENT :
The Arduino integrated development environment (IDE)
is a cross platform application for ( Windows, macOS, and Linux )
that is written in the programming language Java. It includes a code editor with
features such as text cutting and pasting, searching and replacing text,
automatic indenting, brace matching, and syntax highlighting, and provides
simple one click mechanisms to compile and upload programs to Arduino
board. It also contains a message area, a text console, a toolbar with buttons
for common functions and a hierarchy of operation means. The source code for
the IDE is released under the GNU General Public License, version 2. The
Arduino IDE supports the languages C , C++ using special rules of code
structuring.
3.2 BLYNK APPLICATION :
The Blynk Application is
a new platform that allows you to quickly build interfaces for controlling and
monitoring your hardware projects from your iOS and Android device. After
downloading the Blynk app, you can create a project dashboard and arrange
buttons, sliders, graphs, and other widgets onto the screen. Using the widgets,
you can turn pins on and off or display data from sensors.
Fig.3.3 : BLYNK
APPLICATION LOGO
Blynk supports
hardware platforms such as Arduino, Raspberry Pi, and similar microcontroller
boards to build hardware for your projects.
Fig.3.4 : Smart Home Architecture
It was designed for the IoT (Internet of Things) and is able to control
hardware remotely and store/display data from sensors for any desired
project. Blynk is ideal for people who don’t have the level of knowledge needed
to create a complex smartphone app, or who need fast IoT prototyping.
CHAPTER
4
HOME
AUTOMATION
4.1 BLOCK DIAGRAM :
The below block diagram
shows an overview of this project :
4.2 CIRCUIT DIAGRAM :
Fig.4.2 : CIRCUIT DIAGRAM OF HOME AUTOMATION
4.3 COMPONENTS :
4.3.1. NODEMCU
:
The NodeMCU is an
open-source based software and development board specially targeted for IoT
based Applications. The development board consist of
ESP8266 Wi-Fi enabled chip. It is a low-cost Wi-Fi chip developed board with
TCP/IP protocol. It has both
firmware and development board in which it includes software that runs on the
ESP8266 Wi-Fi SoC and hardware which is based on the ESP-12 module.
Fig.4.3 : NODEMCU
ESP8266 PINOUT
NODEMCU ESP8266 SPECIFICATIONS & FEATURES :
- Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
- Operating Voltage: 3.3V
- Input Voltage: 7-12V
- Digital I/O Pins (DIO): 16
- Analog Input Pins (ADC): 1
- UARTs = 1 , SPI’s = 1 , I2C’s = 1
- Flash Memory: 4 MB
- SRAM: 64 KB
- Clock Speed: 80 MHz
- USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
- PCB Antenna
- Small Sized module to fit smartly inside your IoT projects
NODEMCU BOARD PINOUT CONFIGURATION :
Pin Category |
Name |
Description |
Power |
Micro-USB, 3.3V, GND, Vin |
Micro-USB: NodeMCU can be powered through the USB port 3.3V: Regulated 3.3V can be supplied to this pin to power the board GND: Ground pins Vin: External Power Supply |
Control Pins |
EN, RST |
The pin and the button resets the
microcontroller |
Analog Pin |
A0 |
Used to measure analog voltage in the range
of 0-3.3V |
GPIO Pins |
GPIO1 to GPIO16 |
NodeMCU has 16 general purpose input-output
pins on its board |
SPI Pins |
SD1, CMD, SD0, CLK |
NodeMCU has four pins available for SPI
communication. |
UART Pins |
TXD0, RXD0, TXD2, RXD2 |
NodeMCU has two UART interfaces, UART0
(RXD0 & TXD0) and UART1 (RXD1 & TXD1). UART1 is used to upload the
firmware/program. |
I2C Pins |
|
NodeMCU has I2C functionality support but
due to the internal functionality of these pins, you have to find which pin
is I2C. |
BRIEF ABOUT NODEMCU ESP8266 :
The
NodeMCU
ESP8266 development board comes with the ESP-12E module containing ESP8266
chip having Tensilica Xtensa 32-bit LX106 RISC microprocessor. This
microprocessor supports RTOS and operates at 80MHz to 160 MHz adjustable clock
frequency. NodeMCU has 128 KB RAM and 4MB of Flash memory to store data and
programs. Its high processing power with in-built Wi-Fi / Bluetooth and Deep
Sleep Operating features make it ideal for IoT projects. NodeMCU can be powered
using Micro USB jack and VIN pin (External Supply Pin). It supports UART, SPI,
and I2C interface.
Fig.4.4 : ESP-12E MODULE WITH ESP8266 CHIP
APPLICATIONS OF NODEMCU :
- Prototyping of IoT devices
- Low power battery operated applications
- Network projects
- Projects requiring multiple I/O interfaces with Wi-Fi and Bluetooth functionalities.
4.3.2 RELAY :
The Relay is an electromechanical device that uses an
electric current to open or close the contacts of a switch. The
single-channel relay module is much more than just a plain relay, it comprises
of components that make switching and connection easier and act as indicators
to show if the module is powered and if the relay is active or not. The relay module is a separate
hardware device used for remote device switching. With it you can remotely
control devices over a network or the Internet. Devices can be remotely powered
on or off with commands coming from Clock Watch Enterprise delivered over a
local or wide area network. You can control computers, peripherals or
other powered devices from across the office or across the world. The Relay module can be used to sense
external ON/OFF conditions and to control a variety of external devices. The PC
interface connection is made through the serial port.
Fig.4.5 : RELAY
MODULE
The Single Channel Relay Module is a
convenient board which can be used to control high voltage, high current load
such as motor, solenoid valves, lamps and AC load. It is designed to interface
with microcontroller such as Arduino, PIC and etc. The relays terminal ( COM,
NO and NC ) is being brought out with screw terminal. It also comes with a LED
to indicate the status of relay.
SPECIFICATIONS :
- Digital output controllable
- Compatible with any 5V microcontroller such as Arduino.
- Rated through - current: 10A ( NO ) 5A ( NC )
- Control signal : TTL level
- Max. switching voltage 250VAC/30VDC
- Max. switching current 10A
- Size : 43mm x 17mm x 17mm
SINGLE-CHANNEL RELAY MODULE PIN DESCRIPTION :
Pin Number |
Pin Name |
Description |
1 |
Relay Trigger |
Input to activate the relay |
2 |
Ground |
0V reference |
3 |
VCC |
Supply input for powering the relay coil |
4 |
Normally Open |
Normally open terminal of the relay |
5 |
Common |
Common terminal of the relay |
6 |
Normally Closed |
Normally closed contact of the relay |
Table.4.2 : SINGLE – CHANNELRELAY MODULE PIN DESCRIPTION
SINGLE CHANNEL 5V RELAY MODULE :
Fig.4.6 : 5V SINGLE CHANNEL RELAY MODULE
The single-channel relay module is much more than just a plain relay, it contains components that make switching and connection easier and act as indicators to show if the module is powered and if the relay is active. First is the screw terminal block. This is the part of the module that is in contact with mains so a reliable connection is needed. Adding screw terminals makes it easier to connect thick mains cables, which might be difficult to solder directly.
The three connections on the terminal block are connected to the normally open, normally closed, and common terminals of the relay. The second is the relay itself, which, in this case, is a blue plastic case. Lots of information can be gleaned from the markings on the relay itself. The part number of the relay on the bottom says “05V DC”, which means that the relay coil is activated at 5V minimum – any voltage lower than this will not be able to reliably close the contacts of the relay. There are also voltage and current markings, which represent the maximum voltage and current, the relay can switch. For example, the top left marking says “10A 250VAC”, which means the relay can switch a maximum load of 10A when connected to a 250V mains circuit. The bottom left rating says “10A,30V DC”, meaning the relay can switch a maximum current of 10A DC before the contacts get damaged.
The relay status LED turns on whenever the
relay is active and provides an indication of current flowing through the relay
coil. The input jumper is used to supply power to the relay coil and LEDs. The
jumper also has the input pin, which when pulled high activates the relay. The
switching transistor takes an input that cannot supply enough current to
directly drive the relay coil and amplifies it using the supply voltage to
drive the relay coil. This way, the input can be driven from a microcontroller
or sensor output. The freewheeling diode prevents voltage spikes when the relay
is switched off. The power LED is connected to VCC and turns on
whenever the module is powered.
WORKING OF THE RELAY :
Fig.4.7 : WORKING OF
RELAY
The
relay uses an electric current to open or close the contacts of a
switch. This is usually done using the help of a coil that attracts the
contacts of a switch and pulls them together when activated, and a spring
pushes them apart when the coil is not energized. There are two advantages of
this system firstly, the current required to activate the relay is much smaller
than the current that relay contacts are capable of switching. Secondly,
coil and the contacts are galvanically isolated, means that there is no
electrical connection between them. This means that the relay can be used to
switch mains current through an isolated low voltage digital system like a
microcontroller.
INTERNAL CIRCUIT DIAGRAM FOR SINGLE CHANNEL RELAY :
Fig.4.8 : RELAY MODULE BASIC SCHEMATIC
The extra components apart from the relay are there
since it would not be possible to drive the relay directly from the pins of a
microcontroller. digital logic or a sensor. This is because, the coil
consumes much less current than the currents it can switch, it still needs
relatively significant current. Low power relays consume around 50mA while
higher power relays consume around 500mA. The coil is also an inductive load,
when the coil is switched OFF, a large fly back voltage is developed which can
damage the device turning it ON and OFF. For this, a fly back diode is added in
with anti-parallel to relay coil to clamp the fly back voltage. LED’s be added
to circuit, act as indicators, and even optical isolation is added to input to
improve the isolation.
USAGE OF SINGLE CHANNEL
RELAY :
Relay modules like this one are commonly used to
drive mains loads from a microcontroller like the Arduino or a sensor. In cases
like this, the common circuit diagram would be as follows
Fig.4.9 : POWERED
LOAD AND UNPOWERED LOAD
For simple ON / OFF
applications, the relay can be connected as shown above. One terminal of mains
is connected to common, and the other is connected to NO or NC depending on
whether the load should be connected/disconnected when the relay is active.
Fig.4.10 : RELAY CONNECTED TO MICROCONTROLLER AND MAIN
SOURCE
Check out the image below to see how the relay
module is connected to a microcontroller and mains source and load. The mains wiring is screwed to the terminal
block, and the microcontroller can be connected using jumper cables.
SINGLE CHANNEL RELAY MODULE
APPLICATIONS :
- Mains switching
- High current switching
- Isolated power delivery
- Home automation
4.3.3 STANDARD
MICRO USB CABLE :
Micro-USB
used to be the most common USB port and is still found on many older models.
This type of connection allows data to be read without needing a
computer. This is connected between the nodemcu to the laptop where we
dumb the code in nodemcu with the help of Arduino IDE Software.
4.4 WORKING PRINCIPLE :
In this project, we are going to build a home automation like controlling light system using the Wi-Fi network or Internet mobile data. By this we are able to control our home light from anywhere in the world. There are three main components used that is Android Blynk app, Wi-Fi in-built Node MCU and single channel relay module. The designing methodology of the system has two major portions software design and hardware design. The software is designed by installing the Arduino IDE software in desktops. Arduino IDE software acts as the interface between software and hardware of this project. Microcontroller needs a program to operate and execute the process associated with proposed design. It is easy to verify and compile after writing the code. After Installing we need to add NodeMCU board in the board’s manager and blynk library. The hardware is designed by arranging microcontroller, relay and blub as shown in the circuit diagram where the D1 pin of NodeMCU is connected to input pin of relay , ground to ground and 3V3 pin of NodeMCU is connected to the Vcc pin of relay. On the other side, the bulb is connected to relay and power socket as shown in the circuit diagram. The power can be either given through laptop or by power bank after dumbing the programming code in NodeMCU. Once the connection is done you can operate and control it with the help of blynk application via mobile phone. The software design which includes programming that is written and uploaded in the microcontroller. Here blynk is a platform with iOS and android apps, provides widgets to display data received from NodeMCU and control output signals (to control loads) from NodeMCU to the circuits. Blynk mobile application in smartphone and NodeMCU communicate by using Blynk server. Bidirectional transfer of data between NodeMCU and mobile app occurs through this server. NodeMCU is the central co-coordinator. This microcontroller has in-built support for Wi-Fi connectivity which allows it to send and receive data from mobile application via internet server. It reads the data and sends them to mobile application and receives commands from mobile application to control home appliances. It then drives the relay-module to control the appliances. The Android Blynk app sends the serial data to the Wi-Fi Node MCU by clicking ON button. The Wi-Fi Node read the input data and process it according to program uploaded inside it and generate the output to relay module. The output signal from NodeMCU activates and deactivates the relay to perform switching operation. When the Blynk app's button turns on, it turns ON the home light, and when the Blynk app's buttons turns OFF, it turns OFF the home light. Hence by this way we can control any household appliances from anywhere.
4.5 SOFTWARE :
This
project is running by Blynk application. Download the Blynk App in the smart
phone and create an account by email id. Now create a new project by creating
its name, connection type and the hardware ESP8266 boar. An Auth Token will be
sent to your registered email.
Fig.4.12 : TO CREATE NEW PROJECT IN BLYNK APP
Now add a button and set the settings of it by giving output pin, name of the button and labels that is ON/OFF. Set the pin from low to high.
Fig.4.13 : TO ADD BUTTONS AND LABELS WITH OUTPUT PIN
Install
Arduino IDE software in laptop. To code NodeMCU via Arduino IDE, the NodeMCU board needs
to be added to Arduino IDE 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).
Fig.4.15 : INSTALLATION OF ESP-12E MODULE
When NodeMCU is added to
Arduino IDE Boards, now download the latest Blynk library and add it to
program. If the Blynk libraries are not able to be added in your program then,
extract it and paste all the directories in Arduino libraries C:\Program
Files\Arduino\libraries.
Fig.4.16 : INSTALLATION OF BLYNK LIBRARY
Now you can see the blynk
library which is added and then select the board NodeMCU in it
Fig.4.17 : SELECTION OF NODEMCU BOARD
4.6 PROGRAM :
#define BLYNK_PRINT
Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go
to the Project Settings (nut icon).
char auth[] = "YourAuthToken"; [
Enter the here token which is sent to mail ]
// Your
Wi - Fi credentials.
// Set
password to "" for open networks.
char ssid[] = "YourNetworkName"; [ Enter your connection Id ]
char pass[] =
"YourPassword"; [ Enter your connection password ]
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass,
"blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass,
IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
}
4.7 ADVANTAGES :
- Smart lights are usually controlled by smart phones or tablet via an app be it an IOS or Android operating system. It can also be connected directly to the Wi-Fi connection or to any phone via Bluetooth. Managing all of your home devices from one place. The convenience factor here is enormous. Being able to keep all of the technology in your home connected through one interface is a massive step forward for technology and home management. Theoretically, all you’ll have to do is learn how to use one app on your smartphone and tablet, and you’ll be able to tap into countless functions and devices throughout your home.
- The main advantage of smart lighting is that it is Wi-Fi enabled, it can be controlled from anywhere. You don’t need to walk to switch and turn ON the light. It is effective in terms of energy efficiency purpose. Switching ON and OFF any light with just one tap on your smart phone’s screen flexibly. Smart home systems tend to be wonderfully flexible when it comes to the accommodation of new devices and appliances and other technology. No matter how state-of-the-art your appliances seem today, there will be newer, more impressive models developed as time goes on.
- The movement when sensors are installed with smart lighting, it can enhance the security of your home to the whole new level. Sensors will detect any motion performed in its range and turn ON alarm whether you are at home or not. It also increases energy efficiency depending on how you use your smart-home technology, it’s possible to make your space more energy-efficient. For instance, you can have more precise control over the heating and cooling of your home with a programmable smart thermostat that learns your schedule and temperature preferences. Lights and motorized shades can be programed to switch to an evening mode as the sun sets, or lights can turn on and off automatically when you enter or leave the room, so you never have to worry about wasting energy.
4.8 DISADVANTAGES :
- In this, Internet is the main platform. But this project/method cannot be applicable when there is no internet.
- High Requirement for maintaining device compatibility.
- Devices must constantly be updated.
- Lack of Privacy
4.9 APPLICATIONS :
The versatility of IoT has
become very popular in recent years. There are many advantages to having a
device based on IoT. Mckinsey Global Institute reports that IoT business
will reach 6.2 trillion in revenue by 2025. There are lots of
applications are available in the market in different areas.
1)
IoT Applications in Agriculture :
For indoor planting, IoT
makes monitoring and management of micro-climate conditions a reality, which in
turn increases production. For outside planting, devices using IoT technology
can sense soil moisture and nutrients, in conjunction with weather data, better
control smart irrigation and fertilizer systems. If the sprinkler systems
dispense water only when needed, for example, this prevents wasting a precious
resource.
2)
IoT Applications in Consumer Use
:
For the private
citizen, IoT devices in the form of wearables and smart homes make life easier.
Wearables cover accessories such as Fitbit, smartphones, Apple watches, health
monitors, to name a few. These devices improve entertainment, network
connectivity, health, and fitness.
Smart homes take care of
things like activating environmental controls so that your house is at peak
comfort when you come home. Security is made more accessible as well, with the
consumer having the ability to control appliances and lights remotely, as well
as activating a smart lock to allow the appropriate people to enter the house
even if they don’t have a key.
3)
IoT Applications in Healthcare
:
First and foremost, wearable IoT devices let
hospitals monitor their patients’ health at home, thereby reducing hospital
stays while still providing up to the minute real-time information that could
save lives. In hospitals, smart beds keep the staff informed as to the
availability, thereby cutting wait time for free space. Putting IoT sensors on
critical equipment means fewer breakdowns and increased reliability, which can
mean the difference between life and death. Elderly care becomes more significantly
comfortable with IoT. In addition to the above-mentioned real-time home
monitoring, sensors can also determine if a patient has fallen or is suffering
a heart attack.
4)
IoT Applications in Insurance
:
Even the insurance industry
can benefit from the IoT revolution. Insurance companies can offer their
policyholders discounts for IoT wearables such as Fitbit. By employing fitness
tracking, the insurer can offer customized policies and encourage healthier habits,
which in the long run, benefits everyone, insurer, and customer alike.
5)
IoT Applications in Manufacturing
:
The world of
manufacturing and industrial automation is another big winner in the IoT
sweepstakes. RFID and GPS technology can help a manufacturer track a product
from its start on the factory floor to its placement in the destination store,
the whole supply chain from start to finish. These sensors can gather
information on travel time, product condition, and environmental conditions
that the product was subjected to.
Sensors attached
to factory equipment can help identify bottlenecks in the production line,
thereby reducing lost time and waste. Other sensors mounted on those same
machines can also track the performance of the machine, predicting when the
unit will require maintenance, thereby preventing costly breakdowns.
6)
IoT Applications in Retail :
IoT
technology has a lot to offer the world of retail. Online and in-store shopping
sales figures can control warehouse automation and robotics, information
gleaned from IoT sensors. Much of this relies on RFIDs, which are already in
heavy use worldwide.
Mall
locations are iffy things; business tends to fluctuate, and the advent of
online shopping has driven down the demand for brick-and-mortar establishments.
However, IoT can help analyse mall traffic so that stores located in malls can
make the necessary adjustments that enhance the customer’s shopping experience
while reducing overhead.
Speaking
of customer engagement, IoT helps retailers target customers based on past
purchases. Equipped with the information provided through IoT, retailer could
craft Even the insurance industry can benefit from the IoT
revolution. Insurance companies can offer their policyholders discounts for IoT
wearables such as Fitbit. By employing fitness tracking, the insurer can offer
customized policies and encourage healthier habits, which in the long run, benefits
everyone, insurer, and customer alike.
7)
IoT Applications in Transportation
:
By this time, most people have heard about
the progress being made with self-driving cars. But that’s just one bit of the
vast potential in the field of transportation. The GPS, which, if you think of
it, is another example of IoT, is being utilized to help transportation
companies plot faster and more efficient routes for trucks hauling freight,
thereby speeding up delivery times.
There’s already significant progress
made in navigation, once again alluding to a phone or car’s GPS. But city
planners can also use that data to help determine traffic patterns, parking
space demand, and road construction and maintenance. There’s even a possibility
that apps can be made that can prevent a car from starting if the driver is
inebriated.
By this time, most people have heard
about the progress of being made with self-driving cars. But that’s just one
bit of the vast potential in the field of transportation. The GPS, which, if
you
There’s already significant progress
made in navigation, once again alluding to a phone or car’s GPS. But city
planners can also use that data to help determine traffic patterns, parking
space demand, and road construction and maintenance. There’s even a possibility
that apps can be made that can prevent a car from starting if the driver is
inebriated.
8)
IoT Applications in Energy :
IoT sensors can be employed to monitor
environmental conditions such as humidity, temperature, and lighting. The
information provided by IoT sensors can aid in the creation of algorithms that
regulate energy usage and make the appropriate adjustments, eliminating the
human equation.
With IoT-driven
environmental control, businesses and private residences can experience significant
energy savings, which in the long run, benefits everyone, including the
environment.
On a larger scale, data gathered by the Internet of Things can be used to help run municipal power grids more efficiently, analysing factors such as usage. Also, the sensors can help pinpoint outages faster, thereby increasing the response time of repair crews and decreasing blackout times.
RESULT
This project has operated using both Wi-Fi as well as Mobile Data.
FUTURE SCOPE
Internet of Things (IoT) is proved to be an emerging technological innovation. It has emerged as a leading technology around the world. It has gained a lot of popularity in lesser time. Also, the advancements in Artificial Intelligence and Machine Learning have made the automation of IoT devices easy. Basically, Artificial Intelligence (AI) and Machine Learning (ML) programs are combined with IoT devices to give them proper automation. Due to this, IoT has also expanded its area of application in various sectors. In future the IoT seems to be have a very bright as this is feeding and empowering Data Science and Artificial Intelligence in a big way. Data from IoT networks enables us to have better tracking, monitoring, prediction, management and control of various systems in healthcare, automotive and agriculture industries.
CONCLUSION
Based on the results of analysis of all data obtained by testing the smart home with the Internet of Things based NodeMCU ESP6288 module, the following conclusions can be drawn:
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.
2)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.