Dust Sensor - PMS 5003/6003/7003


#123

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.


#124

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?


#125

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

I tested UART mode and left the PIN floating.


#126

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


#127

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


#128

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

#define SP30_COMMS SERIALPORT1
#define TX_PIN 8
#define RX_PIN 8

I did not connect the selection pin.


#129

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

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


#130

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?


#131

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.


#132

@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.

regards,
Paul


Building air quality detector
#133

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


#134

Hello,

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.


#135

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


#136

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 ?


#137

@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 :

SYSTEM_THREAD(ENABLED)

#include "sps30.h"
#define SP30_COMMS SERIALPORT1
#define TX_PIN 8
#define RX_PIN 8
#define AUTOCLEANINTERVAL -1
#define PERFORMCLEANNOW 0
#define DEBUG 0
SPS30 sps30;

The Library is documented well.


#138

Hi. I am having trouble using the files from the github (https://github.com/paulvha/sps30) with a particle electron using I2C. Could someone who has gotten it working on a particle device help me out and possible upload the files an includeable library like the one made for the SCD30?


#139

Welcome to the Particle community.

I’ve had better luck using the SPS30 with UART than with I2C.

I’ll try to post my modifications to the library and a test app in the morning.


#140

FWIW the HPMA115S0 is a decent dust sensor. The PM10 usually aligns with what the value of the PM2.5 value is. (I’ve never seen them diverge) It’s configured via UART. I posted about it here on the forum if you need a good starting point.


#141

any update on that library?


#142

Wow. What you’ve done here is great with the visualization, etc. This is precisely the application I am looking at this sensor for as well (shop readings).

@RWB Have you posted about your project separately? Could you walk me through it?
I understand your SPS30 reports data to the Photon over UART…but how are you getting it into the Losant?

What’s a good, cost responsible place to publish data from a device like this?