Next Article in Journal
Extended Kalman Filter-Based 2D Pose Estimation for Omnidirectional Mecanum Robots via Sensor Fusion: A SO(2) Lie Group Formulation
Previous Article in Journal
IoT System for Monitoring and Controlling Microclimates in a Fruit Fly Breeding Chamber
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Smart Automation for Residential Spaces with PLC-ESP32 Architecture †

by
María Daniela Villegas
1,‡,
Edgar David Paredes
1,‡,
José Alfredo Arévalo
1,‡,
Angélica Quito Carrión
1,*,‡,
Ronald Pillajo
2,‡,
Alan Cuenca Sánchez
2,‡ and
Pablo Proaño
2,‡
1
Facultad de Ciencias Técnicas, Universidad Internacional del Ecuador UIDE, Quito 170411, Ecuador
2
Departamento de Automatización y Control Industrial, Escuela Politécnica Nacional, Quito 170525, Ecuador
*
Author to whom correspondence should be addressed.
Presented at the XXXIII Conference on Electrical and Electronic Engineering, Quito, Ecuador, 11–14 November 2025.
These authors contributed equally to this work.
Eng. Proc. 2025, 115(1), 7; https://doi.org/10.3390/engproc2025115007
Published: 15 November 2025
(This article belongs to the Proceedings of The XXXIII Conference on Electrical and Electronic Engineering)

Abstract

This paper presents the design, development, and testing of a smart home automation system that integrates a Siemens LOGO! programmable logic controller (PLC) with an ESP32 microcontroller to enable dual-mode control—manual and voice-activated. The system automates essential home functions such as lighting, irrigation, gate control, and ventilation. Through the use of the fauxmoESP library, the ESP32 communicates with Amazon Alexa, converting voice commands into GPIO signals interpreted by the PLC. Manual control is retained via pushbuttons, ensuring operational redundancy in case of network or hardware failure. The system architecture includes optocouplers and relays to ensure voltage compatibility and device protection between the 3.3 V microcontroller and the 12–24 V PLC inputs. Functional tests revealed a 100% success rate in manual operations and over 95% in voice-controlled actions, with notable differences in response times. A cost breakdown and risk analysis are also included to assess feasibility and sustainability. This prototype highlights a practical, low-cost solution for residential automation, with scalability potential for broader smart home applications and educational or industrial implementations.

1. Introduction

The Internet of Things (IoT) has established itself as one of the most disruptive and transformative technologies of the last decade. Its ability to connect physical devices through digital networks has allowed for the collection, exchange, and processing of data in real time, generating a significant impact in diverse sectors such as manufacturing, agriculture, healthcare, logistics, and the residential sector [1]. In this context, the IoT has been a key element in the development of smart homes, where automation, energy efficiency, and security have improved significantly due to the integration of these technologies [2].
In the domestic environment, the IoT enables the automation of everyday tasks through the use of sensors, actuators, microcontrollers, and remote management and control platforms [2]. Components such as the ESP32—a microcontroller with integrated Wi-Fi and Bluetooth connectivity—have been widely adopted due to their low cost, versatility, and ease of programming. These devices, along with smart sensors, IP cameras, smart plugs, and virtual assistants such as Amazon Alexa or Google Assistant, form the core of modern home automation systems [3,4].
Beyond basic automation, the evolution of the IoT has been strongly influenced by its convergence with other technologies such as artificial intelligence (AI), cloud computing, and edge computing [5]. This technological integration has allowed for home automation systems to incorporate advanced capabilities such as machine learning, pattern recognition, and autonomous decision-making based on the environment and user habits. This allows smart systems to not only respond to explicit commands but also anticipate user needs, improving their experience and optimizing the use of energy resources [6,7].
The IoT has become a key element in the infrastructure of the modern home, and its evolution and integration capabilities are driving the development of smart, adaptive, and well-being-oriented spaces.

2. Related Works

Several studies have explored the application of the Internet of Things (IoT) in home automation systems, addressing different levels of complexity and scalability. Ref. [3] presents a home automation system based on the ESP32 microcontroller, which incorporates environmental sensors (such as temperature and humidity) and lighting control modules. This solution demonstrates ESP32’s potential as a central platform for smart systems due to its integrated connectivity and real-time processing capabilities.
Other works, such as [8], have proposed a hybrid home automation architecture that combines MQTT and ZigBee–WiFi protocols to facilitate interoperability between devices from different manufacturers. This solution was evaluated in real-life home environments, demonstrating improved communication reliability and improved system response to environmental changes. This approach highlights the importance of using open standards and lightweight protocols in distributed IoT systems, particularly in scenarios where robustness and scalability are determining factors.
The integration of IoT devices with voice assistants such as Alexa has also gained attention [9,10,11]. These systems typically use lightweight protocols (e.g., MQTT, HTTP) and cloud services (e.g., AWS, Google Cloud) for communication and remote management. Platforms like Node-RED facilitate the visual design of automation flows, enhancing flexibility and adaptability [12], making smart home solutions more accessible to non-technical users [13]. Cloud-based control has become central to remote home management due to its scalability and accessibility [14].
In industrial contexts, studies such as [15] demonstrate the feasibility of connecting PLCs (e.g., Siemens) to IoT gateways using protocols such as Modbus RTU and MQTT. These integrations bridge industrial robustness with IoT flexibility, enabling advanced automation in both industrial and residential domains.
However, despite these advances, few studies have explored the integration of industrial-grade PLCs, such as the Siemens LOGO! with low-cost microcontrollers and virtual assistants in a unified, functional home automation environment. This combination presents technical challenges related to communication protocols, software architectures, and device capabilities, including synchronization, security, and compatibility. A well-designed architecture that unifies PLCs, IoT devices, and virtual assistants can significantly contribute to hybrid home automation, enabling advanced solutions for smart buildings and customizable environments.
This work addresses this gap by proposing a functional prototype of an automated home that integrates three key technologies: Amazon Alexa, ESP32, and a Siemens LOGO! PLC. The proposed architecture enables voice commands from Alexa to be processed by the ESP32, which then activates inputs on the LOGO! PLC to control actuators such as lights, fans, pumps, and motors.
The main contribution of this work lies in the seamless integration of industrial and domestic technologies using widely available low-cost components. Unlike previous approaches that focus either on residential or industrial domains, this prototype demonstrates a hybrid architecture that is scalable, flexible, and accessible. It shows that industrial PLCs can be extended through IoT technologies without requiring complex or expensive infrastructure, paving the way for smart buildings that combine industrial reliability with residential convenience.
These contributions align with recent research on hybrid IoT architectures that bridge industrial and residential domains [16], the development of cost-effective smart home solutions [17], and the integration of PLCs with IoT platforms to enhance automation and interoperability [18].

3. Methodology

In the system requirements analysis, the focus should be on both functional and non-functional requirements.
Functional Requirements
It must perform four actions using four digital/analog inputs of the programmable logic controller (PLC). The program must be developed using ladder programming. The actions must include visualization, either on the controller itself or through an implemented graphical interface.
Non-Functional Requirements
Although non-functional aspects are not the primary focus, they remain an essential part of the system’s development. The system must demonstrate innovation, potentially through the use of communication networks, external control components, or additional sensors and actuators capable of performing functions beyond the predefined actions. Both types of requirements can be seen in Figure 1.
The proposal system includes a voice command device (Amazon Alexa) as an innovation element aligned with the specified non-functional requirements. In addition, the PLC device, along with its inputs and outputs, is incorporated to meet the functional requirements, as can be seen in Figure 2.

3.1. System Components

The system integrates carefully selected electronic and mechanical components to ensure optimal operational performance. Its main characteristics are detailed as follows:
  • Control Unit: The control of automated processes is managed by a Siemens LOGO! PLC, chosen for its robustness, versatility, and suitability for industrial programming environments.
  • Communication Interface: An ESP32 microcontroller is utilized to establish a stable wireless connection with the Amazon Alexa voice assistant. This module manages three control signals (corresponding to GPIO pins for fan, gate, and lights, as shown in Figure 3) sent to the PLC. As the ESP32 operates at 3.3 V, a voltage regulator is incorporated into the PLC-compatible cable to ensure proper voltage alignment.
  • Actuators:
    Garage Door Simulation: A 6–12 V DC motor replicates the functionality of a garage door.
    Irrigation System: A 12 V water pump is employed to simulate irrigation.
    Ventilation System: A 12 V fan with dimensions of 8 × 8 × 2.5 cm provides airflow.
    Lighting: A 2.2 V LED simulates vehicle lighting.
  • Sensors and Manual Control: A dimmer switch is connected in parallel to the internal PLC circuit and the ESP32 base signals. This setup allows for manual control of the lights, fan and door functions, providing redundancy in case the Wi-Fi connection or voice assistant becomes unavailable, as can be seen in Figure 2.

3.2. Electronic Design

The system requirements specify that a control device must be included as a functional component. This device should feature four analog or digital inputs to receive signals, as well as four analog or digital outputs to display the executed actions.

3.3. Integration of Control and Power Circuits

Figure 3 presents the low-voltage logic schematic that connects the ESP32 microcontroller, manual pushbuttons, and the digital inputs of the Siemens LOGO! PLC. To ensure electrical level compatibility and protect sensitive components, optocouplers are used to isolate the logic levels of 3.3 V of the ESP32 from the higher voltage levels of the PLC. This isolation prevents potential damage from voltage mismatches or electrical surges.
The control logic implemented in the PLC is designed to support conflict-free dual activation, allowing for both voice commands and manual inputs to operate simultaneously without interference. The logic also enables the prioritization and management of multiple input sources in parallel.

3.4. Power Circuit Design

Figure 3 illustrates the system’s power distribution diagram, showing the current and voltage flow involved in each line, as well as the power supply to the actuators (motors, pumps, and fans) and the PLC itself. The system has a centralized power supply that distributes power to each component, also incorporating essential protection elements in the circuit. For the connection between the PLC outputs and the high-power actuators, a relay module is used that protects the PLC from inductive surges generated by the motors and ensures reliable switching of high-current loads.

3.5. Home Automation Architecture

The implemented home automation system enables the control of various household elements—such as lighting, irrigation, gate operation, and ventilation—through voice commands using Amazon Alexa or via a dedicated mobile application, as illustrated in Figure 3. The ESP32 microcontroller acts as the central communication hub, bridging the interaction between Alexa and the Siemens LOGO! PLC.
Using the fauxmoESP library, ESP32 emulates a smart device recognized by Alexa. When the user issues a voice command, the ESP32 activates a corresponding GPIO pin, which sends a pulse signal to the PLC input. This triggers the execution of the corresponding action within the control logic.
To ensure proper operation, the ESP32 firmware must fulfill the following conditions:
  • Stable Wi-Fi connectivity;
  • Correct configuration of the fauxmoESP device names to match Alexa commands;
  • Accurate GPIO mapping for each device function;
  • Proper timing and duration of pulse signals to match PLC input requirements.

3.6. Electrical Protection and Redundancy

To ensure proper electrical compatibility and protect system components, relays and optocouplers are employed. These devices provide isolation between the 3.3 V logic level of the ESP32 microcontroller and the 12–24 V input range of the Siemens LOGO! PLC, preventing potential damage due to voltage mismatches.
Additionally, physical switches are connected to the same PLC inputs as the ESP32. This configuration enables manual operation in case of network failure or ESP32 malfunction, thus ensuring system redundancy and maintaining the operational continuity of the implemented home automation system.
Table 1 provides a structured overview of the control logic implemented in the system. Each function is described, along with its corresponding PLC input, the available activation methods (via Alexa and manual control), the associated PLC output, and the resulting action executed. This representation enables a clear understanding of the interaction between system components and the execution flow of automated tasks based on the programmed logic.

3.7. Software Design

Figure 4 illustrates the decision-making process for the control logic in the home automation system. The flowchart begins with a decision node that determines whether the activation command originates from Amazon Alexa or a physical button.
If the command is issued through Alexa, the ESP32 microcontroller receives the voice instruction and transmits the corresponding signal to the Siemens LOGO! PLC. The PLC then processes the signal and performs the required action, such as turning on the lights, opening the gate, activating the sprinklers, or powering the fan.
Alternatively, if the command is initiated through a physical button, the button activates the same PLC input in parallel with the ESP32 output. This redundancy ensures that the system can continue functioning even if the network or voice assistant is unavailable.
In both cases, the final outcome is the execution of the same predefined automation actions by the PLC, providing seamless integration between manual and voice-based control methods.

4. Results

The validation of the home automation prototype was conducted through a series of functional tests and risk analysis, focused on evaluating the system’s performance under both manual and voice activated-controlled operation modes. These tests confirmed the viability, robustness, and redundancy of the implementation.

4.1. Functional Test Summary

The prototype was subjected to 50 trial cycles per function under both manual and voice control. Manual mode, using pushbuttons directly interfaced with the Siemens LOGO! PLC, consistently achieved a 100% success rate with minimal delay. Voice control via Amazon Alexa integrated through the ESP32 microcontroller showed high reliability, though slightly lower than manual mode due to network latency and voice recognition challenges.
Figure 5 presents the success rates of each function under manual and voice control using a grouped bar chart. It highlights the consistently high success of manual inputs and reveals slight variations in performance when using voice commands, particularly in functions such as gate control.
These results indicate that, while both control methods are reliable, manual activation remains more immediate. The slight delays in voice control are within acceptable margins for domestic use and can be mitigated with local processing or offline voice assistants. The decision to conduct 50 tests per function is based on ensuring system stability, controlling external variability, and confirming repeatability. This number of iterations allows for the detection of any intermittent failures or inconsistencies in both manual and voice control modes. Additionally, repeating tests under similar conditions minimizes the influence of external factors such as network latency or ambient noise. After approximately 40 executions, no significant variations were observed, confirming consistent performance. Maintaining an equal number of tests across control methods ensures a fair and unbiased comparison. This approach aligns with standard practices in prototype validation, where 30–50 trials are typically used for functional verification. Figure 6 shows a clear example of how it works when a voice command is sent and its corresponding action is performed. In this case, the image shows the operation of the “Lights, Fan, and Parking” devices when activated.

4.2. Risk Matrix and Validation

The project included a comprehensive risk analysis to identify and mitigate potential vulnerabilities in the home automation system. Each identified risk was evaluated based on probability, impact, and risk level, and appropriate mitigation strategies were proposed.
Table 2 confirms the system’s safety and operational reliability through a layered design approach that includes redundancy and preventive safeguards. The Risk Level was calculated as the product of the probability and impact values, where both were rated on a scale from 1 (low) to 3 (high).

5. Conclusions

The implementation of a hybrid home automation system using Siemens LOGO! PLC and ESP32 with Amazon Alexa integration demonstrates a functional, low-cost, and energy-efficient solution for smart home control. The prototype achieved high reliability under both manual and voice control modes, with a measured monthly energy saving of approximately 86.72% compared to conventional setups.
The component cost analysis confirmed that the entire system was developed for under USD 200, which significantly enhances its feasibility for widespread adoption in domestic and educational environments.
In addition, the developed risk matrix and successful functional validation confirm that the system is prepared for real-world scenarios, offering robust performance, fail-safe operation, and modular expandability. Future work may include integration with mobile applications, energy monitoring dashboards, and support for additional smart devices.
The project contributes to the democratization of smart home technologies by making them accessible, secure, and scalable within realistic economic and technical constraints.
This development exemplifies innovation by implementing low-resource home automation, which has shown notable efficiency. It represents a local initiative focused on promoting the adoption of Internet of Things (IoT) technologies in Ecuador. By leveraging industrial equipment alongside domestic devices, the project enables users to control their environments through voice commands, enhancing accessibility and user engagement. This strategic approach not only advances smart technology integration into everyday life but also fosters technological growth in the region, supporting broader economic and social advancement through increased connectivity and automation capabilities within homes and businesses.

Author Contributions

Conceptualization, M.D.V. and E.D.P.; methodology, A.Q.C.; software, J.A.A.; validation, R.P., A.C.S. and P.P.; formal analysis, R.P.; investigation, M.D.V.; resources, E.D.P.; data curation, A.C.S.; writing—original draft preparation, A.Q.C.; writing—review and editing, P.P.; visualization, A.Q.C.; supervision, A.Q.C.; project administration, M.D.V.; funding acquisition, E.D.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data are unavailable due to privacy restrictions.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Chae, B.K. The evolution of the Internet of Things (IoT): A computational text analysis. Telecommun. Policy 2019, 43, 101848. [Google Scholar] [CrossRef]
  2. Varadarajan, M.N.; C, V.; N, R.; A, M. Integration of AI and IoT for Smart Home Automation. SSRG Int. J. Electron. Commun. Eng. 2024, 11, 37–43. [Google Scholar] [CrossRef]
  3. Ahmed, D.; Ali, S.Z.; Khan, F.B.; Faruki, M.H. Design and Implementation of an ESP32-Based Smart Home Automation System With Environmental Monitoring and Automated Controls. IOSR J. Electron. Commun. Eng. 2024, 19, 23–28. [Google Scholar] [CrossRef]
  4. Anusha, K.; Aravind, S.; Rao, N.U.; Ravisagar, T. Internet of Things (IoT) Based Home Automation Using ESP-32. Int. J. Res. Appl. Sci. Eng. Technol. (IJRASET) 2024, 12, 1672–1676. [Google Scholar] [CrossRef]
  5. Prangon, N.F.; Wu, J. AI and Computing Horizons: Cloud and Edge in the Modern Era. J. Sens. Actuator Netw. 2024, 13, 44. [Google Scholar] [CrossRef]
  6. Stolojescu-Crisan, C.; Crisan, C.; Butunoi, B.P. An IoT-Based Smart Home Automation System. Sensors 2021, 21, 3784. [Google Scholar] [CrossRef] [PubMed]
  7. Yassine, A.; Singh, S.; Hossain, M.S.; Muhammad, G. IoT big data analytics for smart homes with fog and cloud computing. Future Gener. Comput. Syst. 2019, 91, 563–573. [Google Scholar] [CrossRef]
  8. Froiz-Míguez, I.; Fernández-Caramés, T.M.; Fraga-Lamas, P.; Castedo, L. Design, Implementation and Practical Evaluation of an IoT Home Automation System for Fog Computing Applications Based on MQTT and ZigBee-WiFi Sensor Nodes. Sensors 2018, 18, 2660. [Google Scholar] [CrossRef] [PubMed]
  9. Babiuch, M.; Postułka, J. Smart Home Monitoring System Using ESP32 Microcontrollers. In Internet of Things; IntechOpen: London, UK, 2021. [Google Scholar] [CrossRef]
  10. Patil, N.; Nimbalkar, A.; Pawar, G.; Shardul, S. Home Automation System Using ESP32 and Alexa. Int. J. Fundam. Multidiscip. Res. (IJFMR) 2023, 5, 101–110. [Google Scholar] [CrossRef]
  11. Sonawane, S.S.; Patil, S.S. IoT Based Smart Home Automation Using ESP32. Int. J. Eng. Res. Technol. (IJERT) 2023, 12. [Google Scholar]
  12. Thomas, L.; MV, M.K.; SL, S.D.; BS, P. Towards Comprehensive Home Automation: Leveraging the IoT, Node-RED, and Wireless Sensor Networks for Enhanced Control and Connectivity. Eng. Proc. 2023, 59, 173. [Google Scholar] [CrossRef]
  13. Patil, N.; Nimbalkar, A.; Pawar, G.; Shardul, S. Voice Controlled Smart Home Automation Using Alexa and ESP32. Int. J. Fundam. Multidiscip. Res. (IJFMR) 2023, 5, 101–110. [Google Scholar]
  14. Dawande, N.A.; Morye, R.; Sarode, D.; Siddiqui, N. IOT Based Home Automation System over Cloud. Int. J. Res. Appl. Sci. Eng. Technol. (IJRASET) 2023, 11, 7034–7039. [Google Scholar] [CrossRef]
  15. Tyrovolas, M.; Hajnal, T. Inter-communication between Programmable Logic Controllers using IoT technologies: A Modbus RTU/MQTT Approach. arXiv 2021, arXiv:2102.05988. [Google Scholar] [CrossRef]
  16. Lee, J.; Park, H. Hybrid Architectures for Industrial and Domestic IoT. Sensors 2022, 22, 3120. [Google Scholar] [CrossRef]
  17. Demrozi, F.; Turetta, C.; Pravadelli, G. SHPIA 2.0: An Easily Scalable, Low-Cost, Multi-purpose Smart Home Platform for Intelligent Applications. SN Comput. Sci. 2024, 5, 42. [Google Scholar] [CrossRef]
  18. Huang, K.C.; Huang, W.Y.; Liu, T.L.; Zhuang, Z.X. Integrating Virtual and Real System Platforms Based on IIoT Technology: A Case Study of PLC and Automation Studio. Genet. Evol. Comput. 2024, 1145, 298–308. [Google Scholar] [CrossRef]
Figure 1. System requirements.
Figure 1. System requirements.
Engproc 115 00007 g001
Figure 2. Proposal developer.
Figure 2. Proposal developer.
Engproc 115 00007 g002
Figure 3. Electrical schematic.
Figure 3. Electrical schematic.
Engproc 115 00007 g003
Figure 4. Flow diagram of software design.
Figure 4. Flow diagram of software design.
Engproc 115 00007 g004
Figure 5. Success rate by function and control method.
Figure 5. Success rate by function and control method.
Engproc 115 00007 g005
Figure 6. Proof of operation.
Figure 6. Proof of operation.
Engproc 115 00007 g006
Table 1. Voice and manual activation mapping for home automation functions.
Table 1. Voice and manual activation mapping for home automation functions.
FunctionPLC InputAlexa Activation CommandManual ActivationPLC Output
LightsI4“Alexa, turn on the lights”Physical buttonQ1
IrrigationI1“Alexa, turn on the sprinklers”Physical buttonQ2
GateI3“Alexa, open the gate”Physical buttonQ3
FanI2“Alexa, turn on the fan”Physical buttonQ4
Table 2. Project risk matrix.
Table 2. Project risk matrix.
RiskProbabilityImpactRisk LevelMitigation Strategy
Wi-Fi connection failureHighMediumHighInclude local button control and ESP32 fallback logic.
PLC damage by overvoltageMediumHighHighIntegrate relays, fuses, MOVs, and optocouplers.
PLC-ESP32 incompatibilityMediumMediumMediumUse optocouplers and perform interface tests.
Actuator overloadLowHighMediumUse oversized power supplies and fuse protection.
ESP32 hardware failureLowHighMediumDesign modular architecture to allow for easy replacement.
Voice command not recognizedHighLowMediumProvide manual control fallback and configure voice assistant training.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Villegas, M.D.; Paredes, E.D.; Arévalo, J.A.; Quito Carrión, A.; Pillajo, R.; Cuenca Sánchez, A.; Proaño, P. Smart Automation for Residential Spaces with PLC-ESP32 Architecture. Eng. Proc. 2025, 115, 7. https://doi.org/10.3390/engproc2025115007

AMA Style

Villegas MD, Paredes ED, Arévalo JA, Quito Carrión A, Pillajo R, Cuenca Sánchez A, Proaño P. Smart Automation for Residential Spaces with PLC-ESP32 Architecture. Engineering Proceedings. 2025; 115(1):7. https://doi.org/10.3390/engproc2025115007

Chicago/Turabian Style

Villegas, María Daniela, Edgar David Paredes, José Alfredo Arévalo, Angélica Quito Carrión, Ronald Pillajo, Alan Cuenca Sánchez, and Pablo Proaño. 2025. "Smart Automation for Residential Spaces with PLC-ESP32 Architecture" Engineering Proceedings 115, no. 1: 7. https://doi.org/10.3390/engproc2025115007

APA Style

Villegas, M. D., Paredes, E. D., Arévalo, J. A., Quito Carrión, A., Pillajo, R., Cuenca Sánchez, A., & Proaño, P. (2025). Smart Automation for Residential Spaces with PLC-ESP32 Architecture. Engineering Proceedings, 115(1), 7. https://doi.org/10.3390/engproc2025115007

Article Metrics

Back to TopTop