Industrial monitoring systems often rely on Modbus RTU devices, while modern IoT platforms use MQTT for scalable data collection and remote monitoring.
This project explores a low-cost industrial edge gateway built around the ESP32, combining RS485 communication, Modbus RTU polling, Wi-Fi connectivity, and MQTT telemetry.
System ArchitectureThe gateway is designed around five main functions:
Read sensor registers using Modbus RTU over RS485.
- Read sensor registers using Modbus RTU over RS485.
Decode raw register values into engineering units.
- Decode raw register values into engineering units.
Publish structured JSON telemetry to an MQTT broker.
- Publish structured JSON telemetry to an MQTT broker.
Detect communication failures and automatically reconnect.
- Detect communication failures and automatically reconnect.
Buffer timestamped measurements during network outages and forward them after reconnection.
- Buffer timestamped measurements during network outages and forward them after reconnection.
The firmware architecture separates Modbus communication, sensor data processing, MQTT publishing, and connection management.
The goal is to provide a practical, reproducible foundation for industrial IoT monitoring that can integrate with SCADA platforms and monitoring applications.
Validation PlanTesting will cover Modbus response handling, polling intervals, MQTT reconnect behavior, offline buffering, and recovery following interrupted network connections.
Hardware photographs, firmware, wiring documentation, and verified test results will be added as implementation progresses.











Comments