Field Installation Doc · Wiring & Pinmap

Particulate-Matter Node — Site (Pi-C, sensor_id=3)

A measurement node connecting the Plantower PMS7003 laser PM sensor to the Raspberry Pi over the primary UART (9600 8N1). The sensor co-locates on an existing leak node and reports PM1.0/PM2.5/PM10 (ug/m3) every 10 minutes under the same sensor_id as that node's leak sensor; high-PM2.5/PM10 threshold decisions and SMS dispatch are handled by the server.

Raspberry Pi 4 Model B BCM2711 Raspberry Pi OS Bookworm 64-bit Plantower PMS7003 UART /dev/serial0 9600 8N1 metric_type=pms7003 Report interval 10 min

240-Pin Header Pinmap Diagram Used pins highlighted · others in gray

40-pin GPIO header (J8) · physical pin numbers 1 3V3 2 5V (VCC) 3 GPIO2 (SDA1) 4 5V 5 GPIO3 (SCL1) 6 GND 7 GPIO4 8 GPIO14 (TXD) 9 GND 10 GPIO15 (RXD) 11 GPIO17 12 GPIO18 13 GPIO27 14 GND 15 GPIO22 16 GPIO23 17 3V3 18 GPIO24 19 GPIO10 (MOSI) 20 GND 21 GPIO9 (MISO) 22 GPIO25 23 GPIO11 (SCLK) 24 GPIO8 (CE0) 25 GND 26 GPIO7 (CE1) 27 GPIO0 (ID_SD) 28 GPIO1 (ID_SC) 29 GPIO5 30 GND 31 GPIO6 32 GPIO12 33 GPIO13 34 GND 35 GPIO19 36 GPIO16 37 GPIO26 38 GPIO20 39 GND 40 GPIO21 [#] square marker = pin 1 (relative to board orientation)
5V power — pin 2 UART RXD (sensor data) — pin 10 GND — pin 6 UART TXD (optional) — pin 8 Unused pins

The pin numbers and signals in this diagram match the standard Raspberry Pi 4 Model B (BCM2711) 40-pin header layout.

3Pinmap Table PMS7003 → 40-pin header

PMS7003 signalDirectionPhys pinNotes
VCC (power) Pi → sensor 2 * 5V required — the PMS7003 fan + laser need 5V (pins 2·4)
GND common 6 Any GND works: 6 · 9 · 14 · 20 · 25 · 30 · 34 · 39
TXD (sensor data out) sensor → Pi RXD 10 GPIO15 (RXD). 3.3V logic — connects directly, no level shifter
RXD (command in) Pi TXD → sensor 8 Optional — only for passive-mode/sleep commands. Active streaming needs only TXD
SET / RESET — n/c Optional. Leave floating — internal pull-up keeps the sensor enabled/running

4Wiring Schematic sensor ↔ header

PMS7003 sensor Pi 40-pin header VCC GND TXD RXD 5V (pin 2) GND (pin 6) RXD (pin 10, GPIO15) TXD (pin 8, GPIO14) Power 5V Ground GND sensor TXD → Pi RXD (GPIO15) Pi TXD → sensor RXD (optional)

Active streaming mode uses only VCC · GND · sensor TXD → Pi RXD. The dashed Pi TXD → sensor RXD line is optional (needed only to send passive-mode / sleep commands). The PMS7003 TXD is 3.3V logic, so it wires directly to the Pi — no level shifter.

5Electrical Design · Cautions

Critical — power VCC from 5V, but NEVER wire the sensor TXD to a Pi 5V pin

The PMS7003 VCC must be 5V (pin 2 or 4) — its fan and laser will not run on 3.3V. However the UART data lines are 3.3V logic: the sensor's TXD connects directly to the Pi RXD (pin 10). Do not connect any 5V line to a GPIO — that would damage the 3.3V-only Pi GPIO. Double-check pin numbers before power-up.

# Verify the UART device exists (symlink to ttyS0 / ttyAMA0) $ ls -l /dev/serial0 lrwxrwxrwx 1 root root 5 ... /dev/serial0 -> ttyS0

6Installation Checklist

  1. Do wiring work with power disconnected (no hot-plugging)
  2. Connect VCC → physical pin 2 (5V) — the sensor fan/laser need 5V
  3. Connect GND → physical pin 6 (or any other GND pin)
  4. Connect sensor TXD → Pi RXD (pin 10, GPIO15) — this is the data line
  5. (Optional) Pi TXD (pin 8) → sensor RXD, only if sending passive-mode commands
  6. Leave SET/RESET floating (sensor stays enabled/running)
  7. Re-check all wiring — confirm no 5V line touches a GPIO — then power up the Pi
  8. Enable UART (enable_uart=1) and disable the serial console (raspi-config / install.sh), then reboot
  9. Run ls -l /dev/serial0 → confirm it symlinks to ttyS0/ttyAMA0
  10. Verify UART_PORT / UART_BAUD in config.py, and SENSOR_ID (1 or 3) in config_local.py
  11. Check measurement log and server reception (10-min PM reporting OK)