KEMBAR78
Real Time Algorithm For The Smart Home | PDF | Internet Of Things | Home Automation
0% found this document useful (0 votes)
34 views7 pages

Real Time Algorithm For The Smart Home

Uploaded by

syed muktthar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views7 pages

Real Time Algorithm For The Smart Home

Uploaded by

syed muktthar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/332036866

Real Time Algorithm for the Smart Home Automation Based on the Internet of
Things

Article · March 2019

CITATIONS READS

11 8,976

1 author:

Dr-Muhammad Ibrar
Hamad bin Khalifa University
31 PUBLICATIONS 392 CITATIONS

SEE PROFILE

All content following this page was uploaded by Dr-Muhammad Ibrar on 08 October 2019.

The user has requested enhancement of the downloaded file.


International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

Real Time Algorithm for the Smart Home


Automation Based on the Internet of Things
Salman Ali Khan1, Arhsad Farhad2, Muhammad Ibrar2, Muhammad Arif1
1Department of computer science, City University of Science & Information Technology, Peshawar, Pakistan
2Department of computer science, COMSATS Institute of Information Technology, Sahiwal, Pakistan

Abstract:—Internet of Things (IoT) is enabled by the based on IoT, which includes; smart refrigerators, smart
advancements in the latest technologies including sensors, Radio vacuum cleaner etc.
Frequency Identification (RFIDS), internet protocols and Smart Cities:- Residential E – meters is used to improve
communication technologies. The most important premises of IoT the efficiency of service and meet residents meet by telling us
is to connect devices and sensors without human intervention. The
proposed smart home automation system differs from other
the amount of electricity consumed and its demand. Smart
systems by allowing the user to access and operate the system from Grids is used to control the energy generating and/or consuming
anywhere around the world through internet along with decision entities within the electricity network. Smart Street Lights are
controls according to the needs. In this paper, we propose an used to monitor switching, voltage, power, alarm, energy
algorithm for smart home automation system based on IoT using consumption and also set parameters and power line, lamp
sensor nodes which are directly connected to Arduino Nano. The failure alarm etc. Surveillance cameras used for security
algorithm perform some basic local functions such as; Turning purpose, operate in hidden mode, capture live events and save
ON/OFF the lights based on the motion sensor and generating the as video file, switching on and off, broadcast video live on
alarm based on the gas sensor. In the proposed algorithm the internet.
Arduino Mega is connected to the internet using Wi-Fi module to
monitor the power consumption of different home appliances and
Manufacturing:- IoT plays a vital role in manufacturing,
can be controlled from anywhere on the internet. The objective of these applications include: Real time inventory, the sale and
the proposed system is to provide a low cost and efficient solution inventory reports, more efficient manufacturing decisions,
for home automation system by using IoT. Results show that the increase manufacturing agility, save money, boost sales. Asset
proposed system is able handle all controlling and monitoring Tracking help to control asset location, optimizing asset
function of home. availability, increase efficiency by minimizing stock out cases.
Wearable’s:- Entertainment google glass is one example
Keywords— Smart home system, Internet of Things, Motion which uses exiting google apps like Gmail and google.
sensor, Gas sensor, Alarm system Healthcare some medical instruments when connected to
patient’s body helps doctor to monitor him/her if he/she is not
I. INTRODUCTION physically present there; e.g. smart stethoscope, B.P. apparatus
The Internet of things [1] is a network of physical objects, etc. Smart Watch allows to check the metabolism and notifies
devices, buildings and other items embedded with electronics when metabolism is disturbed by using internet. Location and
devices, sensors and network connectivity that enable these Tracking/Pet Tracking uses microchips which are placed on
objects to collect and exchange data. By means of IoT, we can person/pet body to track its location easily.
control a door, lights, fans and other embedded electronics Health care:- Remote Monitoring smart medical
appliances which are connected to internet even if we are not apparatus help doctor to monitor the patient details and history
present in the building. directly when apparatus are attached to patient’s body even
IoT has revolutionize the business strategies, through this when doctor is not available at particular place. Hospital Asset
enterprise companies built a proprietary system to collect and tracking smart cabins helps us to track any particular patient
organize data that is secure and complaint, and uses connected data/record and tells the location of different asset placed in
devices to transmit more data to the system. Parcel service smart cabins. Access Control, a smart medical instrument when
companies use sensors on their vehicle to monitor the speed of applied to patient body tells him/her about present condition
a car, mileage, and number of stops. IoT has wide range of and recommended him/her about the type of specialist doctor.
application, these applications are categorized as follows: Ambulance Telemetry, having connection with internet and
Building and Home Automation:- Buildings and homes treat/diagnose patient in a community as well as in the hospital.
are automated by means of temperature. Lights, AC and Fans Drug Tracking contain sensors in the pill which enables doctors
are controlled based on room temperature observed. Energy to have more clear and better insights of human body.
Optimization is one of the prime concern of IoT. If we Predictive Maintenance device connected to patient’s body and
accidently left our home’s lights we can switch them off with predict that when and how much medication is needed.
IoT technology. Connected Appliances is another application Automotive:- Automotive applications are related to
smart vehicles Infotainment provide us information about

94 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

vehicle and travelling and also entertainment contents. Smart and cost effective algorithm for the smart home system is
wire corrector helps us to control its wiring and its replacement needed to provide a feasible solution.
for better functioning of vehicle. The rest of this paper is organized as follows; related works
Retail:- Shopping Applications smart screens provide is discussed in section II, section III outlines the internet of
buyers deeper info about the items they are looking at, including things. Prototype of proposed smart home system is presented in
up sells. A smart cabin tells us about over stock, out of stock. section IV. Section V describes the performance evaluation of
Supply Chain Management we can connect the supplying the proposed algorithm, whereas the last section concludes this
machine with the internet and control it with our smart phones paper.
from anywhere. II. RELATED WORK
Environment:- Water Pollution sensors placed in the
water channels, they detect the harmful entities above the safe This section presents the existing techniques of smart home
limit so we can apply remedies. Air Pollution detectors placed system based on IoT, ZigBee, Bluetooth and smart phones.
at different places to detect the air pollution and alarm at In [2] the author aims to control the heat, light and
specific air pollution and configuration control. Weather temperature of house/office via smart bulbs, smarts heat
Monitoring Ethernet analogue sensor is used to monitor detectors with the help of IoT. Furthermore, it can also clean
weather. house through smart vacuum cleaner and can turn OFF/ON the
The IoT is an emerging technology that is providing a lights even when users are away at a distance from home. The
privilege to communicate all around the world. Its objective is work presented in [3] targets to find the lost things in house that
Anything, Anyone, Anytime, Anyplace, Any service and any we forgot where we placed them, thus with the help of trackers
network. these objects are tracked easily and alarm is generated when
these objects are moved from its appropriate place. An SMS
notification is sent to the owner in case of misplacement. In [4],
a car is replaced with a robot to automate the car by monitoring
the path way, tracking the location by GPS, as a result, reduces
the accidental risks. By using NFC tags [5], visual markers and
numeric identifier are placed on posters and panels to get the
needed information about the cost, number of seats availability,
to automate the ticket system. The work presented in [6] aims
to automate the availability of restaurants, their menu and
rooms availability. People can reserve hotel rooms directly
being staying at home. Patient monitoring system is presented
in [7], the goal of this research to automate the medical
instruments to receive clinical data for diagnosis purposes. In
[8], smart homes are introduced for the comfort, security,
convenience and to provide energy efficiency to its occupants.
In [9], author describes that with advancement in sensor
networks there comes a rapid increase in automation.
Everything going to be automated rather than manual. IoT is an
emergent network of daily objects which is being monitored
and controlled using mobile or internet. In [10], the author
states that by making home environment intelligent enough, it
can make life easy for disabled and elderly personals. In last
Figure 1. C’S and A’s of IoT few years there is much increase in home automation because
of rapid increase in smart phone usage. In [11], the author
Figure 1 describes the combination of C’s and A’s that suggests an idea that in order to make smart home low cost and
discloses, peoples and things can be connected anytime, flexible micro web server based on Arduino Ethernet, hardware
anyplace with anything and anyone by using any available interface modules and android based application is used. Using
network and using any service. This elaborates addressing of this system authorized users can remotely control and monitor
elements such as convergence, content, repositories, home devices connected through 3G/4G or Wi-Fi. In [12],
computing, communication and connectivity in the framework author proposes smart appliances based on Bluetooth. The
where there is continuous interconnection between people and smart appliances are controlled by Bluetooth technology with
things or between things and things so the A and C elements are the use of Wi-Fi to efficiently monitor maximum energy
tightly coupled. consumption appliances. Therefore, to overcome the maximum
The main challenges faced by smart home systems are use of energy consumption by turning OFF/ON those
high cost of ownership, poor security, poor manageability, and appliances. An information framework for creating a smart city
inflexibility. However, the existing solutions are costly in through IoT is presented in [13], aims to enhance the life style.
terms of upgradation and installation. Therefore, an efficient In [14] the author suggests an innovative, detached and flexible
ZigBee based smart home system. The system is flexible and

95 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

scalable that allows extra home appliances designed by multiple collaborate continuously to make the lives of its inhabitants
vendors to securely add to the home network with the minimum more comfortable as it was before.
amount of extra work. The system allows its owners to monitor Every Smart community has important requirements
and control the connected devices locally, through multiple which make that community smart [18]. These requirements
controls like any Wi-Fi enabled device which supports Java or are:
using ZigBee based remote control. Moreover, in this system a
common home gateway is used to integrate ZigBee based home Sensible: Sensor can sense the environment.
automation system and Wi-Fi network. The network is Connectable: All the networking devices should be connected
interoperable, simple and flexible due to common home for information sharing.
gateway that provides user interface, and remote access to the Ubiqtuous: It should be accessible for the user through the web
system. Shareable: Object should be addressable and accessible as well
as data.
III. INTERNET OF THINGS Visible/Augmented: Information should be visible.
Machine to Machine (M2M) communication and mobile
technologies are the current revolution of the internet. It is the RFID is getting prominence in the identification
leading phase towards the IoT. IoT [15] will empower the technology due to its small size, low power, low price, light
physical objects in a way that they can hear, think and see. weight and inexpensive maintenance rates. It is going to be used
These objects can accomplish jobs by talking with each other in many advance fields like pharmaceuticals, manufacturing
and by knowing the status of other connected physical devices. and retail. It is now in consideration to use RFIDs with the
Devices are connected so that they can share data and emerging technologies including ubiqtuous computing.
information to co-ordinate decisions. IoT has transforms the In general almost every home is connected to the internet
objects from traditional to smart by using existing technologies and each home has nearly same objects which can be converted
such as pervasive computing, communication technologies, into the smart objects with the meaning of IoT such as doors,
sensor networks, ubiqtuous computing and internet protocols. windows, fans, meters, security system and automation. All
To get better insight into the real meaning and these objects can be converted into the smart objects by using
functionality of the IoT there is a need to understand its building sensors, Quick Response (QR), RFID, Near Field
blocks which are as follows and as shown in figure 2: Communication (NFC) and by giving them significant level of
intelligence [17]. The purpose is to allow operation of actuators
and even power of decision making. All these characteristics of
i. Identification
objects can transform a classical home into the smart home
ii. Sensing system.
iii. Communication
iv. Computation (hardware and software) IV. SMART HOME AUTOMATION ALGORITHM
v. Services
In this section network assumptions, network components and
vi. Semantics
operation of the proposed algorithm is explained.
A. Network Components
Automation part is built by using following components:
Arduino mega is used for controlling the whole automation part
of the smart home automation. It is connected with the other
Figure 2. IoT basic building blocks modules used in automation as shown in figure 3. It actuates
different devices on the basis of sensors data. Sensors attached
According to a new data from the juniper research [16] the to Arduino Mega consists of: Temperature and humidity sensor,
number of IoT connected devices in the future will have an Motion Sensor, Electromagnetic door sensor, Gas Sensor,
increase of more than 285% from 13.4 billion at the end of 2015 Electromagnetic Relays are used to control and automate the
and 38.5 billion at the end of 2020. electrical appliances on the basis of sensed data.
Home automation is needed to be enhanced by the
integration of above mentioned technologies in the real world Energy monitoring part is used to monitor and control the
environment. This enhancement is the part of emerging concept energy consumption of home appliances especially heavy
called smart home system. Smart home system will change appliances by using web page and on an LCD screen as shown
people’s life radically with the new ubiqtuous computing and in figure 4. This part consists of following modules: CC3000
communication technologies. It will provide the devices and Wi-Fi module is attached to Arduino mega; which aims to
systems supported with the smart technologies. It will have the provide data on the web page for further processing, actions and
rapid response towards the change in the circumstances without controlling.
human intervention. This new system will be able to learn from
these circumstances.
Smart environment [17] is just like a small world where
sensor enabled and network devices are integrated to work and

96 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

Door Sensor Temperature Sensor Gas Sensor Motion Sensor


Internet Web Page

Wi-Fi Router

Arduino Mega
Wi-Fi Module

Buzzer Fan Control Buzzer Relay Control


Current
CT Sensor
Sensor Arduino Mega LCD/ Display

Figure 3. Automation flow


Figure 4. Energy consumption flow

observed. Also, notifies when the main door is left open for at
B. Network Model
least 30 seconds.
This section briefly discusses the network model of the Energy monitoring:- In this portion temperature and current
proposed system. The proposed model is mainly based on two sensors are connected to the controller (Arduino Mega)
parts; Smart automation and Smart energy monitoring. These temperature sensor is used to automate the fan in the room as
models are discussed in the rest of this section. The detailed the fan will automatically turned ON/OFF when the
prototype of proposed model is presented in Figure 5. temperature rises to certain value and the fan speed will
gradually increase with the increase in temperature. Current
Automation:- In this portion sensors are connected to the sensor is used to monitor the energy consumption of the
controller (Arduino Mega) and provides automation features of
appliances at home and a Wi-Fi module is used to send the data
objects such as; Light is turned ON/OFF based on motion to the internet and is accessed on a web page. The values of
sensed by the sensor or any activity observed by the sensor. energy consumption and temperature are shown on web page
Furthermore, an alarm is generated when gas leakage is
and the control of the appliance is also connected with the web
page which can be accessed globally and cab be controlled.

Figure 5. Prototype of smart home automation

sense the motion (lines 1-5). A gas sensor is installed in a


C. Algorithm Working
kitchen for the safety purpose to handle the critical situation.
The algorithm is written on Arduino Mega chip [19] for The MQ5 sensor sense the data, if its values is greater than a
the smart home system. In smart home system, the Passive predefined threshold (1050) as a result alarm is turned ON to
Infrared Sensor (PIR) motion sensor is installed on the top of notify the user that there is leakage or high amount of gas is
door to monitor the motion when a person enter into the room. detected in the kitchen (lines 6-10). If an intrusion detection is
When a person enters into the room the sensor detects motion observed, which means the door is observed open for more than
as a result the lights turned ON. Otherwise, sensor continuously 30 seconds then alarm is turned ON to notify the user about the

97 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

door (lines 11-16). Lines 16-20 describes the working of Fan user can control the socket from the IoT webpage to turn the air
which is based on room temperature. If the temperature conditioner ON or OFF after getting temperature values.
detected less or equal to 24°C then the Fan is kept OFF, on the
other hand, if the temperature exceeds from 24 °C the Fan is
turned ON and the speed of Fan is directly proportional with the
temperature. Therefore, with the increase of temperature the
speed of Fan is increased. The detailed working of algorithm is
shown in Algorithm 1.

Algorithm 1: Smart Home System


Algorithm
1. if motion sensed by the PIR sensor
then
2. Turned ON Light
3. Else
4. Keep sensing
5. end if
6. if MQ5 gas value greater than or
equals to 1050 then Figure 6. Power consumption variation of 100W bulb
7. Start Alarm
8. else
9. Keep sensing
10. end if
11. if electromagnetic door sensor
lost the line of sight connection for
30 sec then
12. Start Alarm
13. else
14. Keep checking
15. end if
16. if temperature less than or
equals to 24°C then
17. Turned OFF Fan
18. else
19. if temperature greater
than 24°C then
Turned ON Fan
(Speed of Fan increased with the
increase in temperature)
20. end if
21. end if Figure 7. Temperature variation against time
V. PERFORMANCE EVUALTION
This section briefly describes the performance assessment
of the proposed algorithm on a webpage for the temperature and
power consumption, while the motion sensor, gas sensor and
door sensor works locally.
Figure 6 shows the energy consumption of a 100W bulb
from 9am to 11am. Power is calculated by using ampere and
voltage as under:
Power = Voltage * Current (amperes)
Both these values are graphically represented on IoT webpage
working on the embedded static IP of the Wi-Fi module. If some
appliances is consuming more power and exceeding the
threshold (a maximum limit), the user can control the appliance
through IoT webpage.
The real time temperature observed on the webpage against
time is shown in figure 7. Thus, on the basis of temperature data Figure 8. Voltage variations against time
the fan speed is automatically controlled. On the other, hand the Figure 8 shows the input voltage fluctuation for a 100 watt
electric bulb from 9am to 9pm. It is observed that in busy hours

98 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 14, No. 7, July 2016

the voltage drops to the minimum limit. As voltage vary, the [15] Al-Fuqaha, A., et al., “Internet of things: A survey on enabling
technologies, protocols, and applications”, in Communications Surveys
power consumption of the appliances also vary. & Tutorials, IEEE, 2015. 17(4): p. 2347-2376.
VI. CONCLUSION [16] Steffen sorell, “The internet of things” in consumer, industrial and public
services 2015-2020. 2015
In this paper, an IoT based algorithm is proposed for the [17] Cata, M., Smart University ,a new concept in the Internet of Things. IEEE
smart home system to automate the Fan, monitor the gas computer society.
leakage and notify by means of an alarm, intrusion detection [18] Adamkó, Attila, Tamás Kádek, Lajos Kollár, Márk Kósa, and János
and energy monitoring. The proposed algorithm was practically Pánovics. "New Challenges in Smart Campus Applications."
implemented on Arduino mega for the testing purpose. The [19] Arduino Mega, https://www.arduino.cc/en/Main/ArduinoBoardMega
result shows that, the algorithm is capable to observe the motion Salman Ali Khan is currently Pursuing his
of a human being, to observe the intrusion by monitoring the MS degree in Computer Science from City
University of Science and Information
line of sight communication between door and senor. The
technology Peshawar, Pakistan. He received
temperature and power consumption are monitored on a web his BS degree in Computer Science from City
page globally and can be monitored and controlled being away University of Science and Information
from home. Simulation results show that, the system is efficient technology Peshawar, Pakistan in 2014. His
and cost effective in terms of providing reliable information and research interests include IOT (Internet Of
automation. In future, this work can be to implement in a real things), wireless sensor network.
world home to automate it as smart home.
Arshad Farhad currently working as Lecturer in department of
REFERENCES computer, COMSATS Institute of
Information Technology, Sahiwal,
[1] Atzori, L., Iera, A., & Morabito, G. (2010). The internet of things: A
survey.Computer networks, 54(15), 2787-2805. Pakistan. He has completed his MS
[2] C. Buckl, S. Sommer, A. Scholz, A. Knoll, A. Kemper, J. Heuer,
degree in Telecommunication and
A.Schmitt, Services to the field: an approach for resource constrained Networking from Bahria University,
sensor/actor networks, in: Proceedings of WAINA’09, Bradford,United Islamabad, Pakistan in 2015 with
Kingdom, May 2009 distinction as a Silver Medalist. He
[3] R. Yuan, L. Shumin, Y. Baogang, Value Chain Oriented RFID System received his BS degree in Information
Framework and Enterprise Application, Science Press, Beijing, 2007. Technology from University of
[4] G. Broll, E. Rukzio, M. Paolucci, M. Wagner, A. Schmidt, H. Hussmann, Peshawar, Peshawar, Pakistan in 2012.
PERCI: pervasive service interaction with the internet of things, IEEE His research interests include design and
Internet Computing 13 (6) (2009) 74–81. performance evaluation of
[5] D. Reilly, M. Welsman-Dinelle, C. Bate, K. Inkpen, Just point and click? communication protocols for wireless ad
Using handhelds to interact with paper maps, in: Proceedings of ACM hoc, wireless body area networks and
MobileHCI’05, University of Salzburg, Austria, and September. 2005 sensor networks.
[6] D. Niyato, E. Hossain, S. Camorlinga, Remote patient monitoring service
using heterogeneous wireless access networks: architecture and Muhammad Ibrar currently working as
optimization, IEEE Journal on Selected Areas in Communications 27 (4)
(2009) 412–423.
Lecturer in department of computer science,
COMSATS Institute of Information
[7] Piyare, R. and Lee, S.R., 2013. Smart home-control and monitoring
system using smart phone. ICCA, ASTL, 24, pp.83-86.
Technology, Sahiwal, Pakistan. He has
completed his MS degree in
[8] K. S. M. Vinay sagar K N, "Home Automation Using Internet of Things,"
International Research Journal of Engineering and Technology (IRJET), Telecommunication and Networking from
vol. 02, no. 03, pp. 1965-1970, 2015. Bahria University, Islamabad, Pakistan in
[9] Joshi, M., & Kaur, B. (2015). Web Integrated Smart Home Infrastructure 2014. He received his BS degree in
Using Internet of Things. International Journal of Engineering Research Telecommunication and Networking from
and General Science, 3(6). COMSATS Institute of information
[10] Piyare, R., 2013. Internet of things: Ubiquitous home control and technology, Abbottabad, Pakistan in 2011.
monitoring system using Android based smart phone. International His research interests include wireless ad
Journal of Internet of Things, 2(1), pp.5-11 hoc, wireless body area networks and sensor
[11] P. McDermott-Wells, “What is Bluetooth?” IEEE Potentials, vol. 23, no. networks.
5, pp. 33–35, Jan. 2005.
[12] J. Jin, J. Gubbi, S. Marusic, and M. Palaniswami, “An information Muhammad Arif is a PHD scholar at
framework for creating a smart city through Internet of Things,” COMSATS Institute of Information
IEEEInternet Things J., vol. 1, no. 2, pp. 112–121, Apr. 2014. Technology Islamabad, Pakistan. Currently
[13] D. Uckelmann, M. Isenberg, M. Teucke, H. Halfar, and B. Scholz-Reiter, he is an Assistant Professor in the
“Autonomous control and the Internet of Things: Increasing robustness, Department of Computer Science at City
scalability and agility in logistic networks,” Unique Radio Innovation University of Science and Information
forthe 21st Century, pp. 163–181, 2010.
Technology. His current interests include
[14] Gill, K., Yang, S.H., Yao, F. and Lu, X., 2009. A zigbee-based home data warehousing, multimedia image
automation system. Consumer Electronics, IEEE Transactions on, 55(2),
pp.422-430.J. Hurtado-López and E. Casilari, “An adaptive algorithm to retrieval, medical imaging, pattern
optimize the dynamics of IEEE 802.15.4 networks,” Mobile Networks recognition, image processing, and
and Management. 2013, pp. 136–148. computer vision.

99 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
View publication stats

You might also like