Domotics - Home Automation Using Wifi Network: C.Santhiya S.Shalini G.Subalakshmi P.Subiksha

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

DOMOTICS - HOME AUTOMATION USING WIFI

NETWORK

A PROJECT REPORT

Submitted by

C.SANTHIYA
S.SHALINI
G.SUBALAKSHMI
P.SUBIKSHA

in partial fulfillment for the award of degree


Of

BACHELOR OF ENGINEERING
IN

ELECTRICAL AND ELECTRONICS ENGINEERING


SARANATHAN COLLEGE OF ENGINEERING, TIRUCHIRAPALLI

ANNA UNIVERSITY: CHENNAI 6200025

MARCH 2021

i
ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “DOMOTICS – HOME AUTOMATION

USING WIFI” is the bonafide work of “C.SANTHIYA (813817105083),

S.SHALINI (813817105087), G.SUBALAKSHMI (813817105101) and

P.SUBIKSHA (813817105102) ” who carried out the project work under my

supervision.

SIGNATURE SIGNATURE

Dr.C.KRISHNAKUMAR M.E. Ph.D Ms.N.GAYATHRI M.E.


HEAD OF THE DEPARTMENT SUPERVISOR
Assistant Professor
Electrical and Electronics Department Electrical and Electronics Department
Saranathan College of Engineering Saranathan College of Engineering
Panjapur Panjapur
Trichy – 620012 Trichy – 620012

ii
CERTIFICATE OF EVALUATION

COLLEGE CODE & NAME: 8138 & SARANATHAN COLLEGE OF ENGINEERING


BRANCH : ELECTRICAL AND ELECTRONICS ENGINEERING
SEMESTER : VIII
SUBJECT : EE8811 - PROJECT WORK

Name of the Title of the Name of the Supervisor


S.No
Students Project with Designation
C.SANTHIYA
1 (813817105083)
DOMOTICS – Ms.N.GAYATHRI, M.E.,
S.SHALINI
HOME ASSISTANT PROFESSOR
2 (813817105087)
AUTOMATION EEE
G.SUBALAKSHMI USING WIFI
3 (813817105101)
P.SUBIKSHA
4 (813817105102)

The report of the project work submitted by the above


students in partial fulfilment for the award of Degree of Bachelor of Engineering
in Electrical and Electronics Engineering of Anna University: Chennai was
confirmed to be the work done by the above students and evaluated on
______________.

Internal Examiner External Examiner


Name: Name:
College Code: College Code:

iii
ACKNOWLEDGEMENT

Our sincere thanks to our honorable secretary, Shri.S.RAVINDRAN,


B.Com. Our respected Principal, Dr.D.VALAVAN, M.Tech., Ph.D., and our
beloved Head of the department of Electrical and electronics Engineering
Dr.C.KRISHNAKUMAR M.E., ph.D for giving us the opportunity to display
our professional skills thorough this project.

We are greatly thankful to our Project Coordinators Dr.K.RAJKUMAR,


M.Tech., Ph.D, Mr.S.RAMPRASATH, M.Tech., our Project Guide
Ms.N.GAYATHRI, M.E., Department of Electrical and Electronics Engineering
for their valuable guidance and motivation, which helped us to complete this
project on time.

We thank all our teaching and non-teaching staffs of the Electrical and
Electronics department for their passionate support, for helping us to identify our
Mistakes and also for the appreciation they gave us in achieving our goal. We
hearty thank our library staff and management for their extensive support by
providing the information and resources that helped us to complete the project
successfully. Also, we would like to record our deepest gratitude to our parents
for their constant encouragement and support which motivated us to complete our
project on time.

iv
ABSTRACT
This project aims on automating the process of home appliances remotely using
Arduino applications. Nowadays, the world is moving towards automation.
People have less time to handle any work so automation is simple way to handle
any device or machine will work to our desire and these automatic systems are
being preferred over manual systems. This project aims to develop and design a
Home automation using Arduino with Bluetooth module. This system gives a
simple and reliable technology with Arduino application. Wireless home
automation system that uses android applications around the world, and domotics
is meant to save the electric power and human energy. This project motive is
controlled home appliances in smart home with user friendly, design at low cost,
simple installation. This system differs from other system by allowing the user to
operate the system from anywhere around the world through internet connection.
In this, we present a home automation system using arduino applications to
provide the user with remote control of various lights, fans, and appliances within
their home and storing the data in the cloud. These will automatically controlled
on the basis of sensors. This project is designed to be a low cost and expandable
allowing a variety of devices to be controlled.

LIST OF TABLES

v
TABLE NO. DESCRIPTION PAGE NO

1 Four-Channel Relay Module 9


Pinout
2 Condition for switch in 24
remoteXY

LIST OF FIGURES

vi
FIGURE.NO TITLE PAGE.NO
3.1 Arduino Pin details 6
3.2 ESP8266 Module layout 8
3.3 Relay Module Pin layout 9
3.4 RemoteXY structure 11
3.5 Parameters Display 12
3.6 Configuration Setting 12
3.7 Module Interface setting 13
3.8 Source code generation 13
3.9 Proposed automation system 14

4.1 Proposed automation 16


simulation

4.2 Conditions and status of 17


appliances

5.1 Flowchart 18
6.1 Schematic diagram 22
6.2 Arduino interfacing with WIFI 23
module

6.3 Mobile application 24


6.4 Hardware prototype 26

LIST OF SYMBOLS

vii
IDE - Integrated Development Environment
GUI - Graphical User Interface
USB - Universal Serial Bus
AC - Alternating Current
DC - Direct Current
AI - Artificial Intelligence

TABLE OF CONTENT

viii
CHAPTER NO TITLE PAGE
NO
ACKNOWLEDGEMENT iv

ABSTRACT v
LIST OF TABLES vi
LIST OF FIGURES vii
LIST OF SYMBOLS viii
1. INTRODUCTION 1
1.1. History of automation 1
1 1.2. Mobile applications 2

2 2. NEED FOR HOME AUTOMATION 3


2.1. Problem addressed 3
2.2. Various attributes 3
2.2.1. Remote access monitoring
system 4
2.2.2. Expandability in the automation
system. 4
2.2.3. Variety of user interface with
automation 4

3 3. ARCHITECTURE AND 5
COMPONENTS
3.1. Arduino uno 5
3.1.1. Choice of controller 6
3.2. Components 7
3.2.1. Wifi Module 7
3.2.2. Relay module 9
10

ix
3.3. Overview of Remotexy and Code
generation using remotexy 11
3.3.1. Editor Window 12
3.3.2. Communication Modules 13
3.3.3. Code generation window 13
3.4. Proposed Home automation system

4 4. SIMULATION OF AUTOMATION
SYSTEM USING CISCO PACKET
TRACER 15
4.1. Introduction 15
4.2. Simulation of proposed system 16

5 5. SOFTWARE DESCRIPTON 18
5.1. Algorithm 18
5.2. Flowchart 18
5.3. Arduino Code 19

6 6. HARDWARE IMPLEMENTATION 22
6.1. Overall schematic diagram 22
6.2. Wifi module interface circuit 23
6.3. Prototype of proposed system 23

7 CONCLUSION 27
8 REFERENCE 28

x
CHAPTER 1

INTRODUCTION

1.1. History of automation

This project is based in automation technology and more


specifically in home automation systems. Automation is the transfer of tasks
normally performed by humans to a set of technological elements. An
automated system consists of two parts:
Operation: Part formed by elements that act directly on the machine and
make it perform desired operations. These elements are called actuators
and some examples are engines, cylinders or photodiodes.
Control: Brain of system, normally constituted by a programmable
automaton, able to communicate with all constituents of the operation
part.
The inclusion of control in the automation system, allows to decide on the
development of a process, manipulating certain variables to get these or other
variables to act in the desired way. In the present day, security systems plays an
important role in the protection of lives and investment. This is achieved by the
incorporation of various subsystems into the security system with a single control
unit. A smart home is one that is equipped with lighting, heating, and electronic
devices that can be controlled remotely by smartphone or through the internet.
These focuses on controlling the home appliances and electronic devices whether
you inside or outside your home. Home automation gives an individual the ability
to remotely or automatically control things around the home. A home appliance
is a device or instrument designed to perform a specific function, especially an
electrical device, such as a light, fan or household use. Automation is today’s fact,
where things are being controlled automatically, usually the basic tasks of turning
ON/OFF certain devices and beyond, either remotely or in close proximity. These

1
systems lowers the human judgement to the lowest degree possible but does not
completely eliminate it. The concept of remote management of household devices
over the internet from anywhere, any time in the world today can be a reality. The
recent developments in technology which permits the use of Bluetooth and wi-fi
have enabled different devices to have capabilities of connecting with each other.
The wi-fi shield would acts as the gateway for the arduino to communicate with
the internet. With this in mind, arduino based home automation system for remote
control of home appliances is designed.

1.2. Mobile applications

The prototype on which this project is based can be controlled from a


customized mobile application. A mobile application is a computer application
designed to be executed on smartphones, tablets and other mobile devices
which allows the user to perform specific tasks of any kind, like
professional, educational or social. Apps are usually available through
distribution platforms operated by companies that own mobile operating
systems such as Android, iOS, Blackberry or Windows Phone.

2
CHAPTER 2

NEED FOR HOME AUTOMATION

In future we may need to add room like recently finished basement or on


addition off the back to our automation system. The Benefits of home automation
typically fall into a few categories, including savings, safety, convenience and
control. Additionally some consumers purchase home automation for comfort
and peace of mind. This automation provides insights into energy use the can help
you become more energy efficient and mindful of ecological factors. Smart
homes can pinpoint areas where you're using more energy than you need to,
allowing you to cut back in those areas and save money.
2.1. Problems addressed
Often monitoring the status of switches all around the house. Cases of
getting electric shocks when manually operating the switch. Wastage of energy
when not used. Absence of comfort and convenience in normal electrical system.
In our project, we have developed home automation by using wifi rather than
bluetooth and IoT. So we don't need internet to control the appliances. By using
smart phone with one application we can easily control the overall appliances.
Internet availability: Even today, internet connectivity and its reliability is still
unpredictable and in some cases, simply insufficient when it comes to propelling
these smart devices. Price of IoT enabled system is high Infrastructural system of
this project is simple when we compare to any other home automation.
2.2. Various attributes
The various attributes of home automation system includes remote access
monitoring system, expandability in the automation system, variety of user
interfaces with the automation ideas respectively.
2.2.1. Remote access monitoring system
Domotics (automation) is able to control everything in our home and also
allows us to change their settings quicker when our plan changes. For example

3
although when we are not at home, we are able to communicate with the
automation system remotely. This is one of the feature of automation.
2.2.2. Expandability in the automation system
The way we are going to live in our home 5 years ahead will be much
different than the way we are today. Technology will continue to develop,
introducing a completely new generation of products to the market place.
Manufacturers will support vertical and horizontal expandability by designing
their systems on a common network language like IP (inter protocol) and using
wireless retrofittable products that will communicate with wired products in
home.
2.2.3. Variety of user interface with automation
There are number of different ways we can control the appliances in our house.
By pressing the switches or by touching colorful icons on the portable touch panel
or by sliding your finger across your iTouch. Depending on the budget and
preference, we can utilize variety of control methods.

CHAPTER 3

ARCHITECTURE AND COMPONENTS


3.1. Arduino Uno
4
Arduino is an open source physical getting ready gear, which depends upon a
microcontroller board and a hardened upgrade condition for the board to be
adjusted. Arduino is fundamental and can be easily learned by juveniles. Arduino
can continue running on any phase that joins Windows, Linux Operating System,
and Macintosh, as opposed to different microcontrollers, which run just in the
Windows working structure. The Arduino can be used to develop a natural
interface, get commitments from a different aggregation of switches and
furthermore sensors, and at the same time control the yield from various physical
contraptions including lights and diverse mechanical assemblies. Arduino is
revolved around a circumstance, which ought to be changed with a tongue that is
executed by methods for wiring: a physical figuring stage. Figure 6exhibits the
picture of the Arduino Uno, which is considered for this endeavor.

Specialized determinations:
“Microcontroller: -Microchip ATmega328P
Usage Voltage:-5 Volts
Voltage:-7 -20 Volts
Computerized I/O Pins: -14 (of which 6 give PWM yield)
Simple Pins in Input:-6
Current of DC per I/O Pin:-20 mA
Current of for 3.3V Pin: -50 mA
28Streak Memory:-32 KB of which 0.5 KB utilized by the bootloader
SRAM:-2 KB
EEPROM:-1 KB
Speed of clock:-16 MHz
Length:-68.6 mm
Width:-53.4 mm
Weight: 25 g”

5
Fig.no 3.1. Arduino pin details
3.1.1. Choice of controllers

There are different effective microcontrollers including MIT‟s Handy board,


Phidgets and Netmedia‟sBX-24 however the Arduino offers various points of
interest for people, including understudies and educators, that give it a high
ground contrasted with alternate microcontrollers. The benefits of the Arduino
are recorded as pursues:
1.More affordable: Arduino sheets are modest contrasted with different
microcontrollers that are accessible in the market. A preassembled Arduino
board is accessible for as low as $50.
2.Perfect: Arduino is good with all the working frameworks including Linux,
Macintosh, what's more, Windows, while different microcontrollers that are only
limited to Windows.
3.Simple to program:-the earth used to program Arduino board and the
approaches to play out the coding are easy to use notwithstanding for amateurs.

6
4. Open source and expandable programming:-Programming dialect of an
Arduino is an open source and can also fuse the Arduino code to the AVR-C code
if necessary.
5.Permits simple and quick prototyping: There are various prewiring and
also free code-libraries, which can help to test a thought as opposed to investing
energy in building and making an over the top sum of low dimension codes.
3.2. COMPONENTS

There are two main components used in our proposed system


3.2.1. Wifi Module

The ESP8266 wifi Module is a self-contained System on Chip with integrated


TCP/IP protocol stack that can give any microcontroller access to our Wifi
network. The ESP8266 is capable of either hosting an application / offloading all
Wi-Fi networking functions from another application’s processor. The Wi-FI
relay module carries an ESP8266 Wi-FI module and microcontroller. It will send
the serial port instructions to the cell phone APP and Implementation within the
local area network for wireless control relay. This is a one channel relay module
which can be used up to 250V and 30VDC.This module used here is an embedded
controller that is programmed through arduino, to handle analogue or digital data
received from sensors and to transmit over the internet. At the same time, it
accepts commands from the web and accordingly actuates connected devices. The
module has a strong enough on-board processing and storage capability that can
allow it to be integrated with the sensor and other application specific devices
through its GPIOs with minimum development up-front and minimum loading
during runtime. Its high degree of on-chip integration allows for minimum
external circuitry, including the front-end module, it is designed to occupy
minimal PCB area.

7
Fig.no 3.2. ESP 8266 Module Layout
Features:
• 802.11 b/g/n
• Wi-Fi Direct (P2P), soft-AP
• Integrated TCP/IP protocol stack
• Integrated TR switch, LNA, power amplifier and matching network
• Integrated PLLs, regulators, DCXO and power management units
• +19.5dBm output power in 802.11b mode
• Power down leakage current of < 2ms
• Standby power consumption of < 1.0mW (DTIM3) Specification of
ESP 8266
• Wi-Fi Direct (P2P), soft-AP
• Integrated TCP/IP protocol stack
• Integrated TR switch, LNA, power amplifier and matching network
• Integrated PLLs, regulators, DCXO and power management units
• 19.5dBm output power in 802.11b mode
• Power down leakage current of < 1.0mW (DTIM3)
3.2.2. Relay module

Relay is an electromagnetic device which is used to isolate two circuits


electrically and connect them magnetically. They are very useful devices and
allow one circuit to switch another one while they are separate. They are often
used to interface an electronic circuit (working a low voltage) to an electrical

8
circuit which works at very high voltage. For example, a relay can make a 5V DC
battery circuit to switch a 230VAC mains circuit. Thus a small sensor can drive
a fan or an electric bulb. The Four channel relay module is a convenient board
which can be used to control high voltage, high current load. It is designed to
interface with microcontroller. It also comes with a LED to indicate the status of
relay.

Fig.no 3.3. Relay module pinout

Table 1: Four-Channel Relay Module Pinout

Pin Number Pin Name Description


1 GND Ground reference for the module
2 IN1 Input to activate relay 1
3 IN2 Input to activate relay 2
4 IN3 Input to activate relay 3
5 IN4 Input to activate relay 4
6 VCC Power supply for the relay module
7 VCC Power supply selection jumper
8 JD-VCC Alternate power pin for the relay module

9
3.3. Overview of Remotexy and Code generation using remotexy

RemoteXY is easy way to make and use a mobile graphical user interface
for controller boards to control via Smartphone or tablet.
The system includes:
➢ Editor of mobile graphical interfaces for controller boards, located on the
site remoteXY.com
➢ Mobile app RemoteXY that allows us to connect to the controller and
control it via graphical interface.
RemoteXY allows user:
➢ To develop any graphical management interface, using the control, display
and decoration elements any combination thereof. You can develop the
graphical interface for any task, placing the elements on the screen using
the online editor.
➢ After the development of the graphical interface, you get the source code
for the microcontroller that implements your interface. The source code
provides a structure for interaction between your program with the controls
and display. Thus you can easily integrate the control system into your task
for which you are developing the device.
➢ To manage microcontroller device using your Smartphone or tablet with
the graphical interface. For manage used mobile application RemoteXY.
➢ Using one mobile application, you can manage a large number of devices
with different graphical management interfaces. As the interface
description is stored on board the microcontroller device.

10
Fig.no 3.4 RemoteXY Structure
3.3.1. Editor Window:
Editor window has three areas, divided by function.
Element Panel:
All available controls grouped. For navigation you can open and close
groups of controls. To place element in the editor box, right-click on the
item and without releasing the button to move it in the editor box.

Editor Area:
Area of the editor box is on the center. The area contains the main editor box as
smartphone field. In this area you set elements and make interface. Also, the area
contains the control buttons allow you to create a new project, save the project,
open the project. Top right is the button that allows you to get the source code of
interface for the microcontroller.
Setting panel:
To the right is the area of properties and settings. Properties and settings
are grouped. For navigation you can open and close the group properties
and settings. The settings allow you to define the configuration of the

11
project, set the connection settings of the communication module. The
properties allow you to specify view settings and control items settings.
Group of control item properties is displayed when the item is selected in
the editor.

Fig.no 3.5 Parameters Display


3.3.2. Communication Modules
Step 1: select Wi-Fi module in the properties configuration settings

Fig.no 3.6 Configuration Setting


Step 2: Configures the module as an access point
Step 3: Connect using hardware serial

12
Fig.no 3.7 Module Interface Setting
3.3.3. Code generation window
To obtain the source code of the interface, click the green button Get source code,
which is located on the top right of the editor area. You will be redirected to the
page where you can get the generated source code.

Fig.no 3.8 Source code generation


3.4. Proposed Home Automation System

The project aims at designing an advanced home automation system


using normal mobile application and Wi-Fi technology. The devices can be
13
switched ON/OFF through Wi-Fi. Automation is the most frequently spelled term
in the field of electronics. The hunger for automation brought many revolutions
in the existing technologies. These had greater importance than any other
technologies due to its user-friendly nature. These can be used as a replacement
of the existing switches in home which produces sparks and also results in fire
accidents in few situations.

Fig.no 3.9 Proposed automation System


Considering the advantages of Wi-Fi an advanced automation system
was developed to control the appliances in the house. Wi-Fi (Short for Wireless
Fidelity) is a wireless technology that uses radio frequency to transmit data
through the air. Wi-Fi has initial speeds of 1mbps to 2mbps. Wi-Fi transmits data
in the frequency band of 2.4 GHz. It implements the concept of frequency
division multiplexing technology. Range of Wi-Fi technology is 40-300 feet. The
controlling device for the automation in the project is an Arduino UNO. The data
sent from PC over Wi-Fi will be received by Wi-Fi module connected to Arduino
UNO. Arduino UNO reads the data and decides the switching action of electrical
devices connected to it through Relays.

14
CHAPTER 4

SIMULATION OF AUTOMATION SYSTEM USING CISCO PACKET


TRACER
4.1. Introduction

Cisco Packet Tracer as the name suggests, is a tool built by Cisco. This tool
provides a network simulation to practice simple and complex networks. The
main purpose of Cisco Packet Tracer is to help us to learn the principles of
networking with hands-on experience as well as develop Cisco technology
specific skills. Since the protocols are implemented in software only method, this
tool cannot replace the hardware Routers or Switches. Interestingly, this tool does
not only include Cisco products but also many more networking devices. Using
this tool is widely encouraged as it is part of the curriculum like CCNA, CCENT
where Faculties use Packet Trace to demonstrate technical concepts and
networking systems. Students complete assignments using this tool, working on
their own or in teams. Engineers prefer to test any protocols on Cisco Packet
Tracer before implementing them. Also, Engineers who would like to deploy any
change in the production network prefer to use Cisco Packet Tracer to first test
the required changes and proceed to deploy if and only if everything is working
as expected.

Workspace:

Logical: Logical workspace shows the logical network topology of the


network the user has built. It represents the placing, connecting and
clustering virtual network devices.

Physical: Physical workspace shows the graphical physical dimension of


the logical network. It depicts the scale and placement in how network
devices such as routers, switches and hosts would look in a real

15
environment. It also provides geographical representation of networks,
including multiple buildings, cities and wiring closets.

Key Features:

➢ Unlimited devices
➢ E-learning
➢ Customize single/multi user activities
➢ Interactive Environment
➢ Visualizing Networks
➢ Real-time mode and Simulation mode
➢ Self-paced
➢ Supports majority of networking protocols
➢ International language support
➢ Cross platform compatibility
4.2. Simulation of proposed system

Fig.no 4.1 Proposed automation simulation


Here in cisco packet tracer we have designed and simulated a whole home
automation system by connecting lot of appliances to wifi system. Here we have

16
a mobile phone through which we can operate all the appliance with interfacing
few conditions with them. Example conditions are:
If window is OPEN turn fan to OFF
If window is CLOSE turn to ON
Here we can open/close the window through our mobile remotely and also if the
window is OPEN then the fan goes to OFF status and vice versa.

Fig.no 4.2 Conditions and status of appliance

17
CHAPTER 5

SOFTWARE DESCRIPTON

After connection are given, the remote XY software is used to implement the
software part of the system. Remote XY is used to completely monitor both the
load and the appliances and setup conditions for automation of home appliances.
5.1. Algorithm

Step1: Configure the connection between wifi module and arduino


Step2: Pin Tx and Rx used to interface wifi module
Step3: initialize the output pin to zero.
A0 – Load 1
A1 – Load 2
A2 – Load 3
Step4: Connect the wifi with the username and password specified
Step5: Control the appliance trough mobile application Remotexy
5.2. Flowchart

Fig.no 5.1 Flowchart

18
5.3. Arduino Code

/*
-- switch --
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 2.4.3 or later version
download by link http://remotexy.com/en/library/
To connect using RemoteXY mobile app by link
http://remotexy.com/en/download/
- for ANDROID 4.5.1 or later version;
- for iOS 1.4.1 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377
#define REMOTEXY_ACCESS_PASSWORD "s4"
19
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,4,0,0,0,127,0,10,13,1,
2,0,2,6,22,11,2,26,31,31,
79,78,0,79,70,70,0,2,0,1,
25,22,11,2,26,31,31,79,78,0,
79,70,70,0,2,0,2,44,22,11,
2,26,31,31,79,78,0,79,70,70,
0,2,0,3,69,22,11,2,26,31,
31,79,78,0,79,70,70,0,129,0,
35,10,18,6,17,76,111,97,100,32,
49,0,129,0,35,29,18,6,17,76,
111,97,100,32,50,0,129,0,36,47,
18,6,17,76,111,97,100,32,51,0,
129,0,35,72,18,6,17,76,111,97,
100,32,52,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t switch_1; // =1 if switch ON and =0 if OFF
uint8_t switch_2; // =1 if switch ON and =0 if OFF
uint8_t switch_3; // =1 if switch ON and =0 if OFF
uint8_t switch_4; // =1 if switch ON and =0 if OFF
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////

20
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_1 4
#define PIN_SWITCH_2 5
#define PIN_SWITCH_3 6
#define PIN_SWITCH_4 7
void setup()
{
RemoteXY_Init ();
pinMode (PIN_SWITCH_1, OUTPUT);
pinMode (PIN_SWITCH_2, OUTPUT);
pinMode (PIN_SWITCH_3, OUTPUT);
pinMode (PIN_SWITCH_4, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_3, (RemoteXY.switch_3==0)?LOW:HIGH);
digitalWrite(PIN_SWITCH_4, (RemoteXY.switch_4==0)?LOW:HIGH);
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay()
}

21
CHAPTER 6
HARDWARE IMPLEMENTATION
Domotics the Home automation using wifi is a comprehensive module which
integrates each appliances with the wifi control application. In addition to these
preexisting systems, the module has its additional features that is we can
implement this system both in old buildings and in new constructions. Status
along with the number of appliances can be controlled through the application
with the system and additionally the simulation design explains the working of
the appliances lively when we operate them in the control area.
6.1. Overall schematic diagram

The Fig.no 6.1 shows the overall schematic diagram of the proposed
system. The Power supply is given to the load and the 4 channel relay. The load
is connected to the Arduino through relay. The Wi-Fi module is connected to the
Arduino for interfacing the mobile application to the appliance. Arduino connect
through the regulator to the transformer.

Fig.no 6.1 Schematic Diagram

22
6.2. Wifi module Interface circuit

The smart monitoring system use ESP8266 Wi-Fi module for data transfer from
ARDUINO to Mobile using RemoteXY application software. The Voltage
required for Wi-Fi module is 3.3V. The TX pin of Arduino give 5V, in order to
reduce to 3.3V a potential divider circuit is used to interface Esp8266 with
Arduino.

Figure 6.2 Arduino Interfacing with Wi-Fi Module

6.3. Prototype of proposed system

After completion of the software implementation the entire setup is moved


to the field to create a functional prototype. To create a prototype system in a field
the Arduino and the 4 channel relay are isolated from the field. Once, the
application is switched on, the remote XY software is accessed from the device
connected to the same network. The configuration of Arduino IDE and remote
XY is shown in Fig.no 6.2 after configuring, the entire system can be monitored
and controlled the home appliances.
The switch transmits information to the microcontroller about one of the
two fixed positions: on or off. Switch fixes its position unlike the buttons. To
change the state of the switch must be to move his slider or press on the necessary
side of the switch.

23
Fig.no 6.3 Mobile Application
Table: 2 Condition for Switch in remotexy
Data Type Values
0 - OFF (left position)
Switch position unsigned char
1 - ON (right position)

Settings of switch allow to specify the different values:


➢ Variable name - name of the switch and the variable in the source code
for the microcontroller, allow to set a name for the variable of C rules.
➢ Caption in "ON" - set the caption the switch position ON. The default
is "ON" - included. Allowed to ask in any language.
➢ Caption in "OFF" - set the caption the switch position OFF. The
default is "OFF" - included. Allowed to ask in any language.
➢ PIN connected - You can specify what pin of controller connect this
switch, or no connect it. If button is connected to pin, this will generate
additional code to control the output of the microcontroller by this
switch.
A common example shows how to check the current status of the switch is on or
off:
if (RemoteXY.switch_1!=0) {
/* switch on */
}

24
else {
/* switch off */
}

Fig.no 6.4 Hardware Prototype

25
The overall setup in Fig.no 6.3 consists all the hardware components for testing
purposes. This setup is then modified to suit a large area purpose like on field
functional prototype testing. The load is connected through the relay to the
arduino. Wi-Fi module is used to connect the Mobile application to the appliance.
RemoteXY is the application we are using. The switch in the mobile will help us
to control the appliances connected to it. The perfect receiver and transmission
ends of both Wi-Fi module and microcontroller will function the control of
appliances over wireless mode. The Wi-Fi module receive the information of the
switch status in mobile phone and transmits it to the microcontroller which will
then operate the appliances through relay circuit.
CHAPTER 7
CONCLUSION

This proposed 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. The Wi-Fi module was
successfully tested for android applications .Thus a low-cost home automation
system was successfully designed, implemented and tested.
Our Future scope for domotics involves making homes even smarter. Homes
can be interfaced with sensors including motion sensors, light sensor and
temperature sensors and provide automated toggling of devices based on the
conditions. Internet of things(IoT) and cloud computing are two major
technologies prevailing .Now a days, we can use them in our automation and
give a better tomorrow.
We can develop a model of home automation using Artificial Intelligence (AI),
which will take automation to next level.

26
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”.
2. Deepali Javale, Mohd. Mohsin, Shreerang Nandanwar “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. Charith Perera, Student Member, IEEE, Arkady Zaslavsky, Member,
IEEE,Peter Christen, and DititriosGeorgakopoulos, Member, IEEE
“Context Aware Computing for The Internet of Things: A Survey”. IEEE
COMMUNICATIONS SURVEYS & TUTORIAL.
4. Charith Perera_y, Arkady Zaslavskyy, Peter Christen_ and Dimitrios
Georgakopoulosy 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-
AwareComputing Applications”.
6. Jayavardhana Gubbi, ,Rajkumar Buyya, Slaven Marusic,a Marimuthu
Palaniswamia, “Internet of Things (IoT): A Vision, Architectural
Elements, and Future Directions”.

27
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) e- ISSN: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 Elkader2 and
Mahmoud Abdelmonim Fakhreldin3, “Smart HomeDesign using Wireless
SensorNetwork and Biometric Technologies” at Volume 2, Issue 3, March
2013.
10. Inderpreet Kaur, “Microcontroller Based Home Automation System With
Security” at IJACSA) International JournalofAdvanced ComputerScience
and Applications, Vol. 1, No. 6, December 2010.
11. Rosslin John Robles and Tai-hoon Kim,“Review: Context Aware Tools for
Smart Home Development”, International Journal of SmartHome, Vol.4,
No.1, January, 2010.
12. Hitendra Rawat, Ashish Kushwah, Khyati Asthana, Akanksha Shivhare,
“LPG Gas Leakage Detection & Control System”, National Conference on
Synergetic Trends in engineering and Technology (STET-2014)
International Journal of Engineering and Technical Research ISSN: 2321-
0869, Special Issue.
13. Nicholas D., Darrell B., Somsak S., “Home Automation using Cloud
Network and Mobile Devices”, IEEE Southeastcon 2012, Proceedings of
IEEE.
14. Chan, M., Campo, E., Esteve, D., Fourniols, J.Y., “Smart homes-current
features and future perspectives,” Maturitas, vol. 64, issue 2, pp. 90-97,
2009.

28

You might also like