Design and Research of Infrared Remote Control Based on ESP8266

Abstract

We buy home appliances every once in a while, and we are adding another Remote controller to our homes, and every device has its own remote control. Thus, the purpose of our work is to control all home devices via the Internet and get rid of using multiple Remote Controls. In this paper, we propose a smart remote controller that can be controlling all home devices and operate them through Internet using the mobile app and it contains a self-learning feature and the ESP8266 is used as a microcontroller. By using our proposed model, people can control the home appliances while they are at work or on the way home on a trip with an easy mobile application and they do not need to learn a lot of remote controllers how it works. Therefore, it can copy all other remote control codes. This is a way to manage many home appliances simply and intuitively. Our experiment results show that the average response time of our model achieved 1.191 seconds.

Share and Cite:

Ali, A.-S.A. and Bao, X.N. (2021) Design and Research of Infrared Remote Control Based on ESP8266. Open Access Library Journal, 8, 1-14. doi: 10.4236/oalib.1107314.

1. Introduction

The rapid growth of modern communication systems is leading to change our lifestyle and work, and the mobile technology is available for everyone. The functions of various electronic devices such as cameras, computers, iPods, etc. have become available in mobile phones, and smartphones can communicate with any other devices through Bluetooth or Wi-Fi communication technology. The remote control is a device used to control another device remotely, usually wirelessly. In home electronics, a remote control can be used to operate devices such as a TV set, DVD player, or any other home appliance [1]. They appeared, satisfying people’s demand to some extent. The first remote control device appeared in the fifties of the last century [2]. However, the technology of infrared control devices began to develop in the seventies, which uses infrared rays to control devices by sending a control signal to control devices remotely to operate all the functions of the device [3]. Since most of the home appliances use infrared-based control systems. Therefore, a simple mobile phone cannot be used directly to control any of these devices. Thus, in order to use the mobile phone to control home appliances, it requires assistive devices that enable the mobile phone to control home appliances via the Internet. This allows for increased work efficiency and comfort [4]. Technology is accelerating every day and people are looking for more luxury and continuously update people’s living standard, some people are looking for automated, smart, and convenient home control systems, and some people are not. Consider one room where you have almost 4 home devices (TV, AC, Audio player, DVD player) which means having a lot of remotes controllers inconvenient to carry, high cost and a lot of batteries and if there are children in the house, this will leads to loss the remotes controllers it is inconvenient. Therefore, it will be great to design a smart remote. With the rapid development of smartphones, especially, the Android phone system is fast developing. The smart remote with Android APP will be the most common way. After opening the APP, users can easily control the TV, AC, DVD player, and Audio player, which bring great convenience to people and improve the quality of life [5]. There are many electronic devices that cannot be controlled via the Internet, such as infrared (IR) controllable devices. Many houses have multiple remote controls and all of them are manually controlled and those houses do not use automation, the user does not enjoy the feature of automation, but the smart remote control can be the beginning of change for many users in the world to the Internet of things and smart home at reasonable prices. When users experience controls many home appliances via mobile at the click of a button, they will inevitably want more.

The Internet of Things (IoT) uses the internet with particularly addressable and interconnected items. IoT has wide applications such as smart home, automobile, agriculture, health care, energy-saving, smart city, smart grid, and smart transportation [6] [7]. IoT utilizes minimal effort computing devices that have less energy and effect on the environment [7]. It is expected that by 2025, 70 billion devices will be connected to the internet [8] as shown in Figure 1. Now, IoT needs such as sensors, actuators, and controllers are available at cheaper prices and smaller sizes than before. So, the component required to create an IoT system is available for use [7].

ESP8266 is the cheapest Wi-Fi chip, full TCP/IP stack, and microcontroller ability produced by Espressif. The ESP8266 module lets microcontrollers connecting to Wi-Fi and does simple TCP/IP linking with AT commands. The low cost and the way that there were almost no outer parts on the module which

Figure 1. IoT worldwide connected devices between 2015 and 2025 ( in billion). https://www.statista.com/statistics/471264/iot-number-of-connected-devices-worldwide/

proposes that it could in the end be extremely reasonable in volume settle on it the component of choice for our necessities. The smart remote control can be control through the Internet. Even if the remote control does not know the Infrared code of some devices, it is possible to operate them by learning the IR code of their Infrared remote [9]. The home devices are usually used with infrared led to send their command to turn temperature control on and off. Each device manufacturer used a specific protocol that different from other devices. There are many attempts to control home appliances using different methods, Kuncoro et al. [7] proposed a NodeMCU that used to manage the old type of AC Split appliances through the internet using Wi-Fi connection. This system is designed to upgrading the old type of AC Split device without change the AC Split device. Their work focuses to make the old devices can be controlled via WiFi. Another work done by Sai et al. [5], their work is an implementation and design of a smart IR remote control which can be used for many home devices. The entire system is based on a microcontroller and it can enable user to control home appliances, but the distance is so short just around 10 meters. Takahashi et al. [10] proposed DeepRemote that can identify different home devices with an IR transceiver, camera, a speaker, four buttons, an inertial measurement unit (IMU) and Wi-Fi module. The user can just point the DeepRemote to the device intuitively to recognize a target home device. Once detected, it will automatically switch a particular mode to operate the known home appliance, this work was limited to recognize the devices that trained model on it and due some devices of the same type but each device work with different protocol, so the model cannot distinguish between them. Ramesh et al. [4] Offering an application, the entire application is based on the Wi-Fi and IR blaster module and the AVR microcontroller. Here it can control multiple devices simultaneously and is also used by multiple users. Any device can be accessed via computers, mobile devices, internet-based devices, and Android devices. Their work based on client server communication and all devices should be connected to the same network. In addition of those works another work done by Bajpai and Radha [11], the research aims to develop a signal-based smart home network to control electronic devices through a voice recognition system, their work based on Arduino microcontroller and smartphone via Bluetooth transmission. By using device voice control avoids searching for different buttons/options when working with the device, this work is limited for simple command and don’t support multilingual. Roy et al. [12] presented a design about how to make a remote control and know how to make the smart phone a real universal remote control device that will be considered a lot of uses and has the ability to easily pick up new devices and new infrared protocols, their work don’t use WiFi in communication. Safadinho et al. [13] presented another purpose to use ESPB266 to manage unnamed vehicle UV. They used three architectures for this purpose, point-to-point communication, point-to-point using local area network, and point-to-point using internet access. Han et al. [3] based on single chip microcomputer designed simulation system for infrared remote control. The simulation system for remote control is mainly designed for home devices requiring remote control. The overall task of this design is to power the LED light from the remote signal light. The main design consists of infrared radiation and the receiving end, connecting pins of the STC89C51 microcontroller, their work limit for control the LED light. Chen et al. [14], proposed a control system called the point-n-press for controlling home appliances their proposed system is limited on IR sensors and manually add new device to control it. Satapathy et al. [15] introduced a cheap and reliable home automation system with added security using an Arduino microcontroller with IP connectivity over local Wi-Fi for remote access and control of authorized user devices via a smartphone app. The proposed system is server-free and uses the IoT to control the devices. Users can also use various appliances for controlling, IR remote control modules, or smartphones. To add a new device the user should add it manually and it work locally, so the user should connect to the local network. Syafa’Ah et al. [16] presented a method for measuring response time and the maximum distance of the ESP8266 module in a smart home system that enables real-time and online control of: door locks, automatic switches equipped with energy sensors, lighting dimmer, camera systems and infrared furniture. The system module is based on the ESP8266. This module is connected to the central server via Wi-Fi media using JSON-based data communication using the HTTP protocol. The experimental results show the maximum distance between the Wi-Fi access point and the ESP8266 under LOS conditions is 190 meters and don’t connect via internet, so the user can control the locally, also the module’s average response time is 1.62 seconds. our work aim to build a remote control to control all devices at home via internet with low cost and the system is expected to work in smart homes to control the appliances such as automatic door lock control, providing electrical control, infrared based furniture controls and cameras.

2. Materials and Methods

2.1. Hardware Component Module

The smart remote control needs a processor to manage the orders from Wi-Fi communication. ESP8266 is used for dealing several functions. Specification and circuit design next will be described.

1) ESP-LAUNCHER Microcontroller

ESP-LAUNCHER is an open-source firmware helps to make IoT Projects, and it is designed to make the Application Programming Interface (API) is simple for hardware Input Output. And can reduce the excessive work. Also it is similar like Arduino Chip Input Output (IO) and uses least cost Wi-Fi Microcontroller Unit that is ESP 8266.

ESP8266 is standard digital interface, RF balun, antenna switches, low noise receive amplifier, power amplifier, power management modules and filters, it is the best integrated Wi-Fi microchip as we know. The dimension is 5 mm × 5 mm [17].

Figure 2 shows the ESP-LAUNCHER ESP8266 and its function on all GPIO pin.

ESP8266EX integrates Tensilica L106 32-bit micro controller (MCU), which has extra features such as low power consumption and 16-bit RSIC, reaching a maximum clock speed of 160 MHz. With the Real Time Operation System (RTOS) enabled and Wi-Fi stack functional, about 80% of the processing power is still available for user application programming and development. It has reliable performance in the Internet of Things industry [18].

2) HXD019DML-Infrared Send and Receive

The core of the software is written in C programming language, and the internal hardware circuit adds integrated long and short distance learning functions. Also, provide communication program package and other various packages. Communication GPI is software that has many features such as interoperable

Figure 2. ESP-LAUNCHER ESP8266. http://andrecurvello.com.br/wp-content/uploads/2017/01/esp-launcher-pinout.png

and strong compatibility, provided with OTP process chip, so it is flexible and convenient expansion, modification, and low risk. It can be completed within a day, so saving development time. In addition, It can really update the upgrade format and code value at any time, the single-tube transceiver circuit, and only two components are added. It supports many countries, cities, and different product codes. It can learn most of the infrared code formats in the world, and the learning effect is stable and accurate. It also supports a variety of software and hardware system platforms, such as can be used in multiple languages programming such as C, C++, C#, Linux.

Technical working parameters: Voltage DC: 2.2 - 3.6 V; Quiescent current: about 1 uA; Distance: 8 - 15 meters [19].

2.2. Communication and Protocol

For an IoT system providing, wireless communication is used in this module. Specifically Wi-Fi 802.11 b/g/n is used for the communication. ESP-LAUNCHER already has built-in Wi-Fi module, so Many devices such as laptop and smartphone can access to it via Wi-Fi (Figure 3, Figure 4).

Figure 3. HXD019DML-Infrared Send and Receive. https://www.yoycart.com/Product/599312156644/

Figure 4. IR command protocol [7].

2.3. Designing Prototype

We used ESP8266_lubuntu virtual machine as a compiler. Several libraries are used such as IRremote.h, ESP8266WiFi.h, ESP8266WebServer.h, and WiFiClient.h.

Figure 5 shows IR Wi-Fi module schematic, whereas Figure 6 shows the design of IR Smart remote ESP-LUNCHER, Figure 7 shows IR smart remote Prototype.

2.4. System Model

The system Model contains of modules like Wi-Fi module, ESP8266 module and the HXD019DML-IR module. The android App called Shan Ju is opened on the android phone, the mobile must be connected to the Internet, and then we open

Figure 5. IR Wi-Fi module schematic [20].

Figure 6. Design IR smart remote using ESP-LAUNCHER.

Figure 7. The whole design in reality.

the Android application. The application will ask to enter the network name and password in order to be save it, through the App, commands are sent to the microcontroller then switch to the appliances. After receives the command by the microcontroller, it turn on the relay for that command. The application contains many devices and the ability to search for any device if it is available, as well as the learning feature for new devices. If the device is available in the list and the required device has been contacted, the control buttons will appear for you, then you can send the commands you want to control the device by pressing the button in the app. The application takes the order and converts that order into a string. It is produced identically for each linked device with the specified command and gives this value to the microcontroller. After the controller receives the command from the mobile, it sends it directly to the device that wants to be control. As shown in the Figure 8 of workflow.

3. Implementation

The proposed Remote Control can be implemented in a viable manner with reasonable cost and smart home meaning. The Remote Control basically contents of two major components: one hardware component and the other one is a software component that is used as a communication module. ESP8266 is the central component as it can act as an intermediate module (interfacing device) between hardware devices and the software. Each and every instruction is executed by the micro-controller through which the commands are processed. Figure 8 shows the work flow of the proposed system. The first step is to initialize the ESP8266 module which means connecting the ESP8266 module ESP-LAUNCHER to the smartphone after giving the power supply to it. Then the microcontroller is also energized to accept the commands via Wi-Fi. The Android program will ask to enter the Wi-Fi network name and password, then send it to the remote control to complete the pairing process between the mobile and the remote control. The connect button in the ESP-LAUNCHER is used to

Figure 8. System work flow.

connect the app with the Infrared box (Pair device) Then we select the desired device to be controlled from the list of devices in the application. The next step is to send commands from the mobile to the remote control and then to the device to be controlled through the Android program interfaces.

Now if these commands are given, then the microcontroller will act accordingly otherwise it will not work and wait for the correct command.

As it can be seen in Figure 10, there is a screenshot of the user interface in the app. In the Interface of the app are buttons, for pairing (Pair device and Connect) and button to choose the device and send the commands to the microcontroller.

Figure 9 shows the whole system components, the core device is controller device in the middle, and the devices we can control it, as well as mobile app.

To initialize the system, we do the following.

Add the smart remote device by clicking the Add button as shown in Figure 10.

The image in Figure 11 left shows all devices we can add, first we should choose the Infrared box then we have to add the Wi-Fi name and password to connect the app with the Infrared box. The image right we can see the list of available devices, As soon as the connection is established, and the user is ready to send the command by pressing the buttons in the app.

Figure 9. The whole system scheme.

Figure 10. App interface shows to add remote control.

As we see in the Figure 12, the left shows the available brand for selected device that selected in Figure 11, right side shows the functionality that we can performed to control on device.

Figure 11. App interface shows the avilable devices can connect to.

Figure 12. App interface, left: the list of available devices brand, right: to add device functionality.

Table 1. Response time for tested devices.

4. Result and Discussion

The smart remote control has been successfully tested and tried on many home devices and has proven its efficiency successfully. It can be controlling via phone from everywhere, we integrate all the IR controllers into one mobile phone. We tested our model to control Xiaomi TV and Hair AC and light. Table 1 shows the response time for tested devices

From Table 1 we can see our experiments tested results; we test our model with AC Device the average time response is 1.191 Seconds. Our model achieved response better by 0.9 seconds comparing with [16] results. This is a part of the smart home, which can enhance the overall home experience. Smart remote-control development reduces alkaline battery usage that used in the remotes. Configuring the remote key value in the App database and transmitting an infrared signal with good signal strength are the two main tasks of intelligent remote control. The graphical user interface is easy to understand for every age group and it is functional and responsive. For demonstration purposes, the Xiaomi TV and Hair AC are controlled by a smart remote control.

5. Conclusion

Today, remote control devices in the home are inevitable for today’s generation technology. Convenience and immediate action allow the use of these controls in everyday life. Instead of using different controllers for different devices, you can use a common controller to control the entire devices. Also it can be controlled with a smartphone, and the most commonly used handheld appliances are an added advantage. The smartphone sends commands via the Wi-Fi channel to the ESP-LAUNCHER which acts according to the sent command. These commands are created with the fact that they must be simple. The simplicity of the commands makes this project easy to use. The idea was successfully tested with a smartphone, air conditioner and TV connected to the smart remote control. With the evolution of this project for different electronic and electrical devices, the lives of people will be much more comfortable and luxurious. Each manufacturer’s device has its own independent system, and if the device not in the list of devices brands, the controller cannot recognize it, so to tackle this issue, the user should add the device manually by using smart configuration.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Wikipedia (1995) Remote Control. https://en.wikipedia.org/wiki/Remote_control#:~:text
[2] Zhu, G. (2011) Design of Decoder of Infrared Remote Controller Based on Single Chip Microcomputer. Computing Technology and Automation, No. 2.
https://en.cnki.com.cn/Article_en/CJFDTotal-JSJH201102017.htm
[3] Han, X. (2016) Infrared Remote Control Design Based on Single Chip Microcomputer. 2015 IEEE International Conference on Computer and Communications (ICCC), Chengdu, 10-11 October 2015, 245-249. https://doi.org/10.1109/CompComm.2015.7387575
[4] Ramesh, N.V.K., Kumar, S.V.T., Vamsi, V. and Akarsh, S. (2017) Wi-Fi Controlled Universal Remote Using ESP8266. ARPN Journal of Engineering and Applied Sciences, 12, 7233-7238.
[5] Sai, C.P.R., Datta, V.S. and Sudheera (2016) Design of a Smart Remote. 2016 International Conference on Circuit, Power and Computing Technologies (ICCPCT), Nagercoil, 18-19 March 2016, 1-4.
[6] Ling, Z., Gao, C., Sano, C., Toe, C., Li, Z. and Fu, X. (2019) STIR: A Smart and Trustworthy IoT System Interconnecting Legacy IR Devices. IEEE Internet of Things Journal, 7, 3958-3967.
https://doi.org/10.1109/JIOT.2019.2963767
[7] Kuncoro, L. and Saputra, P. (2017) Implementation of Air Conditioning Control System. Int. Conf. Smart Cities, Autom. Intell. Comput. Syst., 8-10, 126-130.
[8] Department, S.R. (2016) Internet of Things (IoT) Connected Devices Installed Base Worldwide from 2015 to 2025.
https://www.statista.com/statistics/471264/iot-number-of-connected-devices-worldwide/
[9] Samanta, S., Khan, K.K., Bhattacharyya, A., Das, S. and Barman, A. (2016) Home Automation Using Arduino and ESP8266. International Journal of Advanced Engineering, Management and Science (IJAEMS), 2, 1446-1456.
[10] Takahashi, Y., Shirakura, N., Toyoshima, K., et al. (2017) DeepRemote: A Smart Remote Controller for Intuitive Control through Home Appliances Recognition by Deep Learning. 2017 10th International Conference on Mobile Computing and Ubiquitous Network (ICMU), Toyama, 3-5 October 2017, 1-6. https://doi.org/10.23919/ICMU.2017.8330111
[11] Bajpai, S. and Radha, D. (2019) Smart Phone as a Controlling Device for Smart home Using Speech Recognition. 2019 International Conference on Communication and Signal Processing (ICCSP), Chennai, 4-6 April 2019, 701-705. https://doi.org/10.1109/ICCSP.2019.8697923
[12] Roy, J. and Roy, J.K. (2014) Design of Smart Universal Remote Using Mobile for Home Automation. IOSR Journal of Computer Engineering, 16, 73-80.
https://doi.org/10.9790/0661-16587380
[13] Safadinho, D., Ramos, J., Ribeiro, R., Reis, A., Rabad?o, C. and Pereira, A. (2019) Communication Modes to Control an Unmanned Vehicle Using ESP8266. Advances in Intelligent Systems and Computing, 931, 56-64. https://doi.org/10.1007/978-3-030-16184-2_6
[14] Havani, P.A.B. and Alitha, N.L. (2018) A New Approach for Modern Homes Controlling and Monitoring Using ESP8266 and ARM Controller. International Journal of Advanced Technology and Innovative Research, 10, 461-464.
[15] Satapathy, L.M. (2018) Arduino Based Home Automation Using Internet of Things (IoT). International Journal of Pure and Applied Mathematics, 118, 769-778.
[16] Syafa’ah, L., Minarno, A.E., Sumadi, F.D.S. and Rahayu, D.A.P. (2019) ESP 8266 for Control and Monitoring in Smart Home Application. 2019 International Conference on Computer Science, Information Technology, and Electrical Engineering (ICOMITEE), Jember, 16-17 October 2019, 123-128. https://doi.org/10.1109/ICOMITEE.2019.8921287
[17] Espressif Systems (2019) ESP8266 SDK Getting Started Guide.
[18] Espressif Systems (2020) ESP8266EX Datasheet.
[19] L. Shenzhen Hongxinda Technology Co. (2013) Smart Infrared Remote Control IC for Mobile Phones and Tablets—HXD019 Introduction.
[20] Espressif Systems (2018) ESP-LAUNCHER_SCH.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.