0% found this document useful (0 votes)
54 views6 pages

Iot-Based Air Quality Monitering System

Uploaded by

nalumayashwanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views6 pages

Iot-Based Air Quality Monitering System

Uploaded by

nalumayashwanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

IOT-BASED AIR QUALITY MONITERING SYSTEM

Introduction:

Our project aims to develop an IoT-based Air Quality Monitoring System that enables real-
time monitoring of air quality parameters such as PM2.5, PM10, CO2, and VOCs. By
leveraging Internet of Things (IoT) technology, this system offers a cost-effective and
efficient solution for monitoring air quality levels in both indoor and outdoor environments.

Existing System:

Traditional air quality monitoring systems are often bulky, expensive, and stationary, limiting
their deployment flexibility. Moreover, they typically lack real-time data transmission
capabilities, making it challenging to monitor air quality remotely and in real-time.

Proposed System:

Our proposed system integrates low-cost sensors with IoT technology to enable continuous
monitoring of air quality parameters. By employing wireless communication protocols, the
system can transmit data to a cloud platform for real-time analysis and visualization. This
facilitates prompt decision-making and interventions to improve air quality.

Devices Description:

1. Particle Matter Sensor: Measures PM2.5 and PM10 levels in the air.
2. Carbon Dioxide Sensor: Detects CO2 levels, an indicator of indoor air quality.
3. Volatile Organic Compound (VOC) Sensor: Measures the concentration of VOCs
in the air, indicating potential indoor pollution sources.
4. Microcontroller Unit (MCU): Controls sensor operation and data transmission.
5. Wi-Fi Module: Enables wireless connectivity for data transmission to the cloud
platform.

Components Description:

1. LCD Display: Provides real-time air quality data on-site.


2. Power Supply: Powers the system components.
3. Enclosure: Protects sensors and electronic components from environmental factors.

Specifications:

1. Particle Matter Sensor: PM2.5 and PM10 detection range: 0-1000 µg/m³.
2. Carbon Dioxide Sensor: CO2 detection range: 0-5000 ppm.
3. VOC Sensor: VOC detection range: 0-1000 ppb.
4. MCU: ESP32 microcontroller with built-in Wi-Fi.
5. Wi-Fi Module: IEEE 802.11 b/g/n compatible.

Applications:

1. Indoor Air Quality Monitoring: Ensures a healthy indoor environment in homes,


offices, and public spaces.
2. Environmental Monitoring: Helps assess pollution levels in urban areas and industrial
zones.
3. Health Management: Provides valuable data for researchers and healthcare
professionals to study the impact of air quality on human health.
4. Urban Planning: Supports city planners in implementing measures to mitigate air
pollution and improve overall air quality.

Future Scope:

1. Integration with Smart Home Systems: Enable automatic ventilation control based on
air quality data.
2. Mobile Application Development: Provide users with real-time air quality updates
and personalized recommendations.
3. Expansion of Sensor Capabilities: Incorporate additional sensors to monitor other
pollutants such as ozone and nitrogen dioxide.
4. Data Analysis Enhancements: Implement advanced analytics to identify pollution
trends and patterns for better decision-making.

BLOCK DIAGRAM:
SOURCE CODE:

#include <WiFi.h>
#include <PubSubClient.h> // MQTT library
#include <SDS011.h> // PM sensor library
#include <MHZ19.h> // CO2 sensor library
#include <SparkFunCCS811.h> // VOC sensor library

#define WIFI_SSID "YourWiFiSSID"


#define WIFI_PASSWORD "YourWiFiPassword"
#define MQTT_SERVER "YourMQTTBroker"
#define MQTT_PORT 1883
#define MQTT_USERNAME "YourMQTTUsername"
#define MQTT_PASSWORD "YourMQTTPassword"
#define MQTT_CLIENT_ID "AirQualityMonitor"

#define PM_SENSOR_RX_PIN 16 // UART RX pin for PM sensor


#define PM_SENSOR_TX_PIN 17 // UART TX pin for PM sensor

SDS011 pmSensor(PM_SENSOR_RX_PIN, PM_SENSOR_TX_PIN);


MHZ19 co2Sensor;
CCS811 vocSensor;

WiFiClient wifiClient;
PubSubClient mqttClient(wifiClient);

void setup() {
Serial.begin(115200);
connectWiFi();
connectMQTT();
setupSensors();
}

void loop() {
mqttClient.loop();

// Read sensor data


float pm25, pm10, co2, voc;
pmSensor.wakeUp();
delay(30000); // Wait for sensor stabilization
if (pmSensor.query()) {
pm25 = pmSensor.getPM25();
pm10 = pmSensor.getPM10();
}
pmSensor.sleep();

co2 = co2Sensor.getCO2();
vocSensor.readAlgorithmResults();
if (vocSensor.dataAvailable()) {
voc = vocSensor.getTVOC();
}

// Publish sensor data


publishData(pm25, pm10, co2, voc);
delay(60000); // Publish data every 1 minute
}

void connectWiFi() {
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to WiFi");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("WiFi connected");
}

void connectMQTT() {
mqttClient.setServer(MQTT_SERVER, MQTT_PORT);
while (!mqttClient.connected()) {
Serial.print("Connecting to MQTT Broker...");
if (mqttClient.connect(MQTT_CLIENT_ID, MQTT_USERNAME,
MQTT_PASSWORD)) {
Serial.println("connected");
} else {
Serial.print("failed, rc=");
Serial.print(mqttClient.state());
Serial.println(" retrying in 5 seconds");
delay(5000);
}
}
}
void setupSensors() {
pmSensor.begin();
co2Sensor.begin();
vocSensor.begin();
}

void publishData(float pm25, float pm10, float co2, float voc) {


String payload = "{\"pm25\": " + String(pm25) + ", \"pm10\": " + String(pm10)
+
", \"co2\": " + String(co2) + ", \"voc\": " + String(voc) + "}";
mqttClient.publish("air_quality", payload.c_str());
}

You might also like