Sensors: DFRobot PM2.5

General Information

Sensor Photo, Source: DFRobot Store Photo Source: DFRobot Store Page

  • Type: Laser
  • Connection: Serial
  • Fan: Yes
  • Power saving: No
  • Library Reference: SENSOR_DFROBOT

The sensor comes with a breakout/level shifter board that can be used with the Arduino.

How to connect

First connect the sensor to it’s breakout daughterboard and then connect that to the Arduino using the following pin assignment:

Sensor Pin Description Arduino Pin WiFi Shield pin
GND Power Ground GND GND
VCC Power 5V 5V
RST Reset
RX Receive data 7 STX
TX Transmit data 8 SRX

The board has two more unmarked pins, you can leave those unconnected. To use the shield’s power switch to turn off the sensor when unused and extend lifespan you should use the GND! pin instead of GND.

Warning! The small daughterboard is not optional since this sensor communicates at 3.3V and most Arduino’s communicate at 5V. Always connect the sensor through the daughterboard and never directly.

Specifications

  • Operating Voltage: 4.95 – 5.05 V
  • Maximum input current: 120mA
  • Operating Temperature Range: -20 – 50 °C
  • Operating Humidity Range: 0 – 99%

Data packet

The sensor communicates using an UART port at 9600 bps, no parity and 1 stop bit. Each packet contains the following (32-bytes length):

Content Description
Start Character 1 0x42 (fixed byte)
Start Character 2 0x4d (fixed byte)
Frame Length Length of packer (2 * 9 + 2)
Data 1 Concentration of PM1.0, ug/m3
Data 2 Concentration of PM2.5, ug/m3
Data 3 Concentration of PM10.0, ug/m3
Data 4 Unknown (test data)
Data 5 Unknown (test data)
Data 6 Unknown (test data)
Data 7 The number of particulate of diameter above 0.3um in 0.1 liters of air
Data 8 The number of particulate of diameter above 0.5um in 0.1 liters of air
Data 9 The number of particulate of diameter above 1.0um in 0.1 liters of air
Data 10 The number of particulate of diameter above 2.5um in 0.1 liters of air
Data 11 The number of particulate of diameter above 5.0um in 0.1 liters of air
Data 12 The number of particulate of diameter above 10.0um in 0.1 liters of air
Data 13 Unknown (test data)
Checksum Sum of all data

Frame Length and Data # are all 16-bits in length.