A smart manufacturing monitoring dashboard powered by IoT sensor data.
Real-time machine health tracking, anomaly detection, and maintenance risk analysis โ all in one place.
- Overview
- Dashboard Preview
- Tech Stack
- Dataset
- Project Structure
- Features
- Getting Started
- Future Improvements
- Author
In modern smart factories, machines generate continuous streams of sensor data. Without proper monitoring, anomalies go unnoticed and unexpected breakdowns cost time and money. This project tackles that problem by building an interactive monitoring dashboard using historical IoT sensor data from multiple manufacturing machines.
Key highlights:
- Live machine-wise sensor trend visualization
- Anomaly summary across all machines
- Recent health flag table per machine
- Rule-based maintenance risk checker (demo)
- Optional ML model integration (RandomForest) for predictive maintenance
Add a screenshot of your running Streamlit dashboard here.
| Category | Tools |
|---|---|
| Language | Python 3.x |
| Dashboard UI | Streamlit |
| Data Handling | pandas, numpy |
| Visualization | matplotlib |
| ML (Optional) | scikit-learn (RandomForest) |
| Model Persistence | pickle |
| Environment | Jupyter Notebook, VS Code |
File: smart_manufacturing_data.csv
| Column | Description |
|---|---|
timestamp |
Date and time of the reading |
machine_id |
Unique machine identifier |
temperature |
Machine temperature |
vibration |
Vibration level |
humidity |
Ambient humidity |
pressure |
System pressure |
energy_consumption |
Energy usage during interval |
anomaly_flag |
0 = Normal, 1 = Anomaly detected |
failure_type |
Type of failure (Normal, Overheating, Vibration Issue, Pressure Drop, etc.) |
predicted_remaining_life |
Estimated remaining useful life |
downtime_risk |
Continuous risk score for possible downtime |
maintenance_required |
0 = No maintenance, 1 = Maintenance needed |
smart-manufacturing-iot-monitoring/
โ
โโโ ๐ app.py # Streamlit dashboard (main app)
โโโ ๐ smart_manufacturing_data.csv # IoT manufacturing dataset
โโโ ๐ PROJECT.ipynb # Jupyter notebook for EDA & experiments
โโโ ๐ค rf2_model.pkl # (Optional) Saved RandomForest model
โโโ โ๏ธ scaler.pkl # (Optional) Saved feature scaler
โโโ ๐ README.md # Project documentation
- Sidebar lets you select any
machine_id - Time-series line chart of temperature, vibration, and pressure
- Quickly spot abnormal spikes, trends, and outliers
- Table showing the latest records for the selected machine
- Columns:
timestamp,anomaly_flag,maintenance_required,downtime_risk - Instant snapshot of machine health status
- Aggregates anomaly counts across all machines
- Ranked table of top machines by anomaly frequency
- Helps maintenance teams prioritize inspections
- Manually adjust Temperature, Vibration, and Pressure using sliders
- Rule-based logic compares values to historical quantiles
- Returns risk classification:
| Risk Level | Meaning |
|---|---|
| ๐ข LOW | Maintenance not urgent |
| ๐ก MEDIUM | Keep machine under observation |
| ๐ด HIGH | Maintenance recommended immediately |
This demo logic can be replaced by the trained ML model (
rf2_model.pkl) for production use.
git clone https://github.com/Musawir456/smart-manufacturing-iot-monitoring.git
cd smart-manufacturing-iot-monitoringpython -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activatepip install -r requirements.txtstreamlit run app.pyhttp://localhost:8501
- ๐ค ML Integration โ Replace rule-based logic with the trained
rf2_model.pklRandomForest model for real predictions - ๐ก Real-time Streaming โ Connect live IoT streams via MQTT or HTTP instead of static CSV
- ๐ Authentication โ Add role-based access for operators, engineers, and managers
- โ๏ธ Cloud Deployment โ Deploy Streamlit app to AWS / GCP / Streamlit Cloud for remote access
- ๐ง Alert System โ Automated email/SMS alerts when HIGH risk is detected
| File | Description |
|---|---|
rf2_model.pkl |
Trained RandomForest model to predict maintenance_required from sensor data |
scaler.pkl |
Feature scaler used during model training |
These artifacts are trained and ready โ they can be loaded into
app.pyfor real-time predictive maintenance with minimal code changes.
Abdul Musawir BS IT / Computer Scienc AI/ML Engineer & Data Scientist ๐ The Superior University, Lahore ๐ง abdulmusawir8191456@gmail.com
โญ If you found this project useful, please give it a star! โญ
Made with โค๏ธ by Abdul Musawir โ The Superior University Lahore

