Skip to content

harsh13713/air_quality_monitor

 
 

Repository files navigation

🌍 Air Quality Monitoring System

🚀 A real-time IoT-based Air Quality Monitoring System powered by ESP32 + Gas & Dust Sensors.
The system streams live environmental data to ThingSpeak, processes it with a Flask backend, and visualizes it on a modern, animated dashboard.

It also integrates Machine Learning models for:

  • 📈 Predicting air quality trends
  • ⚠️ Detecting anomalies in sensor readings
  • 🧠 Providing intelligent insights & alerts

🔴 Live Air Quality Status

🌫️ Dust (PM2.5):

🔥 CO (Carbon Monoxide - MQ7):

💨 CO₂ / Air Quality (MQ135):

🔥 LPG/Smoke (MQ2):


✨ Features

Real-time air quality monitoring with ESP32
ThingSpeak integration for IoT data storage & retrieval
Flask-based dashboard with 3 tabs:

  • Live Data
  • Past Analysis
  • About Project
    Machine Learning models for prediction & anomaly detection
    Interactive charts & visualizations (Charts.js, Matplotlib)
    Modern UI/UX with animated backgrounds 🌈

🛠️ Tech Stack

  • Hardware: ESP32 + MQ-2, MQ-7, MQ-135, Dust Sensor
  • Firmware: Arduino IDE (C++ for ESP32)
  • Backend: Python (Flask)
  • Frontend: HTML + CSS + Bootstrap (with animated background 🎨)
  • IoT Cloud: ThingSpeak
  • Visualization: Charts.js / Matplotlib
  • Machine Learning:
    • Regression models for AQI prediction
    • Classification models for hazard detection
    • Time-series forecasting for trend analysis

⚙️ Installation & Setup

1️⃣ ESP32 Firmware

Upload the ESP32 code using Arduino IDE.
Make sure to set your Wi-Fi SSID, Password, and ThingSpeak API key in the code.

2️⃣ Flask Server

# Clone repo
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>

# Create & activate virtual environment
python -m venv venv
source venv/bin/activate   # Linux/Mac
venv\Scripts\activate      # Windows

# Install dependencies
pip install -r requirements.txt

# Run server
python app.py```

📊 Dashboard Tabs

1️⃣ Current Values → live ESP32 readings (fetched via ThingSpeak API)
2️⃣ Past Analysis → historical charts + ML insights
3️⃣ About → project details & scope

🚀 Future Enhancements

🌐 MQTT support for faster real-time updates
📲 Mobile app integration (Flutter/React Native)
🤖 Advanced ML for AQI forecasting
☁️ Cloud deployment on AWS/GCP/Azure

📌 Project Status
🟢 Active Development – ML model improvements coming soon!

📬 Contact
👩‍💻 Developer: Vijaya Lakshmi M, Chindhana K, Harshini Ganga T S

About

A real-time IoT-based Air Quality Monitoring System powered by ESP32 + Gas & Dust Sensors. The system streams live environmental data to ThingSpeak, processes it with a Flask backend, and visualizes it on a modern, animated dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 41.0%
  • Python 30.7%
  • JavaScript 17.7%
  • CSS 10.6%