Project 04 // Data Engineering & IoT

MotorGuard

IoT + AI Predictive Maintenance

MotorGuard detailed preview
DomainData Engineering
Client / FocusIoT
Technology Stack
ESP32FastAPINext.jsMongoDB

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?