I'll update my Arduino (http://www.howmuchsnow.com/arduino/airquality/grovedust/) and Electric Imp (http://www.kickstarter.com/projects/1652961970/wifi-air-particle-sensor) code/docs to use this.
Chris,
So P1, which is how the PPD42x is wired does >1.0um correct ? So the "out of the box" will give the low pulse occupancy for all particles greater than 1.0um ?
thx,
Sanjay
Yes.
I believe David Holstius (Phd student at UC Berkeley) has characterized the PPD42 for it's particle size sensitivity
For the moment, I would say: Take all these numbers---1.0, 2.5, whatever---with a grain of salt. There's a continuum of particle shapes and masses in any sample of "real-world" aerosol, meaning that "size" (aerodynamic diameter, as in PM2.5, or PM less than 2.5 microns in a.d.) is a crude measure of what a given metric or instrument is capturing. Optical instruments, like the Shinyei, are just going to respond more or less strongly to particles in a given size range. There's no hard cutoff.
As a rule of thumb, optical instruments---even laser-based ones---don't do well at detecting particles less than 0.3 um. Has to do with the physics of light-scattering at that scale. On top of that, the lens and assembly are decent (for $5) but not great. So, somewhere between 1.0 and 0.3 um, the sensitivity probably falls off considerably, but exactly what the shape of that curve is, even for a given aerosol composition---who knows.
Just curious how do you measure the "Low Power Occupancy" value with the Electric Imp? I understand for the Arduino the pulseIn() function provides information about how many milliseconds each read pulse lasted. But there is no equivalent in the Electric Imp. Do you just sample in a loop and count the number of times you read a low value? Thanks for sharing.
Regards,
.lzs
Hi
Here what i understand: if i send 5 VDC to P1 of the PPD42 sensor, then i read particules greater than 1 um
If i send 3.3 VDC to the sensor then i read particules smaller than 2.5 um
Am i ok or not ?
Thanks for help.
Jean-Robert
Hi Chris,
I am curious regarding P2. If I use P2, do I use the same curve equation as per P1? And also, the spec sheet states the concentration in US units, is there a way to convert the concentration into SI units (i.e. pcs/cubic metre)? Do I just divide or multiply accordingly from cubic feet to cubic metres (1 cu. ft^3 = 0.028317 cu. m^3)?
Fred-- dont know if this is helpful but the sensor is part of the grove dust sensor arduino shield. can see demo code on seeed's wiki: http://www.seeedstudio.com/wiki/Grove_-_Dust_sensor
but again, that's for the already shield'd version...
Here is some code.
Originally designed by Chris Nafis http://www.howmuchsnow.com/WIFIparticle/.
Adjusted, hacked by me and left to run in a room just off from my kitchen - shows when I do a fry up big time, but otherwise haven't seen too much activity. Having it report to fast is a problem.
https://thingspeak.com/channels/6855#publicview - basic
Hope its useful, but haven't much time to explain it or pretty it up.
Thanks! I'll try to find some time during the holidays to get it up and running, a bit excited!
Hi Folks,
Sorry for the interruption but I'm not finding many discussions regarding this sensor. I have a Grove dust sensor with the Shinyei PPD42NS (presumably) and am using Chris Nafis' code from here - http://www.howmuchsnow.com/arduino/airquality/grovedust/ I'm finding ~50% of my readings are '0'. I'm using the default 30 second interval and am wondering if this is normal. I have it mounted 'upright' (vertically) per the photos at the top of Chris' blog to ensure some convection.
I did notice that the counts increase substantially if I shine a light into the sensor and am wondering if possibly the light is bad or if the optics are off. I don't know how i could test or calibrate this device.
Any suggestions?
You received this message because you are subscribed to a topic in the Google Groups "#AirQualityEgg" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/airqualityegg/L5j7CO1dZQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to airqualityeg...@googlegroups.com.
I think I will do a bit of experimentation with the physical configuration of the device to see what yields best results. The influence of the convection from the heated resistor seems to be incredibly slight and subject to ambient air conditions. I would like to have a bit more positive volumetric system for pushing air through the detection chamber,and given the very low readings currently it seems i have a bit of headroom before oversaturating the test chamber.
I am honestly not terribly interested in calibrated reference as long as I know the system is functioning properly. I plan to use this as a bit of a 'particulastat' to engage the air purification system when levels get beyond some arbitrary threshold. I can check it against rented calibrated system if it becomes interesting in the future.
Thanks for your help. I'll be sure to share anything i find that might be of interest. If anyone knows where i could order a PPD 60PV i would be interested in that as well.
Thanks!
https://mega.co.nz/#!FdRlBDrI!FL6eGF5GsjK5So81OI_DXvv0G3LxJfZyFmmjTn8LFGc
I don't know enough about how the GPIO code works in either case to really debug or test any theories, but the difference is interesting.
https://github.com/hoegaarden/dustnode-dustpi-gpio
It uses the node.js onoff GPIO interrupt library and the concentration calcs look to be inspired directly by Mr Nafis' original Arduino sketch:
https://github.com/hoegaarden/dustnode-dustpi-gpio/blob/master/lib/dustnode.js#L114
I have been watching the lowoccupancy timer on it and I just don't get 0's, even over a 15 second sample interval. The lowest I've seen is 169ms over 15 seconds.
Any thoughts?
I was wondering if anyone knew how to add a timestamp to the data?
/*
Interface to Shinyei Model PPD42NS Particle Sensor
Program by Christopher Nafis
Written April 2012
Updated April 2014 by Dok O Caoimh to include an average of last five readings to smooth out curve
http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html
http://www.sca-shinyei.com/pdf/PPD42NS.pdf
JST Pin 1 (Black Wire) => Arduino GND
JST Pin 3 (Red wire) => Arduino 5VDC
JST Pin 4 (Yellow wire) => Arduino Digital Pin 8
*/
int pin = 8;
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 30000; // define the sample time as 30 seconds (30000ms)
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;
float currentAverage = 0;
float averages[5] = {0,0,0,0,0}; // creates an array to populate the last X values to calculate the average
int averageLoop = 0;
void setup() {
Serial.begin(9600);
pinMode(8,INPUT);
starttime = millis();
}
void loop() {
getSample();
}
void getSample() {
duration = pulseIn(pin, LOW);
lowpulseoccupancy = lowpulseoccupancy+duration;
if ((millis()-starttime) > sampletime_ms)
{
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
averages[averageLoop] = concentration; // populate the averageLoop with the concentration value
currentAverage = getAverage();
Serial.print(lowpulseoccupancy);
Serial.print(",");
// Serial.print(time_t);
// Serial.print(",");
Serial.print(ratio);
Serial.print(",");
Serial.print(concentration);
Serial.print(",");
Serial.println(currentAverage); // prints the current average in the data
lowpulseoccupancy = 0;
starttime = millis();
averageLoop++;
if (averageLoop < 0 || averageLoop >= 5) {
averageLoop = 0;
}
}
}
float getAverage() {
float current = (averages[0] + averages[1] + averages[2] + averages[3] + averages[4]) / 5;
static char dtostrfbuffer[0];
String avg1 = dtostrf(averages[0],6,2,dtostrfbuffer);
String avg2 = dtostrf(averages[0],6,2,dtostrfbuffer);
String avg3 = dtostrf(averages[0],6,2,dtostrfbuffer);
String avg4 = dtostrf(averages[0],6,2,dtostrfbuffer);
String avg5 = dtostrf(averages[0],6,2,dtostrfbuffer);
// Serial.println("---" + String(averageLoop) + " --- " + avg1 +" --- " + avg2+ " --- " + avg3+ " --- " + avg4 +" --- " + avg5 + " --- " );
return current;
}
Here is an example of some of the values I am getting:
155002,,0.52,268.43,633.17
468220,,1.56,807.13,521.28
179133,,0.60,310.00,481.58
75034,,0.25,130.46,445.71
1122115,,3.74,1950.02,693.21
255242,,0.85,440.97,727.71
1049631,,3.50,1820.58,930.40
422482,,1.41,728.46,1014.10
390801,,1.30,673.99,1122.80
346991,,1.16,598.69,852.54
101378,,0.34,175.95,799.53
230314,,0.77,398.09,515.04
272342,,0.91,470.37,463.42
185558,,0.62,321.06,392.83
346678,,1.16,598.15,392.72
with a screenshot of this small dataset attached.
--
You received this message because you are subscribed to a topic in the Google Groups "#AirQualityEgg" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/airqualityegg/L5j7CO1dZQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to airqualityeg...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "#AirQualityEgg" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/airqualityegg/L5j7CO1dZQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to airqualityeg...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "#AirQualityEgg" group.
To unsubscribe from this group and stop receiving emails from it, send an email to airqualityeg...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "#AirQualityEgg" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/airqualityegg/L5j7CO1dZQA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to airqualityeg...@googlegroups.com.