Design of A Home Automation System Using Arduino PDF
Design of A Home Automation System Using Arduino PDF
net/publication/279179486
CITATIONS READS
45 97,170
4 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Nathan David on 25 June 2015.
Abafor Chima
University of Nigeria
chrischuks56@gmail.com
Aronu Ugochukwu
University of Nigeria
ugochukwuaronu@gmail.com
Edoga Obinna
University of Nigeria
butler4ril@gmail.com
IJSER
Abstract: This paper presents a low cost and flexible home control and environmental monitoring system. It employs
an embedded micro – web server in Arduino Mega 2560 microcontroller, with IP connectivity for accessing and
controlling devices and appliances remotely. These devices can be controlled through a web application or via
Bluetooth Android based Smart phone app. The proposed system does not require a dedicated server PC with respect
to similar systems and offers a novel communication protocol to monitor and control the home environment with more
than just the switching functionality. To demonstrate the feasibility and effectiveness of this system, devices such as
light switches, power plug, temperature sensor, gas sensor and motion sensors have been integrated with the proposed
home control system.
—————————— ——————————
INTRODUCTION
In the present day, security systems play 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 such as surveillance, intruder control, access control, fire detection, etc.
A smart home is one that is equipped with lighting, heating, and electronic devices that can be
controlled remotely by smartphone or via the internet. An internet based home automation
system focuses on controlling home electronic devices whether you are inside or outside your
home [1]. 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 refrigerator, for household use. The
words appliance and devices are used interchangeably.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 796
ISSN 2229-5518
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 [2].
Automation lowers the human judgment 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. Assume a system where from the office
desk, the user could view the status of the devices and decides to take control by tuning his TV
set to his favourite channel, turns on the cooling system, say the air conditioner, and switches on
or off some of the lights. This user could walk back home and only find a very comfortable,
pleasant home.
The recent developments in technology which permit the use of Bluetooth and Wi-Fi have
enabled different devices to have capabilities of connecting with each other [3]. Using a WIFI
shield to act as a Micro web server for the Arduino eliminates the need for wired connections
between the Arduino board and computer which reduces cost and enables it to work as a
IJSER
standalone device. The Wi-Fi shield needs connection to the internet from a wireless router or
wireless hotspot and this would act as the gateway for the Arduino to communicate with the
internet. With this in mind, an internet based home automation system for remote control of
home appliances is designed.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 797
ISSN 2229-5518
values of the physical conditions. The mobile application also utilizes this same procedure to act
as an input and output device.
IJSER
DESIGN AND IMPLEMENTATION
Figure 1: Block Diagram of the Smart Home System
A low cost and efficient smart home system is presented in our design. This system has two main
modules: the hardware interface module and the software communication module. At the heart of
this system is the Arduino Mega 2560 microcontroller which is also capable of functioning as a
micro web server and the interface for all the hardware modules. All communication and
controls in this system pass through the microcontroller.
As we can see in figure 2, the smart home system offers feature such as environmental
monitoring using the temperature, humidity, gas and smoke sensors. It also offers switching
functionalities to control lighting, fans/air conditioners, and other home appliances connected to
the relay system. Another feature of this system is the intrusion detection which it offers using
the motion sensor and all these can be controlled from the Android smart phone app or web
application.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 798
ISSN 2229-5518
IJSER
Figure 2: System architecture of the smart home system.
HARDWARE MODULE
Arduino can sense the surroundings by receiving input signal from a variety of sensors
and can affect its environment via actuators [5]. An analog temperature sensor is a chip that tells
you what the ambient temperture is. The DHT11 is a basic, ultra low-cost digital temperature and
humidity sensor [6]. It uses a capacitive humidity sensor and a thermistor to measure the
surrounding air, and spits out a digital signal on the data pin (no analog input pins needed) and is
illustrated in figure 3. It is fairly simple to use, but requires careful timing to grab data. The only
real downside of this sensor is you can only get new data from it once every 2 seconds, so when
using our library, sensor readings can be up to 2 seconds old.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 799
ISSN 2229-5518
IJSER
Figure 4: Circuit diagram of Home Automation System with proteus
The Passive Infra-Red (PIR) sensors allow one to sense motion, almost always and is used to
detect whether a human has moved in or out of the sensors range. The PIR sensor is a
pyroelectric device that detects motion by measuring changes in the infrared level emitted by
surrounding objects. This motion can be detected by checking for a high signal on a signal I/O
pin [7]. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason
they are commonly found in appliances and gadgets used in homes or businesses.
MQ2 is a semiconductor type sensor, which can appropriately sense the presence of smoke,
LPG, methane, butane, propane and other hydrocarbon combustible gases. The sensitive material
in this sensor is tin-dioxide (SnO2), [8]. When it comes in contact with the gas to be monitored,
the electrical resistance of the sensor decreases; enabling the microcontroller to respond to the
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 800
ISSN 2229-5518
situation. When it detects the concentration of combustible gas in the air it outputs its reading as
an analog voltage. The sensor can measure concentrations of flammable gas of 300 to 10,000
ppm. The sensor can operate at temperatures from -20 to 50°C and consumes less than 150 mA at 5
V.To allow connection for power plugs and switching of electrical load within the home, relay switches
are used. The relay switches have capability to carry a maximum load of 10A at 240V. This is sufficient
to carry any household appliance as these devices do not draw much current.
To enable connectivity on the microcontroller, a Bluetooth module and Wi-Fi shield is used. The
Bluetooth provides connectivity via the serial I/O pins on the Arduino through which the Android based
mobile application communicates with the microcontroller. The Wi-Fi shield provides internet
connectivity for the embedded micro web server which allows internet access and controls from a web
application. The circuit diagram of Home Automation System with is illustrated in figure 4.
IJSER
Figure 5: Smart phone app login page and bedroom page after login
The android application was designed using the Google App-Inventor Integrated Development
Environment (IDE) and Java programming language. The application contains both a Bluetooth
module and a Wi-Fi module which interfaces with the micro-controller and allows the android
smart phone to communicate with the micro-controller effectively and efficiently.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 801
ISSN 2229-5518
The android application allows the user to control devices and monitor conditions in the home
using the Bluetooth connection. The android application is efficient, flexible and has a user
friendly Graphic User Interface (GUI). The application has a user authentication page to verify
that the authorized user is logged in and has full control of the home-appliances. The
authentication page and the bedroom page after login are shown in figure 5.
WEB APPLICATION
The internet is great source of information and communication in this information age.
Communication with things via the internet also known as Internet of Things (IoT). Bland by
name and superficially viewed as gee-whiz technology never to be realized, the IoT has
significant potential to transform business. IoT is a developing technology which allows different
things and devices to be controlled via the internet. At its heart, IoT is a wide-ranging ecosystem
of everyday physical objects connected to the Internet, capable of identifying themselves and
IJSER
communicating data to other objects on the network [9]. In this work it is implemented using the
Arduino as a micro web server through which we can connect to the hardware modules, receive
status updates from them and also send control information to the microcontroller.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 802
ISSN 2229-5518
passing information to it as codes. In this case, the Arduino micro-controller acts as a client and
the PHP will act as a server (Wamp, IIS or Apache servers can be used) because PHP is not a
client based programming language. The design of the web pages was chosen to be in metro
style as it gives user friendliness and also a colorful display of the web items as in figure 6.
The web page will display all the variables being read from the Arduino micro-controller and
also be able to perform the functions as the mobile application. The Wi-Fi shield connected with
the Arduino board will be the link between the web pages and the Arduino. When connected to
the IP address of the Arduino, the PHP and the Ajax http request will be able to send information
over this IP address which in turn is interpreted by the Arduino.
CONCLUSION
In this paper, a novel architecture for low cost and flexible home control and monitoring system
using Android based Smart phone is proposed and implemented. The proposed architecture
utilizes a micro web server and Bluetooth communication as an interoperable application layer
IJSER
for communicating between the remote user and the home devices. Any Android based Smart
phone with built in support for Wi-Fi can be used to access and control the devices at home.
When a Wi-Fi connection is not available, mobile cellular networks such as 3G or 4G can be
used to access the system. The system also uses the Google speech recognition engine thus
eliminating the need for an external voice recognition module. Prospective future works include
incorporating SMS and call alerts, and reducing the wiring changes for installing the proposed
system in pre-existing houses by creating a wireless network within the home environment for
controlling and monitoring the smart home environment.
REFERENCES
1. Ajah, G, David, N, Abioye, A, Web Based Security System, Sch. J. Eng. Tech, 1(3):112-116,
2013.
2. Mahmood, S M, Abdulsattar, M, Firas, A Y; Home Automation Management with WLAN
(802.11g) and RF Remote Control, Raf. J. of Comp. & Math’s, 6(1), 2009.
3. Aru O E ,Ihekweaba G, Opara F K, Design Exploration of a Microcontroller Based RF
Remote Control 13amps Wall Socket, IOSR-JCE, 11(1), 56-60, 2013.
4. David, N, Design of an Internet Based Security System, NIJOTECH, 29(2) 118-129, 2010.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 6, June-2015 803
ISSN 2229-5518
IJSER
IJSER © 2015
http://www.ijser.org