You are on page 1of 30

CHAPTER 1

INTRODUCTION

1.1 INTERNET OF THINGS


The Internet of things is the network of physical devices, vehicles, home
appliances, and other items embedded with electronics, software, sensors, actuators,
and network connectivity which enable these objects to collect and exchange data.
Each thing is uniquely identifiable through its embedded computing system but is able
to inter operate within the existing Internet infrastructure.
The IoT allows objects to be sensed or 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 in addition to reduced human intervention.
When IoT is augmented with sensors and actuators, the technology becomes
an instance of the more general class of cyberphysical systems, which also
encompasses technologies such as smart grids, virtual power plants, smart homes,
intelligent transportation and smart cities.

1.1.1 Things under Control


"Things", in the IoT sense, can refer to a wide variety of devices such as heart
monitoring implants, biochip transponders on farm animals, cameras streaming live
feeds of wild animals in coastal waters, automobiles with built-in sensors, DNA
analysis devices for environmental,food,pathogen monitoring, or field operation
devices that assist firefighters in search and rescue operations. Legal scholars suggest
regarding "things" as an "inextricable mixture of hardware, software, data and
service".
2

1.1.2 Application of Internet of Things


Internet of Things is widely used in industry and home and everywhere around
the world. The quick expansion of Internet-connected objects is also expected to
generate large amounts of data from diverse locations, with the consequent necessity
for quick aggregation of the data, and an increase in the need to index, store, and
process such data more effectively.
 Smart homes
 Wearables
 Smart city
 Smart grid
 Smart farming
 Industrial monitoring

1.2 OVERVIEW OF HOME AUTOMATION SYSTEM


Homes of the 21st century will become more and more self-controlled and
automated to the comfort it provides, especially when employed in a private home. A
home automation system is a means that allow users to control electric appliances of
varying kind.
Many existing, well-established home automation systems are based on wired
communication. This does not pose a problem until the system is planned well in
advance and installed during the physical construction of the building. Butfor already
existing buildings the implementation cost goes very high.
In contrast, Wireless systems can be of great help for automation systems.
With the advancement of wireless technologies such as Wi-Fi, cloud networks in the
recent past, wireless systems are used every day and everywhere.
Home automation involves introducing a degree of computerized or automatic control
to certain electrical and electronics system in a building. The lighting, temperature
control, gas monitoring, motor control demonstrate a simple home automation system
which contains a remote mobile host controlled several client module (home
appliances). The client modules communicate with host controllers through a wireless
devices such as a Wi-Fi enabled mobile phone, in this case android based smart
phones.
3

1.2.1 Advantages of Home Automation Systems


In recent years, wireless systems like Wi-Fi have become more and more
common in home networking. Also in home and building automation systems, the use
of wireless technologies gives several advantages that could not be achieved using a
wired network only.
 Reduced installation costs
First and foremost, installation costs are significantly reduced since no
cabling is necessary. Wired solutions require cabling, where material as well as the
professional laying of cables (e.g. into walls) is expensive.
 System scalability and easy extension
Deploying a wireless network is especially advantageous when, due to
new or changed requirements, extension of the network is necessary. In contrast to
wired installations, in which cabling extension is tedious. This makes wireless
installations a seminal investment.
 Aesthetical benefits
Apart from covering a larger area, this attribute helps to full aesthetical
requirements as well. Examples include representative buildings with all-glass
architecture and historical buildings where design or conservatory reasons do not
allow laying of cables.
 Integration of mobile devices
With wireless networks, associating mobile devices such as PDAs and
Smartphones with the automation system becomes possible everywhere and at any
time, as a device's exact physical location is no longer crucial for a connection.
For all these reasons, wireless technology is not only an attractive
choice in renovation and refurbishment, but also for new installations.

1.3 ANDROID APPLICATION


A free, open source mobile platform and a Linux-based, multiprocess,
multithreaded Operating System.Android Application usage is the easiest to use but
powerful app/device usage management app.To make an APK file, a program for
Android is first compiled, and then all of its parts are packaged into one file. Android
application used to connect for a cloud and access in a home application using
nodemcu with Wi-Fi module.
4

1.3.1 Key Features


It provides the following key features

 Show App Usage History

Gather the usage time about apps that you used.

  Check Phone History

Gather counts of you checked the phone.

  Show Activity History

Gather the time that you open apps.

  Over-Use Reminder

Remind when you spend on phone or apps for a long time.

 Most Used Apps 

Show most used apps on widgets or a notification.

 Track All Installs

Keep track of all installs and uninstalled apps.

  App Install Reminder

Notify when apps installed and the summary of daily installed apps.

  Manage Apps

1-tap to uninstall apps, sort apps by various options.

CHAPTER 2

LITERATURE REVIEW

2.1 INTRODUCTION
5

Automation performs an increasingly vital role in daily experience and global


economy. Engineers strive to combine automated devices with mathematical and
organizational tools to create complex systems for a rapidly expanding range of
applications and human activities. The concept of home automation has been around
since the late 1970s. But with the enhancement of technology and smart services,
people’s expectations have changed a lot during the course of time to perfectly turn
the traditional house into smart home, and also think that what a home should do or
how the services should be provided and accessed at home to became a smart home
and so has the idea of home automation systems.

2.2 SUMMARY AND FINDINGS


The aim of this project was to build a home automation system so that the
householder could control the appliances into their house with a mobile application,
from the office or even the other side of the world, and control their home appliances.

The following summaries gives a detailed report on home automation system


with various application based usage such as ARM, Bluetooth, Adrinuo UNO and
Nodemcu models.

The devices were controlled with various sensors and actuators .It was
continuously monitored and controlled using Internet.

Some of the literatures review named Home Automation Using Internet of


Things by Vinay Sagar K N,Home Security SystemBased on Sensors and IoT
byNidhi Sharma, Design and Implementation of Automated Door Accessing System
With Face Recognition by M.Karanjkar, IoT Based Home Alert System Using Wi-Fi
and Cloud Technologies by Dr. SRN Reddy, ARM Based Automation System by
Vijay P. Jadhao,
and Smart Home Automation System byBulbul Bhaskar and R. Swarnalatha.
2.2.1 Home Automation Using Internet of Things
Vinay Sagar K N et al. [1] proposed a system that uses computers or mobile
devices to control basic home functions and features automatically through internet
from anywhere around the world, an automated home is sometimes called a smart
home. It is meant to save the electric power and human energy. The home automation
system differs from other system by allowing the user to operate the system from
6

anywhere around the world through internet connection. In this proposed system, a
Home Automation system(HAS) using Intel Galileo was presented and that employs
the integration of cloud networking, wireless communication, to provide the user with
remote control of various lights, fans, and appliances within their home and storing
the data in the cloud.
The system will automatically change on the basis of sensors data and
allowing a variety of devices to be controlled. Home automation system means that
allow users to control electric appliances of varying kind. The proposed system is a
distributed home automation system, consists of server, sensors. Server controls and
monitors the various sensors, and can be easily configured to handle more hardware
interface module (sensors).Wi-Fi is chosen to improve system security (by using
secure Wi-Fi connection), and to increase system mobility and scalability. The
temperature and the motion detection are stored in cloud for analysis.
If the temperature exceeds the threshold level then the cooler will turn on
automatically and it will off when the temperature comes to control. HTML is a
format that tells a computer how to display a web page. The documents themselves
are plain text files with special "tags" or codes that a web browser uses to interpret
and display information on your computer screen. The designed system not only
monitors the sensor data, like temperature, gas, light, motion sensors, but also actuates
a process according to the requirement, for example switching on the light when it
gets dark.

It also stores the sensor parameters in the cloud (Gmail) in a timely manner.
This will help the user to analyze the condition of various parameters in the home
anytime anywhere.

2.2.2 Home Security System Based on Sensors andIoT

Nidhi Sharma et al. [2] Security is the main concern of the world now days.
Sensor based home security system are the high technology and methodical systems
which connect wirelessly and ensure real time operation and indication of the threat to
the house. The idea of comfortable living in home has changed since the past decade
as digital, vision and wireless technologies are integrated into it. Now-a-days internet
plays a major role in every area, so integrating sensors technology with an IOT
7

environment could resolve the security issues of society to a great extent. The system
is cost effective, reliable and has low power consumption. Smart home security has
become absolutely pre-eminent in daily life of household and industrial works.

Home security is something that is applicable to all of us and involves the


hardware and a personal security practice. The hardware would be the doors, alarms,
lock systems and different type of sensors like IR sensor, LDR sensor, acoustic sensor
etc. to detect unfavorable condition. In case of personal security practice involving
doors locking, activating alarms, closing the windows and many other daily life tasks
are performed to prevent a burglary. In the present time a lot of unsolicited activities
like theft are increasing continuously so there is need to modify the functionality of
existing security systems. The application of this system is quite useful when people
get to know about the remote intrusions in their house or if there is some undesired
event when they are not at their place. The system has two parts: wireless sensor
nodes and IoT.

Fire and IR sensors are digital sensors. Water and LPG (MQ2) sensors are
analog sensors. This system is concerned about overall security of the house and
includes circuitry which in worse case (accidents) automatically sense the situation
and sends the emergency message on the website, which is easily accessed by security
guard/security firm/owner or individual. The extensive capabilities of this system are
those, which makes it so interesting. The system is user friendly and reliable. The 8
product will have a simplistic design making it users can easily interact with the
system.

2.2.3 Design and Implementation of Automated Door Accessing System With


Face Recognition

Prof.M.Karanjkar et al. [3] proposed system to help users for improvement of


the door security of sensitive locations by using face detection and recognition. Face
is a complex multidimensional structure and needs good computing techniques for
detection and recognition. This paper is comprised mainly of three subsystems:
namely face detection, face recognition and automatic door access control. Face
detection is the process of detecting the region of face in an image.
8

The face is detected by using the viola-Jones method and face recognition is
implemented by using the Principal Component Analysis (PCA). Face Recognition
based on PCA is generally referred to as the use of Eigen faces. If a face is
recognized, it is known, else it is unknown. The door will open automatically for the
known person due to the command of the microcontroller. On the other hand, alarm
will ring for the unknown person.

Since PCA reduces the dimensions of face images without losing important
features, facial images for many persons can be stored in the database. Although
many training images are used, computational efficiency cannot be decreased
significantly. Therefore, face recognition using PCA can be more useful for door
security system than other face recognition schemes.

Nowadays, automatic personal identification in access control has become


popular by using biometrics data instead of using cards, passwords or pattern. Most of
the biometrics data have to be collected by using special hardware such as fingerprint
scanner, palm print scanner, DNA analyzer. And, 7 the target objects have to touch
with the required hardware in the stage of data collection. The advantage of this
system is that face recognition does not require to be touched with any touched
with ,hardware. Face is detected automatically by using face detection technique and
the entire face recognition is completed without touching with any hardware.

2.3.4 IoT Based Home Alert System Using Wi-Fi and Cloud Technologies

Dr. SRN Reddy et al. [4] proposed a system to design a budget homeSecurity
system based on wireless sensor network using Wi-Fi and Cloudtechnologies. It can
detect the theft, fire, leakage of gas or smoke and sends anautogenerated email
remotely to intimate the owner. A majority of home ownerssimply do not have
sufficient funds to pay for a professionally installed securitysystem.
The use of this Home Alert System in this paper is affordable and easy
toinstall. It has the ability to activate/deactivate and will automatically open or close
thedoor for the user. Microcontroller ATMEL 168, PIR sensor is used to detect
themotion of doors or windows. Vibration sensor is used when movement or
9

vibrationoccurs, the unstable portion of the circuit moves and breaks the current flow,
whichproduces an alarm. A Numeric keypad is used for authorization and the
failedauthorization results in an alarm. In case of any fire or high temperature then
itintimates the user about the abnormal condition of the environment of his house.
Thisis very user friendly, which is very easy to use and it doesn’t need any
expertise tooperate. It has made the use of latest technologies like Wi-Fi and cloud
which hasreplaced the GSM technology, which incorporates a very high cost, RF and
Bluetoothtechnologies which were used only for short distance. The proposed Home
AlertSystem provides a remote access to home from anywhere by just login into your
cloudaccount. You can also track the previous information at a particular date,
time,location stored in cloud. This system has tried to solve almost every problems
relatedto the security of homes and it asserts.

2.2.5 ARM Based Automation System


Vijay P. Jadhao eq.al [5], present the ARM based automation system that can
monitor and control home appliances and able to establish successful communication
with unknown outdoor person or visitor. This system not only provides Smart Home
automation as well as it provides smart communication system which provides
communication with unknown visitors visiting home. In the first phase i.e. Smart
Home automation system phase commands received from user cell phone and present
sensor conditions, microcontroller system send signal through its ports to switch
ON/OFF appliances like light, fan, siren etc was done. But in the second phase
presents incorporated features to establish successful communication with unknown
visitors visiting home.
In this phase doorbell switch acts as a mediator that is when no one at home,
after some prespecified delay, call will be established with user through cell phone
10

this new feature provides a user opportunity to establish communication and avoid
any losses or event due to no contact at all. ARM LPC-2148 Microcontroller and cell
phone can make possible Smart home automation.
2.2.6 Smart Home Automation System
Bulbul Bhaskar and R. Swarnalatha eq.al [4], presents smart home automation
system using AVR microcontroller. This system incorporates with sensors,
microcontroller and Bluetooth module to provide automation capability to various
household activities. An AVR microcontroller offers high performance and flexibility
for controlling various appliances. This system can monitor the changes in
temperature, lighting, detect fire and keep a check on the safety of the house.

2.3 CONCLUSION

A home automation system means to grant the end users to manage and handle
the electric appliances. If we look at different home automation systems over time,
they have always tried to provide efficient, convenient, and security ways for home
inhabitants to access their homes. Regardless of the change in user’s hope, growing
technology, or change of time, the appearance of a home automation system has
remained the same.
11

CHAPTER 3

METHODOLOGY

3.1 INTRODUCTION

In the present work, the home security system is done with the help of
different type of sensors connected with NodeMCU kit. This section deals with the
technical terms associated with NodeMCU and also included the design, fabrication
part and details of the home automation system. This chapter also explains about the
software details related to cloud and android application which is developed using
Appy pie platform.

3.2 TECHNICAL DETAILS OF NODEMCU

3.2.1 NodeMCU

NodeMCU is an open source IoT platform. It includes firmware which runs on


the ESP8266 Wi-Fi SoC from Express if Systems, and hardware which is based on
the ESP-12 module.

Figure.3.2.1 Pin Diagram of NodeMCU


12

3.2.2Pin Details of NodeMCU

NO PIN NAME FUNCTION

1 A0 Analog input in voltage


2 RSV Reset voltage
3 RSV Reset voltage
4 SD3
5 SD2
6 SD1
7 CMD Command
8 SD0
9 CLK Clock signal
10 GND Ground
11 3V3
12 EN Enable input
13 RST Reset
14 GND Ground
15 Vin Input voltage in volts
16 D0 Digital input / output
17 D1 Digital input / output
18 D2 Digital input / output
19 D3 Digital input / output
20 D4 Digital input / output
21 3V3
22 GND Ground
23 D5 Digital input / output
24 D6 Digital input / output
25 D7 Digital input / output
26 D8 Digital input / output
27 RX Receiver signal
28 TX Transmitter signal
29 GND Ground
30 3V3
13

3.3 RELAY
A relay is an electrically operated switch. Many relays use number of
electromagnets to mechanically operate a switch, but other operating principles are
also used, such as solid-state relays.

Relays are used where it is necessary to control a circuit by a separate low-


power signal, or where several circuits must be controlled by one signal. Relays were
used extensively in early computers to perform logical operations.

3.3.1 Four Channel Relay


The figure 3.3.1 is a LOW Level 5V 4-channel relay interface board, and each
channel needs a 15-20mA driver current. It is equipped with high-current relays that
work under AC250V 10A or DC30V 10A. This module is optically isolated from high
voltage side for safety requirement and also prevent ground loop when interface to
microcontroller.

Figure 3.3.1 Pictorial representation of Four channel relay

 Relay Maximum output: DC 30V/10A, AC 250V/10A.

 4 Channel Relay Module with Opto-coupler. LOW Level Trigger


expansion board, which is compatible with Arduino control board.
14

 Standard interface that can be controlled directly by microcontroller

( 8051, AVR, *PIC, DSP, ARM, ARM, MSP430, TTL logic, Arduino,
NodeMCU).

 Relay of high quality low noise relays SPDT. A common terminal, a


normally open, one normally closed terminal.

 Opto-Coupler isolation, for high voltage safety and prevent ground


loop with microcontroller.

3.3.3 Schematic Diagram of Four Channel Relay

Fundamentally this is four separate circuits on one board.  Other than


sharing VCC and ground, the channels are isolated from one another.When you need
to drive a large power load, you can take the jumper cap off and connect an extra
power to RY-VCC to supply the relay to connect VCC to 5V of the MCU board to
supply input signals. . This will supply power to the transistor drivers and relay coils.
If relay isolation is enough for your application, connect power supply +5V and Gnd.

Figure 3.3.3 Schematic diagram of four channel relay


15

3.4 TEMPERATURE SENSOR

Figure 3.4 Pictorial representation of Temperature Sensor

3.4.1 Pin details of LM35

Pin No Function Name

1 Supply voltage; 5V (+35V to -2V) Vcc

2 Output voltage (+6V to -1V) Output

3 Ground (0V) Ground

3.4.2 Pin description

Vcc - Input voltage is +5V for typical applications.

Analog Out - There will be increase in 10mV for raise of every 1’C. Can
range from -1V(55’C) to 6V(150’C)

Ground - Connected to ground of circuit


16

3.5 GAS SENSOR

Figure 3.5 Pictorial representation of Gas sensor

3.5.1 Pin configuration of Gas sensor

3.6 ARDUINO SOFTWARE IDE

Figure 3.4 Photography of the software Arduino IDE


17

A program for Arduino may be written in any programming language with


compilers that produce binary machine code for the target processor. Atmel provides
a development environment for their microcontrollers, AVR Studio and the newer
Atmel Studio.

The Arduino project provides the Arduino integrated development


environment (IDE), which is a cross-platform application written in the programming
language Java. It originated from the IDE for the languages Processing and Wiring. 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 an Arduino
board. It also contains a message area, a text console, a toolbar with buttons for
common functions and a hierarchy of operation menus.

A program written with the IDE for Arduino is called a sketch. Sketches are
saved on the development computer as text files with the file extension .ino. Arduino
Software (IDE) pre-1.0 saved sketches with the extension .pde.

The Arduino IDE supports the languages C and C++ using special rules of


code structuring. The Arduino IDE supplies a software library from
the Wiring project, which provides many common input and output procedures. User-
written code only requires two basic functions, for starting the sketch and the main
program loop, that are compiled and linked with a program stub main into an
executable cyclic executive program with the GNU toolchain, also included with the
IDE distribution. The Arduino IDE employs the program avrdude to convert the
executable code into a text file in hexadecimal encoding that is loaded into the
Arduino board by a loader program in the board's firmware.

3.5 ESP-01 ESP8266 MODULE

ESP-01 is the one of the most popular ESP8266 module available in the
market. ESP8266 is a self containedSoC with integrated TCP/IP stack which helps
any microcontroller having UART to access a wifi network. It can act as both WiFi
18

access point as well as a WiFi client. It is pre-programmed with AT commands, so we


can easily access and configure it using a microcontroller.

Figure 3.5 ESP-01 ESP8266 MODULE

ESP8266 runs on 3.3V and its input pins are not 5V tolerant. So we need to
reduce the 5V output of the Arduino Tx pin to 3.3V by using voltage dividing
resistors to connect to Rx pin of ESP8266 module. Arduino TTL input pins will detect
3.3V as logic high, so we can directly connect 3.3V output of ESP8266 Tx to Arduino
Rx pin.
19

CHAPTER 4

RESULT AND DISCUSSION

4.1 CIRCUIT DIAGRAM AND EXPLANATION

First we can connect ESP8266 with the Arduino Uno. The ESP8266 runs on
3.3V, it may damage if you connect it directly to 5V from Arduino. Connect the VCC
and CH_PD of the ESP8266 to the 3.3V output pin of Arduino. CH_PD is Chip
Power Down pin, which is active low. So we will give 3.3V to it, which will enable
the chip. Then connect the TXD pin of the ESP8266 with the digital pin 2 of the
Arduino. Then make a voltage divider to make 3.3V for the RXD of the ESP8266
which is connected to the pin 3 of Arduino. Here we are using software UART
through digital pins 2 & 3 of Arduino. Lastly, connect the ground of the ESP8266
with the ground of the Arduino.
20

Figure 4.1 Basic layout of Home Automation

Now we can connect relays to Arduino. Connect three relays to pins 11, 12
and 13 of the Arduino. Also connect 5V and ground from the Arduino to power the
relay. Note that here I am using relay modules which having built in transistor driver.
So don’t forget to add driver when you are using bare relays. We can connect AC
devices to the output terminals of those relays. First connect one wire (Phase) of the
AC source with the common terminal (COM) of all relays and the second wire
(Neutral) of AC source to one terminal of AC devices. Then connect the other
terminal of AC devices to the NO (Normally Open) terminal of relays.
21

4.2 PROGRAM

A most of the Iot using any automation by software coding (program) used.
A Arduino program used to control for the home application. The light, fan and
motor controlled by Arduino code used. A following Arduino pin used to control.

 Pin 11 is control to the light

 Pin 12 is control to the fan

 Pin 13 is control to the motor

4.2.1 Arduino Sketch

#include <SoftwareSerial.h> //Including the software serial library

#define DEBUG true

SoftwareSerialesp8266(2,3); // This will make the Arduino pin 2 as the RX pin


and Arduino pin 3 as the TX. Software UART

/* So you have to connect the TX of the esp8266 to the pin 2 of the Arduino
and the TX of the esp8266 to the pin 3 of the Arduino. This means that you
need to connect the TX line from the esp to the Arduino's pin 2 */

void setup()

Serial.begin(9600); // Setting the baudrate to 9600

esp8266.begin(9600); // Set it according to your esp’sbaudrate. Different


esp’s have different baud rates.

pinMode(11,OUTPUT); // Setting the pin 11 as the output pin for light.

digitalWrite(11,LOW); // Making it low.


22

pinMode(12,OUTPUT); // Setting the pin 12 as the output pin for fan.

digitalWrite(12,LOW); // Making pin 12 low.

pinMode(13,OUTPUT); // Setting the pin 13 as the output pin for motor.

digitalWrite(13,LOW); // Making pin 13 low.

sendData("AT+RST\r\n",2000,DEBUG); //This command will reset


module to default

sendData("AT+CWMODE=2\r\n",1000,DEBUG); // This will configure


the mode as access point

sendData("AT+CIFSR\r\n",1000,DEBUG); // This will get ip address


and will show it

sendData("AT+CIPMUX=1\r\n",1000,DEBUG); // This will configure the


ESP8266 for multiple connections

sendData("AT+CIPSERVER=1,80\r\n",1000,DEBUG); // This will set the


server on port 80

void loop()

if(esp8266.available()) // Checking that whether the esp8266 is sending a


message or not (Software UART Data)

if(esp8266.find("+IPD,"))

delay(1000); // Waiting for 1 sec

intconnectionId = esp8266.read()-48; // Subtracting 48 from the character to


get the number.
23

esp8266.find("pin="); // Advancing the cursor to the "pin="

intpinNumber = (esp8266.read()-48)*10; // Getting the first number which is


pin13

pinNumber += (esp8266.read()-48); // This will get the second number.


For example, if the pin number is 13 then the 2nd number will be 3 and then
add it to the first number

digitalWrite(pinNumber, !digitalRead(pinNumber)); // This will toggle the pin

// The following commands will close the connection

String closeCommand = "AT+CIPCLOSE=";

closeCommand+=connectionId;

closeCommand+="\r\n";

sendData(closeCommand,1000,DEBUG); // Sending the data to the


ESP8266 to close the command

String sendData(String command, constint timeout, boolean debug) //


Function to send the data to the esp8266

String response = "";

esp8266.print(command); // Send the command to the ESP8266

longint time = millis();

while( (time+timeout) >millis()) // ESP8266 will wait for some time for the
data to receive

{
24

while(esp8266.available()) // Checking whether ESP8266 has received the


data or not

char c = esp8266.read(); // Read the next character.

response+=c; // Storing the response from the ESP8266

if(debug)

Serial.print(response); // Printing the response of the ESP8266 on the


serial monitor.

return response;

4.2.2 Explanation
First we will initialize the software art with digital pins 2 & 3 of Arduino for
the communication with ESP8266. After that we will initialize pins to which we will
connect relays as output pins. Then we will configure ESP8266 in access point mode.
Arduino + ESP8266 is programmed as a web server such that we can control those
relays through a web browser.
4.2.3 HTML Code
<html>

<head>

<title>Home Automation System</title>  <!-- This will be the page title -->

</head>

<body><!-- All the data in it will be shown on the page -->


25

<button id="11" class="led">Toggle Pin 11</button><!-- This will create the


button for pin 11 by control to the light-->

<button id="12" class="led">Toggle Pin 12</button><!--  This will create the


button for pin 12 by control to the fan-->

<button id="13" class="led">Toggle Pin 13</button><!--  This will create the


button for pin 13 by control to the motor-->

<scriptsrc="jquery.min.js"></script><!-- This will read the script from the


jquery -->

<script type="text/javascript">

$(document).ready(function(){

$(".led").click(function()

var p = $(this).attr('id'); // Getting the id value that which pin to toggle, pin 13
or pin 13 or pin 11

// Sending the request to the ip address of the server with the pin number to
toggle the pin                                                               

$.get("http://192.168.4.1:80/", {pin:p}); // Sending the get request

});

});

</script>

</body>

</html>

A above the code a web page design code. This web page code used to control
for the home application (Light, Fan and Motor) and also monitor.
26

4.2.4 jQuery
Save the jQuery library file as the jquery.min and the full name of the file will
be “jquery.min.js”.The above HTML code uses the open source javascript library
jQuery, so we need to obtain that. You can get it from this link and save it by right
clicking on it. Save it in the same directory where you are going to save the above
HTML code.

4.3 ESP8266-WiFi Module And Used For Home Automation


Home automation system using ESP8266 WiFi module and Arduino Uno.
Using this we will be able to control lights, electric fan and other home appliances
through a web browser using your PC or mobile. These AC mains appliances will be
connected to relays which are controlled by the Arduino.
ESP8266 and Arduino together acts as a Web Server and we will send control
commands through a Web Browser like Google Chrome or Mozilla Firefox.
ESP8266 is the one of the most popular and low cost wifi module available in the
market today. You can ready more about it here, ESP8266 – WiFiSoC.
27

CHAPTER 5

CONCLUSION

The home automation system has been experimentally proven to work


satisfactorily by connecting sample appliances to it and the appliances were
successfully controlled from a wireless mobile device.
We learned many skills such as soldering, wiring the circuit and other tools
that we use for this project and was able to work together as a team during this
project.
28

The Wifi client was successfully tested on a multitude of different mobile


phones from different manufacturers, thus proving its portability and wide
compatibility. Thus a low-cost home automation system was successfully designed,
implemented and tested.

REFERENCES

[1] Sirsath N. S, Dhole P. S, Mohire N. P, Naik S. C &Ratnaparkhi N.S


Department of Computer Engineering, 44, Vidyanagari, Parvati, Pune-411009, India
University of Pune, “Home Automation using Cloud Network and Mobile Devices”
29

[2] DeepaliJavale, Mohd. Mohsin, ShreerangNandanwar “Home Automation and


Security System Using Android ADK” in International Journal of Electronics
Communication and Computer Technology (IJECCT) Volume 3 Issue 2 (March
2013)

[3] CharithPerera, Student Member, IEEE, ArkadyZaslavsky, Member, IEEE,


Peter Christen,andDimitriosGeorgakopoulos, Member, IEEE “Context Aware
Computing for The Internet of Things: A Survey”. IEEE COMMUNICATIONS
SURVEYS & TUTORIAL

[4] CharithPerera_y, ArkadyZaslavskyy, Peter Christen_ and


DimitriosGeorgakopoulosy Research School of Computer Science, The Australian
National University,Canberra, ACT 0200, Australia yCSIRO ICT Center, Canberra,
ACT 2601, Australia ” CA4IOT: Context Awareness for Internet of Things”

[5] Bill N. Schilit, Norman Adams, and Roy Want, “Context-Aware Computing
Applications”

[6] JayavardhanaGubbi, ,RajkumarBuyya,


SlavenMarusic,aMarimuthuPalaniswamia, “Internet of Things (IoT): A Vision,
Architectural Elements, and Future Directions”

[7] S.P.Pande, Prof.Pravin Sen, “Review On: Home Automation System For
Disabled People Using BCI” in IOSR Journal of Computer Science (IOSR-JCE)
eISSN: 2278-0661, p-ISSN: 2278-8727 PP 76-80

[8] Basil Hamed, “Design & Implementation of Smart House Control Using
LabVIEW” at International Journal of Soft Computing and Engineering (IJSCE)
ISSN: 2231-2307, Volume-1, Issue-6, January 2012

[9] Basma M. Mohammad El-Basioni1, Sherine M. Abd El-kader2 and Mahmoud


Abdelmonim Fakhreldin3, “Smart Home Design using Wireless Sensor Network and
Biometric Technologies” at Volume 2, Issue 3, March 2013

[10] Inderpreet Kaur, “Microcontroller Based Home Automation System With


Security” at IJACSA) International Journal of Advanced Computer Science and
Applications, Vol. 1, No. 6, December 2010
30

You might also like