The PMS5003 Board is a sophisticated air quality sensor designed to measure the concentration of particulate matter (PM) in the air. Particulate matter refers to tiny particles suspended in the atmosphere, which can have significant health impacts when present in high concentrations. The PMS5003 is capable of detecting a range of particle sizes, making it ideal for environmental monitoring, air purification systems, and indoor air quality assessment.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (4.5V-5.5V) |
2 | GND | Ground connection |
3 | SET | Set pin (active low to enter sleep mode) |
4 | RX | UART receive pin (connect to TX of the controller) |
5 | TX | UART transmit pin (connect to RX of the controller) |
6 | RESET | Reset pin (active low) |
#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
uint8_t buffer[32];
int index = 0;
while (pmsSerial.available() && index < 32) {
buffer[index++] = pmsSerial.read();
}
// Process and output the data
if (index == 32) {
int PM_AE_UG_1_0 = buffer[10] * 256 + buffer[11];
int PM_AE_UG_2_5 = buffer[12] * 256 + buffer[13];
int PM_AE_UG_10_0 = buffer[14] * 256 + buffer[15];
Serial.print("PM 1.0 (ug/m3): ");
Serial.println(PM_AE_UG_1_0);
Serial.print("PM 2.5 (ug/m3): ");
Serial.println(PM_AE_UG_2_5);
Serial.print("PM 10 (ug/m3): ");
Serial.println(PM_AE_UG_10_0);
}
}
// Wait for a bit before reading again
delay(1000);
}
Q: How often should the sensor be calibrated? A: The PMS5003 is factory-calibrated and typically does not require additional calibration. However, it's good practice to compare readings with a known reference periodically.
Q: Can the sensor measure the size of individual particles? A: No, the PMS5003 provides the concentration of particles in different size categories, not the size of individual particles.
Q: Is the sensor waterproof? A: No, the PMS5003 is not waterproof and should be protected from moisture and water exposure.
For further assistance, consult the manufacturer's datasheet and technical support resources.