Dust Sensor - PMS 5003/6003/7003


The SPS30 library “incorrectly” reports PM10 Number Concentration [#/cm3] as Zero (0).

I believe both the Mass and Number Concentrations should increase (or stay the same) when moving up the Particulate Matter Size Scale (from PM1 to PM10), as each larger PM classification includes the concentrations from all sizes smaller than it.

PM10 >= PM4 >= PM2.5 >= PM1.0

Other than that, my SPS30 and the library appear to be working great.

This isn’t a huge concern for me, since Air Monitoring is usually PM2.5 and PM10 Mass Concentrations [μg/m3] for my Industrial Applications, as per the EPA.


The guy who wrote the library is talking with Sensirion about the PM 10 concentration being 0 always.

Voc Readings - powered by Losant https://app.losant.com/dashboards/599c9a05b36c040007c6e20c

I have been testing the sensor the last few days while running a Lazer Cutting machine and a CNC Milling machine cutting G10 fiberglass sheets as you can see in the graph above.

The Mass PM10 is not returning 0 for me it looks like.

I find the MASS readings most useful and things do not get as dusty as I was thinking.

The MASS usually shows more larger particles detected than the smaller PM1 sized particles. To me it looks like it’s working perfectly.

I love having the sensor along with Voc, temp, humidity, and Co2 since High Voc does not mean there is more particulates in the air.

Do you know of a good chart or graph for what levels are safe vs unsafe?


I agree, Mass is more useful. The only thing not working is PM10 Number Concentration [#/cm3].

Air Quality Index (AQI) is more commonly used, since it’s nice pretty colors.
You want a 24 hour average for :

  • PM2.5 < 15 [μg/m3]
  • PM10 < 54 [μg/m3]

Here are the two AQI charts that reference the PM values:


Thanks for the info.

How are you generating the 24hr average for PM2.5 and PM10?

I need to add this to my dashboard so it auto changes a image widget box based on the AIQ levels.


I currently just use a rolling average calculated from my backend (ThingSpeak) and not on the Photon, but the official method is quoted from HERE

To accurately reflect the current air quality, the multi-hour average used for the AQI computation should be centered on the current time, but as concentrations of future hours are unknown and are difficult to estimate accurately, EPA uses surrogate concentrations to estimate these multi-hour averages. For reporting the PM2.5, PM10 air quality indices, this surrogate concentration is a particular type of weighted average that provides more weight to the most recent air quality data when air pollution levels are changing.

The Wikipedia link also has the actual equation to calculate AQI.

Or you could just use a Switch/Case to determine the AQI Category based on this Chart:


The Answer is the “worst” AQI Category from either PM2.5 or PM10.


Paul has updated his library so PM10 now works correctly FYI.

I asked him about adding the AIQ averaging to the library to see if that is an option.


Hey RWB,

I am working with the sensirion SPS30 sensor, and a Particle Photon Device.

Device is connected, selector pin connected to A1 port on photon.

I flash the all the files in the paulvha’s library. example.ino, sps30.h, sps30.cpp, and printf.h.

Updated SoftwareSerial.h to ParticleSoftSerial.h inside the sps30.cpp file.

Everything flashed ok… but no data is turning up… can you help me out?


Are you leaving the UART / I2C pin floating or connected to something.

I tested UART mode and left the PIN floating.


I left the UART/I2C Selection pin to A1 on the particle photon. with the original Sps30 basic_reading code flashed.


What does this mean to Set TX and RX pin to 8?


Change the #define statements at the top of your code to use the Photon’s Serial1 Port:

#define TX_PIN 8
#define RX_PIN 8

I did not connect the selection pin.


Has anyone compared the readings from the SPS30 and the Honeywell HPM?

Thanks everyone for your input, I’ve enjoyed following this thread!


Got it. Thanks Rftop.

I am working with the WEB IDE on the photon device. So how do you view the data out of the Serial1?

Also, did you need to an external 5V power source to power on the SPS30 sensor?


The Photon reads the SPS30 sensor over it’s Serial1 interface (TX and RX Pins).
In the library’s example ino code, results are sent to the Serial interface in the Serial.print statements.
(Serial = USB; Serial1 = TX,RX Pins connected to the Sensor)

If you are connected to the Photon via USB, open your favorite Serial Monitor to view the results of each Serial.print.
You may already have the Arduino IDE installed, which has a Serial Monitor.
You can use Particle’s CLI if you have that installed. From a command prompt type: particle serial monitor --follow

I powered the SPS30 with the Photon’s Vin Pin. The photon was powered w/ USB.


@Rftop FYI the guy who created the library for the dust sensor just sent me a email saying he added the Air Quality Index feature to the code if we want to try it.

Let me know if you try it out.

Just completed an AirQuality Index library that works with an SPS30 for different regions. It is example 10 and needs a seperate library to be downloaded https://github.com/paulvha/airquality.

I have designed and tested only on ESP32 as needed enough memory, as well as a board that does NOT reset when a serial monitor is connected. Not enough knowledge about the boards you use.



Thanks for the info @RWB, I’ll give it a test drive :crossed_fingers:



I am new to the boron platform and trying to run the SPS30 with Boron LTE firmware 0.9.0 (Using UART).
Trying to run the https://github.com/paulvha/sps30 code, its not getting complied. not able to find file ParticleSoftSerial.h in particle workbench looks like the library doesn’t support boron.
Is there another library which works with boron?

Thank you.


There currently is no software serial but you should be able to use the HW interface Serial1.


Hello @Rftop,

I am working to get the Boron to work with sps30 using UART.
Would it be possible for you to share how you did it ?


@Pinak, I have not tried the recent versions of the Library.

What I did for V1.0 on a Photon:
Created 2 new “tabs” in my WebIDE project and copied SPS30.cpp and SPS30.h from Github.

I used one of the Example .ino’s with :


#include "sps30.h"
#define TX_PIN 8
#define RX_PIN 8
#define DEBUG 0
SPS30 sps30;

The Library is documented well.