Sensirion SPS30: how to install I2C driver/library?

For I2C you can try my simple program:

Maybe it will help.
If you cannot change the Wire.h lib, you can read out the first 5 values only
(look in code - there is such an option)

@kvital - in your code is one detail not correct:
You must not stop the measurement before finishing all the process. Results will be wrong.

The stop command should be used only before switching off the module.

You are right. the reset and start should be in setup() and read in loop()

Can any one confirm the sensor ranges ?

trying some of the examples the values coming back seem wrong, the example by @micha_pr seems the closest to correct, how ever the first to numbers below seem to high.

These are from the data sheet
PM 0.5 between 0.3 and 1.0
PM 2.5 between 0.3 and 2.5

These are from micha_pr example code the first to returned value are larger than the expected range.
2.32
2.61
2.77
2.80

Am i missing something ?

https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Particulate_Matter/Sensirion_PM_Sensors_SPS30_Datasheet.pdf

Hi
the values can be correct.
I think you misunderstood the parameters.

The values can be much higher - look at Wikipeda as sample.
I'm just traveling - can help you at end if the week, if any needs :wink:

Michael

@micha_pr I think I understand better now, I would be curious what the wikipedia page is your referring to do you just mean the general page on particulates ie

Particulates - Wikipedia ?

Also curious 2.5 4.0 and 10.0 are all the same is this expected I know the the higher readings contain the lower readings, how ever is it really that likely that there would be no particles in an office over 2.5 ?

pmn0.5 -> 22.27
pmn1.0 -> 25.53
pmn2.5 -> 25.60
pmn4.0 -> 25.60
pmn10.0 -> 25.60

yes, it maybe ok.
Most particles can be <2.5um

If you make some experiments with different smoke sources (cigarette, candle, matches....) you can see some difference.

Best regards
Michael

PS about wikipedia - yes, this is one source you found

use this library GitHub - paulvha/sps30: Sensirion SPS30 driver for ESP32, SODAQ, MEGA2560, UNO, ESP8266, Particle-photon on UART OR I2C coummunication

change as you want to use i2c or serial
#define SP30_COMMS I2C_COMMS

and software serial change this
#define TX_PIN 26
#define RX_PIN 25

I'm test on esp8266 i2c it work.

HELLO,

I hope everything is going good at your end. I am working on SPS30 AND ARDUINO on a project " Measurement of Particulate Pollution". I have some doubts. Has someone completely done with this project of sps30. Could you please help me?

LOOKING FORWARD TO HEARING FROM YOU SOON!

Regards,
Pankaj Naryal

Hi,

pankaj-specf:
I am working on SPS30 AND ARDUINO on a project " Measurement of Particulate Pollution". I have some doubts.

what kind of doubts?
Maybe you can post your code?

Best regards
Michael