Adafruit PMSA003I Air Quality

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mdk1966
 
Posts: 4
Joined: Tue Jul 20, 2021 2:26 pm

Adafruit PMSA003I Air Quality

Post by mdk1966 »

Has anyone had experience using the PM2 readings from the Adafruit PMSA003I Air Quality sensor? I'm taking readings both inside and outside and trying to correlate with locally reported air quality PM2 readings. Thanks.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit PMSA003I Air Quality

Post by mikeysklar »

What have your findings been?

The PMSA0003l should report a usable PM2.5 standard if the range is between 0 - 1000 ug/m^3. Ideally 0-500.
760B6253-9F3B-495A-8B75-72E78CE93D4D.jpeg
760B6253-9F3B-495A-8B75-72E78CE93D4D.jpeg (317.28 KiB) Viewed 266 times
(manual pg. 3)
https://cdn-shop.adafruit.com/product-f ... h_V2.6.pdf

User avatar
mdk1966
 
Posts: 4
Joined: Tue Jul 20, 2021 2:26 pm

Re: Adafruit PMSA003I Air Quality

Post by mdk1966 »

pm2.5 2021.07.19.jpg
pm2.5 2021.07.19.jpg (30.74 KiB) Viewed 257 times
pm2.5 2021.07.20.jpg
pm2.5 2021.07.20.jpg (36.55 KiB) Viewed 257 times
Thanks much for your response and links. I'm curious if you have you run tests yourself?

I've run two short tests (several minutes each), starting inside, moving it outside, and then back inside. I live in an area in the western U.S. that has experienced periodic smoke and air quality issues because of the ongoing wildfires. The data for 2021.07.19 show the increase in PM 2.5 when I move outside but I'm doubtful regarding the high readings (in the "red"). For the 2021.07.20 data, the air quality was green according to "official" measurement sources, but the sensor showed high values when I moved outside. I've attached the charts from Excel that show the color coded air quality ranges for PM 2.5.

I'm still at the starting point in this process. Getting the sensor and software to work, first writing data to the serial monitor and more recently (yesterday) adding an LCD (16,2) was my first goal. I've added battery power so I could move the system (rickety as it is) outside. I'm using an Arduino Uno with the PM 2.5 sensor.

Thanks again for your interest and help. I'm just wondering how many others have experimented with this sensor.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit PMSA003I Air Quality

Post by mikeysklar »

I have used earlier versions of this sensor and I do follow the daily AQI / PM2.5 in my area.

If you have not already downloaded the IQAir app is free and excellent and might help quickly summarize various sensors near you so you can tell average or find a mean between your surrounding official sensors.

Your graphs look reasonable to me in the sense that they are in reasonable ranges.

User avatar
etienne_grossmann
 
Posts: 3
Joined: Sun Mar 25, 2012 3:32 am

Re: Adafruit PMSA003I Air Quality

Post by etienne_grossmann »

Hello @mdk1966,

I'm trying to use the PMSA003I w/ an Arduino Uno, but I do not know what Uno pins to connect to the SCL & SDA pins (I assume the +5V and GND are as in https://learn.adafruit.com/assets/93225). I am trying to run this sample sketch: https://github.com/adafruit/Adafruit_PM ... 5_test.ino.

Could you share the connections you used?

Best regards,

Etienne

User avatar
mdk1966
 
Posts: 4
Joined: Tue Jul 20, 2021 2:26 pm

Re: Adafruit PMSA003I Air Quality

Post by mdk1966 »

Hi Etienne
Thanks for your question. I am actually using an Arduino Nano, but I believe the pinouts are the same for the Uno: SDA = A4 and SCL = A5. My system now includes a DHT11 sensor to measure humidity and temperature and an LCD to show the results of H and T, as well as the PM2.5 reading. I also have an RGB LED connected so that I can get the "color" scheme for the equivalent AQI reading (green to yellow to orange, etc). See code at the end of this note.

We have been having terrible air quality in the Pacific NW of the US for the past two months or so, so we've found the sensor to be a helpful complement (for indoor readings) to the EPA and other sensors for outdoor readings. We did a simple calibration test of sorts last week when the air quality was in the green comparing our readings at the sites of two of the local outdoor sensors. While the PM2.5 was low (about 7) our sensors were within 1-2 ug/m3 of the "real" sensors.

I'm trying to transition to the Arduino Nano RP2040 so that I can broadcast my results to a web site. I'm still trying to learn the RP2040 so this will take some time. I am somewhat of a beginner so I hope that this helps you.

@mdk1966

Following is my code for my current system:
//Adafruit PM2.5 sensor
//LCD displays results
//DHT11 sensor for temperature and humidity
//LED to display PM2.5 range

//This revision comments out the printing of the DHT (humidity, temp) sensor

//PM25 library
#include "Adafruit_PM25AQI.h"
Adafruit_PM25AQI aqi = Adafruit_PM25AQI();

//Initialize PM25 data variables
int PM25point1=1;
int PM25point2=1;
int PM25point3=1;
int PM25point4=1;
int PM25point5=1;
int PM25avg;

//DHT sensor initialization
#include <DHT.h>
#define Type DHT11
int sensePin=2;
DHT HT(sensePin,Type);
float humidity;
float tempC;
float tempF;
int setTime=50;

//LCD initialization
#include <LiquidCrystal.h>
int rs=7;
int en=8;
int d4=9;
int d5=10;
int d6=11;
int d7=12;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);

//LED initialization
int pin3=3; //red
int pin5=5; //green
int pin6=6; //blue

void setup()
{

pinMode(pin3,OUTPUT);
pinMode(pin5,OUTPUT);
pinMode(pin6,OUTPUT);

HT.begin();
delay(setTime);

//Open LCD
lcd.begin(16,2);
//lcd.println("PMSA003I");
//Wait two seconds for sensor to boot up!
delay(2000);

//Connect sensor
if (! aqi.begin_I2C())
{

//connect to the sensor over I2C
//lcd.println("Sensor not found");
// while (1) delay(2000);
}

//lcd.println("PM25 found!");
}

void loop()
{
lcd.setCursor(0,0);

PM25_AQI_Data data;

if (! aqi.read(&data))
{
//lcd.print("Can't read sensor");
//delay(1000);
//try again in a bit!
// return;
}

//Print PM 2.5 env data to LCD
lcd.setCursor(0,0);
/*
lcd.print("PM25 std: ");
lcd.print(data.pm25_standard);
*/
//creating moving average
PM25point5=PM25point4;
PM25point4=PM25point3;
PM25point3=PM25point2;
PM25point2=PM25point1;
PM25point1=data.pm25_env;
PM25avg=(PM25point1+PM25point2+PM25point3+PM25point4+PM25point5)/5;
lcd.setCursor(0,0);
lcd.print("PM25 avg: ");
lcd.print(PM25avg);

lcd.setCursor(0,1);
lcd.print("PM25 env: ");
lcd.print(data.pm25_env);

//LED = green
if (data.pm25_env<=12)
{
analogWrite(pin3,0);
analogWrite(pin5,255);
analogWrite(pin6,0);
delay(2500);
}

//LED = yellow
else if (data.pm25_env<=35)
{
analogWrite(pin3,255);
analogWrite(pin5,255);
analogWrite(pin6,50);
delay(2500);
}

//LED = orange
else if (data.pm25_env<=55)
{
analogWrite(pin3,255);
analogWrite(pin5,140);
analogWrite(pin6,0);
delay(2500);
}

//LED = red
else if (data.pm25_env<=150)
{
analogWrite(pin3,255);
analogWrite(pin5,0);
analogWrite(pin6,0);
delay(2500);
}

//LED = purple
else if (data.pm25_env<=250)
{
analogWrite(pin3,128);
analogWrite(pin5,0);
analogWrite(pin6,128);
delay(2500);
}

//LED = purple
else if (data.pm25_env<=350)
{
analogWrite(pin3,128);
analogWrite(pin5,0);
analogWrite(pin6,128);
delay(2500);
}

lcd.clear();

//Read humidity and temperature sensor
humidity=HT.readHumidity();
tempF=HT.readTemperature(true);

lcd.setCursor(0,0);
lcd.print("Humidity: ");
lcd.print(humidity,0);
lcd.print("% ");
lcd.setCursor(0,1);
lcd.print("Temp: ");
lcd.print(tempF,0);
lcd.println("dF");

delay(5000);
lcd.clear();
delay(1000);

}

User avatar
etienne_grossmann
 
Posts: 3
Joined: Sun Mar 25, 2012 3:32 am

Re: Adafruit PMSA003I Air Quality

Post by etienne_grossmann »

Hello mdk1966,

thank you for your quick reply! I compiled your sketch, after commenting lcd and temperature-humidity parts. But since I have long workdays, I will probably only test it in the coming days, maybe this weekend. I will keep you posted when I do.

Best regards,

Etienne

User avatar
etienne_grossmann
 
Posts: 3
Joined: Sun Mar 25, 2012 3:32 am

Re: Adafruit PMSA003I Air Quality

Post by etienne_grossmann »

Hi mdk1966,

after all, I went back to the example https://github.com/adafruit/Adafruit_PM ... 5_test.ino. It took me some time to figure out the Uno has I2C, and to modify the example code appropriately, so it is now running.

Thanks again,

Etienne

PS: Nice curves, and thank you to mikeysklar for the link to the documentation.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”