How to Monitor Air Quality with PM2.5 and 1.0 Sensor
View from outside our office window, yes, it was very polluted that day!
Today we’ll build a PM station that can measure PM1.0 to monitor your air quality. We'll use Arduino to read the sensor’s data, including PM2.5 and PM10.0, then show this data on the OLED display.
You can find an easy test how-to for your OLED display here.
Track your air quality reliably and in real-time! This particular sensor is super easy to set up and use right out of the box. With the example code included in this how-to, it's as easy as hooking it up to an Arduino and uploading the code.
Reliably monitor both PM1.0 and PM10 levels in addition to PM2.5. PM refers to Particulate Matter which here are dust concentrations 10 microns or smaller in diameter. The sensor used here is PMS3003 and utilizes a light scattering analysis method to measure the dust inside the box. A laser radiates particles and collects the resulting scattered light to measure the curve of scattering light over time. The connected microcontroller will then determine the equivalent particle diameter and the number of particles of different diameters per unit volume.
The code provided will output this collected data as both standard units of measurement (think: AQI rating) and environmental units (ug/m3)
So, let's get started! Here's what you'll need:
- 1.5 in. Display 128 x 128
- Arduino Uno
- PM Senor box and breakout board kit
- Extra jumper wires (for power, ground, and TX)
- Arduino IDE
- Adafruit SSD1351 Library (for the OLED display)
- Adafruit GFX Library (for the OLED display)
- Example Code
Step 1: Hook up your Hardware
First, let's hook up the display to the Arduino Uno and then the PM sensor to the Uno. You can use a breadboard to hook up both of these quickly. The pinout for the sensor is below and here are the connections you'll need to make:
|1.5 in. Display
|GND (pin 2)
|VCC (pin 1)
|TX (pin 5)
Disconnect the RX pin on the Arduino Uno when you upload the code. Reconnect it when the code has uploaded.
Step 2: Coding Time!
Upload the example code provided. Don't forget to install the library linked to above!
Now, go ahead and run the code. Let it collect data for a few seconds to stabilize.
That's it! A simple, two-step process for measuring your air quality. Expand on this breadboard hook up and integrate the sensor into a weather station or make a smart air filter. There are any number of fun projects you can do with a PM sensor.