You are on page 1of 7

International Journal of Emerging Technology and Innovative Engineering

Volume 5, Issue 4, April 2019 (ISSN: 2394 – 6598)

CONTROL OF HOME APPLIANCES


USING WIFI AND ARDUINO
AMIRTHAVARSINI G, ANGU KAUSHIKA S DEEPTHESHANMATHIE K

17tucs009@skct.edu.in 17tucs010@skct.edu.in 17tucs026@skct.edu.in

Sri Krishna College of Technology, UG Students

ABSTRACT with clicks or voice commands. Commands are sent


via Bluetooth to Arduino Uno. So you need not get
This paper presents a design and prototype up to switch on or switch off the device while
implementation of new home automation system that watching a movie or doing some workHome and
uses WiFi technology as a network infrastructure building automation systems are used more and
connecting its parts. The proposed system consists of more. On the one hand, they provide increased
two main components; the first part is the server comfort especially when employed in a private home.
(web server), which presents system core that On the other hand, automation systems installed in
manages, controls, and monitors users' home. Users commercial buildings do not only increase comfort,
and system administrator can locally (LAN) or but also allow centralized control of heating,
remotely (internet) manage and control system code. ventilation, air condition and lighting. Hence, they
Second part is hardware interface module, which contribute to an overall cost reduction and also to
provides appropriate interface to sensors and actuator energy saving which is certainly a main issue today.
of home automation system. Unlike most of available Existing, well-established systems are based on wired
home automation system in the market the proposed communication. Examples include BACnet, Lon
system is scalable that one server can manage many Works and KNX [1]. Employing a traditional wired
hardware interface modules as long as it exists on automation system does not pose a problem as long
WiFi network coverage. System supports a wide as the system is planned before and installed during
range of home automation devices like power the physical construction of the building. If, however,
management components, and security components. already existing buildings should be augmented with
The proposed system is better from the scalability automation systems, this requires much effort and
and flexibility point of view than the commercially mush cost since cabling is necessary. Obviously,
available home automation systems. In simple words, wireless systems [1] can come to help here. In the
in this project showing how you can control your past few years, wireless technologies reached their
home appliances from anywhere in world using breakthrough. Wireless based systems, used every
Internet. In our daily life we always forget to switch day and everywhere, range from wireless home
off Lights, TV, AC, Fan and other appliances and networks and mobile phones to garage door openers.
unnecessary we waste electricity and money of As of today, little comparative research of wireless
course, which is very precious for us.So we have automation standards has been done, although such
created a very simple video that you can follow and knowledge would provide valuable information to
convert your normal home to Smart Home and you everyone looking for the most suitable system for
can control from anywhere in world. given requirements. In recent years, wireless systems
like WLAN have become more and more common in
home networking. Also in home and building
I. INTRODUCTION automation systems, the use of wireless technologies
gives several advantages that could not be achieved
Nowadays, people have smartphones with them all using a wired network only.
the time. So it makes sense to use these to control
home appliances. Presented here is a home II. OBJECTIVES
automation system using a simple Android app, The following list gives an overview of the most
which you can use to control electrical appliances important requirements of the proposed system

145
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

2.1 Reduced installation costs: First and foremost, cost. Additionally, also protocols need to scale to
installation costs are significantly reduced since no high node count e.g., ensuring message delivery
cabling is necessary. Wired solutions require cabling,
where material as well as the professional laying of 2.9 Large area coverage: Another challenge lies in
cables (e.g. into walls) is expensive. the fact that devices of a building automation system
are dispersed over large areas. Since transceivers
2.2 Easy deployment, installation, and coverage: must not consume so much power, they cannot be
Wireless nodes can be mounted almost anywhere. In built with a transmission range sufficient for sensors
adjacent or remote places, where cabling may not be to reach associated controllers or actuators directly.
feasible at all, e.g., a garden house or the patio, Also, they may rely on an infrastructure of access
connection to the home network is accomplished points and a wired backbone network (or particularly
instantly by simply mounting nodes in the area. sensitive receivers).
Hence, wireless technology also helps to enlarge the
covered area. III. METHODOLOGY

2.3 System scalability and easy extension: 3.1 System design and implementation
Deploying a wireless network is especially As mentioned the proposed home automation system
advantageous when, due to new or changed consists of three main modules, the server, the
requirements, extension of the network is necessary. hardware interface module, and the software
In contrast to wired installations, additional nodes do package. The following figure (1), shows the
not require additional cabling which makes extension proposed system layout. Secure WiFi technology is
rather trivial. This makes wireless installations a used by server, and hardware interface module to
seminal investment. communicate with each other. User may use the same
2.4 Aesthetical benefits: As mentioned before, technology to login to the server web based
placement of wireless nodes is easy. Apart from application. if server is connected to the internet, so
covering a larger area, this attribute helps to full remote users can access server web based application
aesthetical requirements as well. Examples include through the internet using compatible web browser.
representative buildings with all-glass architecture The proposed home automation system has the
and historical buildings where design or conservatory capabilities to control the following components in
reasons do not allow laying of cables. users home and monitor the following alarms
2.5 Integration of mobile devices: With wireless
• Temperature and humidity
networks, associating mobile devices such as PDAs
• Motion detection
and Smartphones with the automation system
becomes possible everywhere and at any time, as a • Fire and smoke detection
device's exact physical location is no longer crucial • Door status x Light level x
for a connection (as long as the device is in reach of Video monitoring The proposed home automation
the network). Typical examples include an engineer system can control the following appliance
who connects to the network, performs a particular
management task, and disconnects after having • Serine
finished the task; or control of blinds using a remote • Lights on/off/dim
control. For all these reasons, wireless technology is • HVAC on/off
not only an attractive choice in renovation and • Door lock
refurbishment, but also for new installations.\ • Window shutdown
2.6 User friendly interface: User can easily manage • On/off different appliance
system locally or remotely home automation system, 3.2 User Classes and Characteristics
through easy web based interface.
The proposed home automation system is designed as
2.7 Security and authentication: Only authorized a tool for the casual user. A casual user; shall be
user can login to the system (locally, or remotely) in defined as one possessing general knowledge of the
order to manage, control, & monitor. If system Microsoft Windows operating system and general
detects intruders it should immediately alert the knowledge of using the Internet by employing a
system owner and lock login capability for a while. standard browser such as Microsoft Internet Explorer
2.8 Low cost per node / High node count: Thinking General user; who will have the most use of the
of building automation, hundreds of nodes may be system functionality. Administrator; who will control
needed to provide automation. However, the market the access and permissions policy of the system, and
requires competitive performance (compared to can add and delete user accounts, anything that a
wired networks) to be delivered at this low system general user can perform, the administrator can also
perform.

146
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

3.3 Design and Implementation Constraints


The Proposed home automation system is
implemented using ASP, HTML and CSS. The server
application is implemented in ASP.Net, and the
embedded hardware interface application shall be
implemented using C Processing Language.
3.3.1 Assumptions and Dependencies
The component of the system will always be
connected

• Each User must have a User ID and


password
• There is only one Administrator.
• Server must always run under windows
system Fig. 1.1 architecture of Automator
• There should be Internet connection
IV. CLASSES DESCRIPTION
available.
4.1 Data Source Log: Create a log text file in a
• Proper browsers should be installed
specific path. This log file has a new log entry,
• Proper Hardware Components are available ready to be filled with data. A log entry has the
• User is capable of using a computer date of the day and a log number.
3.4 Software Design Concept • Write To Log Entry: Function to write the
data into the log file; using a stream writer
Software of the proposed home automation system is to convert it and save it into a TEXT file.
divided to server application software, and • Read Log: Read from the file line by line,
Microcontroller (Arduino) firmware. The server the log entry with the data
application software package for the proposed home • Read New Log: This function reads the
automation system, is a web based application built new log entry as just been saved.
using asp.net, Microsoft Visual Studio 2010. Server 4.2 Ata Source XML: Responsible for all
application software runs on windows OS, requires operations regarding the main XML files, User,
IIS web server, and “.Net” version 4.0 being Sensors and Automation
installed. The server application software can be • Add User: Function of adding a new user to
accessed from internal network or from internet if the the system
server has real IP on the internet using any internet • Check User: Check if the entered username
navigator supports asp.net technology. Server and password is the exact match with the
application software is responsible of setup, saved XML file or not
configuration, maintain the whole home automation • Get Sensor Status: Get a sensor last status
system. Server use database to keep log of home from the file
automation system components, we choose to use • Automation Time: Sets the time that the
XML files to save system log. The Arduino software, automation is supposed to be activated, in
built using C language, using IDE comes with the hours, minutes, and seconds. The following
microcontroller itself. Arduino software is are of the same functionality; which is to
responsible for collecting events from connected change the data of a specific attribute in the
sensors, then apply action to actuators and pre- XML file given from the function name:
programed in the server. Another job is to report the automation Motion, automation Door,
and record the history in the server DB. Figure(2) automation Temp, automation Appliance,
shows the architecture of the proposed home automation Duration, automation Security.
automation system. The following figure (3) shows • Get User Hex: User Hex is a security issue.
classes diagram of proposed system, which consists Checking progress will not only be on the
of five main classes. username and password, but also on a
random generated number for each user.
This number changes every time the user
logs into the system
• Check User: Check if the entered username
and password is the exact match with the
saved XML file or not
• Get Sensor Status: Get a sensor last status
from the file

147
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

• Automation Time: Sets the time that the • The following are of the same functionality,
automation is supposed to be activated, in which is to get the latest status of the
hours, minutes, and seconds. The following specified sensor given in the function name:
are of the same functionality; which is to get Door, get Motion, get Temperature The
change the data of a specific attribute in the following are of the same functionality,
XML file given from the function name: which is to toggle the specified appliance
automation Motion, automation Door, given in the function name to a World
automation Temp, automation Appliance, Academy of Science, Engineering and
automation Duration, automation Security Technology 68 2012.
• Automator: Responsible for all automation
processes, including the monitoring of the 4.3 Hardware Design
environment for conditions that matches the The second part of the proposed home automation
automation rules configured by the user system design was the choosing of a suitable micro-
• Status Initializer: set all the sensors and controller. The requirements for the micro-controller
actuators back to its initial values. Sensors are; a RS232 port, a fair amount of output Digital
will be set to 0, and the actuators will be set I/O, and a reasonable speed.
to the last update in the XML data files.
• Get Data From XML: Get data from XML Also a reasonable amount of EEPROM was needed
function to enables the system to store device status, and
• Process: check every one of the sensors and username and passwords related to login, so that data
appliance either it contains the key word is not lost in the case of power outages. Arduino is a
from the XML file dictionary or not. If it readymade and open source evaluation Kit based on a
contains the key word it sends the data to 8-bit Atmel microcontroller. Arduino Microcontroller
check dependency function. is the core of hardware interface module, which is
• Check Dependency: check if the responsible for exchanging data between home
automation of a specific sensor in an automation server from one side (through WiFi
automation is dependent on any other module), and sensors, and actuators from the other
sensor, appliance, or a specific time to be side. Arduino communicate with WiFly module
activated. through RS232 protocol. If sensors and actuators are
• Watcher: Watcher function acts like a directly connected to hardware interface module, an
guard; it keeps watching the timer and all isolating interface is needed to protect Arduino from
other sensors and actuators last updated interference caused by home automation components.
statuses from the XML file. When all Figure (5) shows the WIFI Arduino shield PCB
conditions of an automation becomes true. layout, Figure (6) shows the arduino shield PCB
Automation executed. layout of a three input alarms. Figure (7) shows the
• Process Sensor: checks sensors to see the arduino shield PCB layout of a three output actuators.
last updates, in case of any dependent 4.4 Hardware Layout
automation on one of the sensors.
• Activate Appliance: Activates any Hardware consists of four different PCBs, the
appliance that should be activated according Arduino PCB (ready-made), WiFi shield PCB, 3
to the running automation. input alarms PCB, and 3 output actuators PCB .By
• Manager: Responsible for maintaining the doing this system will increase system mobility,
whole system in general and initializing all configurable, and scalability. More intelligent should
that is needed for further operation when the be added to hardware modules to make them capable
system is first started to take decision according to triggered alarms.
• Processor: initializes and load all needed Without referring to server for each event and action.
data into the system and establish That will increase the response time of the system.
communication with the hardware module While hardware interface module reports server with
• Add Automator Object: load an events and actions on pre-programmed intervals.
automation entry into the system to be Replace the WiFly WiFi module with more reliable
watched and stable WiFi module, to increase system
• delete Automation: deletes an automation reliability.
from the system and XML file and also 4.5 Basic Model Structure:
stops the system from watching it anymore
• write To Socket: sends data to the specified
socket in the form of a string
• read From Socket: read data from socket
after sending it a variable to flag the type of
data that is needed to be received .

148
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

If sensors and actuators are directly connected to


hardware interface module, an isolating interface is
needed to protect Arduino from interference caused
by home automation components.
VI.RELAY MODULE

A relay allows you to turn on or turn off a circuit


using voltage and/or current much higher than what
Arduino could handle. Relay provides complete
isolation between the low-voltage circuit on Arduino
side and the highvoltage side controlling the load. It
gets activated using 5V from Arduino, which, in turn,
controls electrical appliances like fans, lights and
airconditioners.
Fig 1.2 Relay module of electrical appliances

Fig 1.4 Flowchart on control of home appliances


using IOT

Table 1.0: WIFI usage:

Fig 1.3 Devices controlled using home


automation

V. CIRCUIT DESIGN

Also, a reasonable amount of EEPROM was needed


to enables the system to store device status, and
username and passwords related to login, so that data
is not lost in the case of power outages. Arduino is a
readymade and open source evaluation Kit based on a
8-bit Atmel microcontroller.
VII.CONCLUSION
Arduino Microcontroller is the core of hardware
This paper proposes a low cost, secure, ubiquitously
interface module, which is responsible for
accessible, auto-configurable, remotely controlled
exchanging data between home automation server
solution. The approach discussed in the paper is
from one side (through WiFi module), and sensors,
novel and has achieved the target to control home
and actuators from the other side. Arduino
appliances remotely using the WiFi technology to
communicate with WiFly module through RS232
connects system parts, satisfying user needs and
protocol.
requirements. WiFi technology capable solution has
proved to be controlled remotely, provide home
security and is cost-effective as compared to the

149
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

previously existing systems. Hence we can conclude [13] Sivaram, M., B. DurgaDevi, and J. Anne Steffi.
that the required goals and objectives of home "Steganography of two lsb bits." International
automation system have been achieved. The system Journal of Communications and Engineering 1.1
design and architecture were discussed, and
(2012): 2231-2307.
prototype presents the basic level of home appliance
control and remote monitoring has been [14] Anne, M. Sivaram B. DurgaDevi J.
implemented. Finally, the proposed system is better "Steffi,“Steganography of two lsb
from the scalability and flexibility point of view than bits”." International Journal of Communications
the commercially available home automation and Engineering 1.1.
systems. [15] Manikandan, V., et al. "PRIVACY
REFERENCES: PRESERVING DATA MINING USING
THRESHOLD BASED FUZZY CMEANS
[1] Christian Reinisch ,“Wireless Communication in CLUSTERING." ICTACT Journal on Soft
Home and Building Automation”, Master thesis, Computing 9.1 (2018).
Viennia univeristy of technlogy, Feb 2007. [16] Malathi, N., and M. Sivaram. "An Enhanced
[2] wiki.smarthome.com/index.php?title=Home Scheme to Pinpoint Malicious Behavior of Nodes
Automation
In Manet’s." (2015).
[3] A.J. Bernheim Brush, Bongshin Lee, Ratul
Mahajan, Sharad Agarwal, Stefan Saroiu, and [17] Mohammed, Amin Salih, et al. "DETECTION
Colin Dixon, "Home Automation in the Wild: AND REMOVAL OF BLACK HOLE ATTACK
Challenges and Opportunities", CHI 2011, May IN MOBILE AD HOC NETWORKS USING
7–12, 2011, Vancouver, BC, Canada GRP PROTOCOL." International Journal of
[4] N. Sriskanthan, F. Tan, A. Karande,” Bluetooth Advanced Research in Computer Science 10.6
based home automation system”, Microprocessors (2018).
and Microsystems journal, issue 26 (2002) pages
[18] Sivaram, M., et al. "Emergent News Event
281–289, Elsevier Science B.V., 2002
[5] Matthias Gauger,Daniel Minder,Arno Wacker, Detection from Facebook Using Clustering."
Andreas Lachenmann,"Prototyping Sensor- [19] Sivaram, M., et al. "The Real Problem Through a
Actuator Networks for Home Automation", Selection Making an Algorithm that Minimizes
REALWSN’08, April 1, 2008, Glasgow, United the Computational Complexity."
Kingdom. [20] Porkodi, V., et al. "Survey on White-Box Attacks
[6] Malik Sikandar Hayat Khiyal, Aihab Khan, and
and Solutions." Asian Journal of Computer
Erum Shehzadi, "SMS Based Wireless Home
Appliance Control System (HACS) for Science and Technology 7.3 (2018): 28-32.
Automating Appliances and Security", Issues in [21] Dhivakar, B., et al. "Statistical Score Calculation
Informing Science and Information Technology of Information Retrieval Systems using Data
Volume 6, 2009 Fusion Technique." Computer Science and
[7] D.Greaves, "Control Software for Home Engineering 2.5 (2012): 43-5.
Automation, Design Aspects and Position Paper", [22] Sivaram, M. "Odd and even point crossover based
The AutoHan project at the University of
Tabu ga for data fusion in Information retrieval."
Cambridge Computer Laboratory
[8] Sivaram, M., et al. "DETECTION OF (2014).
ACCURATE FACIAL DETECTION USING [23] Porkodi, V., et al. "Prolong the Network Lifespan
HYBRID DEEP CONVOLUTIONAL of Wireless Sensor Network by Using HPSM."
RECURRENT NEURAL NETWORK." (2018): 2034-2038.
[9] Mohammed, Amin Salih, Shahab Wahhab [24] Mohammed, Amin Salih, Shahab Wahhab
Kareem, and M. Sivaram. "Time Series Kareem, and M. Sivaram. "Time Series
Prediction Using SRE-NAR and SRE- Prediction Using SRE-NAR and SRE-
ADALINE." (2018): 1716-1726. ADALINE." (2018): 1716-1726.
[10] Sivaram, M., et al. "Exploiting the Local Optima [25] M, Sivaram, ENABLING ANONYMOUS
in Genetic Algorithm using Tabu Search." Indian ENDORSEMENT IN CLOUDS WITH
Journal of Science and Technology 12 (2019): 1. DECENTRALIZED ACCESS CONTROL
[11] Sivaram, M., et al. "Estimating the Secret (March 13, 2019). Available at
Message in the Digital Image." International SSRN: https://ssrn.com/abstract=3352128
Journal of Computer Applications 975: 8887. [26] M, Sivaram, Enhancing Vehicle Safety with
[12] Obulatha-II-ME-CSE, Miss O. "Position Privacy Drowsiness Detection and Collision Avoidance
Using LocX."

150
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298


IJETIE Vol. 5, Issue 4, April 2019

(March 13, 2019). Available at SSRN:


https://ssrn.com/abstract=3352069
[27] M, Sivaram, Preserving DDoS Attacks Using
Node Blocking Algorithm (March 13, 2019).
Available at SSRN:
https://ssrn.com/abstract=3352101
[28] M, Sivaram, HEALTHCARE VISIBLE LIGHT
COMMUNICATION (March 13, 2019).
Available at SSRN:
https://ssrn.com/abstract=3352115
[29] M, Sivaram, INTEGER WAVELET
TRANSFORM BASED APPROACH FOR
HIGH ROBUSTNESS OF AUDIO SIGNAL
TRANSMISSION (March 13, 2019). Available at
SSRN: https://ssrn.com/abstract=3352119
[30] M, Sivaram, et al. “Securing the Sensor Networks
Along With Secured Routing Protocols for Data
Transfer in Wireless Sensor Networks.” Journal
of Emerging Technologies and Innovative
Research, vol. 5, no. 10, Oct. 2018, pp. 316–321.,
doi:http://doi.one/10.1729/Journal.18612.
[31] Porkodi.V, Yuvaraj.D., Mohammed,A.S,
Sivaram.M and Manikandan.V,” IoT in
Agriculture” Journal of Advanced Research in
Dynamical and Control Systems, Pages: 1986-
1991,14-Special Issue, Pages: 1986-1991,2018.
[32] Manikandan.V, Mohammed, A.S, Yuvaraj,D.,
Sivaram.M and Porkod.V, “An Energy Efficient
EDM-RAEED Protocol for IoT Based Wireless
Sensor Networks” Journal of Advanced Research
in Dynamical and Control Systems, Pages: 1992-
2004,14-Special Issue, Pages: 1992-2004, 2018.
[33] Nithya, S., Sundara Vadivel, P., Yuvaraj, D.,
Sivaram, M. “Intelligent based IoT smart city on
traffic control system using raspberry Pi and
robust waste management”, Journal of Advanced
Research in Dynamical and Control Systems,
Pages: 765-770, 2018.
[34] Viswanathan, M., Sivaram, M., Yuvaraj, D.,
Mohammed, A.S. “Security and privacy
protection in cloud computing”, Journal of
Advanced Research in Dynamical and Control
Systems, Pages 1704-1710, 2018
[35] Sivaram, M., et al. "Estimating the Secret
Message in the Digital Image." International
Journal of Computer Applications 975: 8887.

151
COPYRIGHT TO IJETIE

Electronic copy available at: https://ssrn.com/abstract=3368298

You might also like