Professional Documents
Culture Documents
Basic Experiments of Home Automation Using ESP8266, Arduino and XBee
Basic Experiments of Home Automation Using ESP8266, Arduino and XBee
Abstract— Extensive implementation of Internet-of-Things since early 2019. The MICT regulation: No. 1, 2019 about
(IoT) systems increases the needs of IoT engineers. However, Radio Frequency Spectrum Usage based on Class Permit, has
some available IoT-trainer modules, which needed to equipped been a kick-off for commercializing IoT service in Indonesia
engineers with IoT skills, are quite expensive and exclusive for [6]. An increase in productivity and efficiency of Indonesia’s
private institutions. This research proposes an IoT-trainer economy has expected by the IoT implementation. Thus, there
design that offers seven simple experiments to understand IoT will be a vast workforce needed in this new era to maintain
concepts, which classified into three aspects: IoT devices, and build the IoT systems in various sectors. Those people
connectivity, and cloud or application system. All devices are need to understand a fundamental knowledge of IoT.
available and purchasable from the market, low-price, and easy
to configure: ESP8266 (NodeMCU-12E, and ESP-01), Arduino IoT-trainer kit is a designated module to support learners
Uno, and Xbee. Moreover, the platforms that we use to tunnel a in experimenting with IoT projects. By a project-based-
network and processing data are also open source: Ngrok, learning, learners will eventually gain some insight to
ThingSpeak, and 000webhost. By exploiting this simple, understand the IoT concept. There are many IoT Trainer kits
inexpensive IoT-trainer design and experimenting with those available, from a simple IoT kit to an advanced trainer. The
seven scenarios, learners can study the basic concept of IoT as price of the available IoT trainer kits is ranging from 50 to 289
infrastructure. USD [7 – 11]. However, the cheapest IoT trainer kit only
provides limited experiments and exclusive in terms of
Keywords—Internet-of-Things, Prototype, Trainer Board,
Home Automation
application or hardware modules, yet the advanced IoT trainer
kit might too expensive for beginners. Moreover, several
I. INTRODUCTION available IoT-trainers only introduce a single development
board, basic communication protocols (e.g., Wi-Fi and
A rapid transformation of the technology era has Bluetooth that consumes high power), and a single
introduced a new lifestyle. In the previous decade, we use the application. There is a need to provide an IoT experiment
internet mainly for communications: e-mail, chatting, video module that inclusively combines several modules or
calls. However, the internet helps us in almost every aspect of protocols to show simple variation infrastructure of IoT.
our daily lives, from online shopping, navigation, and work.
Recently, the internet is not only connecting people; it also The main contribution of this research is providing an IoT-
connects machines to facilitate social works and increase trainer design that affordable and able to inclusively introduce
productivity. Such a scheme is called Internet-of-Things (IoT) different types of devices, communication protocols, and web-
[1]. The IoT enables us to maintain services conveniently: based applications in IoT technology. As the initial project,
without any human intervention. For example, in agriculture, the IoT prototype supports remote home automation functions
we can automatically give nutrition to the plantations by such as controlling electronic devices remotely (LEDs) and
reading its temperature, humidity, and nutrition level. The monitor house environment (temperature and humidity).
actuators will then act to add more nutrition based on the Home automation projects have been chosen because of its
reading. Farmers can control and monitor the situation high reproducibility so students and learners can do
anywhere in the world since they can read all parameters by independent experiments at home.
using the internet. In 2020, an IoT technology would widely
implement in various objects: from connecting people, II. LITERATURE REVIEW
services, vehicles, to home and buildings. [2] The IoT system is a system that reads information about
Several Indonesian telecommunication access providers the environment through sensors, sends the data to other
have been introducing IoT Technology to the national market systems, and enables remote users to reach out or act through
[3]–[5]. They mostly offer a narrowband IoT technology (NB- actuators. We can look at IoT from two perspectives: IoT-as-
IoT), and some of them also propose a low power wide area a-Service and IoT-as-an Infrastructure.
network (LPWA) solution for customers. Moreover, the
Ministry of Information and Communication Technology of
Indonesia made roadmap and regulation of IoT for Indonesia
Authorized licensed use limited to: Cornell University Library. Downloaded on September 11,2020 at 04:16:35 UTC from IEEE Xplore. Restrictions apply.
A. IoT-as-a-Service
The IoT systems give us a service to improve a business
or process. IoT-as-a-Service can be described as things
(devices) that send data that generate insights, and those
insights will later trigger actions to improve a process [12].
These things consist of hardware and software that interact
directly with the world. Next, the data is processed by a stream
processing platform and will be reported to the user. Users can
manage and monitor all the information from the user
management platform. Lastly, users could also integrate
several systems and take actions by using machine learning to
improve the business process. There are several IoT platforms
as a service (PaaS) that give us an end-to-end solution such as
Microsoft Azure IoT, Amazon AWS IoT, Oracle IoT Cloud.
B. IoT-as-an-Infrastructure
As an engineer, we need to understand the architecture of
IoT systems. IoT architecture can be classified as three
essential components: device, gateway or connectivity, and Fig. 1. Methods taken to develop basic experiments
cloud or application [13]. On-site devices consist of sensors,
actuators, and microcontrollers (or microprocessors) to interface. The schematic designed IoT-trainer, code, and
control all the connected sensors and actuators. Then those documentation isis available online 1 . The method of this
devices communicate with each other by specific protocols. research is shown in Figure 1.
By using a gateway, the information gathered from devices is The literature study shows that NodeMCU and Arduino
being sent to the cloud for further processing. As a beginner, are the simplest micro-controller (and also cheapest). The
we may build a web server for the data stream processor and NodeMCU and Arduino are programmed by using the open-
user interface. source Arduino Software (IDE), which uses C and C++
C. Home Automation language. For the communication protocols, we choose Wi-Fi
as it is widely available everywhere, and introduce Xbee, the
Though there are many IoT application scenarios, home
popular low power consumption module. Lastly, we use open-
automation or Smart Home is one of the simple yet essential
source application to process and show data to users.
aspects of realizing a smart city in the future.
A. Depicting Basic Smart Home Application
A smart home means to enable an automation system of
the home features (windows, lighting, air conditioner, doors, NodeMCU and Arduino UNO are the main
washing machine, and other appliances), by integrating microcontroller, it is cheap, breadboard-friendly. The
information and communication technologies (ICT) for NodeMCU has Wi-Fi on board. NodeMCU is a development
controlling those appliances [14]. An impressive development board which runs on ESP8266 and use ESP-12 module, and
of electronics enables people to implement such a system in Arduino Uno is powered by ATMega 328P. As an
their houses since the expense of deploying a smart home introduction for the home automation project, we learn to read
system is cheaper than 10 or 20 years ago. The home temperature and humidity by using DHT11 sensor with a
automation is expected to be widely implemented in a global temperature range 0°C to 50°C, and humidity range 20% to
market in 2022. 90% [16]. Houses also need lighting management, and we
mimic the house lighting by using LED modules. A display
Moreover, the smart home is not only applied for module is also important, as it can ease users to read the data
convenience to manage lighting or entertainment. Stojkoska on-site without the needs of checking mobile-phone to browse
and Trivodaliev in [15] show that the smart home could be via website. We use OLED Display. In this project we also use
integrated into a smart grid system to maintain efficient power Xbee shield, to ease the connectivity of Xbee to Arduino Uno.
consumption. We use a Google Chrome as our main web browser, Ngrok as
the multiplatform tunneling, and a free hosting at
III. METHODS
000webhost.com. To analyze and display the data reading, we
To design an IoT trainer that depict the IoT concept in use website and ThingSpeak.
general, we firstly study several publications and then carried
basic projects to understand IoT infrastructure. Then, we IV. RESULT AND DISCUSSION
deployed some projects to understands devices A schematic of the IoT-trainer module is depicted in Figure
(sensors/actuators and micro-controllers), connectivity and 2. These devices are chosen because it meets our requirement
gateway, cloud, and application concept. These project to introduce several types of IoT devices; familiarize learners
materials then summarized as one comprehensive IoT-trainer to types of connectivity and web applications. This IoT-
design. We define the essential devices that we need and
trainer provides seven basic experiments which classified in
prepare all the installation and components. We begin by
connecting those electronic circuits to other devices or the three categories: understanding device; understanding
Internet, then finally showing the data out through any user connectivity gateway, and understanding
1
Annisa Sarah (annisarah “Documentation of “Learning Internet-of-Things: IoT
Basic Experiments using ESP8266, Arduino and Xbee”,” GitHub. [Online] Available:
https://github.com/annisasarah/iot-trainer-module-2019
291
Authorized licensed use limited to: Cornell University Library. Downloaded on September 11,2020 at 04:16:35 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. IoT-trainer Schematic design, running the fifth experiment
292
Authorized licensed use limited to: Cornell University Library. Downloaded on September 11,2020 at 04:16:35 UTC from IEEE Xplore. Restrictions apply.
Fig. 5. Recorded data on Thingspeak for experiment 6
293
Authorized licensed use limited to: Cornell University Library. Downloaded on September 11,2020 at 04:16:35 UTC from IEEE Xplore. Restrictions apply.
ThingSpeak.setField(1,t); ThingSpeak.setField(2, h); and humidity, and controlling LED via internet, by using
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey); ESP8266 (12E or NodeMCU and ESP-01), Arduino Uno, and
Where t and h is a variable to save temperature and humidity Xbee. We also use ThingSpeak and free web hosting for
reading. myChannelNumber is the unique Channel ID, and processing data. For the future research, more variety of
myWriteAPIKey is a command to write the field. The result connectivity should be introduced, such as LoRa, NB-IoT,
BLE, and many others. Moreover, we also will conduct one
is shown in Figure 5. This shows learners how to process and
practical case, e.g. smart hydroponics system, or any other
present data online by using existing platform.
application. The more advance application may give learners
2) Experiment 7, Web Hosting: In practical, many IoT more skills and deeper their understanding.
applications use an online website to monitor and control
REFERENCES
their devices. For beginners, it recommended to build a free
[1] R. Minerva, A. Biru, and D. Rotondi, “Towards a Definition of the
website with limited features just to have a grasp of Internet of Things (IoT),” IEEE Internet Initiat., pp. 1–86, 2015.
understanding how the data has been collected, stored and [2] Sukode, Sagar., et.al. “Context Aware Framework in IoT: A Survey,”
process in the cloud. We use a free website hosting, that has International Journal of Advanced Trends in Computer Science and
a capability to have its own server and front-end design. Engineering 4(1):1-9, February 2015
Firstly, we must create an account, create database, set the [3] S. Khafid, “XL Axiata Perkenalkan NB IoT di 31 Kota se Indonesia,”
Tempo.co, 2019.
fields, and finally design the user interface. To mimic the
[4] L. D. Jatmiko, “Cakupan NB-IoT Telkomsel Jangkau 22 Kota,”
ThingSpeak capability of showing the recorded data as a Bisnis.com, 2019. [Online]. Available:
table, we also provide the table that will be updated each 5 https://teknologi.bisnis.com/read/20190930/101/1153576/cakupan-
seconds. The website display is shown in Figure 6. This nb-iot-telkomsel-jangkau-22-kota. [Accessed: 18-Dec-2019].
shows learners how build IoT web platform from scratch. [5] L. Anggraeni, “Indosat Ooredoo Siap Gelar 5G, Tinggal Tunggu
Regulasi” Medcom.id, 2019. [Online]. Available:
D. Final IoT Trainer Kit for Home Automation https://www.medcom.id/teknologi/news-teknologi/lKYBOmAN-
indosat-ooredoo-siap-gelar-5g-tinggal-tunggu-regulasi. [Accessed:
The final IoT-trainer is depicted previously in Figure 2, and 18-Dec-2019].
the detailed specification is shown in Table 1. Platforms that [6] Viva, “Regulasi Disahkan, Perusahaan IoT Sudah Bisa Komersialisasi"
we used are Arduino IDE, Ngrok, HTTP Shortcut, Viva.co.id, 2019. [Online]. Available:
https://www.viva.co.id/digital/teknopedia/1149573-regulasi-disahkan-
ThingSpeak, and 000Webhost. The total cost to deploy this [Accessed: 2-Feb-2020].
IoT-trainer is approximately 76 USD. It can still be [7] “Myduino IoT Training Kit,” Accessed on: Jun. 19, 2020. [Online].
considered as cheap (in the range of 50 – 289 USD) but can Available: https://myduino.com/product/myd-002/
offer inclusive IoT projects to enrich engineers' knowledge in [8] “IoT Trainer Kit V1.0,” Accessed on: Jun. 19, 2020. [Online].
IoT fundamentals. Available: https://digiwarestore.com/en/educational-trainer/iot-
trainer-kit-v10-642522.html
TABLE I. IOT TRAINER KIT HARDWARE DETAILS
[9] “ETS IoT Trainer Kit, for Laboratory,” Accessed on: Jun. 19, 2020.
Category Specification [Online]. Available: https://www.indiamart.com/proddetail/iot-trainer-
Development board ESP 8266-12E (Node MCU) 1 pc, Arduino Uno kit-13388313933.html
Communication ESP 8266 (ESP-01), Xbee S2C XB24C, 405F [10] “SparkFun IoT Starter Kit with Blynk Board,” Accessed on: Jun. 19,
board and Firmware, Xbee Shield for Arduino Uno, Xbee 2020. [Online]. Available: https://www.sparkfun.com/products/14682
supporting module Adapter [11] “Atmega328 IoT Trainer Kit,” Accessed on: Jun. 19, 2020. [Online].
Power AMS1117 5V DC Power Module Available: https://www.sparkfun.com/products/14682
Input/sensors DHT 11 [12] “Arduino MKR IoT Bundle [GKX00006] Accessed on: Jun. 19, 2020.
Output LEDs, 0.96-inch OLED Display [Online]. Available: https://www.amazon.com/gp/offer-
Resistors 330 Ohm (2 pcs), 4.7 k Ohm (1 pc) listing/B076VPGKNK/ref=dp_olp_new_mbc?ie=UTF8&condition=n
Cables Cable Micro B USB, Mini B USB Cable, USB 2.0 ew
Cable Type A/B [13] Microsoft, "Azure IoT Reference Architecture" docs.microsoft.com,
additional 1 set jumper wires, protoboard and acrylic 2019. [Online]. Available: https://docs.microsoft.com/en-
us/azure/architecture/reference-architectures/iot/ [Accessed: 2-Feb-
V. CONCLUSION 2020]
[14] Google Cloud, "Overview of Internet of Things" Google Cloud
The Internet-of-Things technology has been rapidly Documentation. [Online]. Available:
implemented. Ministry of Information and Communication https://cloud.google.com/solutions/iot-overview [Accessed: 2-Feb-
Technology of Indonesia has been compiling a roadmap and 2020].
regulation of IoT for Indonesia. Therefore, hundreds skilled [15] Gaurav, S, "The Evolution of Smart Home Technology". BCC
man powered must be available to meet industry needs. Research, 2018. [Online]. Available: http://blog.bccresearch.com/the-
However, providing a commercial IoT trainer kit is costly, and evolution-of-smart-home-technology [Accessed: 2-Feb-2020].
exclusively available for private institutions. A simple, open- [16] Risteska Stojkoska BL, Trivodaliev KV, A review of Internet of Things
for smart home: Challenges and solutions, Journal of Cleaner
source, and low-cost trainer kit may help beginners to Production (2016), doi: 10.1016/ j.jclepro.2016.10.006
understand the basic concept of IoT infrastructure, and learn [17] Mouser Electronics. "DHT11 Humidity & Temperature Sensor".
skills that are needed to entry the IoT job market. We propose [Online].
an affordable and inclusive IoT-trainer which able to run Available:https://www.mouser.com/datasheet/2/758/DHT11-
several experiments in three categories: device, connectivity Technical-Data-Sheet-Translated-Version-1143054.pdf [Accessed: 2-
and cloud. There are in total seven experiments: three Feb-2020].
experiments of understanding device, two experiments of [18] The Things Network. "ThingSpeak".
[Online].Available:https://www.thethingsnetwork.org/docs/applicatio
understanding connectivity, and two experiments of ns/thingspeak/ [Accessed: 2-Feb-2020]
understanding cloud or application. The services that
introduced in these experiments are reading the temperature
294
Authorized licensed use limited to: Cornell University Library. Downloaded on September 11,2020 at 04:16:35 UTC from IEEE Xplore. Restrictions apply.