Вы находитесь на странице: 1из 5

1

Designing Remote Control System on Smart


Home Using Arduino Module ESP8266
(August 2017)
Zainal Arifin
Department of Electronic Engineering Education
Indonesia University of Education
Bandung, West Java, Indonesia

 modules into a sophisticated technology that has various


Abstract— The design of this tool based on the problems that functions.
occur when a house is burned due to short-circuit when left by Once the system is fully integrated, in order for the system to
the owner. Remote electrical load control is one solution to the function properly, programs that are incorporated therein are
problem. The design of the tool in this research is a control tool
required. That way, if all systems have been integrated in
that can be used to control electronic devices through internet
media by using main board Arduino Mega. The method in terms of hardware or hardware and software or software, a
designing this tool is the experimental method. The results of this security system can be created. By using ESP8266 module
study indicate that the tool can control 4 loads of electronic connected to the Internet and smart phone or smart phone as a
devices one at a time or at a time, and works well if the internet remote controller or device connected to the Internet as well as
connection is stable and main board Arduino Mega is given well as the Arduino Uno R3 Clone programmed in such a way
5V2A power supply. The distance between the controller and the
that enables the process of communication between those
controller is unlimited as long as both have an internet
connection that connects the controller and the controller. The devices.
controller tool used can be anything as long as it supports the Based on the problems already described and also the ability
.html file extension. of these devices to communicate with each other, the author
tries to do research. End task entitled "Designing Remote
Index Terms—Internet of Things (IoT), Smart Home, Wifi Control Systems on Smart Home by Using Arduino Module
Module (ESP8266), Arduino. ESP8266".
The system used is a communication system wirelees
(wireless) between the device pengedali (smart phone) and
I. INTRODUCTION
controlled device that is a miniature smart home / other load.
A home is a place where everyone spends a lot of time. Communication process that occurs is data communication
How not, all the possessions that are owned in large part between smart phone and arduino uno r3 through internet of
stored in it and the house is a place to use all the property tsb things and esp8266. In the smart phone data communication
with as they pleased. For example a home theater that is and internet of things, there is a two-way communication
available in a home, is something so precious that fun to wear where the smart phone send instructions to the internet of
alone or rollicking. If something happens to the object, for things which then the instructions proceed to arduino uno r3 in
example lost due to theft or even burned by fire with short- order to control the load and at the same time the instructions
circuit cause, of course such incident is not desired by the can be monitored on the smart phone. Figure 2.1 is the overall
owner. Especially when the house is abandoned by the owner, system block diagram.
the probability of occurrence of both cases is very high.
Therefore, it needs a security system installed in a house, so it
can provide a sense of security and comfort for the owner
despite being away from home. Creating a sophisticated
technology is not as complicated as it used to be to integrate
components to create a system. Now the system is already in a
module. By utilizing the rapid technological developments and
the various systems that have shaped these modules are sold in
the market, allowing anyone to creativity to integrate these
2

Figure 2 : Interconnections Diagram between ESP8266 and


Figure 1 : Blok Diagram System Smart Phone
Microcontroller technology as one of the semiconductor
II. SYSTEM ANALYSIS technology products contribute to support human activities.
According to Gary B, Thomas J & Misty E, 2007, The development of the latest microcontroller able to perform
smartphones are internet-enabled phones that typically provide the process of introduction of the conversation and the
Personal Digital Assistant (PDA) functions, such as calendar introduction of the picture (pronounciation recognition and
functions, to-do books, address book, calculators and notes. visual recognition) in accordance with the context of user
According to David Wood, Executive President of PT needs. The realization of these technologies can not be
Symbian OS, "Smartphones can be distinguished from separated from the increasingly diverse software tools
ordinary mobile phones in two fundamental ways: how they (software) microcontroller development with language that is
are made and what they can do." Other understandings easily understood by the developer (developer). The progress
emphasize differently from these two factors. of microcontroller technology is inseparable from the
Internet of Things, also known as IoT abbreviation, is a programming factor in the understanding of visual concepts
concept that aims to expand the benefits of continuously and non-visual environmental conditions or specific objects
connected internet connectivity. As for capabilities such as that implicate to the Users [Premeaux, 2012].
data sharing, remote control, and so on, including also in
objects in the real world. Examples of food, electronics, III. SYSTEM DESIGN AND IMPELEMTATION
collectibles, any equipment, including living things that are all Home Automation or commonly called Smarthome is a
connected to local and global networks through embedded and house equipped with a system to integrate and control the
always on censorship. Essentially, the Internet of Things refers electronic devices that exist at home, for example Lights, TV,
to objects that can be uniquely identified as virtual Home Theater, CCTV, Alarm, Fan, Door Lock, Motion
representations in an Internet-based structure. The term Sensor, and many more again. The goals of the Home
Internet of Things was originally suggested by Kevin Ashton Automation system include ease, energy efficiency, security,
in 1999 and began to be famous through Auto-ID Center at and comfort. Current popularity about the concept of Home.
MIT. Some examples of things that can be done with Home
WiFi communications module with SoC IC ESP8266EX Automation:
Serial-to-WiFi Communication This module is a WiFi module 1. Lamp, Air Conditioner, Fan, TV, Radio, Speaker, can be
that can connect the electronic circuit to the internet-wirelessly switched on one remote control, computer, Tablet PC,
because this electronic module provides access to WiFi Smartphone, even when you are not home (via Internet).
network transparently with ease through serial interconnect 2. Can open / close the curtain, lock the door, turn on the AC /
(UART RX / TX) . Lights, automatically.
The main advantages of this module are the availability of 3. Can play movies through your iPad and automatically turn
RISC microcontroller (Tensilica 106μ Diamond Standard Core on the TV directly play the movie.
LX3) and Flash Memory SPI 4 Mbit Winbond W2540BVNIG 4. If the house is equipped with sensors & detectors, when a
integrated, thus you can directly inject application program fire, gas leak, flood, or anything else automatically alarm
code directly into this module. sounds and the system will notify you via sms / email (This is
As for the function of ESP8266 in order to work, then the very important especially if you are not at home).
module must get the IP Address which usually disetting 5. Make a scenario and timer according to your wishes, for
dynamic, so the modem is connected with the module that will example at 6 pm the headlamps and living room light up then
give the IP address. As illustrated in Figure 2. the morning to die automatically.
6. Monitor and control your entire home through your
smartphone, eg you forgot whether it has locked the door or
3

whether it has turned off the lights / AC. A

Elements On Home Automation System:


The elements in Home Automation include sensors (such as
temperature, light, or motion), the controller (functioning as a Masukan ssid dan password wifi ke sketch lalu compile sketch
program dan upload ke arduino uno r3 clone menggunkan kabel
usb ke komputer. (sketch pada tabel 3.4)
server on a computer network as a central system controlling
other devices), and actuators such as light switches, electric
motors, etc.
Menyalakan wifi dan cek komunikasi wifi dengan https://
One or more interface / interfaces are required, because thingspeak.com/channels/79486 dan arduino uno r3 clone B
menggunakan serial monitor pada perangkat ide arduino.
through these interfaces homeowners can interact and control Ya
the system. These interfaces can be touchscreen, TV, Remote
Tidak
Control, PC / Laptop, Smartphone, Tablet PC, or other (cek opsi-1) Apabila esp8266
Apakah esp8266 sudah bisa
gadgets. Some of these devices can be connected with or berkomunikasi dengan https://
belum bisa berkomunikasi
dengan https://thingspeak.com/
thingspeak.com/channels/79486 dan
without cables. arduino uno r3 clone
channels/79486 dan arduino uno
r3 clone
To simplify the Smart Home system design, systematic
steps should be taken in the form of flow charts. The Smart Ya

Home system design flow diagram is shown in Figure 3.


Relay menyala sesuai dengan data pada serial
Mulai Tidak
monitor

Menyediakan alat dan bahan Menghubungkan kondisi relay normally open


Tidak
(software dan hardware) dengan lampu 12 Vdc pada miniatur smart
home.

Tidak
Melakukan flash firmware pada esp8266 dengan menggunakan
flash tool dengan bantuan arduino uno r3 clone. (wiring pada Ya Apakah relay dan lampu
gambar 3.3 dan sketch program pada tabel 3.3) menyala sesuai data pada serial
monitor

Ya
Cek perangkat
Apakah flash firmware esp8266 dan arduino uno Selesai
Tidak
berhasil? r3 masih berfungsi atau
tidak berfungsi?
Figure 3 : Flow Chart System
Ya
In Figure 4 the tool is used to control the dot matrix,
Wiring esp8266 dengan arduino uno. dimmer lamp, dht module 11 (temperature sensor) + wemos
B
(wiring pada gambar 3.4)
d1 mini and led control via wifi (wemos d1 mini). The detail
in Figure 4 is shown in Figure 5.
Wiring arduino uno r3 clone dengan
modul relay 4 kanal. (wiring pada
gambar 3.4)

Membuat sketch program. (sketch pada


tabel 3.4)

Membuat kanal di https://


thingspeak.com/, sign up, copy nomor
kanal dan api key ke sketch. (sketch
pada tabel 3.4)

Figure 4 : Experimental Setup


4

MODUL RELAY 4
STOP KONTAK 4
CHANNEL

ARDUINO MEGA
STOP KONTAK 3
2560

INDIKATOR
MCB (Miniature
TEGANGAN STOP KONTAK 2
Circuit Breaker)
220 VAC
Figure 7 : Arduino connected with internet through
ESP8266

STEKER 220 VAC STOP KONTAK 1

STOP KONTAK
UTAMA

Figure 5 : Detail from figure 4

IV. UNITS
Testing HTML, using the device adobe dreamweaver cs 6,
the testers create a simple command script by utilizing the url Figure 8 : ESP8266 scanning data from thingspeak.com
feature of thingspeak.com. Here is the HTML design as shown
in Figure 6. In Figure 9 shows that if there is a command from the web
browser in the form of ON / OFF condition, and the web
browser gets reciprocal data in the form of numbers (random),
from thingspeak.com as shown in figure 9, then
thingspeak.com will continue the command To ESP8266
which is then sent to Arduino Mega to be implemented. The
command is a two-way command between the user and
thingspeak.com, while between thingspeak.com and ESP 8266
are one-way commands.

Figure 6 : Html Design Using Adobe Dreamweaver

Testing of hardware is done to determine whether the input


and output equipment is working properly or not. The first
process is to test ESP8266 whether it can be connected
properly and can communicate with the main board (Arduino
Mega) through serial monitor. In Figure 7 is an ESP8266
communication with mega Arduino board. There are four Figure 9 : Reciprocal data (422)
fields to be translated as commands by Arduino Mega, where Here is table of experiment about stability of devices and
field 1 = relay condition 1, field 2 = relay condition 2, field 3 packet loss of data that happen at any given time described at
= relay condition 3 and field 4 = relay condition 4. Condition figure 10 and 11.
ID = 1.0 shows the ON instruction on the relay And ID = 0.1
indicates OFF. In Figure 8 is a reading of fields 1, 2, and 3.
5

Waktu pengujian Jumlah pengujian Jumlah perubahan kondisi control System Away In Smarthome Using Arduino ESP8266
relay
Modules, it can be deduced in the form of:
09.00 s/d 10.00 20 kali 20 kali
1. This tool is able to control 4 relays remotely using internet
10.00 s/d 11.00 20 kali 12 kali
connection, but the test is done only one floor on cimahi
11.00 s/d 12.00 20 kali 14 kali
techno park.
12.00 s/d 13.00 40 kali 36 kali
13.00 s/d 14.00 20 kali 18 kali
2. This device is capable of controlling 4 AC voltage
14.00 s/d 15.00 20 kali 18 kali
electronics devices, one at a time or simultaneously with a
15.00 s/d 16.00 20 kali 19 kali
250VAC10A relay capacity, which means that one load can be
controlled up to 2500 W / load, but the author has a maximum
load of 2200 W for all loads (10A) with MCB used.
Figure 10 : Sum of device experimental
Waktu pengujian Stabilitas alat (%) Packet loss (%)
3. Main board can work if the power source is powered
09.00 s/d 10.00 100 0 5VDC2A.
10.00 s/d 11.00 60 40 4. Infinite tool control capabilities distance during a stable
11.00 s/d 12.00 70 30 internet connection.
12.00 s/d 13.00 90 10 5. There is no problem with the control tools used during
13.00 s/d 14.00 90 10 support for web browser scripts (HTML).
14.00 s/d 15.00 90 10
15.00 s/d 16.00 95 5 REFERENCES
[1] Kadir, A. (2015). Buku Pintar Pemrograman Arduino Tutorial Mudah dan
Figure 11 : Stability of devices and packet loss of data Praktis Membuat Perangkat Elektronik Berbasis Arduino. Yogyakarta :
Mediakom.
[2] Istiyanto, Jazi Eko. (2014). Pengantar Elektronika dan Instrumentasi
Graphic of figure 11 is described at figure 12 that shown Pendekatan Project Arduino dan Android. Yogyakarta : C.V Andi Offset
bad condition of devices to work is at 10 AM until 12 PM. (Penerbit ANDI).
[3] Syhwil, M. (2013). Panduan Mudah Simulasi & Praktek Mikrokontroler
Arduino. Yogyakarta : C.V Andi Offset (Penerbit ANDI).
CHART TITLE [4] Mulia, V. (2015). Pengertian Internet Of Things. [Online]. Tersedia :
https://www.academia.edu/12418429/PENGERTIAN_INTERNET_OF_THI
NGS. [6 April 2016].
Stabilitas alat (%) Packet loss (%)
[5] Setiawan, A. (2013). Mengenal Home Automation. [Online]. Tersedia :
http://www.transiskom.com/2013/01/mengenal-home-automation.html. [6
100

April 2016].
95
90

90

90

[6] Putra, A. A. (2012). Android dan Anak Tukang Sayur. Lubuklinggau :


70
60

wartech-id.com
40

30

[7] www.gadgetfrontal.com. (2014). Perkembangan Smart Phone dan


10

10

10

Kejayaan Apple Inc. [Online]. Tersedia :


0

http://www.academia.edu/7277830/Perkembangan_Smartphone_dan_Sejarah
09.00 10.00 11.00 12.00 13.00 14.00 15.00 _Berdiri_Apple.inc_by_Gadgetfrontal.com. [20 April 2015].
S/D S/D S/D S/D S/D S/D S/D
10.00 11.00 12.00 13.00 14.00 15.00 16.00 [8] Vcc2GND.com. (2014). ESP8266 Remote Serial-to-WiFi Wireless
Communication Module. [Online]. Tersedia :
Figure 12 : Graphic of Stability and Packet Loss http://www.vcc2gnd.com/2014/11/esp8266-remote-serial-to-wifi-
wireless.html. [20 April 2015].

V. CONCLUSIONS
Based on the results of design and testing of Distance