Sensirion sensors
Connector
5 pin JST ZH (1.50mm pitch)
Pin | Name | Voltage | Function |
---|---|---|---|
1 | VDD | 5V±10% | |
2 | RX/SDA | 3.3V/5V TTL | serial port/I2C |
3 | TX/SCL | 3.3V/5V TTL | serial port/I2C |
4 | SEL | floating/GND | floating for UART, GND for I2C |
5 | GND | 0V |
Protocol
Serial protocol is UART 115200 8N1 5V TTL 3.3V compatible.
Note
The SPS30 only support continuous operation, at about one measurement per second.
However, new measurements are not streamed. Each measurement has to be requested.
This behavior is consistent with passive_mode
/single-shot operation in other sensors.
The sleep
/wake
commands listed here (stop measurement/start measurement on the datasheet),
behave consistently with the rest of the supported PM sensors.
There are also deep-sleep
/wake-up
commands (sleep/wake-up on the datasheet),
which are not implemented. As deep-sleep
disable the UART interface and wake-up
is a 2 stage procedure.
Command | Description | message |
---|---|---|
active_mode |
continuous operation | N/A |
passive_mode |
single-shot operation | N/A |
passive_read |
request last measurement | 7E 00 03 00 FC 7E |
sleep |
idle mode | 7E 00 01 00 FE 7E |
wake |
wake up from idle mode | 7E 00 00 02 01 03 F9 7E |
Messages containing measurements consist of floats.
The second to last bit of the message should contain 0xFF-sum(message[1:-2])%0x100
.
message |
SPS30 |
---|---|
47 bits | |
header | 5 bits |
7E 00 03 00 28 |
|
body | 40 bits |
10 values | |
checksum | 1 bit |
tail | 1 bit |
7E |
The message body (message[5:-2]
) contains 10 values:
- pm01, pm25, pm04, pm10: PM1.0, PM2.5, PM4.0, PM10 [ug/m³]
- n0_5, n1_0, n2_5, n4_0, n10_0: number concentrations under X.Y um [#/cm³]
- diam: typical particle size [μm]
SPS30
About the SPS30 sensor (-m SPS30
)
pms -m SPS30 info
Sensirion SPS30 sensor observations
time measurement time [seconds since epoch]
pm01, pm25, pm04, pm10 PM1.0, PM2.5, PM4.0, PM10 [μg/m3]
n0_5, n1_0, n2_5, n4_0, n10_0 number concentrations between 0.3 and X.Y um [#/cm3]
diam typical particle size [μm]
String formats: pm (default), num, diam, csv and header
Read 10 samples (-n 10
), one sample every 10 seconds (-i 10
)
pms -m SPS30 -n 10 -i 10 serial
2021-09-07 07:05:00: PM1 5.2, PM2.5 9.5, PM4 12.6, PM10 13.3 μg/m3
2021-09-07 07:05:10: PM1 5.8, PM2.5 8.2, PM4 9.9, PM10 10.2 μg/m3
2021-09-07 07:05:20: PM1 7.0, PM2.5 9.1, PM4 10.5, PM10 10.8 μg/m3
2021-09-07 07:05:30: PM1 7.8, PM2.5 9.9, PM4 11.2, PM10 11.5 μg/m3
2021-09-07 07:05:40: PM1 8.3, PM2.5 10.5, PM4 11.8, PM10 12.1 μg/m3
2021-09-07 07:05:50: PM1 8.2, PM2.5 10.2, PM4 11.4, PM10 11.7 μg/m3
2021-09-07 07:06:40: PM1 8.4, PM2.5 10.4, PM4 11.6, PM10 11.8 μg/m3
2021-09-07 07:05:10: PM1 8.5, PM2.5 10.4, PM4 11.5, PM10 11.7 μg/m3
2021-09-07 07:07:00: PM1 8.8, PM2.5 10.7, PM4 11.8, PM10 12.1 μg/m3
2021-09-07 07:07:10: PM1 8.5, PM2.5 10.3, PM4 11.4, PM10 11.6 μg/m3
Print on CSV format (-f csv
)
pms -m SPS30 -n 10 -i 10 csv
time, pm01, pm25, pm04, pm10, n0_5, n1_0, n2_5, n4_0, n10_0, diam
1630991100, 5.2, 9.5, 12.6, 13.3, 26.31, 37.00, 41.52, 42.41, 42.54, 0.8
1630991110, 5.8, 8.2, 9.9, 10.2, 35.09, 43.75, 46.20, 46.67, 46.75, 0.8
1630991120, 7.0, 9.1, 10.5, 10.8, 44.12, 53.44, 55.51, 55.91, 55.97, 0.8
1630991130, 7.8, 9.9, 11.2, 11.5, 50.39, 60.42, 62.40, 62.78, 62.84, 0.7
1630991140, 8.3, 10.5, 11.8, 12.1, 53.64, 64.24, 66.29, 66.68, 66.75, 0.7
1630991150, 8.2, 10.2, 11.4, 11.7, 53.40, 63.68, 65.56, 65.91, 65.97, 0.7
1630991200, 8.4, 10.4, 11.6, 11.8, 54.85, 65.26, 67.09, 67.44, 67.50, 0.7
1630991210, 8.5, 10.4, 11.5, 11.7, 55.52, 65.91, 67.66, 68.00, 68.05, 0.7
1630991220, 8.8, 10.7, 11.8, 12.1, 57.40, 68.09, 69.87, 70.21, 70.27, 0.7
1630991230, 8.5, 10.3, 11.4, 11.6, 55.63, 65.90, 67.56, 67.88, 67.94, 0.7
Print on hexdump format (-f hexdump
)
pms -m SPS30 -n 10 -i 10 serial -f hexdump
00000000: 7e 00 03 00 28 40 a7 83 20 41 17 77 bb 41 4a 5f 83 41 54 8d dd 41 d2 83 3e 42 7d 33 fc 85 42 26 17 22 42 29 a4 d9 42 2a 29 bc 3f 55 b7 e7 9e 7e ....(@.. A.w.AJ_.AT..A..>B}3..B&."B)..B*).?U....
0000002f: 7e 00 03 00 28 40 b9 c6 7f 41 03 6c 8b 41 1e 4a e2 41 23 aa 92 42 0c 5b 7c 42 2e fd ba 42 38 ca b3 42 3a b2 c9 42 3a fd e9 3f 4a 10 25 d6 7e ....(@...A.l.A.J.A#..B.[|B...B8..B:..B:..?J.%..
00000064: 7e 00 03 00 28 40 df 03 da 41 7d 31 62 ae 41 27 9e 32 41 2c 10 7d 5e 42 30 7d 5e d3 42 55 c0 4c 42 5e 09 08 42 5f a2 8a 42 5f e4 43 3f 40 fa 1f ff 7e ....(@...A}1b.A'.2A,.}^B0}^.BU.LB^..B_..B_.C?@....
00000090: 7e 00 03 00 28 40 fa 9f ee 41 1e 6a 7d 33 41 33 60 81 41 37 91 cd 42 49 8e c8 42 71 b1 18 42 79 9a b4 42 7b 20 1b 42 7b 60 21 3f 3c a4 c4 87 7e ....(@...A.j}3A3`.A7..BI..Bq..By..B{ .B{`!?<....
000000c0: 7e 00 03 00 28 41 05 1c 4c 41 27 8b 14 41 3d 38 59 41 41 8e 35 42 56 92 6c 42 80 79 7c 42 84 93 12 42 85 5c b2 42 85 7d 5d fb 3f 3e 67 ea 31 7e ....(A..LA'..A=8YAA.5BV.lB.y|B...B.\.B.}].?>g.1.
000000f5: 7e 00 03 00 28 41 03 9f 9e 41 23 7d 5e 0b 41 37 29 dc 41 3b 18 f8 42 55 95 4a 42 7d 5e ba 00 42 83 1c 73 42 83 d4 4c 42 83 f3 10 3f 3e 00 79 76 7e ....(A...A#}^.A7).A;..BU.JB}^..B..sB..LB...?>.yv.
00000120: 7e 00 03 00 28 41 06 b1 47 41 26 09 7d 5d 41 39 24 19 41 3c f6 37 42 5b 61 d6 42 82 85 77 42 86 2d ad 42 86 e0 ca 42 86 ff 03 3f 3d 19 e5 5b 7e ....(A..GA&.}]A9$.A<.7B[a.B..wB.-.B...B...?=..[.
00000149: 7e 00 03 00 28 41 07 d4 61 41 26 1c 2a 41 38 4c cf 41 3b f0 1a 42 5e 17 d0 42 83 d2 21 42 87 52 70 42 87 fd 97 42 88 1a c2 3f 3e 47 c7 38 7e ....(A..aA&.*A8L.A;..B^..B..!B.RpB...B...?>G.8.
00000178: 7e 00 03 00 28 41 0c 43 87 41 2b 1e da 41 3d 92 1e 41 41 42 bc 42 65 9c 10 42 88 2f 76 42 8b be 32 42 8c 6c 00 42 8c 89 b8 3f 3e 5a 83 89 7e ....(A.C.A+..A=..AAB.Be..B./vB..2B.l.B...?>Z...
000001a7: 7e 00 03 00 28 41 07 9f e5 41 24 a7 bf 41 35 d7 db 41 39 47 db 42 5e 89 35 42 83 cd 07 42 87 20 a7 42 87 c2 f8 42 87 de e9 3f 3d be a6 ff 7e ....(A...A$..A5..A9G.B^.5B...B. .B...B...?=....