About the project
# Project Overview
The Digital Machine Health Monitor is an IoT-based system developed for real-time generator monitoring and predictive maintenance. It combines embedded sensing, MQTT communication, backend processing, machine learning, and a web dashboard to monitor generator performance and identify abnormal operating conditions.
The prototype uses a DC motor to represent generator operation. An ESP32 collects data from connected sensors and transmits it to a backend application, where the data is processed, analysed, and displayed. The system aims to support condition-based maintenance by identifying potential faults before they lead to equipment failure.
# 1. System Architecture and Operation
The system consists of four main layers:
**Physical Monitoring and Embedded Processing**
The ESP32 collects operating data using:
- Hall-effect sensor for RPM measurement.
- DS18B20 for coolant temperature monitoring.
- MPU6050 for three-axis vibration measurement.
- Fuel-level sensor for monitoring fuel level and availability.
The ESP32 processes the MPU6050 readings to calculate the overall 3D vector vibration magnitude, which is transmitted as a single value. Fuel-level was also taken from sensor and readings were used as representative data for machine-learning development on Fuel depletion.
A relay-based shutdown mechanism is included to demonstrate remote and automated control.
**Communication Layer**
The ESP32 transmits structured JSON telemetry to an MQTT broker, providing communication between the monitoring hardware and backend application.
**Backend Processing and Machine Learning**
A Python FastAPI backend receives MQTT data, processes measurements, and stores historical records in an SQLite database. It calculates additional parameters, including fuel consumption rate, estimated remaining fuel time, temperature rate of change, and an overall machine health index.
An Isolation Forest model identifies abnormal operating patterns by learning from recorded operating data. Separately, a threshold-based protection system monitors predefined limits and triggers warnings or prototype shutdown actions when critical conditions like engine stalling are detected.
**Web-Based Monitoring Dashboard**
The dashboard displays live RPM, coolant temperature, fuel level, vibration magnitude, and machine health status. It uses WebSockets for live updates and provides graphical monitoring, operational alarms, historical records, session analytics, machine-learning model training, and remote shutdown controls.
# 2. Major Achievements and Technical Contributions
The project integrates embedded monitoring, edge processing, wireless communication, backend analytics, machine learning, and web-based control into a single working prototype.
Key contributions include:
- Development of an ESP32-based monitoring unit.
- Acquisition of RPM, coolant temperature, fuel-level, and vibration data.
- Edge processing of three-axis vibration readings into an overall 3D magnitude.
- MQTT-based telemetry transmission using JSON.
- Development of a FastAPI backend and SQLite database.
- Implementation of fuel consumption and remaining-time calculations.
- Integration of Isolation Forest for machine-learning-based anomaly detection.
- Implementation of independent threshold-based fault detection.
- Development of a live dashboard with alarms, charts, and historical analytics.
- Implementation of prototype remote and automated relay shutdown.
# 3. Scalability to Real Industrial Generators
The system can be extended to monitor actual industrial generators by introducing additional sensors for other mechanical and electrical subsystems.
Possible extensions include:
- **Lubrication:** Oil pressure, temperature, and level sensors.
- **Cooling:** Coolant temperature, level, and pressure sensors.
- **Fuel:** Fuel-level, flow, and pressure sensors.
- **Air Intake:** Intake air temperature and air-filter differential pressure sensors.
- **Mechanical:** Additional vibration sensors mounted around the engine, alternator, bearings, and mounting points.
These additions would allow the system to monitor more operating parameters and detect a wider range of potential faults. And of course industrial deployment would also require appropriately rated sensors, protected enclosures, reliable communication infrastructure, and properly engineered control interfaces.
The modular architecture allows additional monitoring nodes and telemetry parameters to be integrated as required. The backend can also accommodate individual operating thresholds and machine-learning models trained with larger datasets.
# 4. Industrial Benefits and Applications
The system provides continuous visibility into generator operating conditions and helps identify abnormal behaviour early. By combining real-time monitoring, historical analysis, machine-learning-based anomaly detection, and threshold-based protection, it can support predictive maintenance, improve maintenance planning, and reduce unexpected downtime. Potential applications include hospitals, manufacturing plants, data centres, commercial buildings, and other facilities that depend on reliable generator power.
# Conclusion
The Digital Machine Health Monitor demonstrates the integration of embedded systems, IoT communication, backend analytics, machine learning, and web technologies for generator condition monitoring. The prototype establishes the core functions of data acquisition, telemetry transmission, machine-health evaluation, anomaly detection, fault alerts, and remote monitoring. Its modular architecture provides a foundation for expanding the system into a more comprehensive industrial generator monitoring and predictive maintenance platform.