Project tutorial
PPD42NS Arduino Air Quality Monitor in 3D Printed Enclosure

PPD42NS Arduino Air Quality Monitor in 3D Printed Enclosure © GPL3+

Improve reliability of measurements using PPD42NS sensor using modular 3D printed solution which includes exclosure box for sensor.

  • 683 views
  • 0 comments
  • 7 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
3drag
3D Printer (generic)

Apps and online services

About this project

This time I present you another air quality gauge, but now with Shinyei PPD42NS sensor. Like the previous one (DSM501A), this sensor is in the class of cheap particle monitors.

It gives a good indication of the air quality in an environment by measuring the dust concentration. The Particulate Matter level (PM level) in the air is measured by counting the Low Pulse Occupancy time (LPO time) in a given time unit. LPO time is proportional to PM concentration. This sensor can provide reliable data for air purifier systems; it is responsive to PM of diameter 1μm.

In this case, several steps have been taken to increase the accuracy of the reading. According to the instructions on the "nanometrologie.cz" web page I made 3D printed housing which, with the help of a fan, ensures a constant airflow through the sensors.

For this purpose should be made a slight modification of the sensor module. The 100 ohm heat resistor should be removed as shown in thefigure below.

This also drastically reduces the module consumption so that the entire assembly can now be powered through the Arduino USB port.

Schematics for connection of sensor to Arduino & operating software can be

found e.g. on http://wiki.seeedstudio.com/Grove-Dust_Sensor/ (caution: colors of sensor cables vary, therefore always connect the sensor to Arduino according to pin numbers). Operation of sensor embedded in presented system has several advantages due to stable forced gas flow, which can be also determined. This can help to better interpret and quantify results obtained by the sensor.This time the reading is done directly on the Arduino serial monitor, but the code can be easily modified so that the reading of the values are on an LCD monitor (similar to the previous video) or on another output unit. Also, interesting is the possibility of newer versions of Arduino IDE for a graphical display on serial plotter as shown in the video.

And finally, as I announced earlier, I compared the features of the PDD42NS and DSM501A sensor boards with identical software and under equal conditions.I can say that they are basically the same devices made by different manufacturers with very similar features and price.

Code

Code (serial monitor)Arduino
int pin = 8;
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 3000;//sampe 3s ;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() 
{
    Serial.begin(9600);
    pinMode(pin,INPUT);
    starttime = millis();//get the current time;
}

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

    if ((millis()-starttime) > sampletime_ms)//if the sampel time == 30s
    {
        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
        Serial.print(lowpulseoccupancy);
        Serial.print(",");
        Serial.print(ratio);
        Serial.print(",");
        Serial.println(concentration);
        lowpulseoccupancy = 0;
        starttime = millis();
    }
}
Code (serial plotter)Arduino
int pin = 8;
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 500;//sampe 0.5s ;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() 
{
    Serial.begin(9600);
    pinMode(pin,INPUT);
    starttime = millis();//get the current time;
}

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

    if ((millis()-starttime) > sampletime_ms)//if the sampel time == 30s
    {
        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
        
        Serial.println(ratio);
        Serial.print(" ");
        
        lowpulseoccupancy = 0;
        starttime = millis();
    }
}

Custom parts and enclosures

.STL files
module_ppd42_stl_o2NDhiG457.rar

Schematics

Schematic
Untitled sketch bb jrlve7uqch

Comments

Similar projects you might like

Arduino Air Quality Monitor with DSM501A Sensor

Project tutorial by Mirko Pavleski

  • 6,710 views
  • 1 comment
  • 22 respects

Otto DIY+ Arduino Bluetooth robot easy to 3D Print

Project tutorial by Team Otto builders

  • 74,849 views
  • 135 comments
  • 217 respects

Air Quality Monitor

Project showcase by Mustafa Hesham

  • 8,185 views
  • 9 comments
  • 40 respects

Atmospheric Air Analyser

Project in progress by Tejas Shah and Tejas Shah

  • 4,187 views
  • 7 comments
  • 24 respects

Wooden Chest Air Quality Monitor

Project tutorial by Fillbee

  • 2,588 views
  • 2 comments
  • 11 respects

3D Printed Lunar Phase Clock

Project tutorial by G4lile0

  • 7,163 views
  • 6 comments
  • 56 respects
Add projectSign up / Login