ESP32-Based Sparkplug B Gateway Framework for Brownfield PLC Integration into an IIoT Unified Namespace: A Data Foundation for Intelligent Industrial Systems
Ivana Šenk, Srđan Tegeltija, Laslo TarjanBrownfield industrial systems often contain programmable logic controllers (PLCs) that expose heterogeneous vendor-specific protocols but cannot directly participate in Industrial Internet of Things (IIoT) data architectures. Replacing these controllers is frequently impractical, while low-cost gateways often address only one vendor or lack Sparkplug B lifecycle management, Unified Namespace (UNS) structuring, security, or supervisory control and data-acquisition (SCADA) integration. This paper proposes a modular ESP32-based edge gateway framework that connects Festo CI, Mitsubishi SLMP, and Siemens S7comm controllers to a Message Queuing Telemetry Transport (MQTT)/Sparkplug B infrastructure and a UNS aligned with the ISA-95 (International Society of Automation Standard 95) enterprise-control hierarchy in Ignition. Each PLC is served by a protocol adapter and represented as a Sparkplug Device, while Transport Layer Security (TLS) protects gateway-to-broker communication. The framework was evaluated using 20,000 measurements per PLC and communication configuration for gateway request-to-publication time, application-level publication-to-Ignition latency, memory usage, and fault behavior. With TLS enabled, mean request-to-publication times were 38.62 ms, 20.28 ms, and 16.80 ms for Festo, Mitsubishi, and Siemens, respectively, while mean publication-to-Ignition latency remained approximately 55–56 ms. The results demonstrate an extensible, low-cost approach for integrating heterogeneous brownfield PLCs without modifying their control logic while establishing a structured data layer for supervisory and future analytics applications.