Environment Air Quality Monitor




About: Disclaimer: The author is not responsible for loss of life, limb or property. The author is not responsible for your actions. The author is not responsible for anything. In fact, the author is completely i...

I wanted to build an environmental monitor. Partly to see what happens from day to day and also because I wanted to compare all the different MQ Sensors and see how they respond to different things. Using a Linkit one allowed me to add GPS logging to make this a mobile platform.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: External Antennas

I happened to have some leftover U.fl to RP-SMA adapters from Zigbee boards and a couple of U.fl to SMA cables from my SDR radio boards. These seemed like the perfect antennas to replace the stripboard ones that came in the kit. The GPS antenna was good the way it is. I just needed a case to protect it so I printed one....

I've included the SCAD source and STL files if you want to make one for yourself.

Step 2: Making an ADC Expander Sheild

The Linkit only has 3 Analog Inputs. I needed 9! I added a TLC1540CN 11 Channel ADC Chip from TI. I used an Arduino Mega Prototype Shield. I only populated the pins that matched the Linkit One. I used the other pins for I/O from the chip. I also added an extra I2C connector on the front edge in case I want to add an LCD Later.

Step 3: How to Make It Pretty

To make it look nice I decided to mount it to a plaque and make everything visible, well almost. I bussed all the power wires behind the board. I cut a second board to the exact same size so I can sandwich some 1/2 square wood strips to make a box.

To make it look nice I decided to engrave all the legends for the plaque on a CNC Mill. A quick shot of black paint to highlight it and a swipe with some WD-40 to remove the excess paint really makes it look nice.

Step 4: Schematic and Code

The code for the TLC1540 is a little rough. I do a little brute force bit twiddling but it does work.

I have to draw a nice schematic but for now here my hand drawn one and one I tried in Fritzing...

I send all 11 channels from the ADC out to the CSV file. The last two channels are not connected to anything so you get random noise there. I will use them soon.

The code logs a file to the SD card with the current date for a name. Everyday its running you get a new file. I may change that to drop the day and just use Month-Year. That way I only get a new file every month.

Its a CSV file so I can use Office to manipulate it.

Step 5: Wiring It Up

I used some Telco cross connect wire and Dupont Crimp connectors. A little hot glue to keep the connectors in place and that's it......

this way each sensor is removable for testing or replacement. That's my other concern is how well they hold to to constant use. I guess I'll find out in 2016....

Step 6: Future Enhancements

A Geiger Counter, Well why not. I have to make a PIC micro-controller I2C slave to keep track of the CPM. I might have to cover this part with a Plexiglas shield to keep fingers away from the High Voltage. Somewhere I have a Mica windowed tube too. I might even have a pancake tube in my fathers Army survey meters. I have to go check his footlocker. That way I can compare tube types.

There are a few MQ sensors I don't have yet so they're on the list. I picked 5V sensors to make it easy to wire up. I have plenty of area left on that shield for any support circuitry I might need to switch the supply level for the really odd sensors.

I also order an ML8511 UVB sensor about 8 weeks ago. If I don't get it by Jan 10th I'll have to open a claim and order from another supplier....

Arduino All The Things! Contest

Runner Up in the
Arduino All The Things! Contest



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    8 Discussions


    Tip 10 months ago

    Love the Instructable. In future, if you could include a complete equipment list with what the codes mean (as in the lamens terms for MQ-2 for example) that would be really helpful. Going to give this tutorial a try soon!

    1 reply

    Reply 7 months ago

    the MQ bunch are a series of sensors. if you google "MQ Sensors" you can find their data sheets.
    theres some overlap between the different ones....


    Question 9 months ago on Introduction

    I'm currently undertaking a project looking at studying air pollution in urban environments. What were your results regarding the sensors accuracy? Could you suggest which sensor would be best for sampling NO2, O3 and PM2.5 - 10 in a city such as London?

    1 answer

    Reply 7 months ago

    I don't really think these are accurate to any standard scale Its more of a relative change from day to day I'm looking at.

    On most readings I just take a baseline for a couple of days then set an alarm on a 5% rise. I was using pachube, then ubidots, now I trying a local log to MySql and either going with a node red dash or custom php & Libchart code.

    Download the pdf's for each of the sensors to see what each one respinds to

    there are newer air quality senesors out there but there more expensive than the MQ series...


    2 years ago

    Hi Great Job!

    Just wondering if you have a master library for download for the project?


    3 years ago

    Thank You. I appreciate it.


    3 years ago

    I'm interrested about the result of your different tests

    1 reply

    Reply 3 years ago

    I put a 32GB sd card in it so it can log a lot of data. I'll post a log after a while. I plan on driving it through town to see what it does. I live near cattle horse & alpaca farms, a quarry, Black Dirt Onion fields, orchards and wineries with fields of grapes.

    I don't need the methane gas detector to tell me what it like when you pass a bunch of cows in the summer.......