The PMS5003 is a digital universal particle concentration sensor based on the laser scattering method that can continuously collect and calculate the number of suspended particles in different sizes in the air per unit volume, which is the particle concentration distribution, and then convert it into mass concentration and output it in the form of a digital interface. This sensor can be embedded in various instruments or environmental improvement equipment to provide timely and accurate concentration data.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (4.5-5.5V) |
2 | GND | Ground |
3 | SET | Set pin (Low level: sleep mode, High level: working mode) |
4 | RX | Serial data input (TTL level) |
5 | TX | Serial data output (TTL level) |
6 | RESET | Reset pin (Low level: reset) |
7 | NC | Not connected |
8 | NC | Not connected |
#include <SoftwareSerial.h>
SoftwareSerial pmsSerial(10, 11); // RX, TX
void setup() {
Serial.begin(9600);
pmsSerial.begin(9600);
}
void loop() {
if (pmsSerial.available()) {
// Read data from the sensor
char ch = pmsSerial.read();
Serial.write(ch);
// Process the data as per the PMS5003 datasheet
}
// Add your code to handle the sensor data and output it
}
Q: Can the PMS5003 be used outdoors? A: Yes, but it should be protected from direct sunlight, rain, and condensation.
Q: How often should the sensor be calibrated? A: Calibration frequency depends on the usage environment. In general, calibration should be performed periodically to ensure accuracy.
Q: What is the lifespan of the PMS5003 sensor? A: The sensor has a lifespan of at least 3 years when used as recommended.
Q: Can I use the PMS5003 with a 3.3V system? A: The PMS5003 requires a 5V power supply, but the serial communication can be adapted for 3.3V logic with a level shifter.
Q: How can I extend the life of the sensor? A: Avoid exposure to high concentrations of particles and corrosive gases, and operate the sensor within the recommended temperature and humidity ranges.