Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.

Air Quality Sensor Help
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Air Quality Sensor Help

by guillermo_pallarolas on Thu Sep 19, 2019 12:16 am

Hello, this is the first time I write in a post. I could not find another place but it is about several PMS5003 we acquired from you via, together with some Feather HUZZAH esp8266. The sensor readings are Ok we assume, but we could not find what would be the right position/orientation of this sensor. Datasheets from other sensors mention how to place their sensors (vertical/horizontal, and what to pay attention about the air inlet/outlet).

I have seen many have experienced with this sensor. Does anybody know how to get this info? or any advice? Thanks in advance!


Posts: 1
Joined: Fri Dec 05, 2014 11:43 am

Re: Air Quality Sensor Help

by oesterle on Mon Sep 23, 2019 9:09 pm

Hi, guillermo!

Please create a new topic with your question, as your question may not get the attention it merits here.



Posts: 756
Joined: Tue Sep 17, 2013 11:32 pm

Re: Air Quality Sensor Help

by StanJ on Sun Oct 06, 2019 4:18 pm

Guillermo, there isn't much mention of sensor orientation in the manual. From looking inside, it shouldn't matter much, and I've never noticed a change in speed of the fan with different orientation.

To get the most accurate results, you want the air flow in the room to go from the intake to the outlet, or else you're pulling already-measured air back into the intake. If it's outdoors, you don't have that option, and it's best to route the exhaust air over to the other side of the sensor, if that's feasible. Mine is inside a box that has ~4 times the total volume of the sensor, so I routed the exhaust air with internal baffles. You don't want to constrict the air flow, or else the sampling volume will change.


Posts: 12
Joined: Sat Aug 24, 2019 7:33 am

Re: Air Quality Sensor Help

by airhead on Sat Oct 12, 2019 2:27 pm

I work for a State air quality program, and we operate EPA reference monitors for PM2.5 and submit data to EPA's national map.
My State, along with many others, has been evaluating the Plantower 5003 to see how it compares to EPA monitors we use for public reporting. To evaluate and calibrate our Plantower5003 sensors, we use the PM2.5 (std) data from the adafruit code instead of the PM2.5 (env) data.

I thought I would share some recent (May to September) data at one of our sites where we are comparing PMS5003's with our Teledyne T640 monitor. We made hourly averages from the Plantower data so we could compare the two data sets. The T640 uses particle scattering like the PMS5003, but is a FEM monitor (approved by EPA for measuring outdoor air quality).

Here is a plot of PM2.5(std) vs PM2.5(env) data for two of the Plantower sensors over the course of the study

PM2.5 (std) vs PM2.5(env).jpg
PM2.5 (std) vs PM2.5(env).jpg (44.83 KiB) Viewed 1158 times

This is the same behavior we see in the lab; PM2.5(env) is the same as PM2.5(std) up to 30ug/m3, and after that PM2.5(std) is higher.
We think that Plantower came up with a mathematical function that relates PM2.5(env) to PM2.5(std) that is the same for all of the PMS5003 sensors (up to electrical noise). Physically it does not make sense that atmospheric levels abruptly change character
at 30ug/m3. So we utilize our T640 to figure out which of the two parameters should be used for outdoor applications and which was a mathematical construct.

Here's the graph of the PM2.5(env) from two 5003's vs the T640:

PM2.5(env) vs T640.jpg
PM2.5(env) vs T640.jpg (66.1 KiB) Viewed 1158 times

and here is the graph of PM2.5 (std) vs the T640:

PM2.5 (std) vs T640.jpg
PM2.5 (std) vs T640.jpg (75.11 KiB) Viewed 1158 times

The plot of the PM2.5 (env) vs the T640 data is clearly not linear, and falls off at high concentrations,
but the PM2.5(std) data is much closer to being linear.

Its easy to calibrate PM2.5 (std) to the T640 using a simple linear model, see for example, page 38 of this document:

Thanks to EPA-ORD, CSU, and the Washington State Dept of Ecology for helping us figure this out.

Posts: 2
Joined: Sun Nov 13, 2016 11:03 pm

Re: Air Quality Sensor Help

by airhead on Sat Oct 12, 2019 10:54 pm

I work in the monitoring group for a small state and answer a lot of questions about what the US Air Quality Index (AQI) is and what it means. So I thought I would discuss the issues we get the most questions about, and say what I can about computing the AQI for the Plantower 5003.

States compute the Air Quality index for PM2.5 from EPA approved monitors known as FEMs. The PM2.5 AQI is based on 24-hr average data. Our FEMs produce hourly data, so if we want to know what the air quality index is for last Tuesday, we just take the a twenty-four hour average of the FEM data from last Tuesday, and plug the result into the concentration to AQI tab of EPA's AQI calculator:

The calculator lists the AQI index associated with the 24 hr average concentration entered, the groups such as asthmatics and children that are most effected at this level of exposure, and cautionary statements associated at this level of exposure.

Of course, you can always code your own calculator from the equation listed in the wikipedia article United States AQI :

This is simple enough, but the problem is that no one wants to know what the air quality was last Tuesday, they want to know what it is now. You're probably thinking, why not just plug the most recent hour into the calculator? But that is not quite right. You can think about exposure to air pollution like taking a drug. Taking one aspirin in the last hour is not the same as one aspirin an hour for 24 hours, or averaging a dose of 1 aspirin per hour for 24 hours. So what we need is some sort of surrogate for a 24 hour average that tells us what the 24 hour average will be based on the values we have the measured in the previous 12 hours and a good estimate of what they will be in the next 12 hours. Then we can plug in this surrogate for a 24 hour average concentration into the AQI calculator and explore the health effects. The US EPA has come up with a function that does the job, the calculator is here:

If you like, you can code your own NowCast calculator based on the equations here.

But you have a Plantower 5003, not a pricey EPA reference monitor, and you want to know about the health effects associated with the levels your reading. What are you supposed to do? There are two possibilities here. If you want to know the Air Quality index for last Tuesday, you can average your calibrated Plantower 5003 data for last Tuesday and plug it into the AQI calculator.

If you want to know the Air Quality associated with current conditions, you can take hourly averages of your calibrated Plantower data for the past 12 hours and plug them into the NowCast calculator, and then take your NowCast and plug it into the the AQI calculator.

OK, you saw what I did there. I put in the word calibrated in front of Plantower. How are you supposed to calibrate your Plantower 5003? Once its calibrated do you have to recalibrate it? These are good questions, and researchers, EPA and States are working hard to try to answer them. In my last post, I presented some of our data; we take a pretty simple approach, we just plot hourly average PM2.5 (std) from the Plantower vs hourly average FEM data and develop our calibrations via linear regression as described in the EPA reference cited in the post. What? You need an FEM to calibrate a Plantower 5003? Not happening! Well PM2.5 levels are pretty uniform away from sources of smoke. You can find the nearest FEM monitor to where you live here:

and work out your own PMS5003 calibration. It's an interesting scientific problem, and you can join the team that's working on it!

Posts: 2
Joined: Sun Nov 13, 2016 11:03 pm

Re: Air Quality Sensor Help

by Dave_Adafruit_2 on Sat Nov 30, 2019 11:13 am

I'm using a PM2.5 Sensor by Plantower from Adafruit. ... r/overview

I'm trying to connect to a circuit playground express as shown in the tutorial above.
I have wired it as shown in the images.

I am getting an error that seems to be related to no data being returned from the sensor at the line in the code for...

while True:
data =
data = list (data)
I get the error TypeError: NoneType object is not iterable

Is the sensor compatible with a circuit playground express?

Note i also have a CCS811 CO2/TVOC from Adafruit also wired to the circuit playground express and that unit and code is working well.

Thank you
image 3.JPG
Connections for wiring.
image 3.JPG (45.89 KiB) Viewed 698 times
image 2.JPG
PM2.5 Sensor
image 2.JPG (42 KiB) Viewed 698 times
image 1.JPG
wiring on the CPX. Red are the connections for the PM2.5 sensor
image 1.JPG (91.75 KiB) Viewed 698 times

Posts: 2
Joined: Sat Nov 30, 2019 10:48 am

Re: Air Quality Sensor Help

by adafruit_support_carter on Mon Dec 02, 2019 2:26 pm

@Dave_Adafruit_2 Please start a new thread for your issue.

Posts: 15955
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.