Shinyei PPD42NS particle sensor has >1um and >2.5um channels!

6,472 views
Skip to first unread message

Nafis

unread,
May 17, 2013, 11:58:07 PM5/17/13
to airqua...@googlegroups.com
The SEEED studio Shinyei PPD42NS dust sensor (http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html) comes with a cable wired for +5VDC, GND, and P1. P1 shows >1um particles. The interesting thing is that the PPD42NS also has a pin P2 that shows >2.5um particles. So this allows you to determine if the detected particles are < 2.5um. This is important for health reasons.

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.

Nafis

unread,
May 18, 2013, 9:53:17 PM5/18/13
to airqua...@googlegroups.com
I contacted Shinyei. By default P2 is calibrated for > 2.5um. Don't fiddle with the pots. You can change the P2 detection size by changing the input voltage to pin 5. P1 is always >1um. If you look at P1 and P2 on a scope you can see what is happening. If P1 only, then >1um and < 2.5um. If P1 & P2 then >2.5um. Looking at the pulse size ratios of P1&P2 can tell you that you have a mix of particle sizes.

Another interesting thing is that SEEED is not an official distributor of Shinyei. Shinyei has newer versions of the PPD42Nx. There is also a knock-off version from a Korean firm: DSM501 ( http://www.alibaba.com/product-gs/89...01_series.html )

netnut

unread,
May 28, 2013, 1:55:17 AM5/28/13
to airqua...@googlegroups.com
On Saturday, May 18, 2013 6:53:17 PM UTC-7, Nafis wrote:
> I contacted Shinyei. By default P2 is calibrated for > 2.5um. Don't fiddle with the pots. You can change the P2 detection size by changing the input voltage to pin 5. P1 is always >1um. If you look at P1 and P2 on a scope you can see what is happening. If P1 only, then >1um and < 2.5um. If P1 & P2 then >2.5um. Looking at the pulse size ratios of P1&P2 can tell you that you have a mix of particle sizes.
>
>
>
> Another interesting thing is that SEEED is not an official distributor of Shinyei. Shinyei has newer versions of the PPD42Nx. There is also a knock-off version from a Korean firm: DSM501 ( http://www.alibaba.com/product-gs/89...01_series.html )

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

Nafis

unread,
May 28, 2013, 6:37:28 PM5/28/13
to airqua...@googlegroups.com

Yes.

I believe David Holstius (Phd student at UC Berkeley) has characterized the PPD42 for it's particle size sensitivity

David Holstius

unread,
May 31, 2013, 12:37:11 PM5/31/13
to airqua...@googlegroups.com
I'm working on this, with the generous assistance of some folks with far greater expertise. I hope to share some preliminary results soon, in a way that's accessible to both professionals and non-professionals.

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.

Jason Burroughs

unread,
May 31, 2013, 12:59:39 PM5/31/13
to airqua...@googlegroups.com
How can particulate size be measured without pulling in the particulates, and therefore filling some kind of reservoir which would then need to be periodically cleaned out (like a filter)?

Based on my experience in the liquid fuel world, just wanting to understand the particulate sensor better.
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

mhspohr

unread,
Jun 5, 2013, 2:22:16 PM6/5/13
to airqua...@googlegroups.com
On Friday, May 31, 2013 9:59:39 AM UTC-7, Jason Burroughs wrote:
> How can particulate size be measured without pulling in the particulates, and therefore filling some kind of reservoir which would then need to be periodically cleaned out (like a filter)?
>
The device seems to use a "flow through" model where particles disrupt a light beam and this disruption is measured. On reference said that it uses a "resistor" to create a thermal current and another referred to a "fan" so not sure which. I don't have the device yet so can't take a look.
Anyway, this flow through model shouldn't get clogged up but I imagine over time there may be some degradation of output due to build up of particles within the chamber.

Zit Seng Lai

unread,
Jun 22, 2013, 3:51:22 AM6/22/13
to airqua...@googlegroups.com
On Saturday, 18 May 2013 11:58:07 UTC+8, Nafis wrote:
> The SEEED studio Shinyei PPD42NS dust sensor (http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html) comes with a cable wired for +5VDC, GND, and P1. P1 shows >1um particles. The interesting thing is that the PPD42NS also has a pin P2 that shows >2.5um particles. So this allows you to determine if the detected particles are < 2.5um. This is important for health reasons.
>
> 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.

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

jeanrobe...@yahoo.ca

unread,
Jun 24, 2013, 5:53:10 PM6/24/13
to airqua...@googlegroups.com
On Friday, May 17, 2013 11:58:07 PM UTC-4, Nafis wrote:
> The SEEED studio Shinyei PPD42NS dust sensor (http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html) comes with a cable wired for +5VDC, GND, and P1. P1 shows >1um particles. The interesting thing is that the PPD42NS also has a pin P2 that shows >2.5um particles. So this allows you to determine if the detected particles are < 2.5um. This is important for health reasons.
>
> 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.

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

Victor Aprea

unread,
Jun 24, 2013, 5:58:21 PM6/24/13
to airqua...@googlegroups.com
I don't think that's how it works. There is a separate output for "2.5 um" You send it 5V either way, but you read the other output for 2.5 um.
 
Vic

Victor Aprea // Wicked Device


jeanrobe...@yahoo.ca

unread,
Jun 24, 2013, 7:13:42 PM6/24/13
to airqua...@googlegroups.com
Vic
OK but where is the other output ? On the PPD42 or on the Arduino bord ?
Thanks
Jean-Robert

daffodilistic

unread,
Jun 27, 2013, 2:15:47 AM6/27/13
to airqua...@googlegroups.com
On Sunday, May 19, 2013 9:53:17 AM UTC+8, Nafis wrote:
> I contacted Shinyei. By default P2 is calibrated for > 2.5um. Don't fiddle with the pots. You can change the P2 detection size by changing the input voltage to pin 5. P1 is always >1um. If you look at P1 and P2 on a scope you can see what is happening. If P1 only, then >1um and < 2.5um. If P1 & P2 then >2.5um. Looking at the pulse size ratios of P1&P2 can tell you that you have a mix of particle sizes.
>
>
>
> Another interesting thing is that SEEED is not an official distributor of Shinyei. Shinyei has newer versions of the PPD42Nx. There is also a knock-off version from a Korean firm: DSM501 ( http://www.alibaba.com/product-gs/89...01_series.html )

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)?

Davide Gironi

unread,
Aug 26, 2013, 5:06:06 AM8/26/13
to airqua...@googlegroups.com
same for me, courious about the P2 to concentration conversion.

Christian Rapp

unread,
Nov 21, 2013, 9:43:16 AM11/21/13
to airqua...@googlegroups.com
I am also curious how to get the concentration using P2. Did anyone solve this?

Fredrik Persson

unread,
Dec 17, 2013, 9:47:00 AM12/17/13
to airqua...@googlegroups.com
Hi! I've just purchased two of these Shinyei PPD42NS sensors that I planned to hook up to a couple of electric imps. Do you have some example code for the imp that you could share?
Kind regards
Fredrik

Adam Altman

unread,
Dec 18, 2013, 1:21:50 PM12/18/13
to airqua...@googlegroups.com

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

NeilH

unread,
Dec 18, 2013, 10:18:13 PM12/18/13
to airqua...@googlegroups.com
On Tuesday, December 17, 2013 6:47:00 AM UTC-8, Fredrik Persson wrote:

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.

NeilH

unread,
Dec 18, 2013, 11:59:10 PM12/18/13
to airqua...@googlegroups.com

Fredrik Persson

unread,
Dec 19, 2013, 10:25:43 AM12/19/13
to airqua...@googlegroups.com
Den torsdagen den 19:e december 2013 kl. 05:59:10 UTC+1 skrev NeilH:
> Oops here is the code link https://github.com/neilh10/ParticleCounter01

Thanks! I'll try to find some time during the holidays to get it up and running, a bit excited!

Robert Rich

unread,
Mar 17, 2014, 4:03:31 PM3/17/14
to airqua...@googlegroups.com

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?

Chris Nafis

unread,
Mar 17, 2014, 8:05:45 PM3/17/14
to airqua...@googlegroups.com
Yes zeros are common. It should be vertical so the heat resister causes air
to rise. You can put black electric table over the large opening to
eliminate sun light issues
--
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.
For more options, visit https://groups.google.com/d/optout.


Lai Zit Seng

unread,
Mar 17, 2014, 8:23:55 PM3/17/14
to airqua...@googlegroups.com
I’ve found zero readings now and then too. Sometimes quite frequent, but never more than, say, 5 times in a row. So I’ve decided to do a rolling average of the last 10 readings for purpose of reporting and graphing. :P It just sounds weird to have a zero dust reading.

I’ve also gone with taping the window opening to prevent stray light from getting in. I’m not sure if I should also go further to also shield the entire setup from direct gust of wind. I’ve noticed that dust reading does get quite elevated if it is in the wind.

Regards,

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

Robert Rich

unread,
Mar 18, 2014, 12:57:54 PM3/18/14
to airqua...@googlegroups.com
Thanks to both of you for the additional information.

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!

Robert Rich

unread,
Mar 18, 2014, 1:08:24 PM3/18/14
to airqua...@googlegroups.com
For what it's worth, Shinyei customer service sent me a nice little infographic as to how the sensor works. I've uploaded it to mega, not sure how to share files here:

https://mega.co.nz/#!FdRlBDrI!FL6eGF5GsjK5So81OI_DXvv0G3LxJfZyFmmjTn8LFGc

Robert Rich

unread,
Mar 20, 2014, 10:45:09 AM3/20/14
to airqua...@googlegroups.com
I'm not sure what to make of this, but I've found that running it from the Raspberry Pi using dustpi, I don't get anywhere near the number of zero counts.

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?

Dok O Caoimh

unread,
Apr 17, 2014, 4:33:04 PM4/17/14
to airqua...@googlegroups.com
In case anyone is interested here is some code to find the average of the previous X values (I used 5 for no particular reason). There may be a better way to do this (as I am new to Arduino and not a very good coder).

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.

Screenshot 2014-04-17 13.31.27.png

Simon Liu

unread,
Nov 20, 2014, 11:24:50 AM11/20/14
to airqua...@googlegroups.com
在 2013年5月18日星期六UTC+8上午11时58分07秒,Nafis写道:
> The SEEED studio Shinyei PPD42NS dust sensor (http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html) comes with a cable wired for +5VDC, GND, and P1. P1 shows >1um particles. The interesting thing is that the PPD42NS also has a pin P2 that shows >2.5um particles. So this allows you to determine if the detected particles are < 2.5um. This is important for health reasons.
>
> 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.

Hi Chris,
I read this thread and went through the 2 urls that you mentioned, and I didn't find any information about P2.
Did you update them?

I have similar questions as daffodilistic.
1. What equation should be applied to P2 without any data from Shinyei?
2. Is there any equation to convert the reading from pcs/0.01cf to ug/m3 (both for 1um and 2.5um particles?)
2. Is there any equation to conver the pcs/0.01cf to the AQI (AQI based on 1.0um and 2.5um particle readings)?

Walter

unread,
Dec 2, 2014, 1:44:12 PM12/2/14
to airqua...@googlegroups.com
Is there any equation to convert the reading from pcs/0.01cf to ug/m3 (both for 1um and 2.5um particles?)

Not really. The problem is that you need to know the density and average size of the PM that you're measuring. Commercial manufacturers will calibrate their sensors/instruments against known concentrations of known substances. For example, TSI uses Arizona Test Dust A1 for their DustTrak instruments.

If you wanted to get a rough estimate, you could assume an average particle size (normally less than the 2.5 um) and density (changes based on source) to convert pt/cc to ug/m3 and use math similar to what is shown in problem 2, here;
http://spacemath.gsfc.nasa.gov/earth/10Page104.pdf

Some sample assumptions could be:
Density = 1.65 g/cc (Tittarelli, Atmos Env, 2008)
Average size = pick something between 1um - 2.5um as this will dominate the volume/mass distribution. Probably err on the high side as particle mass/volume is dependent on Dp^3

From here, you could calculate a PM2.5-based AQI. Obviously, these are huge assumptions to be making but it get you started becoming familiar with the calculations involved in particle measurements.

Simon Liu

unread,
Dec 5, 2014, 10:33:57 AM12/5/14
to airqua...@googlegroups.com
在 2014年12月3日星期三UTC+8上午2时44分12秒,Walter写道:
Thank you, Walter.
And yes I understand that this is difficult and there is no way to convert the reading to an accurate ug/m3 numbers.
I talked to a local disty and it seems that P1 is for 1um-10um , and P2 is for 3um-10um. And P2 is not recommended at all and I'm guess P2 is not stable and that is why is not even shown in the data sheet.
Message has been deleted

Marcos García

unread,
Dec 11, 2014, 8:42:16 AM12/11/14
to airqua...@googlegroups.com
In this code, what about this line.
> ratio = lowpulseoccupancy/(sampletime_ms*10.0);
Reading the datasheet, I understood that it should be a % of the total time the pulses are low during the 30s. Why multiplying the 30s by 10.0?

Thanks in advance

BR
Marcos

Simon Liu

unread,
Dec 12, 2014, 11:20:31 PM12/12/14
to airqua...@googlegroups.com
Because
duration = pulseIn(pin, LOW);
lowpulseoccupancy = lowpulseoccupancy+duration;
The value of pulseIn( and lowpulseoccupancy) is in microsecond, and sampletime_ms is in millisecond.

AJ Uppal

unread,
Dec 15, 2014, 12:10:52 AM12/15/14
to airqua...@googlegroups.com
> I talked to a local disty and it seems that P1 is for 1um-10um , and P2 is for 3um-10um. And P2 is not
> recommended at all and I'm guess P2 is not stable and that is why is not even shown in the data sheet.

Hi Simon,

I don't know what "disty" means, but I don't think P2 is not stable. From my tests it is quite stable and can be changed to increase the sensitivity of the PPD42NS. Have posted about that on my blog today.

thx,

-- AJ

Simon Liu

unread,
Dec 15, 2014, 5:01:14 AM12/15/14
to airqua...@googlegroups.com
Hi AJ,
Disty is short for distributor.
BTW, would you please post the link of your blog?

Simon
在 2014年12月15日星期一UTC+8下午1时10分52秒,anirudh uppal写道:

anirudh uppal

unread,
Dec 15, 2014, 3:27:17 PM12/15/14
to airqua...@googlegroups.com

Simon Liu

unread,
Dec 17, 2014, 10:29:32 AM12/17/14
to airqua...@googlegroups.com
Thank you, A,J.
Very interesting results.
I have one question and one comment:
1. Are you simply adding the low pulse time of P1 and P2 and use the characteristic of P1 to do the calculation?
2. For the fan, my concern is that the more air flows to the sensor, the higher reading it is since it detects far more particles than using its heater. I didn't get any 0 reading for P1 here. And the sensor will get dirty pretty fast with that kind of air flow behind the fan and you need to clean it up from time to time. Your data curve becomes very similar to Dylos reading though.
 

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


--
toopoo From DRL&CCF
QQ:150739525
淘宝旺旺:突破
Email: too...@gmail.com

anirudh uppal

unread,
Dec 17, 2014, 8:42:57 PM12/17/14
to airqua...@googlegroups.com
Simon,

Thanks for your comments! See below.

On Wednesday, December 17, 2014 7:29:32 AM UTC-8, Simon Liu wrote:
> Thank you, A,J.
> Very interesting results.
>
> I have one question and one comment:
> 1. Are you simply adding the low pulse time of P1 and P2 and use the characteristic of P1 to do the calculation?

No I am handling P1 and P2 separately. I have also done P1 from one sensor and P2 from a different (modified) sensor. The "Particle Counts" are just scaled linear values of the LPO. That is I have not fitted a curve to them because a new calibration is needed, the old one does not work.

> 2. For the fan, my concern is that the more air flows to the sensor, the higher reading it is since it detects far more particles than using its heater. I didn't get any 0 reading for P1 here. And the sensor will get dirty pretty fast with that kind of air flow behind the fan and you need to clean it up from time to time. Your data curve becomes very similar to Dylos reading though.

After doing this for a while, I am convinced that a fan is needed to reduce the noise. If you are getting no zeroes that is very good (or very bad since the air must be quite poor!) but still the fan will help to reduce the noise as it did for the T2 (where there are no zeroes typically).

But you are correct that the sensor will become dirty and will need to be vacuumed. Just like the Dylos and the AES-1 as well.

Regards,

A.J.

Marcos García

unread,
Dec 20, 2014, 7:28:44 AM12/20/14
to airqua...@googlegroups.com
Hello all.
I have one question about the threshold voltage in PIN5, what voltage do you apply, 5V or 2.5V?
And I am also getting zeros quite often, I would say that almost always in P2 and at P1 50% or even lower. I am wondering if it could be the quality of the sensor since I purchased it in aliexpress...(http://es.aliexpress.com/item/Guaranteed-100-100-NEW-AND-ORIGINAL-JAPAN-SHINYEI-DUST-SENSOR-PPD42NS-PPD4NS-Free-shipping/1355349773.html). If it is not a problem with the sensor, what could be done to solve this. I am planning to purchase a fan but I am not sure it deserves to spend more money. My application is to build a monitoring station which could display the measurements in real time, so for me, it doesn't make sense an average of the last 5 measurements...
What do you think? I would appreciate some opinions!
Thanks a lot!!
Btw, what have you heard about the new PM2.5 sensor of SHARP (http://es.aliexpress.com/item/FREE-SHIPPING-DN7C3JA001-PM2-5-sensor/32230824926.html?recommendVersion=1)?

anirudh uppal

unread,
Dec 20, 2014, 11:30:26 AM12/20/14
to airqua...@googlegroups.com
Marcos,

You don't need to apply a voltage to Pin5, you connect a resistor to change the threshold voltage and which you will see the reading on Pin2. The resistor is connected between Pin5 and ground. The number of zeros will go down as detailed in my blog.

If you are getting many zeros on P1 it is quite normal. I don't think your sensor is bad. Adding a fan helps for sure. I had the same needs as you i.e. to display the measurement in quicker time than waiting for minutes or an hour or even a day.

A.J.
BTW, the "new" Sharp sensor is the "old" Sharp sensor with a fan attached!! I have one and in the break (yay, school is out!) I will try and measure it.

Marcos García

unread,
Dec 20, 2014, 12:48:46 PM12/20/14
to airqua...@googlegroups.com
Thanks for your reply and thanks a lot for sharing your great work.
I have gone through your post and as I understood, by adding a 10k resistor, the size of the particles which can be detected goes down to 0.5u (approx). Then, at P1 we have particles detection above 1u and at P2 above 0.5u. My idea at the beginning when I discovered this (https://github.com/NodeJournalism/DustDuino/blob/master/Size%20Discrimination(PPD42NJ).pdf) was to detect particles above 2.5u and above 1u and the substraction would be PM2.5. With you solution, by adding the 10k resistor, how you manage both voltages to convert to PM2.5. 

pD: I am new to PM and these things, I am just a electronic engineer who is trying to play with the air quality. Sorry if any of my questions is completely nonsense ;)

Thanks a lot again!

BR
Marcos!


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



--
Best regards/Mvh

Marcos García López
Stud. M.Sc. Electrical Eng. at DTU

AJ Uppal

unread,
Dec 20, 2014, 9:03:00 PM12/20/14
to airqua...@googlegroups.com
Yes you need to add a 10K resistor to pin 5, but I would not go so far to say that the size of particles directed goes down to 0.5 microns.
What is missing right now is converting the P2 output to particles per cuft and to PM2.5 i.e. the calibration curve in the data sheet will not work anymore as the sensor has become more sensitive.

I am working on the calibration and I will post the results during the break.

Regards 

-- AJ

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

jsoplop

unread,
Feb 2, 2015, 4:07:11 PM2/2/15
to airqua...@googlegroups.com
On Friday, May 17, 2013 at 11:58:07 PM UTC-4, Nafis wrote:
> The SEEED studio Shinyei PPD42NS dust sensor (http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html) comes with a cable wired for +5VDC, GND, and P1. P1 shows >1um particles. The interesting thing is that the PPD42NS also has a pin P2 that shows >2.5um particles. So this allows you to determine if the detected particles are < 2.5um. This is important for health reasons.
>
> 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,

I have gotten the PPD42NS to work with Arduino without issue and now I want to add it into an electric imp project. But the electric imp doesn't seem to have an equivalent function to the arduino's pulseIn capability. Were you able to figure out how to determine the low pulse occupancy time using the electric imp?

Chris Nafis

unread,
Feb 2, 2015, 9:43:21 PM2/2/15
to airqua...@googlegroups.com
i've been distracted restoring an old car... I intended to share all the
electric imp code and CAD models for the failed kickstarter project.
Not sure when I will get to it, but will try

----- Original Message -----
From: "jsoplop" <sopl...@gmail.com>
To: <airqua...@googlegroups.com>
Sent: Monday, February 02, 2015 4:07 PM
Subject: [#AirQualityEgg] Re: Shinyei PPD42NS particle sensor has >1um and
>2.5um channels!


jsoplop

unread,
Feb 6, 2015, 3:08:28 PM2/6/15
to airqua...@googlegroups.com
Chris,

That would be great if you get the chance to post it. I'm struggling with how to properly hook the Shinyei up to the imp and how to read the low pulses and count them properly in the imp's Squirrel language. So any direction on how you did that would help. Thanks!

Fredrik Persson

unread,
Feb 10, 2015, 8:16:17 AM2/10/15
to airqua...@googlegroups.com
Hi Chris,

I have an IMP with Shinyei and a BMP sensor. I simplified the count for the particle analyser and use the IMPs count possibility on pin 1. It is in the last block of lines in the code at github. Most of the code is for the BMP sensor... https://github.com/fredrikhallgren/Particle-analyser

Hope it helps.


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

Fredrik Persson

unread,
Feb 10, 2015, 8:18:56 AM2/10/15
to airqua...@googlegroups.com
The answer was for you jsoplop, not Chris. Got confused of the names in the thread.

Chris Nafis

unread,
Feb 10, 2015, 10:28:16 PM2/10/15
to airqua...@googlegroups.com
Here was some test code

/*
Interface to Shinyei Model PPD42NS Particle Sensor
Program by Christopher Nafis
Written March 2013

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
*/
local totalmillis = 0;
local downmillis = 0;
local t = hardware.millis();
local old_t = t;
local ratio =0.0;
local concentration =0.0;
local outputratio = OutputPort("Ratio", "number");
local outputconcentration = OutputPort("Concentration", "number");

function PulseIn(){
local level = hardware.pin1.read();

t = hardware.millis();
if (t-old_t > 0) // check for clock wrap
{
local pulselength = t-old_t;
old_t = t;

totalmillis = totalmillis+pulselength;
if (level == 1) {
if (pulselength >= 10 && pulselength <200) {
downmillis = downmillis+pulselength;
}
}
}

if (totalmillis > 60000) {
ratio = downmillis/(totalmillis*0.01); // Integer percentage 0=>100
concentration =
1.1*math.pow(ratio,3)-3.8*math.pow(ratio,2)+520*ratio+0.62; // using spec
sheet curve
server.log(format("total = %dms, down time = %dms, ratio = %f,
concentration = %f",totalmillis,downmillis,ratio,concentration));
outputratio.set(ratio);
outputconcentration.set(concentration);
totalmillis = 0;
downmillis = 0;
t = hardware.millis();
old_t = t;
}
}

imp.configure("Shinyei PPD32NS", [], [outputratio,outputconcentration]);

hardware.pin1.configure(DIGITAL_IN,PulseIn);

----- Original Message -----
From: "jsoplop" <sopl...@gmail.com>
To: <airqua...@googlegroups.com>
Sent: Monday, February 02, 2015 4:07 PM
Subject: [#AirQualityEgg] Re: Shinyei PPD42NS particle sensor has >1um and
>2.5um channels!


Marcos García

unread,
Feb 12, 2015, 11:57:33 AM2/12/15
to airqua...@googlegroups.com
Hi!
I have added a fan to my sensor too and also the configuration you mentioned. I don't have any material to calibrate it and I was wondering if by chance, you got your calibration. Thank you in advance!


Another issue is that from particles per feet, I found different conversions to PM2.5. For instance here http://wireless.ece.drexel.edu/air_quality/project%20files/Data%20Validation.pdf (page 2). this conversion is completely different the one I got in other paper. Is this right? In this case, my measurements would be completely nonsense...

And finally the last general question, by chance, are you getting overflows usually or it is just for me?

Thanks all ;)

Jacek

unread,
Nov 7, 2018, 2:42:22 AM11/7/18
to #AirQualityEgg
I’ve got problem with (I think) too high measurements with PPD42NS. During 30s I have about 25s of LOW state on P2 pin. I checked my connections many times, compared it with different documents, pages about PPD42NS so I’m sure it’s connected good. I checked also voltage on P2 with voltmeter. Of course voltage was changing all the time, but very rarely I saw it over 3-4V. Most of time it was around 1-2V, sometimes below 1V.
Seeing such results I thought about voltage min rates. For PPD42NS low state is BELOW 0,7V. But for Arduino low is BELOW 1,5V. There’s 0,8V of gap. This can make measurements not accurate, because if 42 gives for example 1V (which is not low state for it) Arduino shows that it’s low state. Can it be a problem? If yes, how can I multiply by 2 (from 0,7 to 1,4V which is max for low state in Arduino) voltage that comes from 42 and also make sure that it won’t be over 5V?
Or… my measurements are correct and my air is so bad? 😉 Because what’s interesting, all measurements are very similar. It’s always between 24800ms and 25100ms. Always…
Reply all
Reply to author
Forward
0 new messages