Indoor Air Quality Meter

11,739

212

16

Introduction: Indoor Air Quality Meter

About: DIY enthusiast.

Simple project to check the air quality in your house.

Since we stay/work from home a lot lately, it might be a good idea to monitor the quality of the air and remind yourself when it's time to open the window and get some fresh air in.

Step 1: Parts and Tools

Parts

Tools

Soldering iron

Step 2: Wiring Diagram

Wiring Diagram

Step 3: The Code

The code is available here: https://github.com/zangaby/ESP8266_BME680_air_quality

Based on https://github.com/3KUdelta/heltec_wifi_kit_32_BM...

Calculates IAQ with a BME680 sensor.

Reading of raw temperature, humidity and gas resistance Allow offset for temperature calibration Automatically calculate respective humidity using the August-Roche-Magnus approximation Calculate IAQ from temperature, humidity and gas resistance following Dr. Julie Riggs, The IAQ Rating Index, www.iaquk.org.uk

Code for those who are interested in using a BME680 sensor via I2C and Adafruit libraries to calculate IAQ without the proprietary libraries from Bosch.

Adafruit´s library: This is a library for the BME280 humidity, temperature & pressure sensor Designed specifically to work with the Adafruit BME280 Breakout ----> www.iaquk.org.uk These sensors use I2C or SPI to communicate, 2 or 4 pins are required to interface. The device's I2C address is either 0x76 or 0x77. Adafruit invests time and resources providing this open source code, please support Adafruit andopen-source hardware by purchasing products from Adafruit! Written by Limor Fried & Kevin Townsend for Adafruit Industries. BSD license, all text above must be included in any redistribution

Libraries needed:

ThingPulse SSD1306 (https://github.com/ThingPulse/esp8266-oled-ssd1306)

General Adafruit Sensor (Arduino Library Manager)

Adafruit BME680 (Arduino Library Manager)

SoftwWire Steve Marple (Arduino Library Manager)

AsyncDelay Steve Marple (Arduino Library Manager)

Step 4: Connect Everything

OLED
VCC - 3.3v

GND - GND

SCL - D1

SDA - D2

BME680

VCC - 3.3v

GND - GND

SCL - D1

SDA - D2

Since both the sensor and the OLED are connected using I2C, they are connected to the same pins. In order to do that you can cut a dupont cable in half, and solder the cables to have some Y shaped cables.

Step 5: ​Further Ideas

Further Ideas

  • Send the data to MQTT/Blink/Thingspeak
  • Add a battery

Hope you enjoyed this project and if you have any questions feel free to ask.

Thank you for reading!

Anything Goes Contest

Participated in the
Anything Goes Contest

Be the First to Share

    Recommendations

    • CNC and 3D Printing Contest

      CNC and 3D Printing Contest
    • Lamps Challenge

      Lamps Challenge
    • Anything Goes Contest

      Anything Goes Contest

    16 Comments

    0
    RobertG288
    RobertG288

    Question 1 year ago

    I'm just getting into the OLED. I have a working BME680 using an Arduino UNO. Can I simply proceed with the code and libraries that you list. Great project incidentally. Love it.

    1
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    Yes, I think you can proceed.

    0
    d ata
    d ata

    1 year ago

    Thanks for the presentation.
    Would like to add email notifications and CO, CO2, and hydrocarbon sensors.

    0
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    Thanks!
    Glad you found this project inspiring.

    0
    Yersu
    Yersu

    Question 1 year ago

    Coincidently I created a environment sensor yesterday (not as complete as yours - no screen/case); yours is very impressive!
    I did use the proprietary Bosch library - what a PITA. Bosch should be embarrassed.

    @ZaNgAbY, did you compare your results to the Bosch output? I am curious if the Riggs IAQ rating is close (eg: can we figure out if that is the algorithm Bosch uses)

    IAQ.png
    0
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    I tried the libraries from Bosch but it was quite fiddly to setup and I wasn't happy with the results.

    Since the Bosch libraries are closed we can't see how they calculate the IAQ.

    2
    matt.shepker
    matt.shepker

    1 year ago

    I like this project, and it got me thinking about additional things you could do. Seeed makes an I2C laser dust sensor that would be cool to add to something like this. It would help you get a better overall sense of air quality.

    0
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    There is indeed room for improovement.

    0
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    Yes, I think it should work.

    1
    GoodWinApps
    GoodWinApps

    1 year ago

    This is an interesting project. Thank you for sharing. I've been considering that an air quality meter of some sort might help my friend, an old guy who lives alone, to identify the cause of some of his ailments. He suspects something in the air; I'd like to identify the specific problem, or rule it out. I'm trying to replace my ignorance with knowledge, and this device looks like a good starting point. Googling "gas resistance" produces a couple of directions for research: gas flow rate in ohms which is a factor in IAQ, or, the second stage of General Adaptation Syndrome, which corresponds with my friend's situation. A lot of this goes over my head. My question is, What does this information tell us? If air quality is "excellent", does that mean it is safe and healthy to breathe? What would it mean if the air quality measured is poor? Could there be other pollutants that are not detected? Like, say, radon? I like the idea of including a dust sensor. I'd probably place the device next a CO detector too.
    I'm going to order the parts to build this. In the meantime, reading Dr. Riggs' information and the BME680 datasheet will keep me busy. Feel free to point me to the kindergarten. Again, thanks for publishing this.

    0
    DavidE341
    DavidE341

    Reply 1 year ago

    I would like to second GoodWinApps question - what exactly is "gas resistance" measuring (in known IAQ parlance)? Particulate matter (e.g., PM2.5 or PM.25)? Ozone? Also - "Since we stay/work from home a lot lately, it might be a good idea to monitor the quality of the air and remind yourself when it's time to open the window and get some fresh air in." sounds good, but is only really good if outdoor air is "better" than indoor air. So you need to have both outdoor and indoor air testing before you go opening up any windows. In fact, it may be that recycling indoor air through a HEPA air filter (one per room) might be the better option when you weigh the costs of temperature and humidity conditioning loss that occurs when you open a window. Good testing will tell you.

    0
    dlebryk
    dlebryk

    Reply 1 year ago

    VOC (Volatile Organic Compounds) - that's what it measures. Gas resistance, for this sensor in this case, translates to VOC (see above reply).

    It doesn't measure ozone or particulates.

    A HEPA filter does nothing for VOC - it is a particulate filter. Now most air purifiers include an activated charcoal or carbon filter in them, so they do have some impact on VOC's.

    If you really want to go down a rabbit hole, a good one at that, the EPA has an excellent series on indoor air quality:
    https://www.epa.gov/indoor-air-quality-iaq/introduction-indoor-air-quality

    0
    dlebryk
    dlebryk

    Reply 1 year ago

    This is a VOC meter. The air quality is based on measuring volatile organic compounds in the air. It doesn't measure radon, CO, dust, anything else you mentioned in your comment.

    It isn't easy to find or decode the information about what gas resistance means. It is VOC plain and simple, nothing more.
    The information you seek is on page 8 of this document (easy to understand, impossible to find)
    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf

    0
    Build_it_Bob
    Build_it_Bob

    1 year ago

    Very nice work and presentation.
    Thanks for sharing,
    Bob D

    0
    ZaNgAbY
    ZaNgAbY

    Reply 1 year ago

    Thanks Bob!