Engineering Innovations, ISSN: 2813-1002, Vol. 15, pp 33-42

doi: 10.4028/p-F92q4U

© 2025 The Author(s). Published by Trans Tech Publications Ltd, Switzerland.

Submitted:
2025-06-06

Revised:
2025-06-14

Accepted:
2025-06-18

Online:
2025-11-18

Development of an loT-Enabled Smart Home Automation System

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

M. N. Afnan Uda , Uda Hashim , M. N. A Uda , Ahmad Haziq Zulkifli , Widyastuti , Retno Asih , Yuri Pamungkas , N.H. Ibrahim

Faculty of Engineering, Universiti Malaysia Sabah (UMS), 88400 Kota Kinabalu, Sabah, Malaysia

Faculty of Mechanical Engineering & Technology, Universiti Malaysia Perlis (UniMAP), 02600 Arau, Perlis, Malaysia

Institute of Nano Electronic Engineering, Universiti Malaysia Perlis (UniMAP), 01000 Kangar, Perlis, Malaysia

Department of Material and Metallurgical Engineering, Institut Teknologi Sepuluh Nopember (ITS), 60111 Surabaya, Indonesia

Department of Physics, Institut Teknologi Sepuluh Nopember (ITS), 60111 Surabaya, Indonesia

Department of Medical Technology, Institut Teknologi Sepuluh Nopember (ITS), 60111 Surabaya, Indonesia

Faculty of Chemical Engineering & Technology, Universiti Malaysia Perlis (UniMAP), 02600 Arau, Perlis, Malaysia

nurafnan@ums.edu.my, uda@ums.edu.my , nuraiman@unimap.edu.my, haziqajik010602@gmail.com, wiwid@its.ac.id, retno.asih@its.ac.id, yuri@its.ac.id, hhulwaniibrahim@gmail.com

Keywords: Energy Efficiency, ESP8266, Home Automation, Internet of Things, Mobile Application, Sensors

Abstract

The integration of Internet of Things (IoT) technologies is transforming homes by improving energy efficiency, safety, convenience, and even health. This paper presents the development of an IoT-enabled smart home automation system designed to enhance these aspects using cost-effective components and user-friendly control methods. The system utilizes the ESP8266 microcontroller along with KY-018 Light and HC-SR04 Ultrasonic Sensors to collect environmental data. Core features include real-time visual feedback through LEDs and LCD I2C displays, and remote operation via a custom Android mobile application integrated through Firebase. Both automated and manual control modes are provided, ensuring seamless and adaptive responses to realworld conditions. Experimental results confirm accurate detection and reliable control actions, demonstrating the practicality and scalability of this smart home automation system.

Introduction

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The rapid advancement of technology has enabled the evolution of smart homes, greatly enhancing daily living through improved convenience, security, and energy efficiency [1]-[3]. Beyond these core benefits, smart homes also play a vital role in fostering healthier indoor environments by regulating lighting and air circulation, minimizing manual tasks, and supporting elderly and healthrelated care through automation. This study focuses on the development of an IoT-based smart home automation system powered by the ESP8266 microcontroller [4]-[7]. The system incorporates KY018 Light Sensors and HC-SR04 Ultrasonic Sensors to monitor environmental parameters critical to home automation. These sensors work in tandem with LEDs and an LCD I2C display to deliver immediate visual feedback and system responsiveness [8]-[10].
Smart home automation has become increasingly important in tackling global challenges such as energy conservation, climate resilience, and technological accessibility [11]-[13]. Current systems often rely on advanced computing techniques like big data analytics, cloud services, and user-centered design to manage and optimize home environments [14]-[16]. Despite these advancements, the
widespread adoption of smart home technologies remains hindered by various barriers including technical complexity, high costs, unreliable internet access, and unfriendly user interfaces [17]-[19]. Addressing these challenges is crucial to improving the usability, affordability, and trust in smart home systems [20]-[22].
This research aims to develop a dual-mode IoT-enabled smart home system that integrates both automated and manual control mechanisms. The automated mode uses environmental inputs from sensors to trigger actions, while the manual mode allows users to operate devices remotely via a custom-built mobile application. The project involves the design and implementation of core hardware components, including the ESP8266 microcontroller, KY-018 Light Sensor, HC-SR04 Ultrasonic Sensor, LEDs, and an LCD I2C display. The effectiveness of the system is evaluated in terms of sensor performance, algorithm responsiveness, and user interface reliability. Overall, this work demonstrates the potential of IoT to deliver a practical, adaptable, and health-conscious smart home experience.

Methodology

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

System Design

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

This project adopts a dual-component methodology, comprising an Automatic Detection System and a Manually Controlled System, to create a comprehensive smart home automation solution. The Automatic Detection System utilizes sensors to enable hands-free, real-time management of home devices based on environmental data, automating tasks such as lighting, security, and energy regulation. In parallel, the Manually Controlled System empowers users with direct control via a custom mobile application connected through Wi-Fi, allowing for customization and manual overrides of automated settings. By integrating these two systems, the project achieves a balance between automation and user-driven control, enhancing safety, efficiency, and user convenience. This dual approach ensures a versatile and adaptive smart home system, contributing to an improved quality of life.

Circuit Diagram and Implementation

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The Automatic Detection System leverages an ultrasonic sensor to measure the proximity of objects by emitting ultrasonic sound waves and calculating the time it takes for the waves to reflect off an object. This process determines the distance to the object and triggers specific automated responses. For instance, if the sensor detects an object within a predefined range 0 to 5 centimeters, it activates an LED light, enhancing visibility and security. Additionally, a light sensor is integrated into the system to complement the ultrasonic sensor by detecting ambient light levels and adjusting appliance settings accordingly. For example, under low-light conditions, the light sensor can trigger the activation of lights, ensuring seamless and efficient automation that adapts dynamically to environmental conditions. Figure 1 illustrates the schematic diagram of the Automatic Detection System, while Figure 2 depicts its circuit implementation on a breadboard.

Fig. 1. Schematic Diagram for Automatic Detection System

Fig. 1. Schematic Diagram for Automatic Detection System

Fig. 2. Circuit Implementation on Breadboard

Fig. 2. Circuit Implementation on Breadboard

The Manually Controlled System, on the other hand, relies on a mobile application for managing the activation and deactivation of household devices. Through a successful Wi-Fi connection and user authentication, the application interfaces with the smart home system via the Firebase Realtime Database. This enables users to remotely control devices such as lights and appliances, providing flexibility and convenience. Designed for ease of use, the mobile application ensures that even users with minimal technical expertise can efficiently navigate its features to manage their home environment from anywhere with an internet connection.

Result and Discussion

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

Hardware Analysis

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The automatic detection system plays a vital role in the IoT-powered smart home automation project, with the HC-SR04 ultrasonic sensor as a key component. This sensor measures the distance between itself and an object using the following Eq. (1).

Where D represents the distance, T is the time taken for the ultrasonic waves to reflect, and C is the speed of sound. Equation 1 forms the basis for calculating distances with reasonable accuracy in the system.

Fig. 3. Object Detection Distance Measurement

Fig. 3. Object Detection Distance Measurement

The sensor was tested to detect objects at various specific distances: cm , and 2 cm . As shown in Figure 3, when an object falls within the range of 0 to 5 cm , the LED light is activated. If the object is beyond this range, the LED remains off. The hardware analysis focused primarily on evaluating the accuracy of the ultrasonic sensor. In this test setup, objects were placed at different distances, and the sensor's readings were recorded. These values were then compared against expected measurements to assess any deviation or error. For example, at a target distance of 10 cm , the average measured value was 10.0657 cm , yielding an error percentage of , demonstrating the sensor's precision.
The integration of the light sensor further enhances the overall system's functionality. During nighttime, the system automatically activates outdoor lamps, and in the morning, it deactivates them. This automatic adjustment not only increases convenience but also contributes to energy efficiency by ensuring that lights are only used when necessary.

Software Analysis

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The manually controlled system enables users to manage the smart home automation system through a dedicated mobile application. Developed using Android Studio, the app interfaces with the ESP8266 microcontroller via Firebase Realtime Database, a cloud-based platform designed for real-time data synchronization. The mobile app incorporates an intuitive user interface to ensure ease of use for controlling household appliances remotely. Upon establishing a successful Wi-Fi connection, the app authenticates users through Firebase. Once authenticated, users can toggle devices on or off directly from the app, as illustrated in Figure 4. For example, when a user presses a button in the app, Firebase updates its database in real-time, sending a signal to the ESP8266 microcontroller to control the corresponding hardware, such as an LED light.

Fig. 4. Mobile Application

Fig. 4. Mobile Application

This process guarantees real-time communication and precise control. For instance, if a user activates the living room LED via the app, Firebase immediately registers this input, and the ESP8266 microcontroller processes the change to illuminate the LED. This integration demonstrates the system's responsiveness and effectiveness. Table 1 shows the summary of system responses for different input conditions, illustrating how the sensors and control methods affect the automation behavior.

Table 1. Summary of Input Conditions and System Responses

Input Condition | Sensor or Trigger | System Response
Object detected (≤5 cm) | Ultrasonic Sensor | LED ON, LCD displays "WELCOME BACK"
No object detected (>5 cm) | Ultrasonic Sensor | LED OFF
Low ambient light | Light Sensor | Lamp ON
Bright ambient light | Light Sensor | Lamp OFF, LCD displays "Its Morning"
App button: ON | Firebase via Mobile App | Specific LED ON
App button: OFF | Firebase via Mobile App | Specific LED OFF

Complete Design Analysis

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

Automatic Detection System

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The light sensor was evaluated to ensure proper functionality under different lighting conditions. Its primary role is to manage lighting based on ambient light levels, enhancing energy efficiency. In the absence of light, the yellow LED, functioning as an outdoor lamp, illuminates as shown in Figure 5. This simulates real-world scenarios where the outdoor lamp automatically turns on at night when the sensor detects darkness. Conversely, during daylight, the light sensor disables the lamp to conserve energy.

Fig. 5. No Light Detected

Fig. 5. No Light Detected

When ambient light is detected, as illustrated in Figure 6, the outdoor lamp LED turns off, and the LCD displays the message "Its Morning." This dynamic response mirrors practical applications, where the system adapts to varying environmental conditions, contributing to sustainability and user convenience.

Fig. 6. Light Detected

Fig. 6. Light Detected

The ultrasonic sensor was analyzed for its ability to detect objects within a specified proximity and automate responses accordingly. When the sensor identifies an object within a range of , it triggers the LCD to display the message "WELCOME BACK," and all LEDs light up, as shown in Figure 7 and Figure 8. In practical applications, the sensor can be calibrated for longer detection ranges, such as meters, to control household appliances like lights, fans, or air conditioners. This adaptability enhances proximity-based automation, improving the overall functionality and convenience of the smart home system. Furthermore, users can customize the detection range to suit their specific needs, thereby enhancing satisfaction and usability.

Fig.7. Object Detected

Fig.7. Object Detected

Fig. 8. LED On After Object Detected

Fig. 8. LED On After Object Detected

Manual Controlled System

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

The Manual Controlled System for home automation relies on a mobile application developed with Android Studio to manage device outputs. The process begins by establishing a Wi-Fi connection, followed by user authentication via Firebase. Once authenticated, users can control various household devices, such as LEDs in different rooms, directly through the app. This setup allows for remote control of devices, providing a convenient and user-friendly experience. Firebase enables seamless communication between the mobile app and hardware components, ensuring real-time data synchronization and efficient control of the smart home environment.

Fig. 9. Light in All Room On

Fig. 9. Light in All Room On

Fig. 10. All Light Off

Fig. 10. All Light Off

Figures 9 and 10 illustrate the outputs of the smart home using the manual control method through the Android Studio-based application, with all outputs managed via this app interface. When the user presses a button for a specific room, such as Living Room, Kitchen, or Bedroom, the LED associated with that room turns on. The corresponding change is reflected in Firebase, where the ledStatus value is updated to 1 , and the LED is activated. Conversely, when the red color appears on the button, indicating the LED should be off, the ledStatus value in Firebase is set to 0 , and the LED turns off.

Conclusion

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

This project successfully demonstrates the integration of various hardware components, including the ESP8266 microcontroller, light sensors, ultrasonic sensors, LEDs, and an LCD display, alongside a custom Android application for efficient smart home automation. The system facilitates remote control and real-time data synchronization, significantly enhancing user convenience and operational flexibility. The testing phase confirmed the system's reliability and performance under different conditions, highlighting its potential for practical application in smart homes. Future improvements may include the use of more advanced microcontrollers with higher processing power to accommodate additional sensors and actuators. Enhancing sensor accuracy and reliability, integrating machine learning algorithms for predictive automation, and ensuring a stable power supply are crucial areas for development. Additionally, integrating face recognition technology for personalized access control and CCTV cameras for real-time surveillance could significantly enhance both the security and functionality of the system.

References

The original version of this paper is available on https://www.scientific.net/EI.15.33.pdf

N. Khunrattanaporn, P. Rijiravanich, M. Somasundrum, and W. Surareungchai, "Highly sensitive electrochemical detection of genomic DNA based on stem loop probes structured for magnetic collection and measurement via metalised hollow polyelectrolyte shells," Biosens. Bioelectron., vol. 73, pp. 181-187, 2015, doi: 10.1016/j.bios.2015.05.068.

M. Xu, R. Wang, and Y. Li, "Electrochemical biosensors for rapid detection of Escherichia coli O157: H7," Talanta, vol. 162, pp. 511-522, 2017, doi: 10.1016/j.talanta.2016.10.050.

T. Saxena, P. Kaushik, and M. Krishna Mohan, "Prevalence of E. coli O157: H7 in water sources: An overview on associated diseases, outbreaks and detection methods," Diagn. Microbiol. Infect. Dis., vol. 82, no. 3, pp. 249-264, 2015, doi: 10.1016/j.diagmicrobio.2015.03.015.

B. Thakur et al., "Rapid detection of single E. coli bacteria using a graphene-based field-effect transistor device," Biosens. Bioelectron., vol. 110, pp. 16-22, 2018, doi: 10.1016/j.bios.2018.03.014.

N. Shoaie, M. Forouzandeh, and K. Omidfar, "Voltammetric determination of the Escherichia coli DNA using a screen-printed carbon electrode modified with polyaniline and gold nanoparticles," Microchim. Acta, vol. 185, no. 4, pp.1-9, 2018, doi:10.1007/s00604-018-2749-y.

C. Song, J. Li, J. Liu, and Q. Liu, "Simple sensitive rapid detection of Escherichia coli O157:H7 in food samples by label-free immunofluorescence strip sensor," Talanta, vol. 156-157, pp. 4247, 2016, doi: 10.1016/j.talanta.2016.04.054.

Y. Luo and E. C. Alocilja, "Portable nuclear magnetic resonance biosensor and assay for a highly sensitive and rapid detection of foodborne bacteria in complex matrices," J. Biol. Eng., vol. 11, no. 1, pp. 1-8, 2017, doi: 10.1186/s13036-017-0053-8.

M. Nur et al., "Conductometric immunosensor for specific Escherichia coli O157: H7 detection on chemically funcationalizaed interdigitated aptasensor," Heliyon, vol. 10, no. 5, p. e26988, 2024, doi: 10.1016/j.heliyon.2024.e26988.

U. Hashim et al., "Advancing COVID-19 Detection: High-Performance RNA Biosensing via Electrical Interactions," Int. J. Nanoelectron. Mater., vol. 17, no. June Special issue, pp. 229235, 2024, doi: 10.58915/ijneam.v17iJune.862.

M. N. Afnan Uda et al., "Aluminium Interdigitated Electrode with Gap for Electrolytic Scooting," Int. J. Nanoelectron. Mater., vol. 17, no. Special issue, pp. 237-243, 2024, doi: 10.58915/ijneam.v17iJune.863.

M. N. Afnan Uda, A. B. Jambek, U. Hashim, and M. N. A. Uda, "Development of Voltage Amplifier Electronic Reader for Multiplex Detection of Two Electrode Electrical Biosensors," IOP Conf. Ser. Mater. Sci. Eng., vol. 743, no. 1, 2020, doi: 10.1088/1757-899X/743/1/012019.

M. Isa et al., "Arthropods-mediated Green Synthesis of Zinc Oxide Nanoparticles using Cellar Spider Extract: A Biocompatible Remediation for Environmental Approach," Int. J. Nanoelectron. Mater., vol. 17, no. Special Issue, pp. 211-219, 2024, doi: 10.58915/ijneam.v17iJune.860.

M. N. Afnan Uda et al., "Nano-micro-mili Current to Mili Voltage Amplifier for Amperometric Electrical Biosensors," IOP Conf. Ser. Mater. Sci. Eng., vol. 743, no. 1, 2020, doi: 10.1088/1757899X/743/1/012021.

J. L. Soler-Llorens, J. J. Galiana-Merino, J. Giner-Caturla, P. Jauregui-Eslava, S. Rosa-Cintas, and J. Rosa-Herranz, "Development and programming of Geophonino: A low cost Arduinobased seismic recorder for vertical geophones," Comput. Geosci., vol. 94, pp. 1-10, 2016, doi: 10.1016/j.cageo.2016.05.014.

I. Luiz, B. De Moura, L. Carlos, D. S. Monteiro, and F. A. Soares, "Low Cost Surface Electromyographic Signal Amplifier Based On Arduino Microcontroller," Int. J. Electr. Robot. Electron. Commun. Eng., vol. 8, no. 2, pp. 310-314, 2014.

O. A. Olumodeji and M. Gottardi, "Arduino-controlled HP memristor emulator for memristor circuit applications," Integr. VLSI J., vol. 58, no. March, pp. 438-445, 2017, doi: 10.1016/j.vlsi.2017.03.004.

M. N. A. Uda et al., "Harumanis Mango: Perspectives in Disease Management and Advancement using Interdigitated Electrodes (IDE) Nano-Biosensor," IOP Conf. Ser. Mater. Sci. Eng., vol. 864, no. 1, 2020, doi: 10.1088/1757-899X/864/1/012180.

L. O. Agbolade et al., "Revisiting the Optoelectronic Properties of Graphene: A DFT Approach," Int. J. Nanoelectron. Mater., vol. 17, no. 1, pp. 76-88, 2024, doi: 10.58915/ijneam.v17i1.476.

M. N. A. Uda, U. Hashim, S. C. B. Gopinath, M. N. A. Uda, N. A. Parmin, and A. M. Isa, "Labelfree aptamer based biosensor for heavy metal detection," AIP Conf. Proc., vol. 2291, no. November, 2020, doi: 10.1063/5.0022834.

J. M. Ismail et al., "Synthesis of Zinc Oxide Nanoparticles via Cellar Spider Extract for Enhanced Functional Properties in Antimicrobial Activities," Int. J. Nanoelectron. Mater., vol. 17, no. June Special issue, pp. 203-210, 2024, doi: 10.58915/ijneam.v17iJune.856.

M. N. A. Uda et al., "Analysis on Silica and Graphene Nanomaterials Obtained From Rice Straw for Antimicrobial Potential," Int. J. Nanoelectron. Mater., vol. 17, no. Special issue, pp. 221228, 2024, doi: 10.58915/ijneam.v17iJune.861.

M. N. Afnan Uda, A. B. Jambek, U. Hashim, and M. N. A. Uda, "Electrical DNA Biosensor Using Aluminium Interdigitated Electrode for Salmonella Detection," IOP Conf. Ser. Mater. Sci. Eng., vol. 743, no. 1, 2020, doi: 10.1088/1757-899X/743/1/012022.

This ePub file was created using machine-generated methods and automated software to convert the source text into an ePub format and may contain formatting inconsistencies from the original version. Formatting may vary depending on the device used.