0

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 adafruit2 on Sat Aug 24, 2019 12:08 pm

hiya this is really helpful info! i dont believe anything under $50 is going to give super accurate counts...but its good to know the limitations!

adafruit2
Site Admin
 
Posts: 20259
Joined: Fri Mar 11, 2005 7:36 pm

Re: Air Quality Sensor Help

by adafruit2 on Sun Aug 25, 2019 1:53 pm

Stan, we've linked/copied your text with attribution here int he guide https://learn.adafruit.com/pm25-air-qua ... sage-notes because you did such an amazing job. please let us know if you're prefer we remove it!

adafruit2
Site Admin
 
Posts: 20259
Joined: Fri Mar 11, 2005 7:36 pm

Re: Air Quality Sensor Help

by StanJ on Sat Aug 31, 2019 10:33 pm

Remove it?? Please, don't. I posted it 'cos I wanted to help others avoid frustration! :-) There's a lot of confusion with the PMS parts since the manual is so skimpy on details.

Of what use is knowledge if you don't share it?

The folks here are pretty good with sharing & caring. On forums elsewhere some members like to club newbies with the RTFM stick. I'm not 'that guy'. I tried to put all of my most hard-won hints, tips & research in that first post.

I used the PMS5003 project as a way to learn the ESP8266, since I'm new to the Espressif micros. The ESPs are a nice family that I think I'll be using more frequently from now on. The tool chain was pretty easy to learn as well, and that's a welcome surprise as I'm nothing like a C programmer, either; I'm an old hardware tech. Quoting Steve Ciarcia, "My favorite programming language is solder." :D

And to respond to the question above, no, we never intended a $35 sensor (total cost) to replace a $4500 NIST-traceable particle counter. We're using it merely to give us a heads-up on the quality of the cleanroom. We use the Beckman once a month and it's a fairly painful process to qualify our cleanroom. This little gadget runs 24/7 with samples every half hour, so we can tell quickly if we've gotten contaminated. At > 100:1 price difference I can afford to spread 5 of the PlanTower sensors around the cleanroom! I was pleasantly surprised to see that the Beckman and PlanTower tracked fairly well in different areas (classes) of our environment, including the inspection area that's outside the cleanroom (nowhere near as bad as Room Air). The single handiest feature of the $35 monitor that the Beckman can't do is send an email or SMS message (or both) if the cleanroom gets contaminated. We don't have to wait to find out we've possibly destroyed the product with dirty air, we can correct it immediately. Unfortunately, yes, it's happened before.

For home use, the PlanTower opens up a world of sensing that you couldn't afford to do just 5 years ago. Nobody in their right mind would pay $4500 to see how much their air is polluted, or whether their air filter(s) are actually working. I'm doing a comparison of various air filters here at home to see which is the most cost-effective. I don't have to rely on advertising claims when I have real data at hand.

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

Re: Air Quality Sensor Help

by adafruit2 on Sun Sep 01, 2019 9:57 pm

nice work - keep us updated, this is great stuff!

adafruit2
Site Admin
 
Posts: 20259
Joined: Fri Mar 11, 2005 7:36 pm

Re: Air Quality Sensor Help

by MT5 on Tue Sep 10, 2019 6:08 pm

Hello,
Could those who have used this sensor help me to understand the meaning of the effective range and resolution? For example, to measure smoke/dust over a period of time, could the concentration never exceed the amount prescribed in the range at each second intervals, or rather 2.3 second intervals in which the measurements are taken?
Thank you

MT5
 
Posts: 1
Joined: Tue Sep 10, 2019 6:04 pm

Re: Air Quality Sensor Help

by adafruit2 on Tue Sep 10, 2019 11:01 pm

it'll be an average - it counts the particle spots over a time period and then divides

adafruit2
Site Admin
 
Posts: 20259
Joined: Fri Mar 11, 2005 7:36 pm

Re: Air Quality Sensor Help

by StanJ on Sun Sep 15, 2019 3:47 pm

It's quite a long average. I've lightly blown smoke near the sensor, and it ran the counts way up for 15 to 20 seconds before the air around the sensor (and inside the air chamber) cleared. The 0.3um raw particle counts were at maximum (0xFFFF) most of that time. I have the debug print turned off right now but I could re-enable it if you want actual time measurements. I'd have to run a fan from the 'cleaner' air in the room and then blow smoke in between the fan and the sensor to minimize stagnant air results.

With the air handler fan running continuously, the sensor reports a small spike when I'm smoking downstairs, about 1/5th to 1/10th as large as when I'm in the room with the sensor.

-------------------------------------------------

Electronics 101 mistake I forgot to mention earlier: the data & control pins on the PlanTower sensor are ~3.3V TTL level, and they're real. Vil (logic low input level) is < 0.8V, and Vih (logic high input level) is > 2.7V.

I'm so used to CMOS levels that I forgot about that unusually high Vih for the PMS5003. In order to conserve pins on the D1 Mini I'd used in this project, I had one pin control both the SET input on the PMS sensor and also the backlight control on the 2.2" TFT display, so any time the sensor is running the LCD is lit up. Oops. The backlight control on the TFT is low impedance (likely a single transistor switch), so the TFT pulled the SET pin down to around 2.5V. I didn't consider it a problem until I started doing power measurements on the circuit. As I unplugged the backlight control line to measure how much current the TFT was drawing, I heard the fan in the PMS sensor speed up. That meant it hadn't been moving as much air through the measurement chamber, so the measurement wasn't valid: the reported particle counts would have been lower than actual.

I changed to a higher value resistor between the D1 Mini / PMS5003 SET pin line and the TFT backlight control pin to minimize the current draw on that pin even further. 10k was right on the edge of the 2.7V Vih spec, so I used 33k instead. The backlight is a little dimmer, but still usefully bright. The PMS seems happy with 3.12V on the SET control input.

Image

Any spec limit you ignore WILL come back to haunt you later. You can't run your circuit directly from battery without a 5V regulator, as the PMS5003 needs 5V +/ 0.5V for the fan to run at the correct speed. I'd seen a couple of people question that elsewhere for low-power Li-poly battery operation.

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

Re: Air Quality Sensor Help

by StanJ on Wed Sep 18, 2019 8:09 pm

Sorry MT5, I misunderstood your question.

The AQI (Air Quality Index) is calculated differently by different countries. Wiki shows several of them, but the only ones they quote the actual PM2.5 & PM10 ug/m3 measurements for is the UK, Europe and the USA:
https://en.wikipedia.org/wiki/Air_quality_index (about half way down the page). The others indexes mentioned at Wiki are possibly ug/m3, but I can't trust a list of numbers with no scale shown. '10' is a meaningless number without a scale or reference value.

The PlanTower sensor spec says it'll measure 0 to ~500 ug/m3, so: nothing (clear air) to OMG wear an SCBA! with about 10% accuracy and 1 ug/m3 resolution. That's reasonable accuracy. The UK and US indexes are an 8 hour moving mean, so you'd want to do a moving average to match that. Other countries use a 1 or 24 hour average. Here's the UK table for particulates (they also include indexes for gaseous Ozone, Nitrogen Oxide and Sulphur Dioxide which I've removed as the PlanTower can't measure them):

Image

The particle concentration numbers reported by the PlanTower sensor are calculated from the raw particle counts; it's not a direct measurement. I'd believe their 10% accuracy claim for PM2.5, although the PM10 number is made up from a good guess based on the smaller particle sizes and standard log distribution curve of particles. That means that if the PM10 pollution is made up almost wholly of large particles like pollen then the reported number may be lower than actual, as the sensor is estimating the 5 and 10um particle counts.

My indoor 8 hour moving average is pretty low as I have a high quality air filter. My instantaneous readings however vary over a range of roughly 1000:1 since I smoke. If you don't smoke or you're measuring outdoors you won't have such a large variation between readings. Indoor AQI only jumps when you're cooking, presuming you don't pollute your environment like I do. :-) Outdoor AQI will jump if a diesel truck drives by, but it'll clear within a few minutes. Cooking curry is pretty high in particulates (oil fog) which will eventually gum up the sensor. I turn the sensor off if I'm cooking anything that produces an oil fog.

Off-topic for my American friends that might not have a clue how big the 0.1 liter sample size of the PlanTower is, here's a graphic:
Image

The first pic is per sample. The second pic is 100 samples averaged or accumulated (takes 1 to 3 minutes for that much).

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

Re: Air Quality Sensor Help

by StanJ on Wed Sep 18, 2019 9:20 pm

One other thing barely mentioned in the PlanTower spec is humidity. They rate the sensor for operation at 0-99% humidity, but when you get over ~60% RH the readings will start to shift to larger perceived particle sizes, so be aware. If you're going to run a sensor in high humidity you may want to account for the particle size shift versus humidity:

Image
(sorry, don't recall where I got the graphic from)

In high humidity environments the water adheres to the particles (nucleation sites). Get enough humidity and the particles turn into rain.

The apparent size shift vs. humidity is only for soluble particles. Water won't adhere to insoluble particles, so high humidity won't affect particle counts of soot, ash, or most dusts, but it will have an effect with salts (like sea salt spray) or organic compounds.

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

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 Mouser.com, 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!

Guillermo

guillermo_pallarolas
 
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.

Cheers,

Eric

oesterle
 
Posts: 797
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.

Image

StanJ
 
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 7454 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 7454 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 7454 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:

https://www.epa.gov/sites/production/files/2018-01/documents/collocation_instruction_guide.pdf

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

airhead
 
Posts: 3
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:

https://airnow.gov/index.cfm?action=airnow.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 :

https://en.wikipedia.org/wiki/Air_quality_index

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:

https://www3.epa.gov/airnow/aqicalctest/nowcast.htm

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

https://en.wikipedia.org/wiki/NowCast_(air_quality_index)

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:

https://www.epa.gov/outdoor-air-quality-data/interactive-map-air-quality-monitors

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

airhead
 
Posts: 3
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

Hi,
I'm using a PM2.5 Sensor by Plantower from Adafruit.
https://learn.adafruit.com/pm25-air-qua ... 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 = uart.read(32)
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
Dave
Attachments
image 3.JPG
Connections for wiring.
image 3.JPG (45.89 KiB) Viewed 6995 times
image 2.JPG
PM2.5 Sensor
image 2.JPG (42 KiB) Viewed 6995 times
image 1.JPG
wiring on the CPX. Red are the connections for the PM2.5 sensor
image 1.JPG (91.75 KiB) Viewed 6995 times

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

Please be positive and constructive with your questions and comments.