• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Is there anyone who has worked with Sensirion SPS30 sensor?

shubh1196

New Member
The problem I'm facing is how can I verify the measured data is it correct or not?
And whether the sensor will give any value in Zeros or not?
Below is the file in which I'm getting data packets but mostly the values are the same every time.
 

Attachments

DrG

Active Member
I do not have experience with that specific particle sensor, but I have interfaced and used a similar sensor from Honeywell.

To answer your question, "how can I verify the measured data is it correct or not? " You simply can not do that easily. To validate a sensor, you need to provide standards. In this case, the standards would be atmospheres with known concentrations of particles of a particular size, e.g., 2.5um. Moreover, to truly test how well the unit is calibrated, you would need to present atmospheres of different concentrations and of different particle sizes.

It is just not easy for you to do that. Nor is it easy for the manufactures to do that and I strongly suspect that they use something like the Chinese cigarette smoke model or similar...there are a few.

A second and more common way of "validating" a sensor is to compare it to a sensor that has some kind of better or "accepted as better" calibration. In other words, compare values received by your sensor with those obtained from a "better" sensor. Such equipment is referenced in the scientific literature and you find them at laboratories at places like the EPA and so on.

As a gross test to determine whether the unit is working in some general way, simply light a match, blow it out and let the smoke trail hit the inlet valve. They probably do some internal average of values (let's say every 10 sec or something), but you should see a dramatic rise in the concentration values accross the range of particle sizes.

Before going further, I would ask you whether you have read and understand the data sheet for the sensor? How are you interfacing the unint - UART or I2C? What board are you using? Are you using canned drivers (and/or programs) from a Sparkfun unit and not really understanding what they are doing? I am not trying to insult you or be presumptuous, I am just trying to understand your level of experience and knowledge about the area.

Hope it helps.
 

shubh1196

New Member
thanks for your reply.
As I have tested sensor with keeping the Honeywell air purifier for a couple of minuted and checked the data on IAR's live watch it's responding with the value between 9 to 6 and suddenly becomes 1 on repeating check of 2 secs.
Yes, I've read the dataSheet fully and I'm trying to use the sensor with UART interface with the stm32f0 discovery board.
But I've also checked by directly interfacing the sensor to my laptop via USB to UART device that gives me serial data on Hercules.
In this case, also I'm getting constant values.
 

DrG

Active Member
Ok, it looks like you have dug deeply into the situation. I was just reading the data sheet now and I see that it is not a simple straight UART. Sensiron is using a SHDLC protocol on top of the simple UART.

Are you using the drivers provided by Sensiron https://github.com/Sensirion/embedded-uart-sps/tree/master/sps30-uart or are using your own code?

My approach would be to carefully interpret the frames that you have posted but that requires knowing what code you have sent to receive the frames.

BTW: it looks like they have a 1-sec read interval.

So, I guess the bottom line as far as how I would approach it is to show something like this:

Sending command XX receives frame XX..XX.XX...

But, if you can use their drivers and can compile their example code sps30_example_usage.c, it would be a reasonable starting point because that program is interpreting the frames and printing out particle values for you.. I can't tell where you are at on any of that.
 

DrG

Active Member
After reading more, I think I might understand what you are getting and why.

See the data sheet section that starts: If no new measurement values are available: no data.
If new measurement values are available:

From your text file, this frame has data as follows:

{7E}Start
{00}{03}{00}{28} Addr/CMD/State/Length
{40}{AB}{3C}{80} PM 1.0 ug/m3 concentration as floating point
{40}{B3}{DA}{05} 2.5
{40}{B3}{D9}{FE} 4.0
{40}{B3}{D9}{FE} 10.0
{42}{0B}{E8}{EB} 0.5 # of particles / cm3
{42}{23}{01}{32} 1.0
{42}{23}{9D}{FB} 2.5
{42}{23}{A0}{0A} 4.0 (or 4.5 in the code)
{42}{23}{A1}{59} 10.0
{3E}{E9}{88}{4C} typical particle size um
{A9} checksum
{7E} End

This is a data frame when there is no new measurement available (i.e., no data).

{7E}{00}{03}{00}{FC}{7E}

I am thinking that it is why you get zero values. You have frames with data and frames without data. Suggest that you read it at a slower rate and/or keep reading until you get a valid frame - one that has new data.

There are several parts of the data sheet that are confusing and that is typical – they might be written poorly or it may be my misunderstanding. Usually, I can work that out empirically. In this case, however, I don’t have one of the units.

This might be helpful or not, but I gave it a try.
 

DrG

Active Member
I watched that video. Please see post #2. The values shown in the video do not appear to be unreasonable to me, but as stated in post #2, you can not verify them by simply looking at them. As I mentioned before, you can blow out a lit match and let the smoke trail enter the inlet port on the sensor and those values should increase sharply. That test will add some confidence that the sensor is working but would not truly validate the unit.
 

shubh1196

New Member
Yes, you were right, I worked on NDIS PM sensor it's also sending the almost same value as of Sensirion PM sensor.
Thanks for your help.
 

EE World Online Articles

Loading

 
Top