Arduino Air Quality Monitoring System:
Jai Prajapati
BBA Digital Marketing | Passionate about Leveraging Data-Driven Strategies for Business Growth. #digitalmarketing #Seospecilist #certifiedigitalmarketer, #contentcreator
Securing clean, breathable air is actually inseparable from our working and living, even though air quality is still a substantial problem in many of the places we live. This one of the most fascinating systems to measure is the air quality system. This is basically that in the article we expound on building an Air Quality Monitoring System based on Arduino. The ongoing project had its conversation on connectivity using the ESP8266, but this DIY air quality sensor is much easier as it is based on the popular Arduino UNO. We'll walk through the different components, how to connect the MQ135 sensor board to the Arduino board, and the coding necessary. As we will see, there are a number of components a.Let's dive in!
What is AQI?
An air quality index sensor Is a device that measures the air quality index and raises an alarm when the air becomes dangerous or unhealthy.
Air Quality Index (AQI) is an adopted measurement that is employed for gathering information about air pollution levels in a particular place during a particular time. It makes things much simpler because it allows the avoidance of complicated or lengthy terminology in making people aware of the air quality index.
AQI looks at the predominant air pollutants that are tiny ground-level ozone molecules like PM2.5 and PM10, CO, SO2, and NO2. For every pollutant, there is a scale of the pollution and a threshold over which the AQI value depends.
The AQI scale ranges from 0 to 500, with categories indicating the level of health concern associated with air quality:The AQI scale ranges from 0 to 500, with categories indicating the level of health concern associated with air quality:
0 to 150: Normal-Moderately highly polluted
151 to 200: Poor
201 to 300: Terribly Horrible
301 to 500: Toxic
With this project we prefer to limit ourselves with gas sensor monitoring yet we can consider PM2.5 and PM10 among the following features that can be added.
What Is A System Of Air Quality Monitoring:
This Air Quality Monitoring System contains sensors for analyzing the environmental factors such as gaseous level, temperature, and humidity. The gas sensor gives a PWM voltage to Ardiono's analog pin hence showing the air quality. Additionally, a DHT11 sensor which can measure the humidity and the temperature is provided with the same time. Data can be presented as dynamic charts on an OLED screen using Adafruit libraries in the form of real-time data. Through the monitoring of these parameters, the system offers the possibility to make air quality conditions aware, so users can take counteractive measures when environmental quality crosses the desirable value threshold.
Components Required:
Arduino board
MQ135 gas sensor
The use of DHT11-based sensors which measures the current temperature and humidity levels.
OLED display
Breadboard and jumper wires
Circuit Diagram for the Air Quality Monitoring System:Circuit Diagram for the Air Quality Monitoring System:
Plug the OLED, DHT 11, and MQ135 gas sensor into the Arduino Uno on a breadboard. Send I2C protocol to the OLED display by connecting analog output from the gas sensor to Arduino's A0 pin.
Arduino Code for Air Quality Monitoring:
The code directs the microcontroller’s state machine to read the sensor data (temperature, humidity, and gas levels) and display the result on the OLED screen. As it gets data for temperature and humidity from the DHT sensor and either shows data or calculates air quality based on gas levels within certain brackets provided.
cpp
// Arduino Code for Air Quality Monitoring
// Electro Global- Innovate with us
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME680.h>
// Define the address for the BME680 sensor
#define SEALEVELPRESSURE_HPA (1013.25)
// Create an instance of the BME680 sensor
Adafruit_BME680 bme; // I2C
// Electro Global- Innovate with us
void setup() {
??Serial.begin(9600);
??// Wait for serial monitor to open
??while (!Serial);
??Serial.println(F("BME680 test"));
领英推è
??if (!bme.begin()) {
????Serial.println("Could not find a valid BME680 sensor, check wiring!");
????while (1);
??}
??// Set up oversampling and filter initialization
??bme.setTemperatureOversampling(BME680_OS_8X);
??bme.setHumidityOversampling(BME680_OS_2X);
??bme.setPressureOversampling(BME680_OS_4X);
??bme.setIIRFilterSize(BME680_FILTER_SIZE_3);
??bme.setGasHeater(320, 150); // 320*C for 150 ms
}
// Electro Global- Innovate with us
void loop() {
??if (!bme.performReading()) {
????Serial.println("Failed to perform reading :(");
????return;
??}
??Serial.print("Temperature = ");
??Serial.print(bme.temperature);
??Serial.println(" *C");
??Serial.print("Pressure = ");
??Serial.print(bme.pressure / 100.0);
??Serial.println(" hPa");
??Serial.print("Humidity = ");
??Serial.print(bme.humidity);
??Serial.println(" %");
??Serial.print("Gas = ");
??Serial.print(bme.gas_resistance / 1000.0);
??Serial.println(" KOhms");
??Serial.print("Approx. Altitude = ");
??Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
??Serial.println(" m");
??Serial.println();
??delay(2000);
}
Working Demo:
The project will reflect the interesting temperature and humidity values on the bottom of the OLED display. The upper area portrays the toxicity level, varying from good to toxic (meaning the mixture is flammable) once the gas coming out from a lighter is lighted.
By following these procedures, you can create your own Arduino version of the Air Quality Monitoring System which can help in measuring and assessing air quality of your environment.
Conclusion:
Through designing and executing such an Arduino Breathing Condition Monitoring System, you have already designed an invaluable aid for assessing and reacting to the certain changes in exhaled air. With a few more advanced applications, such as including PM2.5 and PM10 sensors, the project could be taken to the next level and boom in more valuable air quality monitoring features.
Remember, being inhaled of fresh air is one of the most crucial resources of our bodies and for the health of our fellow townsmen. By projects like this, we, however, can act early enough so as to preserve the environment for other people too.