PMS5003 Sensor Library for Esp32 idf
Plantower PMS5003 is a laser dust sensor. It can sense particulates of various sizes (PM1, PM2.5, PM10) from sources like smoke, dust, pollen, metal and organic particles.
This library can be used with multiple sensors at the same time. For each sensor you can choose between one shot or periodic data read.
The source code is available on my GitHub at the following link.
Working principle
This sensor uses laser scattering to radiate suspending particles in the air, then collects scattering light to obtain the curve of scattering light change with time. The microprocessor calculates equivalent particle diameter and the number of particles with different diameter per unit volume.
About the Library
To initialize the library you need to setup the pmsx003_config_t structure as below sample
|
|
Note
You can configure the library to execute a periodic data read. Between each data sample the sensor will be disabled; datasheet suggests to wait at least 30s after sensor wake up. For this reason periodic_sec_interval parameter min value is 30.
Datasheet
Sensor datasheet can be downloaded here