Dust Sensor Module
Quickstart Guide
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.
Bitstoc Electronics 1|Page
HARDWARE SPECIFICATIONS
• 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
PARTS LIST
For this quickstart guide, we will need the following materials. Click on the image for additional
information:
Arduino Uno Line Follower Sensor Board (1 channel) Male-Female Connecting Wires
1 piece 1 piece 1 piece
HARDWARE OVERVIEW
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
1 GND
2 Output (P2)
3 VDC
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
Adjust threshold voltage used in increasing or decreasing sensitivity when using
Thresh
P2 sensor.
Bitstoc Electronics 2|Page
GND To be connected to the GND pin in a microcontroller.
VDC Supplies power to the module. Should be connected to a +5V pin.
OUTPUT
P2 Detects particulate sizes around 2.5 µm or higher
P1 Detects particulate sizes around 1 µm or higher
WIRING CONNECTION
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 Arduino Uno
right)
1 GND
3 5V
4 Digital 8
ARDUINO CODE
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
[Link]
[Link]
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;
Bitstoc Electronics 3|Page
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 30000;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;
void setup() {
[Link](9600);
pinMode(8,INPUT);
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
[Link](lowpulseoccupancy);
[Link](",");
[Link](ratio);
[Link](",");
[Link](concentration);
lowpulseoccupancy = 0;
starttime = millis();
}
}
Upload the code into an Arduino Uno board. Open Serial Monitor, and set baud rate to “9600, Both NL
& CL”.
OUTPUT
The Serial output displays 3 outputs: low pulse occupancy, ratio, and concentration. Low pulse
occupancy is the amount
Bitstoc Electronics 4|Page
APPLICATIONS
You can find more uses of the relay in the sample projects below:
Blinds Control by GPL3+:
[Link]
27f633?ref=tag&ref_id=relay&offset=2
Home Automation Using Raspberry Pi 2 and Windows 10 IoT by CC BY-NC:
[Link]
windows-10-iot-0dcefc?ref=tag&ref_id=relay&offset=0
SOURCES
[Link]
[Link]/UK_SHN_PPD42NJ_DS.pdf
[Link]
[Link]
[Link]
Bitstoc Electronics 5|Page