Dust Sensor Module

Get a PDF version of this file here!

The Dust Sensor Module is an air quality sensor capable of detecting air quality by measuring dust concentration in your surroundings. It is responsive to particles >1µm in diameter. Use this for detecting PM 2.5 particles, environment monitoring or pollution monitoring.


  • Input Voltage: 5V
  • Standby current supply: 90 mA
  • Detectable range of concentration: 0-28,000 pcs/liter; 0-8,000 pcs/0.01cf
  • Operating Temperature Range: 0-45°C
  • Particle Detection Range: >1 µm
  • Humidity Range: 95%rh or less


For this quickstart guide, we will need the following materials:

  • 1 – Arduino Uno
  • Connecting wires
  • 1 – Dust Sensor Module


The Dust Sensor has 5 pins to connect to: GND, OUTPUT (P2), VDC, OUTPUT (P1) and Thresh. The Pinout for the connector is shown in the table beside the image:


Pin Description
2 Output (P2)
4 Output(P1)
5 Thresh

In using the table, pin labels are printed in the PCB, indicated by the numbers 1 and 5.

The table below describes the function of each pin in the module

INPUT Description
Thresh Adjust threshold voltage used in increasing or decreasing sensitivity when using P2 sensor.
GND To be connected to the GND pin in a microcontroller.
VDC Supplies power to the module. Should be connected to a +5V pin.
P2 Detects particulate sizes around 2.5 µm or higher
P1 Detects particulate sizes around 1 µm or higher


Connect the dust sensor to Arduino Uno according to the table. Pin label of dust sensor is printed on the board:

Dust Sensor (Pin Number from left to right) Arduino Uno
3 5V
4 Digital 8



Open Arduino IDE. Set the board to Arduino/Genuino Uno. Copy the code below to the programmer:

Interface to Shinyei Model PPD42NS Particle Sensor
Program by Christopher Nafis
Written April 2012
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;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() {
 starttime = millis();

void loop() {
 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
   lowpulseoccupancy = 0;
   starttime = millis();

Upload the code into an Arduino Uno board. Open Serial Monitor, and set baud rate to “9600, Both NL & CL”.


The Serial output displays 3 outputs: low pulse occupancy, ratio, and concentration. Low pulse occupancy is the amount

References and other Applications

You can find more information, examples and resource below.

Blinds Control by GPL3+
Home Automation Using Raspberry Pi 2 and Windows 10 IoT by CC BY-NC
Datasheet  example
Example project by takingspace
Grove example from seeedstudio