Is there any alternative sensor that makes more sense in terms of transparency and reliable measurements?
@Kieran …mostly in response to your last post.
Here comes the freight train!
I could be incorrect in my understanding here, someone smarter can correct me if I am wrong.
The principle by which this sensor is operating is actually fairly simple. Visually, you can actually see dust particles when light relfects/refracts off of them when the sun is shining really brightly through blinds, or when you turn your phone’s flashlight on in a dark room.
The Plantower device uses this same principle to identify PM at a smaller scale. It’s really nothing more than a laser beam and an optical sensor. The reading is where it gets complicated. Based on how much of the lasers light is “blocked” alone, we are somehow able to extropolate the volumetric density in μg/m3…MICRO grams per meter cubed.
Remember, PM2.5 is very very small…and the DENSITY of the individual particles has be ASSUMED so there’s going to be wiggle room for margin of error, on top of the fact that we’re talking about particles that are exceptionally small in diameter.
Finding 2 or 3 micrograms of particles in a meter cubed is like the proverbial needle in a haystack. Except, its worse. Its more like a single grain of sand lost in an empty warehouse the size of a football field.
This sensor is a 20 dollar device. I say it’s doing a great job. Expecting much more is…unreasonable. You cannot get blood from a stone - Idioms by The Free Dictionary
Surely there are sensors which operate based on different principles, maybe they would do a better job, but you can also be sure they will cost exponentially more than 20 dollars.
Hmmmm, fair points Nick. Thanks for helping to wind back my expectations of a $20 device that a few years back would have likely cost hundreds or more.
It’s the difficulty of drawing a line between having a measurement, vs having an indication
@Kieran Yes! I agree. BTW Where did your graphs come from?
I am a bit frustrated with this situation too.
Plantower says this in their spec sheet
So…really they are saying a reading of 10
can actually be 0
or 20
and that’s in spec. And +/- 10% at 500 is the differance of a reading of 450
or 550
…a range of 100 is obviously unfortunate. They don’t say this in their spec sheet, but I’d imagine it’s far less accurate with readings over 500.
It makes sense tho, when there are more and more partcles to count and they are moving very fast.
My assumption is that the work by the AirGradient team is primarily focused on this part of the problem:
@Achim_AirGradient says:
By comparing pm02
data between known “good” and “bad” sensor batches in a lab envitonment (with controlled/consistent pm003Count
) they can extroplate out better assumptions for calculating density. I think?
It sounds like they are piling through a mountain of data right now trying to come up with a good one-size-fits-all correction algorithm using math that’s way above my head.
I do have a suggestion that I believe has helped in my situation which also may help you. My “work around” comes at this problem from a completely differant angle, but it is also outside of the AirGradient App solution, so it may not fit your needs.
I am writing all of my sensor data to a CSV and then graphing it with Grafana.
Here’s an example of what my data looks like from around 11PM last night to around 1PM this afternoon.
Heres the same time period but in the air gradient app
I think my data looks “more correct” because I believe I have many more sample data points than the cloud does, and these sensor values can change very very rapidly.
Some examples:
=== DEBUG: pm02Compensated Samples and Calculation ===
Collected Samples (Timestamp and Value):
2025-02-11T13:59:44.053981: 44.69
2025-02-11T13:59:47.179969: 41.01
2025-02-11T13:59:50.254322: 31.51
2025-02-11T13:59:53.326942: 23.54
2025-02-11T13:59:56.400643: 20.03
2025-02-11T13:59:59.474897: 15.74
2025-02-11T14:00:02.541830: 13.9
2025-02-11T14:00:05.612419: 10.67
2025-02-11T14:00:08.684507: 9.45
2025-02-11T14:00:11.719674: 8.4
2025-02-11T14:00:14.826479: 6.66
2025-02-11T14:00:17.899040: 6.05
Processing 12 numeric samples:
Sorted Values: [6.05, 6.66, 8.4, 9.45, 10.67, 13.9, 15.74, 20.03, 23.54, 31.51, 41.01, 44.69]
Trimming highest and lowest: [6.66, 8.4, 9.45, 10.67, 13.9, 15.74, 20.03, 23.54, 31.51, 41.01]
Average: 18.090999999999998 => Rounded: 18.09
Final pm02Compensated value stored: 18.09
Data logged at 2025-02-11T14:01:21.296463
Are you using Home Assistant?
I have a ticket open there on this topic where I proposed a change to the integration. Right now it samples a single datapoint each interval, which I think can be vastly improved.
Our cloud averages the data points into 5 minute averages. This is probably the difference from your script.
You are correct that we are piling through a lot of data right now bit it looks very good with our approach. I believe next week we will roll out some features that will make it easier to correct the Plantowers.
I just noticed that @Siriel_AirGradient’s new algorithm showed up on my unit as part of that OTA update I did not realize I got. I’ll start monitoring for when I get updates now.
@Achim_AirGradient Would this be the most optimal set of settings since I know my sensor is from that batch? Or is using the EPA one stacked on top not recommended?
"corrections": {
"pm02": {
"correctionAlgorithm": "slr_PMS5003_20240104",
"slr": {
"intercept": 0,
"scalingFactor": 0.02896,
"useEpa2021": true
}
}
}
}
Yes, the EPA should be used on top. Your setting looks correct.
Thank you as always. I know I must drive you crazy
When do you expect to start shipping indoor units with individually calibrated PMS5003?
And are you also planning to offer individual PM5003T calibration on the outdoor units?
I would like to buy one and would prefer to wait till you have the individual calibration set up.
But if you think it’s going to take a long time, I might just purchase an indoor kit for now.
What is the authoritative source of what scaling factors and intercepts to use for the various batches?
I see a table for 3 different models here, but it says it is outdated:
Low Readings from Plantower PMS5003
Other articles that are linked from there don’t have a table.
In the Dashboard for Advanced Settings I see where I can pick different batches, but it only shows a Scaling Factor and the Offset is 0 for all of them
Update on PMS5003 Calibrations has some other values, but they don’t match up of the other 2 sources.
I’m looking to add this to the ESPHome config so those users can also have accurate data, but I’m confused as to what the calculation is, and what the scaling and offset/intercept values to be used are.
Ultimately, I think all of the relevant formulas and table of values should be updated in this page, which is supposed to have all off the Correction Algorithms used by AirGradient
Correction Algorithms
Sorry for the delayed response. Please take the ones from the dashboard with offset 0. These are the latest ones.
Is the formula the same from the first article I linked?
Is Intercept the same as Offset?
Does it still only apply if PM2.5 is below 31?
All of this should be included in the “Correction Algorithms” page
# Apply scaling factor and intercept
PM2.5_calibrated_low <- scaling factor * PM0.3_count + intercept
# Use the calibrated data only for PM2.5 < 31 ug/m3
IF (PM2.5_calibrated_low < 31)
THEN (PM2.5_calibrated = PM2.5_calibrated_low)
ELSE (PM2.5_calibrated = PM2.5_ugm3)
Just seeing this discussion and curious how we can know what batch our PMS5003 is from, to select the correct offset in the settings? I ordered a set of sensors to install on a board in early August 2024, and received them in late August. One of the offsets is labeled “PMS5003_20240826”, should I use that one or the one prior? (I’m guessing the 20240104, but want to make sure)
You would have to open your unit up and look at the sticker, it will have the date code on it.
Hi All,
I just got my indoor unit up and running. PM 2.5 reads extremely low compared to other monitors. I did flash the update, and it is hooked up to the server. I’m not a coder, and short on time, so I’m hoping for an easy fix. Thanks.
Have you updated the PM2.5 PMS5003 calibration settings to suit your specific sensor (if necessary)?:
Dashboard
admin (for that monitor)
Advanced settings
PM2.5 Calibration formula - select the details of your PM2.5 sensor (you will need to open the monitor to read the details on the PMS5003 sensor label
Thanks Rog! I’ll give it a go…
What ti use? Specific bach calibration alone?
Or bach calibration + epa?
Latest August batch…
I would recommend + EPA as it seems to be giving more accurate readings