PMS5003 particulate matter sensor with ESP32
Supply 5 V
Bus GPIO
Measures particulates
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| VCC | Power | VIN | Needs 5 V for the fan: use VIN |
| GND | Ground | GND | |
| SET | Input (the ESP32 drives it) | D25 | HIGH or unconnected = working, LOW = sleep (3.3 V logic) |
| RX | Input (the ESP32 drives it) | D26 | UART: the part receives data here. Connect to an ESP32 TX pin |
| TX | Output (the part drives it) | D27 | UART: the part sends data here. Connect to an ESP32 RX pin (9600 baud, 3.3 V level) |
| RESET | Input (the ESP32 drives it) | D32 | Reset, active LOW. Optional |
| NC1 | Not wired to the ESP32 | — | Not connected |
| NC2 | Not wired to the ESP32 | — | Not connected |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.
Sources
- Plantower PMS5003 datasheet, Pin 1 VCC, 2 GND, 3 SET, 4 RX, 5 TX, 6 RESET, 7-8 NC; 3.3 V logic
Try it in 3D in BoardPilot
Related parts
A02YYUW waterproof ultrasonic distance (UART)A3144 hall effect switchAM312 mini PIR motion sensorATGM336H GPS/BeiDou moduleBeitian BN-220 GPS moduleBenewake TF-Luna LiDAR (UART mode)
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.