Component guide · Intermediate · 4 min read
PMS5003 and PMS7003 PM2.5 Sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The Plantower PMS5003 and the slimmer PMS7003 are laser particle sensors. A small fan pulls air past a laser, and the sensor counts particles and reports PM1.0, PM2.5 and PM10 in µg/m³ over a 9600 baud UART. The fan needs 5 V, but the data pins are 3.3 V logic, so they connect straight to an ESP32. Readings arrive about once a second.
Key specs at a glance
- Measures
- PM1.0, PM2.5, PM10 (µg/m³) and particle counts
- Range
- 0 to 500 µg/m³ (effective), particles 0.3 to 10 µm
- Supply
- 5 V, about 100 mA with the fan running
- Interface
- UART 9600 baud, 3.3 V logic
- Connector
- 8-pin 1.25 mm (PMS5003) or 10-pin 1.27 mm (PMS7003)
- Lifetime
- About 3 years (sleep mode extends it)
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
What the PMS5003 / PMS7003 sensor is
These sensors are the ones inside many home air purifiers and community air monitors. They give consistent readings, much better than the cheap optical dust sensors with an IR LED.
The PMS7003 is thinner with the air inlet and outlet on the same side; the PMS5003 is a cube. Both send the same 32-byte data frame. Use the adapter board or cable to reach the tiny connector.
PMS5003 / PMS7003 sensor pinout
The pins on the PMS5003 / PMS7003 sensor and what each one does.
| Pin | Function |
|---|---|
| VCC | 5 V for the fan |
| GND | Ground |
| TX | UART data out, 3.3 V |
| RX | UART data in, 3.3 V (for sleep and passive mode) |
| SET | HIGH or open = run, LOW = sleep |
| RESET | LOW resets (leave open) |
- VCC
- 5 V for the fan
- GND
- Ground
- TX
- UART data out, 3.3 V
- RX
- UART data in, 3.3 V (for sleep and passive mode)
- SET
- HIGH or open = run, LOW = sleep
- RESET
- LOW resets (leave open)
Wiring the PMS5003 / PMS7003 sensor
The sensor's TX at 3.3 V is read fine by a 5 V Uno. Its RX must not see 5 V: use a divider or level shifter from the Uno's TX, or leave RX unconnected if you only read data.
| PMS5003 / PMS7003 sensor pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V | 5V (VIN) |
| GND | GND | GND |
| TX | D2 (SoftwareSerial RX) | GPIO 16 (RX2) |
| RX | D3 through a 1k/2k divider | GPIO 17 (TX2) |
| SET | Open (or D4 to sleep) | Open (or GPIO 4) |
- VCC
- Arduino Uno:
- 5V
- ESP32:
- 5V (VIN)
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- TX
- Arduino Uno:
- D2 (SoftwareSerial RX)
- ESP32:
- GPIO 16 (RX2)
- RX
- Arduino Uno:
- D3 through a 1k/2k divider
- ESP32:
- GPIO 17 (TX2)
- SET
- Arduino Uno:
- Open (or D4 to sleep)
- ESP32:
- Open (or GPIO 4)
Example code
Install the PMS library by Mariusz Kacki. Use the atmospheric (AE) values for outdoor or room air. Show them on a display or send them to a dashboard.
#include "PMS.h"
PMS pms(Serial2);
PMS::DATA data;
void setup() {
Serial.begin(115200);
Serial2.begin(9600, SERIAL_8N1, 16, 17); // RX, TX
}
void loop() {
if (pms.read(data)) {
Serial.print("PM1.0: "); Serial.print(data.PM_AE_UG_1_0);
Serial.print(" PM2.5: "); Serial.print(data.PM_AE_UG_2_5);
Serial.print(" PM10: "); Serial.println(data.PM_AE_UG_10_0);
}
}Setup and tuning
wait about 30 seconds after waking for the fan to settle before trusting readings.
keep inlet and outlet clear and do not seal it in a box without vents.
above about 80 % humidity, water droplets read as particles; values run high in fog or rain.
sleep it between readings (SET LOW) to extend its life.
What you need
Shop this list8 of 9 found in our store · ₹6,514
Plantower PMS5003 PM2.5 Laser Particle Concentration Sensor, UART, 0~500 µg/m³, 5 V, Range: 0.3~10 µm: the part this guide coversPlantower PMS5003 PM2.5 Laser Particle Concentration Sensor, UART, 0~500 µg/m³, 5 V, Range: 0.3~10 µm₹2,119
Plantower PMS7003 PM2.5 Laser Particle Concentration Sensor, UART, 0~500 µg/m³, 5V, Range: 0.3~10 µm: another version this guide coversPlantower PMS7003 PM2.5 Laser Particle Concentration Sensor, UART, 0~500 µg/m³, 5V, Range: 0.3~10 µm₹1,849
PMS7003 PM2.5 Air Particle Dust Sensor Module: another version this guide coversPMS7003 PM2.5 Air Particle Dust Sensor Module₹1,690
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
PMS5003 adapter board and cable: to connect to the sensor's small socket8P Switch Board and Cable for PMS5003 Laser Dust Sensor – Interface PCB₹259Closest match, check the specs
4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- SDS011 dust sensor: a larger PM2.5/PM10 sensor with a USB adapter option.
- PM2.5 dust sensors: how laser and IR dust sensors compare.
- BME280: add humidity so you can flag readings taken in very damp air.
Common mistakes to avoid
- Driving the sensor's RX from a 5 V Uno pin without a divider.
- Powering the fan from 3.3 V, so it reads zero or nonsense.
- Trusting readings in fog or very humid air.
- Forcing jumper wires into the 1.25 mm connector instead of using the adapter.
Frequently asked questions
PMS5003 or PMS7003?
Same data and accuracy. The PMS7003 is slimmer; the PMS5003 is easier to mount with its side inlet.
Does it work at 3.3 V?
The data pins are 3.3 V, but the fan needs 5 V.
How accurate is it?
Good for trends and comparing places, within about 10 to 15 % at normal levels, but not a certified reference monitor.
How often does it send data?
About once a second in active mode, or on request in passive mode.
How long does it last?
About 3 years of continuous running; sleeping between readings extends it.
Parts for this guide
Keep learning
Sources
- Plantower PMS5003 series data manual
- Plantower PMS7003 series data manual
- PMS library documentation (Mariusz Kacki)
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

