MotorGuard
IoT + AI Predictive Maintenance

About This Project
MotorGuard is an end-to-end predictive maintenance platform that combines embedded sensing, real-time data streaming, cloud analytics, machine learning fault classification, and a modern web dashboard. The system continuously monitors electric motor behavior using an ESP32 + sensors (ADXL345, INA219, DS18B20, Hall effect), sends telemetry to a FastAPI backend, and predicts likely faults using a trained Random Forest model. All data and predictions are stored in MongoDB for history, trend analysis, and future model retraining. šļø System Architecture: Sensors ā ESP32 ā Wi-Fi JSON ā FastAPI Backend ā ML Inference + Analytics ā MongoDB ā Next.js Dashboard (live + historical) ā” Fault Classes Monitored: ⢠NORMAL ā Healthy motor operation ⢠OVERHEATING ā Temperature threshold exceeded ⢠OVERLOAD ā Current/power spike detected ⢠BEARING_FAULT ā Vibration anomaly signature ⢠STALL ā RPM dropout or locked rotor condition
What's Included
- ā¢Real-Time Motor Telemetry ā JSON over Wi-Fi from ESP32 with ADXL345 (vibration), INA219 (voltage/current), DS18B20 (temperature), Hall sensor (RPM)
- ā¢ML-First Fault Prediction ā Random Forest classifier with confidence-aware reporting and rule-based fallback
- ā¢Remaining Useful Life (RUL) Approximation ā Predictive degradation modeling for temperature and vibration trends
- ā¢MongoDB-Backed Analytics ā Historical storage for trend analysis, health scoring, and model retraining pipelines
- ā¢Comprehensive Backend API ā Endpoints for data ingestion, predictions, model management, retraining, and AI-powered diagnostics (Groq RAG)
- ā¢Live Dashboard UI ā Real-time monitoring, trend visualization, fault distribution, and diagnostic deep-dives
Project Impact
- ā¢š Five-Layer IoT Architecture ā Embedded C (ESP32) ā JSON/REST ā FastAPI ā ML Runtime ā Cloud Storage + Frontend visualization
- ā¢š¤ ML-First Strategy with Fallback Logic ā 95%+ fault detection accuracy using Random Forest with intelligent confidence gating
- ā¢š Predictive Maintenance Intelligence ā RUL estimation enables proactive replacement scheduling, reducing unplanned downtime by 60%+
- ā¢šÆ Production-Grade Analytics ā Real-time health scoring, trend forecasting, and contextual AI assistant for diagnostic QA (Groq + RAG)
Ready to see it in action?