Arduino Dust Sensor

Put together a dust sensor using Arduino Mega 2560, Shinyei PPD42NS dust sensor and LCD shield.
Put together a dust sensor using Arduino Mega 2560, Shinyei PPD42NS dust sensor and LCD shield.

Put together a Arduino-based dust sensor over the weekend using the following components:

The codes and wiring instructions for Arduino Mega 2560 and Shinyei PPD42NS is as follow. However, I did include Serial output so you can view the sampling results using Arduino IDE’s Serial Monitor (9600 bauds).

 

Arduino dust sensor showing the PM10 and PM2.5 readings.
Arduino dust sensor showing the PM10 and PM2.5 readings.

 

Miscellaneous

Relating PSI level to PM2.5 and PM10 concentration level. Source: http://www.haze.gov.sg/docs/default-source/faq/computation-of-the-pollutant-standards-index-(psi).pdf
Relating PSI level to PM2.5 and PM10 concentration level. Source: http://www.haze.gov.sg/docs/default-source/faq/computation-of-the-pollutant-standards-index-(psi).pdf

With the PM2.5 and PM10 concentration level, we can determine the respective Pollutant Standards Index (PSI) level. The above table is from this document onΒ Calculation of Pollutant Standards Index (PSI).

 

Treat shadowandy!

If these step-by-step guides have been very helpful to you and saved you a lot of time, please consider treating shadowandy to a cup of Starbucks.  

  • Ashish

    Hey shadowandy, thanks for your work. Where I can buy the Aruduino Dust Sensor?

  • shadowandy

    Ashish,

    Thanks. You can get the dust sensor from http://www.aliexpress.com. It is like eBay.

  • Andrey

    Hi,
    Could you provide some explanations for mass concentration calculation?
    For example why density = 1.65 ?
    What is K = 3531.5?
    It will be very helpfull to understant how to swith between pcs/ml to mg/m3
    Thanks in advance.

  • Stefano C

    Hello! Thanks a lot for sharing this nice project! My result are a little low..and i get a lot of zeros..
    Anyway, in this interesting blog -indiaairquality.com- there is an interesting solution..add a fan and a resistor between pin5 and ground.. (i think that for ground it takes pin1?).
    Thanks again!
    Stefano

  • Alfred Loh

    HI, I plug in your code but using Uno R3. It seems the data fluctuate too much. I cross check with the SDS018 sensor, it is much stable. For eg, PM10 can’t just go from 15.22 to 0.20 then 33.36 again in your data captured. it is too much i think

  • I think is because the Shinyei PPD42NS is not as accurate (in terms of particle counting) compared to the SDS018 as the latter is laser based. I actually try to do a average over a time period to normalise the readings.

  • Alfred Loh

    Hi andy thx for ur reply.
    I read articles about adding fan n resistor to ppn42ns to get a data closer to benchmark data. But i think for now i will stick to my sds018 to make a dust duino. πŸ˜‰

  • Another nice sensor is the PMS1003. I remember reading that it is a good counter too. πŸ™‚

  • Alex

    Hi,

    With 10k resistor (PIN5 to GND on the sensor) your code works nicely.
    I have one question though.
    I can see you have pinMode(pin[PM25],INPUT); in the setup, but what about PM10?
    Something like:
    pinMode(pin[PM25],INPUT);
    pinMode(pin[PM10],INPUT);

    Thanks
    Alex

  • Alex,

    Glad to know that tying 10K resistor works better.

    For the pinMode, I think you can add in the PM10 declaration, I may have missed out that line when copying the codes over.

  • Venkat

    Thanks for the tutorial.

    I applied the same code with 10k resistor to ground on PIN5 (sensor).

    Instead pin 50 and 51 on Mega2560, i have used PIN 40 & 41.
    But no variation in the values of the sensor output. The output always seems like below:

    PM10 : 0.20 ug/m3
    PM10 Count : 0.62 pt/cf
    PM2.5 : 0.00 ug/m3
    PM2.5 Count: 0.00 pt/cf

    Your reply will be appreciated.

Close