SSRN Id3701427

You might also like

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

Smart Home Automation using ESP8266 and Internet of Things

Sarishma Sushant Chamoli Dr. Sumitra Sangwan


Assistant Professor Assistant Professor Assistant Professor
Graphic Era Deemed to be Graphic Era Hill University KTGC Ratia
University, Dehradun, India Dehradun, India Fatehabad, Haryana
sarishmasingh@gmail.com chamolisushant@gmail.com cksummi@gmail.com

Vivudh Fore
Assistant Professor,
Gurukula Kangri Vishwavidyalaya, Haridwar, India
vivdh.fore@gmail.com

Abstract—By means of using the latest technologies such as cloud Soon sensors were customized [2] to monitor and report
computing, Internet of Things, embedded systems etc. this paper specific information rather than general purpose information
proposes a working model for smart home automation. The for example, the smoke sensor started to report the smoke
advancement in field of information technology has led to
sensed, the temperature sensor began noticing the temperature.
numerous practical applications which can help the humans to
Presently many types of sensors are available in the market
lead a better life where regular chores can be handled via
wireless communications instead of practical effort. The which are customized to work and report various types of
proposed model is projected as one of the cheapest ways available environment related information. The deployment of these
to automate a home and transform it into a smart home using sensors accompanied by suitable communication protocols and
ESP8266 microcontroller. The model provides a mechanism to an interface to process and make meaning or use of all of that
remotely monitor and control the home devices by using a user data has led to the development of a new paradigm commonly
interface which will be interlinked to Amazon Elastic Compute referred to as Internet of Things (IoT) [3].
Cloud (EC2). The paper provides a background of the enabling Many new technologies have also developed during
technologies along with the proposed model. The paper concludes
this phase of advancement. One of these is called as cloud
by providing the result of implementation and its challenges.
computing which aims at providing computing as a service to
Keywords-Cloud computing; Internet of Things; Embedded its users [4] i.e. using the internet to deliver the results of
systems; ESP8266; Microcontroller; Amazon Elastic Compute computation to users where the user is not concerned about the
Cloud. geographical locality of the resources. Using these, we can
easily use the sensors to automate any domain we need to. In
I. INTRODUCTION this paper, we primarily focus on the use of sensors to
The advancement in the field of information technology transform a home into a smart home which is capable of taking
and computer science has crossed many hurdles and has decisions on its own and can also be monitored or controlled as
currently reached a threshold whereby low cost, power per the user.
efficient small computational devices are made available and The proposed model is validated as the one which
used at almost every domain of practical knowledge. There has includes minimum cost overhead and is very easy to deploy as
been quite a revolution in use of small devices after the well. Rest of the alternatives in the market costs a normal user
introduction and shift of addresses [1] to Internet Protocol around 10 to 100 times more than the one we have proposed.
version 6. IPv6 provides a 128 bit unique address to a device in The use of ESP8266 microcontroller as an embedded system
contrast to the earlier 32 bit address which limited the address provides a far cheaper alternative. It is very low cost WiFi
space and thus limited the number of devices which can have microchip having complete TCP/IP stack being manufactured
unique addresses. The use of IPv6 enhanced the practical use by Espressif Systems, a Shanghai based company [5] and
of low power, low memory, small computational devices; more works in the same way as a normal microcontroller would.
commonly known as sensors. The use of sensors [2] provided The paper begins by a brief introduction of the
the user with enormous amounts of data which it sensed from enabling technologies which have been used to make the
its environment. proposed system work. This is followed by a detailed

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


description of our model. The results and implementation are smaller and compact, aimed specifically at providing some
then presented followed by the conclusion. dedicated service only.

II. ENABLING TECHNOLOGIES


III. PROPOSED SYSTEM
Many concepts and technologies are amalgamated so as to
make a complete model for smart home automation. Some of Internet of Things can be used to cater to many varied
these concepts are briefly explained below: domains such as home, environment, safety, health, logistics,
industry etc. We propose a solution to provide a low cost,
A. Wireless Sensor Networks efficient and reliable model which can transform our home into
It comprises of a set of distributed small computational a smart home in no time along with providing a mechanism to
devices which interact with one another so as to monitor the manage the devices deployed in the home. The proposed
environmental as well as physical conditions of their system uses some key components which are described as:
surroundings [6]. The key to their popularity lies in the fact that
it allows its users to have a large number of low cost and low A. Amazon Elastic Compute Cloud (EC2)
power computational devices which constantly assist in a better It is a platform which provides the cloud computing services on
service delivery with minimum overhead. The working of a behalf of Amazon Web Services [8]. Users can simply go and
WSN is assisted by means of communication protocols for rent the virtual machines for as long as they want to use the
instance, ZigBee, IEEE 802.15.4 etc. service, after which the machine is either shut down or is
destroyed depending upon the user and its future requirement.
B. Cloud Computing It allows scalability and reliability to the users along with a
It has served as the most dynamic and useful of all the control over the geographical locations of the machines.
paradigm shifts in the information technology which we have
B. Arduino Uno
witnessed [12]. This technology enables the user to access
computational resources and their associated services over the It is a microcontroller board equipped with multiple pins
internet by simply using a user interface to interact with. It has (analog and digital) based on the ATmega328P [9]. The board
eliminated the need of having a bulk of resources at the comprises of 6 analog pins along with 14 digital pins and is
disposal of user’s end, which in turn lead to pooling of programmed using Arduino Integrated Development
resources. This enabled more utilization of resources and thus Environment using a type B cable. This board can be powered
provided a far more cheaper online service in comparison to using a 9 volt battery or via a USB cable. As a precaution, the
the one received via traditional means [4]. RST, ch_pd is connected to a 3.3V (Vcc) so that it works in a
normal mode.
C. Communication protocols
These serve as the backbone for any model which needs to
communicate with distributed objects or devices. These allow
the communication or data to be exchanged between different
devices or units. In our model also, many distributed devices
will come together to share their information, so that the
overall result is up to the expectations of the user.

D. Embedded systems
It resembles a normal computer system comprising of a set of
hardware and software which are dedicated to perform some
tasks [7]. However, an embedded system is designed in a way
that it works and provides only some specific service or task. A
microprocessor or microcontroller, memory, networking
devices, input / output devices and some storage are the key
requirements to make an embedded system work. It can be Figure 1. Arduino Uno pin configuration [9]
considered as general purpose system but in contrast is much

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


C. Message Queuing Telemetry Transport The ESP8266 is to be plugged into a 3.3V separate power
It is a ISO standard based light weight communication supply or into the 3.3V pin of the arduino uno [17]. We have
protocol which works on publish-subscribe model [10]. It is plugged it into the arduino 3.3V pin in the model. Along with
specifically designed to work in resource constrained this, the Rx and Tx of arduino are connected with the Rx and
environments and allows communication between remotely Tx of the ESP8266. Here the pin 3 is used as Rx and pin 2 is
located devices. The devices communicating via MQTT used as Tx. By default the baud rate of ESP8266 is 115200,
generally have very limited processing power and memory. which needs to be adjusted to nearly 57600 for our model. This
The publish-subscribe model comprises of a publisher, broker can be adjusted or altered using the command AT +
and consumer. UART_DEF = 57600,8,1,0,0.

D. ESP8266 Microcontroller IV. IMPLEMENTATION


It is a cheaper form of a WiFi chip manufactured by a Arduino uno contains a .ino file which is used for
Shanghai based firm. It contains complete TCP/IP stack along programming. Arduino will receive all the information
with the capability to function like a microcontroller. It is used gathered by the sensors and it will be acting according to the
in our system to act as a microcontroller to which every device information received by it. This model allows the use of any
will be connected and will act as a node or router of computing device with a working internet connection to
communication between the cloud and the sensors. monitor and control the pins of the arduino which will be
located at home whereas the device can be located anywhere
E. ThingSpeak geographically. For instance, the led lights can be turned on by
It is an open source application developed specifically for using H representing High or they can be turned off by using L
use with the Internet of Things [11] concept whereby different which represents Low for the application programming
things or sensors or devices can store and retrieve data from it interface. The commands used to operate the channel are given
by using a communication protocol. It provides services such below.
as mobility tracking, updates on data, logging applications etc.

Figure 3: Commands to operate the channel

Figure 2: ThingSpeak representing itself as cloud interface [11] The GET request can be used to express the value of field1
by writing the details of the URL in any type of supported
The proposed model dictates that there will be multiple browser. The data entered in filed1 is read by using arduino
distributed sensors placed all across the house. Each sensor uno and then different commands are shot up for generating
will be dedicated to some purpose or the other depending upon commands such as, turn the fan on/off. A request “Get channel
the demands of the user. The model enables the user to control field” is sent using ESP8266 as well as arduino uno.
and monitor these devices from any remote location possible
[15].
V. RESULTS AND CHALLENGES
Three key requirements are there to make it working and After practically deploying the model for the smart home
running. One is arduino uno which is a microcontroller as automation, a user interface was also designed which enabled
explained above. The second one is a Wi-Fi module in the form the user to choose what he/she wants to monitor or operate
of ESP8266. The third is the portable mobile phone which can upon. The following screenshots of the interface represents
easily act as a router. that. The sensors used in automation are DHT11/22 [14]
Temperature and Humidity sensor having 4 pins. It uses
capacitive humidity sensor and then generate a digital signal to

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


the corresponding data pin. The first is for power supply, details out the proposed system by defining the functionality of
second acts as a data pin, third is a no connection pin, lastly its modules and used components, followed by its
fourth one is connected to ground. These sensors are deployed implementation, results and some associated challenges.
at different locations in the home from where they sense the
data, publish it to the broker and then it read by the
REFERENCES
subscribers.
[1] Czyz, Jakub, et al. "Measuring ipv6 adoption." ACM SIGCOMM
Computer Communication Review. Vol. 44. No. 4. ACM, 2014.
[2] Santoso, F. K., & Vun, N. C. (2015, June). Securing IoT for smart home
system. In Consumer Electronics (ISCE), 2015 IEEE International
Symposium on (pp. 1-2). IEEE.
[3] Li, B., & Yu, J. (2011). Research and application on the smart home
based on component technologies and Internet of Things. Procedia
Engineering, 15, 2087-2092.
[4] Soliman, M., Abiodun, T., Hamouda, T., Zhou, J., & Lung, C. H. (2013,
December). Smart home: Integrating internet of things with web services
and cloud computing. In Cloud Computing Technology and Science
(CloudCom), 2013 IEEE 5th International Conference on (Vol. 2, pp.
317-320). IEEE.
[5] Schwartz, Marco. Internet of Things with ESP8266. Packt Publishing
Ltd, 2016.
[6] Akyildiz, Ian F., et al. "Wireless sensor networks: a survey." Computer
networks 38.4 (2002): 393-422.
[7] Marwedel, Peter. Embedded system design. Vol. 1. New York: Springer,
Figure 4: Interface screenshots 2006.
[8] Juve, Gideon, et al. "Scientific workflow applications on Amazon
EC2." 2009 5th IEEE international conference on e-science workshops.
There are many challenges which need addressing before the IEEE, 2009.
smart home automation really becomes a common market [9] Arduino, Store Arduino. "Arduino." Arduino LLC (2015).
practice. The first and foremost challenge is the security and [10] Hunkeler, Urs, Hong Linh Truong, and Andy Stanford-Clark. "MQTT-
S—A publish/subscribe protocol for Wireless Sensor Networks." 2008
privacy concern whereby any virtual user may hack the system 3rd International Conference on Communication Systems Software and
and unlock the home or can also access the personal data about Middleware and Workshops (COMSWARE'08). IEEE, 2008.
the user [16][17]. Moreover in cases when a router is [11] Maureira, Marcello A. Gómez, Daan Oldenhof, and Livia Teernstra.
"ThingSpeak–an API and Web Service for the Internet of
vulnerable, the whole system becomes vulnerable to attacks. Things." Leiden Institute of Advanced Computer Science (2011).
Secondly, only integration of things won’t simply solve the [12] Gubbi, J., Buyya, R., Marusic, S., & Palaniswami, M. (2013). Internet of
Things (IoT): A vision, architectural elements, and future
problem. There needs to be a considerable level of integration directions. Future generation computer systems, 29(7), 1645-1660.
before they start to work in a complete and comprehensive [13] Jie, Y., Pei, J. Y., Jun, L., Yun, G., & Wei, X. (2013, June). Smart home
manner.[18]-[22] The deployment of Internet of Things setup system based on iot technologies. In Computational and Information
Sciences (ICCIS), 2013 Fifth International Conference on (pp. 1789-
at home should also be accompanied by a comprehensive study 1791). IEEE.
guide for the owner of the house so that he or she can know [14] Stojkoska, B. L. R., & Trivodaliev, K. V. (2017). A review of Internet of
what all is going on in their house. Lastly, most important Things for smart home: Challenges and solutions. Journal of Cleaner
Production, 140, 1454-1464.
requirement for a smart home to function is the availability of [15] Singhal, Akriti, and Ravi Tomar. "Intelligent accident management
an internet connection. [23]-[27] system using IoT and cloud computing." 2016 2nd International
Conference on Next Generation Computing Technologies (NGCT).
VI. CONCLUSION IEEE, 2016.
[16] Khanna, Abhirup. "Sarishma.(2015)." Mobile Cloud Computing:
There have been many breakthroughs in development of Principles and Paradigms. IK International.
technologies in the past few years. The use of Internet Protocol [17] Amadeo, M., Campolo, C., Iera, A., & Molinaro, A. (2015, June).
Information Centric Networking in IoT scenarios: The case of a smart
version 6 allowed the deployment of millions of cheap sensors home. In Communications (ICC), 2015 IEEE International Conference
which turned out to be affordable to the users. This paper takes on (pp. 648-653). IEEE.
advantage of this sensor based wireless technology along with [18] Tomar, Ravi, Hanumat G. Sastry, and Manish Prateek. 2020. “A Novel
Protocol for Information Dissemination in Vehicular Networks.” Pp. 1–
the services provided by the Amazon cloud in order to create a 14 in Lecture Notes in Computer Science (including subseries Lecture
smart home automation system. The system is among the Notes in Artificial Intelligence and Lecture Notes in Bioinformatics).
Vol. 11894 LNCS. Springer, Cham.
cheapest and the most efficient way as per the market survey,
[19] Bansal, Parnika, Bhawna Aggarwal, and Ravi Tomar. 2019. “Low-
to transform your home into a smart automated home. It can Voltage Multi-Input High Trans-Conductance Amplifier Using Flipped
control as many as 8 devices by using a single module and the Voltage Follower and Its Application in High Pass Filter.” Pp. 525–29 in
2019 International Conference on Automation, Computational and
corresponding cost will hardly cross the INR 1000. The paper Technology Management, ICACTM 2019. IEEE.

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


[20] Tomar, Ravi, Rahul Tiwari, and Sarishma. 2019. “Information Delivery International Conference on Communication, Computing and Internet of
System for Early Forest Fire Detection Using Internet of Things.” Pp. Things (IC3IoT), 319–323.
477–86 in Communications in Computer and Information Science. Vol. [25] Jayaraman, S., Choudhury, T., & Kumar, P. (2017). Analysis of
1045. Springer, Singapore. classification models based on cuisine prediction using machine
[21] Tomar, Ravi, Manish Prateek, and Hanumat G. Sastry. 2017. “A Novel learning. 2017 International Conference On Smart Technologies For
Approach to Multicast in VANET Using MQTT.” Pp. 231–35 in Ada Smart Nation (SmartTechCon), 1485–1490.
User Journal. Vol. 38. Ada-Europe. [26] Choudhury, T., Kumar, V., & Nigam, D. (2013). Cancer Research
[22] Tomar, Ravi, Hanumat Sastry, and Manish Prateek. 2020. “Establishing Through The Help of Soft Computing Techniques: A
Parameters for Comparative Analysis of V2V Communication in Survey. International Journal of Computer Science and Mobile
VANET.” Journal of Scientific and Industrial Research (JSIR) Computing, IJCSMC, 2(4), 467–477.
79(01):26–29. [27] Arshad, I., Dutta, C., Choudhury, T., & Thakral, A. (2018). Liver
[23] Agarwal, A., Gupta, S., & Choudhury, T. (2018). Continuous and Disease Detection Due to Excessive Alcoholism Using Data Mining
Integrated Software Development using DevOps. 2018 International Techniques. Proceedings on 2018 International Conference on
Conference on Advances in Computing and Communication Engineering Advances in Computing and Communication Engineering, ICACCE
(ICACCE), 290–293. 2018. https://doi.org/10.1109/ICACCE.2018.8441721
[24] Narang, S., Nalwa, T., Choudhury, T., & Kashyap, N. (2018). An
efficient method for security measurement in internet of things. 2018

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

You might also like