Many times we feel very weak while waking up from the bed even after getting a good sleep at night. This sometimes happens because of the poor air quality in the closed room at night.
This is a low cost Air Quality Monitor which can monitor the air quality of a room using MQ135 air quality sensor. It also measure the room temperature and humidity using DHT11 and shows the data on a OLED display. It is a fun little project and very helpful too.
WiringConnect:
- Arduino D2 to DHT11 out
- Arduino A0 to MQ135 Ao
- Arduino A5 to Oled SCL
- Arduino A4 to Oled SDA
In the coding part you will need to install some library to run the code
- Adafruit_SSD1306.h
- Adafruit_GFX.h
- DHT.h
there is two main function in the code sendSensor()
and air_sensor()
.
In air_sensor()
function it read the analog value from the Air quality sensor gasLevel = analogRead(sensor);
and define the quality for that corresponding gasLevel
. And the sendSensor() function measure the temperature and humidity data with dht
library and display it on the oled.
In the air_sensor()
function you might need to celebrate your gasLevel
value for your sensor. For that power 5V to the mq135 sensor and put it on a clean environment for at least 24 hour before using it. it is (burning) necessary for this kind of sensor because the sensor comes polluted. so burning helps it to clean itself and gives more accurate result.
then connect the sensor to your circuit and go outside with it and tune the right value for your place.
Comments