Air Quality Monitor

DIY Arduino air quality monitor which can measure surrounding air quality also shows temperature and humidity in your room.

May 21, 2021

198444 views

65 respects

Components and supplies

1

DHT11 Temperature & Humidity Sensor (3 pins)

1

0.96" i2c OLED display

1

Arduino Nano R3

1

Air Quality sensor (MQ135)

Tools and machines

1

3D Printer (generic)

1

Soldering iron (generic)

Apps and platforms

1

Arduino IDE

Project description

Code

Arduino Air Quality Monitor

arduino

Downloadable files

AirQuality.jpg

AirQuality.jpg

Image

AirQuality.jpg

AirQuality.jpg

Image

Documentation

BOX

This is a 3D enclosure I design for the project. But you don't need a 3d printer for build one, you can make your own enclosure with many thing like cardboard.

BOX

BOX

This is a 3D enclosure I design for the project. But you don't need a 3d printer for build one, you can make your own enclosure with many thing like cardboard.

BOX

Top

Top

Top

Top

Comments

Only logged in users can leave comments

Image
Image

tarabostes78

5 months ago

Hello friends. I made this wonderful projects and is working 100%. Thanks for all.

Image
Image

haaxy

a year ago

Is the soldering Iron necessary?

Image
Image

haaxy

a year ago

is the soldering iron necessary?

Image
Image

homation

a year ago

Pls can you send me the Edited code for 1.3 oled display this above code is not working with this display reply on my emailid

Image
Image

homation

a year ago

Please send me the Edited code on my email add

Image
Image

sanket7120

a year ago

Sir my project is not ruuning what can i do

Image
Image

selenyx09

a year ago

Hello is this still working i planned to to this what's your thought?

Image
Image

sanket7120

a year ago

Sir plz can give me your number for help

Image
Image

super-admin

a year ago

Please help, I tried your project but the program code couldn't be uploaded to the Arduino Idea, and the Oled LCD that I used also couldn't turn on

Image
Image

super-admin

a year ago

Please help, I tried your project but the program code couldn't be uploaded to the Arduino Ide, and the Oled LCD that I used also couldn't turn on

Image
Image

nottt

2 years ago

themp and RH doesnt print on display can someone help?

Image
Image

emilking

2 years ago

What cables are needed

Image
Image

celestial_fr

2 years ago

Hey, I've made this project on a breadboard. I've got all the connections correct and I've also uploaded the AS IT IS code without any changes and errors. But my project is not working at all. Whenever I plug USB in the Arduino NANO, only the POW light glows and L light keeps blinking, otherwise no other components work at all. Please guide me. It's urgent I've got a strict deadline!

Image
Image

andre02005

2 years ago

can you show the esquematic view from fritzing?

Image
Image

andre02005

2 years ago

what is RH?

Image
Image

andre02005

2 years ago

i have an error with dht

Image
Image

riahyshirin

2 years ago

very god

Image
Image

gerwin050

2 years ago

Good working project but i have one minor problem with the display. When refreshing the oled screen in the right botom of the screen there is some flickering. Just like it's printing something for a very short period. Is this about the quality of the Oled or is this something i could easily fix? Thank you in advance!

Image
Image

valerko

a year ago

i have the same problem currently so if you found any solution to the problem please tell me.

Image
Image

ec_s2

2 years ago

very gud proyect

Image
Image

zokhirjon

2 years ago

how do you know gas level in your code? is there any standard about air pollution level ?

Image
Image

abhishek348923

2 years ago

so how am i suppose to those 2 codes above on the arduino board together>??

Image
Image

raja_rwp

2 years ago

How can I get library files to include to arduino IDE?

Image
Image

021191065shifat

2 years ago

just amazing project

Image
Image

sazin_samin

2 years ago

Good project, How can I get this data to my mobile phone in real time with alerting system???

Image
Image

abid_hossain

2 years ago

Thank you. You can use a esp8266 along with the arduino and send the data through internet. You can use iot platform like "blynk iot" to get the real time data and notification to your mobile phone.

Image
Image

Anonymous user

2 years ago

can u provide the code for this project to do it with 16x2 lcd

Image
Image

abid_hossain

2 years ago

I've Uploaded the LCD version of this project. please check that out here: https://create.arduino.cc/projecthub/abid_hossain/air-quality-monitor-with-1602-lcd-fc27db

Image
Image

akshay_arjun_007

2 years ago

which site or software did you use to create the SCHEMATIC? I couldn't find MQ135 & DHT11 sensors in TINKERCAD. can u help me out?

Image
Image

abid_hossain

2 years ago

I used Fritzing to create the schematic. It is a free software. You can find library for any component there.

Image
Image

Anonymous user

2 years ago

Perfect

Image
Image

sunsketcher

2 years ago

This looks good. I'm new to Arguing boards so I'm going to use this as a jumping off point (or jumping in point). I am using various GRAVITY: CCS811 AIR QUALITY SENSOR being one, ANALOG TURBIDITY SENSOR, ANALOG TDS SENSOR/METER and of course the obligatory temp/humidity sensor along with the on-board sensors of the ARDUINO NANO 33 IOT I also have a NEO 6M GPS module. I 'll log it to a micro sd card. So thanks again for getting me started😶

Image
Image

sunsketcher

2 years ago

Maybe I'll spell-check before I post 📪 I am not new to Arguing but I am new to Arduino. 🤗

Image
Image

Anonymous user

2 years ago

I love this project. I will try to make this project soon. ❤️

Image
Image

Anonymous user

2 years ago

I made thik project and it's work accurately ❤️

Image
Image

abid_hossain

2 years ago

Thanks for trying my project ... hope you enjoyed making it♥️

Image
Image

Anonymous user

2 years ago

Please fix the level check ranges in the function air_sensor. Now if the level is 181, instead of poor, it will display toxic, which is not true. The same will happen with the values 225 and 300. Just include them in the upper range by '>='. Another improvement will be to add a filter for the analog reading. The values jump up and down with some noise and if it is on the border of two ranges it is not good to display flashing different texts for the result. Exponential moving average filter with 5-10% weight of the new reading will do the job. Something like this: float filter_avg = 0.0; float gas_filter(int ach) { float current_value= (float)analogRead(ach); if (filter_avg == 0.0) filter_avg =current_value; filter_avg = 0.05 * current_value + 0.95 * filter_avg ; // 5% weight return filter_avg ; } ... gasLevel = int(gas_filter(sensor));

Image
Image

Anonymous user

2 years ago

I want to check this code where should I check it ? Please tell me.

Image
Image

abid_hossain

2 years ago

Please check the project tutorial wisely. The code is attached there.

Image
Image

Anonymous user

2 years ago

Can this be created using Arduino UNO?

Image
Image

iniyan

2 years ago

Can this project be done with a LCD of 16x2 If not can you post the same project with 16x2 I2C LCD and mq2 sensor?

Image
Image

abid_hossain

2 years ago

You can use 1602 lcd, but then you should have to change the library and the code for the 1602 lcd. And if you want to use mq2 then you have to tune the gasLevel value for your sensor. I'll post the same project with 16*2 LCD soon, then I'll pose the link here!

Image
Image

abid_hossain

2 years ago

I've Uploaded the LCD version of this project. please check that out here: https://create.arduino.cc/projecthub/abid_hossain/air-quality-monitor-with-1602-lcd-fc27db

Image
Image

Anonymous user

2 years ago

Thinking of doing this project but I have two questions. Does this project sense methane gas? Can it be used for outside use? Thank you.

Image
Image

abid_hossain

2 years ago

Thank you for showing interest in my project.❤ MQ 135 can detect NH3, NOx, alcohol, Benzene, smoke, CO2, etc. But it is not very suitable for measuring CH4. You can use an MQ4 sensor to measure methane (CH4). then you have to tune your sensor value for your sensor in the code. And it can be used on the outside.

Image
Image

Anonymous user

2 years ago

Hi. I am in the process of adding in a MQ4 sensor. Do I connect it to A0 as well with my MQ135 sensor? Or best to use say A1 on the Arduino board?

Image
Image

Anonymous user

2 years ago

Love this project 🧡❤️💙

Image
Image

Anonymous user

2 years ago

I have MQ-135 ready but it has 4 pins, this project specified 3. Is there any difference or it's okay?

Image
Image

Anonymous user

2 years ago

It works fine. Thanks!

Image
Image

abid_hossain

2 years ago

You have to connect your arduino A0 with the Ao (Analog Out) pin of your MQ135 sensor and let the Do pin open... Thank you♥️

Image
Image

Anonymous user

2 years ago

Oww! Such a cool project and i will try to make this in sha allah.

Image
Image

Anonymous user

2 years ago

The code does not work. It displays the following error message. "Ardfruit_GFX.h. No such file or directory." Please help.

Image
Image

abid_hossain

2 years ago

Include the Ardfruit_GFX library to your arduino ide and it will be solved.

Image
Image

Anonymous user

2 years ago

I have 1.3 oled display, can you please help me how to make it work?

Image
Image

Anonymous user

2 years ago

Amazing project. Definitely I will try to make this one day.

Image
Image

Anonymous user

2 years ago

how to change from good to toxic i burnt some paper and released the smoke directly onto the gas sensor (mq2 instead of mq135). i also currently dont have dth sensor will it affect the mq2?

Image
Image

Anonymous user

3 years ago

can i know which programmer do you use for this project in ardino nano

Image
Image

alfiemark305

3 years ago

this project is amazing :) <3 <3

Image
Image

Anonymous user

3 years ago

Can this be created using Arduino UNO?

Image
Image

devjhon14

3 years ago

I have 1.3 oled display, can you please help me how to make it work?

Image
Image

Anonymous user

3 years ago

how to change from good to toxic i burnt some paper and released the smoke directly onto the gas sensor (mq2 instead of mq135). i also currently dont have dth sensor will it affect the mq2?

Image
Image

Anonymous user

3 years ago

The code does not work. It displays the following error message. "Ardfruit_GFX.h. No such file or directory." Please help.

Image
Image

abid_hossain

2 years ago

Include the Ardfruit_GFX library to your arduino ide and it will be solved.

Image
Image

Anonymous user

3 years ago

Please fix the level check ranges in the function air_sensor. Now if the level is 181, instead of poor, it will display toxic, which is not true. The same will happen with the values 225 and 300. Just include them in the upper range by '>='. Another improvement will be to add a filter for the analog reading. The values jump up and down with some noise and if it is on the border of two ranges it is not good to display flashing different texts for the result. Exponential moving average filter with 5-10% weight of the new reading will do the job. Something like this: float filter_avg = 0.0; float gas_filter(int ach) { float current_value= (float)analogRead(ach); if (filter_avg == 0.0) filter_avg =current_value; filter_avg = 0.05 * current_value + 0.95 * filter_avg ; // 5% weight return filter_avg ; } ... gasLevel = int(gas_filter(sensor));

Image
Image

Anonymous user

4 years ago

Perfect

Image
Image

Anonymous user

4 years ago

Thinking of doing this project but I have two questions. Does this project sense methane gas? Can it be used for outside use? Thank you.

Image
Image

Anonymous user

2 years ago

Hi. I am in the process of adding in a MQ4 sensor. Do I connect it to A0 as well with my MQ135 sensor? Or best to use say A1 on the Arduino board?

Image
Image

abid_hossain

2 years ago

Thank you for showing interest in my project.❤ MQ 135 can detect NH3, NOx, alcohol, Benzene, smoke, CO2, etc. But it is not very suitable for measuring CH4. You can use an MQ4 sensor to measure methane (CH4). then you have to tune your sensor value for your sensor in the code. And it can be used on the outside.

Image
Image

asiannerdie

4 years ago

I have MQ-135 ready but it has 4 pins, this project specified 3. Is there any difference or it's okay?

Image
Image

abid_hossain

2 years ago

You have to connect your arduino A0 with the Ao (Analog Out) pin of your MQ135 sensor and let the Do pin open... Thank you♥️

Image
Image

asiannerdie

2 years ago

It works fine. Thanks!

Image
Image

Anonymous user

4 years ago

can u provide the code for this project to do it with 16x2 lcd

Image
Image

abid_hossain

2 years ago

I've Uploaded the LCD version of this project. please check that out here: https://create.arduino.cc/projecthub/abid_hossain/air-quality-monitor-with-1602-lcd-fc27db

Image
Image

021191065shifat

4 years ago

just amazing project

Image
Image

Anonymous user

4 years ago

I want to check this code where should I check it ? Please tell me.

Image
Image

abid_hossain

2 years ago

Please check the project tutorial wisely. The code is attached there.

Image
Image

akshay_arjun_007

4 years ago

which site or software did you use to create the SCHEMATIC? I couldn't find MQ135 & DHT11 sensors in TINKERCAD. can u help me out?

Image
Image

abid_hossain

2 years ago

I used Fritzing to create the schematic. It is a free software. You can find library for any component there.

Image
Image

sunsketcher

4 years ago

This looks good. I'm new to Arguing boards so I'm going to use this as a jumping off point (or jumping in point). I am using various GRAVITY: CCS811 AIR QUALITY SENSOR being one, ANALOG TURBIDITY SENSOR, ANALOG TDS SENSOR/METER and of course the obligatory temp/humidity sensor along with the on-board sensors of the ARDUINO NANO 33 IOT I also have a NEO 6M GPS module. I 'll log it to a micro sd card. So thanks again for getting me started😶

Image
Image

sunsketcher

2 years ago

Maybe I'll spell-check before I post 📪 I am not new to Arguing but I am new to Arduino. 🤗

Image
Image

iniyan

4 years ago

Can this project be done with a LCD of 16x2 If not can you post the same project with 16x2 I2C LCD and mq2 sensor?

Image
Image

abid_hossain

2 years ago

I've Uploaded the LCD version of this project. please check that out here: https://create.arduino.cc/projecthub/abid_hossain/air-quality-monitor-with-1602-lcd-fc27db

Image
Image

abid_hossain

2 years ago

You can use 1602 lcd, but then you should have to change the library and the code for the 1602 lcd. And if you want to use mq2 then you have to tune the gasLevel value for your sensor. I'll post the same project with 16*2 LCD soon, then I'll pose the link here!

Image
Image

Anonymous user

4 years ago

Bonjour, j'ai vraiment aimé votre projet.

Image
Image

abid_hossain

2 years ago

Merci beaucoup♥️

Image
Image

sazin_samin

4 years ago

Good project, How can I get this data to my mobile phone in real time with alerting system???

Image
Image

abid_hossain

2 years ago

Thank you. You can use a esp8266 along with the arduino and send the data through internet. You can use iot platform like "blynk iot" to get the real time data and notification to your mobile phone.

Image
Image

megboron

4 years ago

I made thik project and it's work accurately ❤️

Image
Image

abid_hossain

2 years ago

Thanks for trying my project ... hope you enjoyed making it♥️

Image
Image

towhid_azim

4 years ago

Oww! Such a cool project and i will try to make this in sha allah.

Image
Image

tanvir504

4 years ago

Amazing project. Definitely I will try to make this one day.

Image
Image

megboron

4 years ago

I love this project. I will try to make this project soon. ❤️

Image
Image

ifrat150

4 years ago

Love this project 🧡❤️💙