International Journal of Interactive Mobile Technologies (iJIM) – eISSN: 1865-7923 – Vol. 14, No. 18, 2020 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home IoT-Based of Automatic Electrical Appliance for Smart Home https://doi.org/10.3991/ijim.v14i18.15649 Intan Sari Areni (), Ahmad Waridi, Indrabayu, Christoforus Yohannes, Armin Lawi, Anugrayani Bustamin Hasanuddin University, Makassar, Indonesia intan@unhas.ac.id Abstract—The remote-control system on electrical equipment in the room can be created by implementing the internet as an Internet of Things (IoT). All devices managed from one interface to deliver quick and convenient home appli- ances management. This research contributes to IoT Technology for controlling lights, vertical curtains, and the temperature of the air conditioner (AC) by im- plementing a private network to run a personal cloud service. The hardware uti- lized is Raspberry Pi 3 as a server, Relay, motor stepper, IR led Transmitter, and temperature sensor DS18B20. For implementation, an android application is de- veloped by MIT App Inventor 2. The result shows that all features function cor- rectly, but each device responds with a different delay value. Delay time response of a lamp, vertical blind, and AC is up to 1.5 sec, 2.1 sec, and 1.6 sec, respec- tively. Keywords—Electrical appliances, IoT, controlling system, smart room 1 Introduction Technology becomes an essential part of human life. People need communication, and information is one aspect that influenced by current technology development, which allows us to make a device and system that can assist all activities and resolve problems by themselves. One of the systems created by man to facilitate the work of the system is the Smart Home. Smart Home is an automated system for a room or a building ease task management. This system provides comfort, convenience, and en- ergy efficiency [1]. A smart home is equipped with a communication network, devices, and sensors that can be automatically controlled remotely from anywhere via a smartphone application, GSM network, or even voice [2][3][4]. Internet of Things (IoT) leads to an electronic access control system that allows a person to perform many activities faster, more productive, and safe. IoT is a scientific development that is very promising to optimize life based on smart sensors and smart devices that cooperated through the internet. In 2018, Bo et al. compared the smart grid communication infrastructure’s performance by utilizing IoT technology. This study was to observe the efficiency of power usage and stability [5]. Kim et al. purpose to describe and manage the aggregated home IoT data based on Smart home Web of 204 http://www.i-jim.org https://doi.org/10.3991/ijim.v14i18.15649 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home Objects (SWO), and SWO analytics platform using real data from smart metering de- vices to analyze appliance usage patterns [6]. IoT technology for real-time smart home implementation was also developed on the Arduino microcontroller board and Lab- VIEW platform. The process of evaluating the system’s design carried out trials on three household appliances, namely room temperature, light energy savings, and secu- rity cameras. The results obtained from the testing process prove the simplicity of the system design, cost-effective, and flexibility [7]. In addition to controlling household appliances, a slightly different study was also conducted by Pal. Smart home healthcare service developed for older adults. The sur- vey process was carried out on 254 older adults aged over 55 years in four Asian coun- tries. Modeling of structural equations of the smallest partial squares is applied in ana- lyzing this problem. This research forms the basis for developing and exploring future IoT technology for elderly health care [8]. Yan et al. implement telemedicine using wearable sensors and intelligent medicine packages as IoT devices for service effi- ciency. The study concerned the variety of health IoT devices and their hardware archi- tecture [9]. Ali et al. proposed a compatible smart home computing platform architec- ture to integrate with a smart grid. The proposed hardware and software algorithm em- power utility companies and homeowners to communicate with home appliances through a public mobile network to monitor and manage power consumption of home appliances [10]. In 2015, monitoring electrical parameters of household devices such as voltage cur- rent and subsequently calculated the appliance's power consumed is performed by Suryadevara et al. The power management in a home can be improved by this tech- nique, which makes proper utilization of electricity [11]. IoT devices also implemented in building security. For example, users can monitor and control the home appliances and door permission systems in building/home [12]. Related to data security on IoT technology, several studies have also been conducted, showing that security and privacy were the important factors that influenced people’s intention to adopt the smart home [13][14]. Issues of confidentiality and information integrity must guarantee a timely response. Research conducted by Mbarek et al. proposed a safe data aggregation scheme using compressed sensing (CS). The encryption process is then performed for each sensor node and the utilization of the hash algorithm to ensure data integrity in the smart home system [15]. This research aims to integrate lamp, curtain, and AC remote into a long-distance with IP-Based that implements the semi-automatic system for further smart building employment. This study used the "ngrok" private network to run a personal cloud ser- vice that functions to synchronize files and run webmail from hardware securely using end-to-end encryption. 2 Techniques and Materials The system is designed to ease the control of light and room temperature and stream- line the room’s electrical energy consumption. This study uses a room that has six lights, one vertical blind curtain, and one AC. For temperature adjustment, a series of iJIM ‒ Vol. 14, No. 18, 2020 205 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home IR LED Transmitters controls the air conditioner’s is temperature and additional sen- sors to monitor the temperature of the room. The system is controlled and monitored through the internet network using a Smartphone. The proposed system architecture is shown in Figure 1 and explained as follows: 1. Raspberry Pi 3, as a central command and server 2. Smartphone with Android OS, as an access medium to Raspberry Pi 3 by the internet 3. Relay SPDT 12V DC, as an electronic switch to control TL lamp 4. Driver L298N is used to control the speed and the direction of Motor Stepper Nema 17 5. Motor Stepper Nema 17, as a vertical blind driver 6. IR LED Transmitter, as an infrared signal transmitter to control AC 7. DS18B20 Sensor, as a temperature sensor 8. Opto-sensor, as a vertical blind original condition sensor The schematic diagram of hardware is shown in Figure 2. There are six relays SPDT, six diodes IN5399 of 1.5A, eight resistors 100Ω of 0.25 watt, two resistors 4.7kΩ, one resistor 22kΩ, seven NPN transistors type 2N2222, one temperature sensor type DS18B20, one IR LED, one Opto-sensor, one motor stepper nema17, and one driver L298N. 2.1 Lamp controller circuit The controlled circuit is Relay Module with six channels of 12V with NPN transistor type 2N2222. A Relay is connected to a transistor. If the input signal from Raspberry Pi 3 is going through a 100 Ω resistor to transistor basis, the transistor will be active, and the circuit works with pulls the Relay where there will be an initial displacement of the state from NC (Normally Close) to NO (Normally Open). The IN5399 diode function is to eliminate electromotive force (EMF) when the input signal stops and pro- tects the transistor. Figure 1 shows that each NO on Relay is connected to each lamp, while the COM Relay is connected to the electricity source. The relay switch is regu- lated by each input signal on the GPIO (General Purpose Input / Output) pin of the Raspberry Pi 3, and pins 11, 5, 6, 13, 19, and 26 controls six lamps in this system. 2.2 AC controller circuit In the AC controller, an NPN transistor is used as a switch that forms a square wave as a remote control. Data is sent via the Raspberry Pi. The LED anode is connected to the power supply of Raspberry Pi 3 while the LED cathode is connected to the transistor collector. There is a resistor of 100kΩ connected to the base and emitter of the transis- tor. The emitter transistor is directly connected to the ground and the base is connected to the GPIO of pin 14 as the Raspberry Pi output. 206 http://www.i-jim.org Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home 2.3 Vertical blind controller circuit We use Motor Stepper Nema 17 to rotate the Vertical Blind shaft and to control this motor we use the L298N Motor Driver which functions to regulate the rotation direction and rotational speed of the motor. The four outputs on L298N is connected with Motor Stepper, GND (ground) is connected to a parallel power supply with Gnd on Raspberry Pi, and the power used is 12V DC and four inputs connected to Raspberry Pi 3 GPIO pins, which are pins 12, 16, 20, and 21. Stepper Motor is used to rotate the Vertical Blind curtain shaft and to control this motor, the L298N Motor Driver is used to regulate the direction of rotation and motor speed. Four outputs on the L298N are connected to a Stepper Motor, ground (GND) connected to a power supply that is parallel to GND on the Raspberry Pi. The power used is 12V DC and four inputs are connected to the GPIO pin from Raspberry Pi 3, namely pins 12, 16, 20, and 21. 2.4 Temperature monitoring circuit On the DS18B20 module sensor, VCC is connected to GPIO 3.3V DC Power pin on Raspberry Pi, GND is connected to the GND Raspberry Pi pin, and the data is connected to GPIO pin 4. 2.5 Temperature monitoring circuit On the DS18B20 module sensor, VCC is connected to GPIO 3.3V DC Power pin on Raspberry Pi, GND is connected to the GND Raspberry Pi pin, and the data is connected to GPIO pin 4. The Opto-sensor output will be connected to the pin GPIO17 of Raspberry Pi through a 22kΩ resistor. This circuit functions as a pull-up and pull-down to overcome floating conditions in the circuit so that the signal can be defined as high (True) or low (False). The Opto Sensor functions LEDs as senders of optical light signals (Transmit- ter), while Phototransistor functions as the receiver of the light (Receiver). The light emitted will be detected by Phototransistor and cause a connection or switch ON on the Phototransistor. The way the Phototransistor works is almost the same as Bipolar Tran- sistor, the difference is that the Phototransistor base operates as a light-sensitive re- ceiver. After the hardware design process, software design is carried out on Raspberry Pi and Android-based smartphones. This research applies Raspbian Jessie as an operating system. Raspberry Pi functions as a server that receives commands from a smartphone and then executes data on the server with a python script to control the device. In order to make, the local host "NGROK" is used. The android application for this system de- veloped using the official Android application site by Google. iJIM ‒ Vol. 14, No. 18, 2020 207 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home Fig. 1. The proposed system architecture Fig. 2. The schematic diagram 3 Result and Discussion The proposed system performance is based on the delay time response parameter. Testing is performed by connecting the Raspberry Pi and Smartphone with the same Internet Service Provider. Data retrieval is carried out 10 times for testing each 208 http://www.i-jim.org Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home controlled device. Fig. 2 shows the main display of software design on the smartphone and Fig. 3 shows the average delay time response for each device. Fig. 3. Home screen display Fig. 4. The Average Delay Time Response Based on the results, each device’s delay time response depends on internet access time and the complexity of the equipment control circuit. The light control only changes the I/O pin from High to Low or Low to High, and the AC control only gives commands to the command prompt to send stored remote IR pulse data. On curtains control, the delay obtained is higher due to the rotation number of the stepper motor. Delay response 0 0.5 1 1.5 2 2.5 Lamp Vertical Blind Air Conditioner Temperature Sensor D e la y T im e [ se c ] Controlled Equipment iJIM ‒ Vol. 14, No. 18, 2020 209 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home on the temperature monitor is higher than other devices because the DS18B20 sensor has a delay in converting temperature data to the 12-bit digital world in a maximum of 750 milliseconds. 4 Conclusion This research performs electronic devices control, such as a lamp, AC, and vertical blind in a room using a smartphone. The delay value reported by Ping becomes the indicator of how responsive the communication with the designated computer. This research shows that the average delay response of HTTP for lamp control is 1.5 sec, a vertical blind is 2.1 sec, and AC control is 1.6 sec. In future research, the development of the device condition monitoring system and room security systems such as adding a solenoid door lock for room access will be studied. 5 Acknowledgement This work is supported by the Universitas Hasanuddin (UNHAS) via LPPM Grant and AIMP Research Group UNHAS. 6 References [1] Adnan, Areni I. S., M. Iqbal, and Y. Andyani. (2017). Smart laboratory system using rasp- berry PI 2. ICIC Express Letter, 8: 763-766. [2] Prasetyo, N. A., Prabawati, A. G., and Suyoto. (2019). Smart Home: Power Electric Moni- toring and Control in Indonesia. International Journal of Interactive Mobile Technologies (iJIM), 13(3): 143-150. https://doi.org/10.3991/ijim.v13i03.10070 [3] Sipani, J. P., Patel, R. H., Upadhyaya, T., and Desai, A. (2018). Wireless Sensor Network for Monitoring & Control of Environmental Factors using Arduino. International Journal of Interactive Mobile Technologies (iJIM), 12(2): 15-26. https://doi.org/10.3991/ijim.v12i2. 7415 [4] Mittal, Y., Toshniwal, P., Sharma, S., Singhal, D., Gupta, R., and Mittal, V. K. (2017). Voice control for smart home automation: Evaluation of approaches and possible architectures. 2017 IEEE 7th International Conference on Consumer Electronics - Berlin (ICCE-Berlin), September 3-6 2017, Berlin, Germany, pp. 140-142. https://doi.org/10.1109/icce-ber- lin.2017.8210613 [5] Bo, P., Bindner, H., Poulsen, B. and You, S. (2018). Smart Grid Communication Infastruc- ture Comparison – For Distributed Control of Distributed Energy Resources using Internet of Things Devices. International Journal of Electrical and Electronic Engineering and Tele- communications, 7(1): 7-14. https://doi.org/10.18178/ijeetc.7.1.7-14 [6] Kim, J. Y., Lee, H. J., Son, J. Y., and Park, J. H. (2015). Smart home web of objects-based IoT management model and methods for home data mining. 17th Asia-Pacific Network Op- erations and Management Symposium (APNOMS), August 19-21 2015, Busan, South Ko- rea, pp. 327–331. https://doi.org/10.1109/apnoms.2015.7275448 [7] Soliman, M.S., Alahmadi, A. A., Maash, A. A., and Elhabib, M. O. (2017). Design and Implementation of a Real-Time Smart Home Automation System Based on Arduino 210 http://www.i-jim.org https://doi.org/10.3991/ijim.v13i03.10070 https://doi.org/10.3991/ijim.v12i2.7415 https://doi.org/10.3991/ijim.v12i2.7415 https://doi.org/10.1109/icce-berlin.2017.8210613 https://doi.org/10.1109/icce-berlin.2017.8210613 https://doi.org/10.18178/ijeetc.7.1.7-14 https://doi.org/10.1109/apnoms.2015.7275448 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home Microcontroller Kit and LabVIEW Platform. International Journal of Applied Engineering Research, 12(18): 7259-7264. [8] Pal, D., Funilkul, S., Charoenkitkarn, N., and Kanthamanon, P. (2018). Internet-of-Things and Smart Homes for Elderly Healthcare: An End User Perspective. IEEE Access: Special Section on Human Centered Smart System and Technologies, 6: 10483-10496. https:// doi.org/10.1109/access.2018.2808472 [9] Yang, G., Xie, L., Mantysalo, M., Zhou, X., Pang, Z., Xu, L. D., et al. (2014). A Health-IoT Platform Based on the Integration of Intelligent Packaging, Unobtrusive Bio-Sensor, and Intelligent Medicine Box. IEEE Trans. Ind. Inform., 10: 2180–2191. https://doi.org/10. 1109/tii.2014.2307795 [10] Al-Ali, A. R., El-Hag, A. H., Dhaouadi, R., and Zainaldain, A. (2011). Smart home gateway for smart grid. International Conference on Innovations in Information Technology, April 25-27, Ab Dhabi, United Arab Emirates, pp. 90–93. https://doi.org/10.1109/innovations. 2011.5893876 [11] Suryadevara, N. K., Mukhopadhyay, S. C., Kelly, S. D. T., and Gill, S. P. S. (2015). Wsn- based smart sensors and actuator for power management in intelligent buildings. IEEE/ASME Transactions on Mechatronics, 20(2): 564–571. https://doi.org/10.1109/tmech. 2014.2301716 [12] Kumar, P., and Pati, U. C. (2016). IoT based monitoring and control of appliances for smart home. Proceeding of IEEE International Conference on Recent Trends in Electronics, Infor- mation & Communication Technology (RTEICT), pp. 1145–1150. https://doi.org/10.1109/ rteict.2016.7808011 [13] Phadnis, N., Krishnan, S. S., Mishra, S. K., and Sujeetha, R. (2019). Smart home Security Augmentation. International Journal of Engineering and Advanced Technology, 8(4): 474- 476. [14] Wei, N. T., Baharudin, A. S., Hussein, L. A., and Hilmi, M. F. (2019). Factors Affecting User’s Intention to Adopt Smart Home in Malaysia. International Journal of Interactive Mo- bile Technologies (iJIM), 13(12): 39-54. https://doi.org/10.3991/ijim.v13i12.11083 [15] Mbarek, B., Meddeb, A., Jaballah, W. B., and Mosbah, M. (2017). A Secure Electric Energy Management in Smart home. International Journal of Communication Systems, 30(17): 1-8, https://doi.org/10.1002/dac.3347 7 Authors Intan Sari Areni was born in Watampone, South-Sulawesi, Indonesia, 1975. She received a B.E. and M.E. degree in Electrical Engineering from University of Hasanud- din (UNHAS) Makassar (1999) and University of Gadjah Mada (UGM) Jogjakarta (2002), respectively, and received a Doctorate degree from Ehime University Japan in 2013. Since 2000 she has been in the Electrical Engineering Department, Faculty of Engineering UNHAS as a lecturer. Her research interests in Multimedia Signal Pro- cessing, Telecommunication, Wireless and Biomedical Engineering, Powerline Com- munication System (PLC). She is a member of IEEE. Ahmad Waridi was born in Makassar, April 19th 1994. He received the bachelor degree in Electrical Engineering from Hasanuddin University, Gowa, Indonesia in 2018. He joined lecturer’s project about Internet of Things, Instrumentation and Control System. iJIM ‒ Vol. 14, No. 18, 2020 211 https://doi.org/10.1109/access.2018.2808472 https://doi.org/10.1109/access.2018.2808472 https://doi.org/10.1109/tii.2014.2307795 https://doi.org/10.1109/tii.2014.2307795 https://doi.org/10.1109/innovations.2011.5893876 https://doi.org/10.1109/innovations.2011.5893876 https://doi.org/10.1109/tmech.2014.2301716 https://doi.org/10.1109/tmech.2014.2301716 https://doi.org/10.1109/rteict.2016.7808011 https://doi.org/10.1109/rteict.2016.7808011 https://doi.org/10.3991/ijim.v13i12.11083 https://doi.org/10.1002/dac.3347 Short Paper—IoT-Based of Automatic Electrical Appliance for Smart Home Indrabayu was born in July 16, 1975 in Makassar, Indonesia. He was awarded Summa Cum Laude from the Doctoral degree in Artificial Engineering in Civil Appli- cation from Hasanuddin University, Makassar, Indonesia, in 2013. Also received M.E. degree in multimedia and communication from Institute Teknologi 10 November, Su- rabaya, Indonesia in 2005 and received the B.E. degree in Communication Engineering from Hasanuddin University, Makassar, Indonesia in 1999. His research interest in- cludes artificial intelligence and multimedia processing. He is a member of IEEE. Christoforus Yohannes received the bachelor degree in Electrical Engineering from Hasanuddin University, Makassar, Indonesia in 1986. He received his Master of Technology from Hasanuddin University, Makassar, Indonesia in 2002. His research interest is in Robotics, Internet of Things, Instrumentation and Control System. Cur- rently, he is the staff of Department of Informatics, Faculty of Engineering, Hasanuddin University. Armin Lawi received Doctor of Engineering from the Department of Creative In- formatics at the Graduate School of Computer Science and Systems Engineering, Kyu- shu Institute of Technology on March 2007. His degree on Master of Engineering from the Department of Computer Science and Communication Engineering at the Kyushu University, Japan on March 2001 and Bachelor of Science from the Department of Mathematics, Hasanuddin University, Indonesia on October 1995. He was a lecturer in the Department of Mathematics on October 1995 and became an associate professor in the Department of Computer Science of the Faculty of Mathematics and Natural Sci- ences, Hasanuddin University, Indonesia on April 2010. His research filed includes al- gorithms, distributed systems, computer network, cryptography, artificial intelligence and data mining. Anugrayani Bustamin was born in Sengkang, 1 December 1990. Graduated S1 In- formatics Engineering majors on Universitas Hasanuddin, Makassar. In 2014 continu- ing education in Informatics Engineering Study Program, Department of Electrical En- gineering, Universitas Hasanuddin, Makassar, Indonesia. Member of Artificial Intelli- gence and Multimedia Processing (AIMP) Research Group, Universitas Hasanuddin. Her research interests include speech recognition and natural language processing. Article submitted 2020-05-19. Resubmitted 2020-08-03. Final acceptance 2020-08-08. Final version pub- lished as submitted by the authors. 212 http://www.i-jim.org