Summary of Arduino Dust Sensor
This article guides users in building a weekend Arduino-based dust sensor project. It details the necessary hardware components and provides complete wiring instructions alongside C++ code for the Arduino Mega 2560. The system utilizes a Shinyei PPD42NS sensor to measure particulate matter (PM2.5 and PM10) and displays results on an LCD Shield while simultaneously outputting data via the Serial Monitor at 9600 baud for debugging purposes.
Parts used in the Arduino Dust Sensor:
- Arduino Mega 2560
- Shinyei PPD42NS dust sensor
- LCD Shield (16 x 2)
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).
Put together a dust sensor using Arduino Mega 2560, Shinyei PPD42NS dust sensor and LCD shield.
- What components are required for this project?
The project requires an Arduino Mega 2560, a Shinyei PPD42NS dust sensor, and an LCD Shield (16 x 2). - How can I view sampling results during operation?
You can view the sampling results using the Arduino IDE's Serial Monitor set to 9600 bauds. - Does the code support monitoring both PM2.5 and PM10?
Yes, the provided code defines pins and variables specifically to track PM25 and PM10 values. - What is the sample time duration defined in the code?
The sampletime_ms is set to 30000 milliseconds. - Can I use this code with an Arduino Uno instead of the Mega?
The article explicitly provides codes and instructions for the Arduino Mega 2560 only. - How does the code detect low pulse occupancy?
The code uses micros() to calculate the difference between triggerOn and triggerOff timestamps when the pin value changes. - Is the watchdog timer enabled in the setup function?
Yes, wdt_enable(WDTO_8S) is called within the setup function. - What is the baud rate for serial communication?
The Serial.begin function initializes communication at 9600 baud.
