Air Quality Index Analysis and Alert System using Machine Learning

The rapid rise in air pollution causes an urgent need for planning of air pollution monitoring so that the communities and individuals can avoid the adverse effects of pollution and can have a healthy living, therefore, the evaluation of air pollution plays a significant role in controlling and moni

2025-06-28 16:25:04 - Adil Khan

Project Title

Air Quality Index Analysis and Alert System using Machine Learning

Project Area of Specialization Artificial IntelligenceProject Summary

The rapid rise in air pollution causes an urgent need for planning of air pollution monitoring so that the communities and individuals can avoid the adverse effects of pollution and can have a healthy living, therefore, the evaluation of air pollution plays a significant role in controlling and monitoring air pollutants for well being of the human kind.

Now several ways have been articulated to evaluate air pollution. Presently, it is supervised through the Air Quality Index (AQI) which explains the air quality in terms of series of pollutants in air in parts per million. Therefore, we can say that AQI can be considered as a bench mark that runs from 0 to 500. The superior the amount of the AQI, more will be the amount of air pollution and hence greater will be the alarming state regarding health concern for the living beings.

The proposed model is designed in such a way that can detect various atmospheric air pollutants that contaminants the fresh air and cause various health issues including breathing problems and cardiovascular diseases. The major air pollutant is PM2.5 according to the research. Dust sensor is being used to measure PM2.5. Data collection is being done through the Breezometer application, that gives the concentration level of PM2.5, O3, PM10, NO2, SO2 and CO. The sensors are being calibrated and with the help of Arduino Uno software the real time readings of the desired air contaminants including temperature and humidity are being recorded.

Project Objectives Project Implementation Method

The proposed system uses Arduino Uno employing ATMega328P as microcontroller for execution of the system. Arduino is an interactive open-source platform considered by low cost and flexible hardware and software. Arduino Uno is the considered as a reference model and extensively used. Arduino Uno comes with an ATmega328 microcontroller chip which is of 8 bits having a frequency of 16MHz, having 14 digital I/O pins and 6 analog input pins. It is usually activated using USB connection but can also be powered by DC power socket from batteries.

The inputs to the Arduino are taken from the four different sensors to govern the local environmental situations. The most significant sensor is the MQ135 Gas sensor. It senses numerous gases including Ammonia (NH3), Nitrous Oxides (NOx), alcohol, Benzene, smoke, CO2 and some other gases.

MQ135 sensor has the restriction of not measuring CO data and according to the researchers CO is an essential gas that leads to the increase in air pollution, therefore MQ7 (carbon monoxide sensor) has also been used. This additionally enhances the air pollution data received by Arduino Uno and can create better outcomes. The MQ7 sensor measure CO amount ranging from 20 to 2000ppm. It has the faster response time and a high sensitivity as compared to other sensors.

MQ135 and MQ7 were calibrated in clean environment for more than 12 hours to remove the excess of dust particles present in the sensor and make the sensor sensitive to achieve accuracy.

The third sensor is the DHT11 which is commonly used as a Temperature and humidity sensor, it comes with a dedicated NTC to measure temperature having 8-bit microcontroller to output the amount of temperature and humidity as serial data, having an Operating Voltage of about 3.5V to 5.5V and an accuracy of ±5%.

The GP2Y10 is also used which is a dust sensor, originally created by Sharp for monitoring air cleaners and similar devices. It gives the density of dust particles in the air. Sharp GP2Y10 was calibrated in clean air to give relatively more accurate values in targeted environment.

After the calibration of the sensors, the air quality can be observed clearly on the serial monitor. Data collection has been done using the application Breezometer.

Benefits of the Project

The basic aim of AQI is to increase the awareness level among the people in order to let them know that how the local air quality influences their health. Air quality models use mathematical and numerical procedures to simulate the physical and chemical processes that affect air pollutants as they scatter and react in the atmosphere.

These models are significant to our air quality management system because they are broadly used by agencies tasked with governing air pollution to both recognize source contributions to air quality problems and assist in the design of operative tactics to diminish harmful air pollutants.

There are countless cities around the globe facing the air quality problems. Numerous deaths are the consequences of air pollution every year and decay in health condition as many people are visible to unhealthy air quality. Alertness of the contaminated air enables the public to take precautionary steps.

Air pollution is growing severely these days due to many reasons that includes vehicle emissions, deforestation and mechanization, all such factors lead to the climate change. Hence, we are in need of a suitable metric that tells us about the concentration level of air contamination, whether it is low, medium or high, so that we can take benefit of several sensors that could sense the air quality index and precautionary steps can be taken.

Technical Details of Final Deliverable

In the proposed system, different sensors are being used including MQ135, MQ7, Sharp GP2Y10. All these sensors are important to calculate the air quality index (AQI) and the result is being taken on the basis of the given data set that is being collected using Breezometer application downloaded from the Play Store, DHT-11 sensor is also being used to calculate the temperature and humidity.

MQ-135 is used to detect various harmful gases including ammonia, NOX, alcohol, sulfur and smoke. It has four pins. Pin number 1 is for Vcc, pin number 2 is Ground, pin number 3 is digital out and pin number 4 is analog out. The 5V power supply is being used for this sensor.For the calibration we connect the Vcc of the sensor to 5V pin of the Arduino board, GND pin of the sensor is connected to the GND and the analog output pin is connected to the A0 pin of the Arduino board.

MQ-7 is used to detect the level of CO in the air. It detects the level of CO in between the range of 20 to 2000ppm. It has the same pin configuration as that of MQ-135. Vcc is connected to the 5V on an Arduino uno, GND is connected with the GND of the Arduino and analog out is connected with the analog pin of an Arduino.

DHT-11 is a sensor used to detect the amount of temperature and humidity in the air. Pin number 1 is Vcc, pin number 2 is Data pin and pin number 4 is ground.For the calibration of DHT-11 Vcc of the sensor is connected to the 5V pin of the Arduino Uno, data pin of the sensor is connected to the D2 of the Arduino and Ground is connected to the ground pin of the Arduino.

Sharp GP2Y10 is a dust sensor used to detect the most dominant contaminant in the air which is PM2.5. Pin number 1 is V-LED, pin number 2 is LED-GND, pin number 3 is LED, pin number 4 is S-GND, pin number 5 is V0 and pin number 6 is Vcc. For the calibration of the sensor, V-LED pin of the sensor is connected to the 5V of an Arduino Uno with a 150ohm resistor in between them, LED-GND pin of the sensor is connected to the GND of an Arduino, LED pin is connected to any one of the digital pin of an Arduino board, S-GND pin is also connected to the GND to the Arduino board, LED-GND and S-GND is connected to the anode of the capacitor of 220micro farad and the cathode of the capacitor is connected to the V-LED pin of the sensor, Vo pin is connected to any one of the analog pin on an Arduino board and Vcc is connected to the 5V on an Arduino board.

Final Deliverable of the Project HW/SW integrated systemCore Industry OthersOther IndustriesCore Technology Internet of Things (IoT)Other TechnologiesSustainable Development Goals Climate ActionRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 21200
Drone Equipment11600016000
Arduino board ATmega 328P Equipment26001200
MQ135 Equipment1350350
MQ7 Equipment1450450
Sharp GP2Y10 Equipment113001300
DHT11 Equipment1250250
LM 7805 Regulator Equipment1300300
ESP8266 Wifi Module Equipment1600600
NodeMCU Equipment1750750

More Posts