Design and Implementation of a Low-Cost, High-Density IIoT Gateway for Smart Factory Monitoring Using ESP32
DOI:
https://doi.org/10.69968/ijisem.2026v5i2364-375Keywords:
Industry 4.0, IIoT Gateway, ESP32, Embedded Firmware, High-Density Monitoring, Resource-Constrained Microcontrollers, Chunked Transfer Encoding, Network Resilience, Data Persistence, Smart FactoryAbstract
Affordable real-time machine monitoring remains an unsolved operational challenge for small and medium-scale enterprises (MSMEs), where the capital cost of Programmable Logic Controllers (PLCs) and proprietary industrial gateways renders factory-floor visibility economically inaccessible. This paper presents a low-cost IIoT edge gateway engineered on the ESP32 microcontroller, delivering production-grade machine monitoring without the financial burden of conventional infrastructure.
The central contribution is a firmware architecture that scales a single ESP32 — equipped with only 320 KB of Static RAM (SRAM) — to simultaneously monitor and control 512 independent machine nodes (M1–M512) through a live web dashboard. This was achieved through an optimized memory-mapping strategy combined with a purpose-built Chunked Transfer Encoding mechanism over a native HTTP server, which streams dashboard payloads in bounded segments rather than constructing full responses in memory, preventing heap exhaustion under high-density node loads.
Operational continuity in electromagnetically harsh factory environments is maintained by a "Hybrid Scan & Auto-Connect" firmware routine that periodically evaluates Received Signal Strength Indication (RSSI) across a prioritized list of saved network credentials and autonomously switches to the strongest available connection, eliminating monitoring gaps caused by localized interference or access-point failures. Machine states and user-defined node labels are committed to persistent flash storage via the ESP32's Non-Volatile Storage (NVS) Preferences library, ensuring complete context restoration following abrupt power interruptions.
The proposed system demonstrates that resource-constrained microcontrollers, when paired with thoughtfully optimized firmware strategies, are fully capable of sustaining the monitoring demands of industrial-scale deployments. By eliminating dependence on expensive proprietary hardware, this gateway offers MSMEs a practical, scalable, and immediately deployable foundation for real-time factory-floor visibility within Industry 4.0 environments.
References
[1] E. Sisinni, A. Saifullah, S. Han, U. Jennehag, and M. Gidlund, "Industrial Internet of Things: Challenges, Opportunities, and Directions," IEEE Transactions on Industrial Informatics, vol. 14, no. 11, pp. 4724–4734, 2018.
[2] R. Dharmawati, "Industrial Automation PLC, SCADA, IoT-based Monitoring, Smart Factories, and Cyber Physical Production Systems," Journal of Electrical Engineering, 2024.
[3] S. C. Lee, T. G. Jeon, H. S. Hwang, and C. S. Kim, "Design and Implementation of Wireless Sensor Based-Monitoring System for Smart Factory," International Conference on Computational Science, Springer, 2007.
[4] T. Begović, Z. Mandić, and N. Kukrić, "HTTP Embedded Web Server and its Application for Air Parameters Monitoring," International Journal of Electrical Engineering, 2023.
[5] V. C. Gungor, "Industrial Wireless Sensor," in Industrial Communication Systems, 2018.
[6] D. J. Russell, "Non-volatile Memory," in Introduction to Embedded Systems: Using ANSI C, Springer, 2022.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Devya, Shib Sankar Das

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Re-users must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. This license allows for redistribution, commercial and non-commercial, as long as the original work is properly credited.





