Grove Dust Sensor - erratic readings

I’m atempting to build a multi-point air quality monitor. At the moment, I am just getting myself familiar with the sensors and their output using the example code. In my testing so far, the Grove Dust Sensor is extremely erratic. The concentration fluctuates wildly, and I frequently get 0 results. I have tried two separate dust sensors, and I am getting similar results.

I thought it might be the air quality in my office, but even after placing the sensor under a glass beaker, the results continue to be erratic. Here is a picture of my current setup:

I am running a very slightly tweaked version of the example code from the wiki. The only thing I added was a start notification and the number of seconds running at the beginning of each status line:

[code]/* Grove - Dust Sensor Demo v1.0
Interface to Shinyei Model PPD42NS Particle Sensor
Program by Christopher Nafis
Written April 2012

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;//sampe 30s ;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() {
Serial.begin(9600);
pinMode(8,INPUT);
starttime = millis();//get the current time;
Serial.println(“Starting…”);
}

void loop() {
duration = pulseIn(pin, LOW);
lowpulseoccupancy = lowpulseoccupancy+duration;

if ((millis()-starttime) > sampletime_ms)//if the sampel time == 30s
{
ratio = lowpulseoccupancy/(sampletime_ms10.0); // Integer percentage 0=>100
concentration = 1.1
pow(ratio,3)-3.8pow(ratio,2)+520ratio+0.62; // using spec sheet curve
Serial.print(int(millis()/1000));
Serial.print(": “);
Serial.print(lowpulseoccupancy);
Serial.print(”,");
Serial.print(ratio);
Serial.print(",");
Serial.println(concentration);
lowpulseoccupancy = 0;
starttime = millis();
}
}[/code]

Here’s my output for a run slightly over 3000 seconds:

Starting... 30: 1220209,4.07,2126.80 61: 1701086,5.67,3027.53 92: 1914760,6.38,3450.74 122: 1807166,6.02,3235.60 152: 1426533,4.76,2505.62 183: 3006978,10.02,5938.64 213: 1159515,3.87,2017.19 244: 242371,0.81,418.83 274: 871489,2.90,1506.10 304: 1251248,4.17,2183.16 335: 968484,3.23,1676.73 365: 1058239,3.53,1835.90 396: 2177995,7.26,3996.44 427: 2367387,7.89,4408.01 458: 772707,2.58,1333.57 488: 1720543,5.74,3065.41 519: 565793,1.89,975.19 550: 2751042,9.17,5297.79 580: 24565,0.08,43.17 611: 171147,0.57,296.24 642: 0,0.00,0.62 672: 414898,1.38,715.42 704: 0,0.00,0.62 735: 0,0.00,0.62 765: 508987,1.70,877.30 795: 403998,1.35,696.68 826: 415559,1.39,716.55 857: 0,0.00,0.62 888: 377043,1.26,650.34 919: 0,0.00,0.62 949: 1012068,3.37,1753.86 980: 0,0.00,0.62 1011: 272181,0.91,470.09 1042: 0,0.00,0.62 1073: 0,0.00,0.62 1104: 0,0.00,0.62 1135: 36936,0.12,64.59 1166: 48415,0.16,84.44 1197: 0,0.00,0.62 1227: 167083,0.56,289.24 1258: 0,0.00,0.62 1289: 121669,0.41,210.96 1320: 248009,0.83,428.53 1350: 423979,1.41,731.03 1381: 417091,1.39,719.19 1412: 0,0.00,0.62 1443: 378301,1.26,652.50 1474: 37503,0.13,65.57 1505: 0,0.00,0.62 1536: 0,0.00,0.62 1567: 149235,0.50,258.49 1598: 109904,0.37,190.66 1628: 144106,0.48,249.65 1659: 0,0.00,0.62 1690: 144137,0.48,249.70 1721: 306985,1.02,529.93 1751: 131915,0.44,228.63 1782: 8154,0.03,14.75 1813: 13523,0.05,24.05 1843: 258052,0.86,445.80 1874: 0,0.00,0.62 1906: 0,0.00,0.62 1937: 0,0.00,0.62 1968: 73322,0.24,127.50 1999: 0,0.00,0.62 2030: 0,0.00,0.62 2061: 0,0.00,0.62 2091: 56572,0.19,98.55 2121: 52979,0.18,92.34 2153: 0,0.00,0.62 2184: 0,0.00,0.62 2215: 0,0.00,0.62 2246: 0,0.00,0.62 2277: 0,0.00,0.62 2308: 0,0.00,0.62 2339: 0,0.00,0.62 2370: 0,0.00,0.62 2400: 25343,0.08,44.52 2431: 0,0.00,0.62 2463: 0,0.00,0.62 2493: 231493,0.77,400.12 2524: 5464,0.02,10.09 2554: 84757,0.28,147.25 2585: 465211,1.55,801.95 2615: 123222,0.41,213.64 2646: 223548,0.75,386.45 2676: 384966,1.28,663.96 2707: 145576,0.49,252.18 2738: 0,0.00,0.62 2769: 0,0.00,0.62 2800: 118720,0.40,205.87 2831: 0,0.00,0.62 2862: 0,0.00,0.62 2893: 0,0.00,0.62 2924: 138761,0.46,240.43 2955: 102007,0.34,177.04 2986: 0,0.00,0.62 3017: 153547,0.51,265.92 3048: 11107,0.04,19.87 3078: 673729,2.25,1161.71 3109: 560051,1.87,965.29 3140: 0,0.00,0.62 3170: 185301,0.62,320.62

Howdy,

I’m just wondering if anyone has any suggestions for me?

How cruel… I just got a ‘topic reply’ notification, and I had high hopes that maybe someone was offering help. Alas, it seems it was a several month old notification of my own thread bump…

About the extremely erratic: The dust sensor is very sensitive, so if you wanna monitor the air quality of office, you should put in on the wall or other places where the environment can’t be affected by other disturbances. The value of dust sensor would be changed to a very high value while gas burst agitation even the air quality of office is good. Normally, the values are steady, but if i touch or shake it, after that, you can see a value which is higher more than previous. So pay attention to the place. Following data are what i got from my office:

Starting...
31: 0,0.00,0.62
62: 212887,0.71,368.10
93: 78462,0.26,136.38
124: 18624,0.06,32.89
154: 15085,0.05,26.76
185: 267171,0.89,461.48
216: 1551738,5.17,2740.86 // Touch it
247: 75256,0.25,130.84
278: 201931,0.67,349.25
309: 0,0.00,0.62
340: 192553,0.64,333.10
370: 127359,0.42,220.77
401: 39304,0.13,68.68
432: 0,0.00,0.62
463: 0,0.00,0.62
494: 144650,0.48,250.59
525: 0,0.00,0.62
556: 0,0.00,0.62
587: 18883,0.06,33.34
617: 16882,0.06,29.87
648: 0,0.00,0.62
679: 0,0.00,0.62
710: 1827455,6.09,3275.84 //
740: 705294,2.35,1216.42   // Shake it
771: 99161,0.33,172.12
801: 203536,0.68,352.01
832: 165407,0.55,286.35
863: 39887,0.13,69.69
894: 139493,0.46,241.70
924: 194616,0.65,336.66
955: 301225,1.00,520.03
986: 238448,0.79,412.08
1017: 148929,0.50,257.96
1047: 130114,0.43,225.53
1078: 0,0.00,0.62
1109: 59309,0.20,103.28
1139: 62092,0.21,108.09
1170: 13039,0.04,23.21
1200: 29303,0.10,51.38
1231: 0,0.00,0.62
1262: 57591,0.19,100.31
1293: 105611,0.35,183.26
1324: 40996,0.14,71.61
1354: 475967,1.59,820.46
1384: 12503,0.04,22.29
1415: 98660,0.33,171.26
1446: 138617,0.46,240.19
1477: 213714,0.71,369.53
1508: 50323,0.17,87.74
1538: 79100,0.26,137.48
1568: 26963,0.09,47.33
1599: 78563,0.26,136.56
1629: 102158,0.34,177.30
1660: 61575,0.21,107.20
1691: 57270,0.19,99.76
1722: 359769,1.20,620.65
1752: 230059,0.77,397.65
1782: 197316,0.66,341.30
1813: 21741,0.07,38.28
1843: 168833,0.56,292.26
1874: 152966,0.51,264.92
1904: 12604,0.04,22.46
1935: 20015,0.07,35.30
1965: 111191,0.37,192.89
1996: 31890,0.11,55.85
2027: 92322,0.31,160.32
2057: 103682,0.35,179.93
2087: 101550,0.34,176.25
2118: 199380,0.66,344.86
2149: 400316,1.33,690.35
2180: 162668,0.54,281.64
2211: 0,0.00,0.62
2241: 117251,0.39,203.34
2273: 0,0.00,0.62
2303: 231410,0.77,399.97
2333: 80011,0.27,139.06
2364: 86999,0.29,151.13
2394: 100415,0.33,174.29
2424: 20318,0.07,35.82
2456: 0,0.00,0.62
2487: 0,0.00,0.62
2518: 75077,0.25,130.53
2549: 0,0.00,0.62
2579: 32299,0.11,56.56
2610: 209327,0.70,361.98
2641: 71064,0.24,123.60
2671: 242895,0.81,419.73
2701: 69302,0.23,120.55
2732: 75627,0.25,131.48
2762: 217511,0.73,376.06
2793: 295983,0.99,511.01
2824: 124173,0.41,215.28
2855: 0,0.00,0.62
2885: 115789,0.39,200.82
2916: 112519,0.38,195.18
2946: 46651,0.16,81.39
2977: 139949,0.47,242.48
3007: 165768,0.55,286.98

QQ20140609-1.png