Hello folks! This is my first post to the forums. Please let me know if I've posted this in the wrong place, or if there's someplace better than the Arduino forums to ask this question.
I'm a student living at home in California, and the wildfires here made me want to make an air quality sensor for my first Arduino project. For cost reasons, right now I just want the sensor to detect PM2.5 particles. As I understand it, those are the main particles produced by fires, and they're about the only pollutant I have to worry about where I live. After a bit of digging, I found a project I want to follow that was put together by MIT's Edgerton Center (link here). It uses Grove's Dust Sensor. The sensor's spec sheet (titled on the store page as "data sheet") has what I think is a useful graph.
I'm trying to build this sensor, but I also want to understand what I'm doing and what the sketch code means. I have a lot of questions that I'm trying to sift through, but for the moment I'll restrict myself to these:
- What is the x axis's units in the attached graph? I'm not sure that I understand the notation. Is it detected particles per hundredth of a cubic foot?
- How do I relate the sensor's output to this unit? Chris Nafis found that the graph I linked above could be expressed by the function
y = 1.1x^3 - 3.8x^2 + 520x + 0.62,
where y is concentration (whose units I'm still not sure of) and x is the Lo Pulse Occupancy Ratio. Chris used the following code to get the concentration (I've pulled these lines from a couple functions he wrote):
unsigned long duration; unsigned long lowpulseoccupancy = 0; duration = pulseIn(pin, LOW); lowpulseoccupancy = lowpulseoccupancy+duration; ratio = lowpulseoccupancy/(sampletime_ms*10.0); // Integer percentage 0=>100 concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; // using spec sheet curve
What I don't understand in this code is the assignment of ratio. In the Edgerton Center's project documentation, ratio is defined by
ratio = duration/(sampletime_ms*1000)
Why the factor of 100 difference? How do I know which I should use, if either?
- How do I relate the magnitude of this unit to health concerns? For example, at what magnitude should I avoid going for a jog outside? At what should I wear a mask just to go out to the shed? If it's easier, is there a way to convert this unit to the EPA's AQI, or some similar index?
I'd appreciate any amount of help with any of these questions. I've kind of got myself lost in the weeds by trying to understand what I'm doing.