Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCD30 and SPS30 sensors #102

Closed
lemeit opened this issue Nov 26, 2021 · 1 comment
Closed

SCD30 and SPS30 sensors #102

lemeit opened this issue Nov 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@lemeit
Copy link

lemeit commented Nov 26, 2021

Both sensors are connected through the i2c connection. TTGO TDisplay. Firmware rev851

The device only detects the SCD30 sensor.

The SCD30 sensor is disconnected (unplugged) and after a reset the device recognizes the SPS30 sensor and outputs the corresponding values.

Then the SPS30 sensor is disconnected and the SCD30 is connected and when performing a reset the CO2, T and H data appear.

Log:

6:17:25.428 -> -->[SLIB] SPS30 read > done!
16:17:25.428 -> -->[SLIB] PM1:002 PM25:002 PM10:002 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:0.000000% T:0.000000°C
16:17:38.055 -> ets Jul 29 2019 12:21:46
16:17:38.055 ->
16:17:38.055 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
16:17:38.055 -> configsip: 0, SPIWP:0xee
16:17:38.055 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
16:17:38.055 -> mode:DIO, clock div:2
16:17:38.055 -> load:0x3fff0018,len:4
16:17:38.055 -> load:0x3fff001c,len:1044
16:17:38.055 -> load:0x40078000,len:10124
16:17:38.055 -> load:0x40080400,len:5828
16:17:38.055 -> entry 0x400806a8
16:17:39.189 ->
16:17:39.189 -> == CanAirIO Setup ==
16:17:39.189 ->
16:17:39.189 -> -->[CONF] debug is enable.
16:17:39.790 -> -->[BATT] ADC eFuse Vref:1114 mV
16:17:39.790 -> -->[TGUI] display config ready.
16:17:39.790 -> -->[TGUI] displayed welcome screen
16:17:39.790 -> -->[INFO] ESP32MAC: 08:3A:F2:69:B8:DA
16:17:39.837 -> -->[INFO] Revision: r851
16:17:39.837 -> -->[INFO] Firmware: 0.4.7
16:17:39.837 -> -->[INFO] Flavor : TTGO_TDISPLAY
16:17:39.837 -> -->[INFO] Target : prod
16:17:39.837 -> -->[INFO] Detecting sensors..
16:17:39.837 -> -->[INFO] PM sensor configured: 0
16:17:39.931 -> -->[SLIB] new sample time: 1
16:17:39.931 -> -->[SLIB] debug is enable.
16:17:39.931 -> -->[SLIB] temperature offset: 0.00
16:17:39.931 -> -->[SLIB] altitude offset: 40.00
16:17:39.931 -> -->[SLIB] forced only i2c sensors: 1
16:17:39.931 -> -->[SLIB] trying to load I2C sensors..
16:17:39.931 -> -->[SLIB] I2C SPS30 starting sensor..
16:17:39.931 -> I2C Sending: 0xD1 0x00
16:17:39.931 -> I2C Received: 0x02 0x02 length: 2
16:17:39.931 ->
16:17:39.931 -> I2C Sending: 0xD0 0x33
16:17:39.931 -> I2C Received: 0x46 0x35 0x46 0x33 0x33 0x39 0x37 0x33 0x33 0x43 0x36 0x46 0x39 0x34 0x31 0x38 0x00 0x00 length: 18
16:17:39.978 ->
16:17:39.978 -> -->[SLIB] SPS30 Serial number : F5F339733C6F9418
16:17:39.978 -> I2C Sending: 0xD0 0x02
16:17:39.978 -> I2C Received: 0x30 0x30 0x30 0x38 0x30 0x30 0x30 0x30 length: 8
16:17:39.978 ->
16:17:39.978 -> -->[SLIB] SPS30 product name : 00080000
16:17:39.978 -> I2C Sending: 0xD1 0x00
16:17:39.978 -> I2C Received: 0x02 0x02 length: 2
16:17:39.978 ->
16:17:39.978 -> -->[SLIB] SPS30 firmware level: 2.2
16:17:39.978 -> -->[SLIB] SPS30 Hardware level: 0
16:17:39.978 -> -->[SLIB] SPS30 SHDLC protocol: 0.0
16:17:39.978 -> -->[SLIB] SPS30 Library level : 1.4
16:17:39.978 -> I2C Sending: 0xD3 0x04
16:17:41.993 -> -->[SLIB] SPS30 Detected SPS30 via I2C.
16:17:41.993 -> I2C Sending: 0x00 0x10 0x03 0x00 0xAC
16:17:42.959 -> -->[SLIB] SPS30 Measurement OK
16:17:43.006 -> -->[SLIB] I2C detected SPS30 sensor :)
16:17:43.006 -> -->[SLIB] GCJA5 starting PANASONIC GCJA5 sensor..
16:17:43.006 -> -->[SLIB] AM2320 starting AM2320 sensor..
16:17:43.006 -> -->[SLIB] SHT31 starting SHT31 sensor..
16:17:43.006 -> -->[SLIB] BME280 starting BME280 sensor..
16:17:43.006 -> -->[SLIB] BME680 starting BME680 sensor..
16:17:43.006 -> -->[SLIB] AHT10 starting AHT10 sensor..
16:17:43.053 -> -->[SLIB] SCD30 starting CO2 SCD30 sensor..
16:17:43.099 -> -->[SLIB] I2C detected SCD30 sensor :)
16:17:43.099 -> -->[SLIB] SCD30 current temperature offset: 0.00
16:17:43.193 -> -->[SLIB] SCD30 current altitude offset: 0
16:17:43.193 -> -->[SLIB] SCD4x starting CO2 SCD4x sensor..
16:17:43.709 -> [E][SLIB] SCD4x Error Stopping Periodic Measurement : 267
16:17:43.709 -> [E][SLIB] SCD4x Received NACK on transmit of address
16:17:43.709 -> -->[INFO] PM/CO2 sensor detected: SCD30
16:17:43.812 -> -->[WDOG] watchdog config to check each 120 seconds.
16:17:43.812 -> -->[WIFI] connecting to BELL 2.4GHz............ done.
16:17:46.852 -> -->[WIFI] IP: 192.168.0.227
16:17:46.852 -> -->[WIFI] publish interval: 30 sec.
16:17:46.852 -> -->[INFO] OTA on: CanAirIO8DA.local with passw: CanAirIO
16:17:47.461 -> -->[FOTA] not need update
16:17:47.461 -> -->[MQTT] Anaire init
16:17:47.461 -> -->[MQTT] Anaire connecting to mqtt.anaire.org..connected!
16:17:49.617 -> -->[CONF] response: {
16:17:49.617 -> "dname": "",
16:17:49.617 -> "stime": 15,
16:17:49.617 -> "stype": 0,
16:17:49.664 -> "wenb": true,
16:17:49.664 -> "ssid": "BELL 2.4GHz",
16:17:49.664 -> "ienb": true,
16:17:49.664 -> "ifxdb": "canairio",
16:17:49.664 -> "ifxip": "influxdb.canair.io",
16:17:49.664 -> "ifxpt": 8086,
16:17:49.664 -> "geo": "69tmpwc",
16:17:49.664 -> "denb": true,
16:17:49.664 -> "penb": false,
16:17:49.664 -> "i2conly": true,
16:17:49.664 -> "toffset": 0,
16:17:49.664 -> "altoffset": 40,
16:17:49.664 -> "hassip": "",
16:17:49.664 -> "hasspt": 1883,
16:17:49.664 -> "hassusr": "",
16:17:49.664 -> "hasspsw": "",
16:17:49.664 -> "lskey": "",
16:17:49.664 -> "wmac": 55480,
16:17:49.664 -> "anaireid": "69TTTGOTD9B8DA",
16:17:49.664 -> "wsta": true,
16:17:49.664 -> "vrev": 851,
16:17:49.664 -> "vflv": "TTGO_TDISPLAY",
16:17:49.664 -> "vtag": "prod",
16:17:49.664 -> "vmac": "08:3A:F2:69:B8:DA"
16:17:49.664 -> }
16:17:49.664 -> -->[BTLE] GATT server ready. (Waiting for client)
16:17:49.811 -> -->[INFO] InfluxDb API: 1
16:17:49.905 -> -->[IFDB] config: [email protected]:8086
16:17:50.511 -> -->[IFDB] connected to http://influxdb.canair.io:8086
16:17:51.675 -> -->[TGUI] starting task loop
16:17:51.675 -> -->[TGUI] displayed main screen
16:17:52.340 -> -->[SLIB] Any data from sensors? check your wirings!
16:17:52.387 -> -->[SLIB] PM1:000 PM25:000 PM10:000 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:0.000000% T:0.000000°C
16:17:52.387 -> -->[SLIB] new sample time: 15
16:17:52.387 -> -->[SLIB] SCD30 interval time to (2x): 30
16:18:07.363 -> -->[SLIB] SCD30 read > done!
16:18:07.363 -> -->[SLIB] PM1:000 PM25:000 PM10:000 CO2:0551 CO2humi:38.005066% CO2temp:28.869308°C H:0.000000% T:0.000000°C
16:18:09.681 -> -->[IFDB] write done.

@lemeit lemeit added the bug Something isn't working label Nov 26, 2021
@lemeit
Copy link
Author

lemeit commented Dec 6, 2021

Expanded detection failure of both sensors for DEV channel Revision: r867

Obtaining CO2 data but not particulate matter, however SPS30 sensor fan operation is heard:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

== CanAirIO Setup ==

-->[CONF] debug is enable.
-->[BATT] ADC eFuse Vref:1114 mV
-->[TGUI] display config ready.
-->[TGUI] displayed welcome screen
-->[INFO] ESP32MAC: 08:3A:F2:69:B8:DA
-->[INFO] Hostname: CanAirIO8DA
-->[INFO] Revision: r867
-->[INFO] Firmware: 0.4.9
-->[INFO] Flavor : TTGO_TDISPLAY
-->[INFO] Target : dev
-->[INFO] Detecting sensors..
-->[INFO] PM sensor configured: 0
-->[SLIB] new sample time: 1
-->[SLIB] debug is enable.
-->[SLIB] temperature offset: 0.00
-->[SLIB] altitude offset: 40.00
-->[SLIB] forced only i2c sensors: 1
-->[SLIB] trying to load I2C sensors..
-->[SLIB] I2C SPS30 starting sensor..
I2C Sending: 0xD1 0x00
I2C Received: 0x02 0x02 length: 2

I2C Sending: 0xD0 0x33
I2C Received: 0x46 0x35 0x46 0x33 0x33 0x39 0x37 0x33 0x33 0x43 0x36 0x46 0x39 0x34 0x31 0x38 0x00 0x00 length: 18

-->[SLIB] SPS30 Serial number : F5F339733C6F9418
I2C Sending: 0xD0 0x02
I2C Received: 0x30 0x30 0x30 0x38 0x30 0x30 0x30 0x30 length: 8

-->[SLIB] SPS30 product name : 00080000
I2C Sending: 0xD1 0x00
I2C Received: 0x02 0x02 length: 2

-->[SLIB] SPS30 firmware level: 2.2
-->[SLIB] SPS30 Hardware level: 0
-->[SLIB] SPS30 SHDLC protocol: 0.0
-->[SLIB] SPS30 Library level : 1.4
I2C Sending: 0xD3 0x04
-->[SLIB] SPS30 Detected SPS30 via I2C.
I2C Sending: 0x00 0x10 0x03 0x00 0xAC
-->[SLIB] SPS30 Measurement OK
-->[SLIB] I2C detected SPS30 sensor :)
-->[SLIB] GCJA5 starting PANASONIC GCJA5 sensor..
-->[SLIB] AM2320 starting AM2320 sensor..
-->[SLIB] SHT31 starting SHT31 sensor..
-->[SLIB] BME280 starting BME280 sensor..
-->[SLIB] BMP280 starting BMP280 sensor..
-->[SLIB] BME680 starting BME680 sensor..
-->[SLIB] AHT10 starting AHT10 sensor..
-->[SLIB] SCD30 starting CO2 SCD30 sensor..
-->[SLIB] I2C detected SCD30 sensor :)
-->[SLIB] SCD30 current temperature offset: 0.00
-->[SLIB] SCD30 current altitude offset: 40
-->[SLIB] SCD30 read > done!
-->[SLIB] SCD4x starting CO2 SCD4x sensor..
[E][SLIB] SCD4x Error Stopping Periodic Measurement : 267
[E][SLIB] SCD4x Received NACK on transmit of address
-->[INFO] PM/CO2 sensor detected: SCD30
-->[WDOG] watchdog config to check each 120 seconds.
-->[WIFI] connecting to BELL 2.4GHz...... done.
-->[WIFI] IP: 192.168.0.227
-->[WIFI] publish interval: 10 sec.
-->[INFO] OTA on: CanAirIO8DA.local with passw: CanAirIO
-->[FOTA] not need update
-->[IFDB] config: [email protected]:8086
-->[IFDB] connecting to influxdb.canair.io.. connected!
-->[MQTT] connecting to mqtt.anaire.org.. connected!
-->[INFO] InfluxDb: enabled
-->[INFO] WiFi : enabled
-->[CONF] response: {
"dname": "",
"stime": 5,
"stype": 0,
"wenb": true,
"ssid": "BELL 2.4GHz",
"ienb": true,
"ifxdb": "canairio",
"ifxip": "influxdb.canair.io",
"ifxpt": 8086,
"geo": "69tmpwc",
"denb": true,
"penb": false,
"i2conly": true,
"toffset": 0,
"altoffset": 40,
"hassip": "",
"hasspt": 1883,
"hassusr": "",
"hasspsw": "",
"lskey": "",
"wmac": 55480,
"anaireid": "69TTTGOTD9B8DA",
"wsta": true,
"vrev": 867,
"vflv": "TTGO_TDISPLAY",
"vtag": "dev",
"vmac": "08:3A:F2:69:B8:DA"
}
-->[BTLE] GATT server ready. (Waiting for client)
-->[TGUI] starting task loop
-->[TGUI] displayed main screen
-->[SLIB] SCD30 read > done!
-->[SLIB] PM1:000 PM25:000 PM10:000 CO2:1210 CO2humi:63.966370% CO2temp:24.265663°C H:0.000000% T:0.000000°C
-->[SLIB] new sample time: 5
-->[SLIB] SCD30 interval time to (2x): 10
-->[MQTT] Anaire sensor payload published. (size: 198)
-->[IFDB] write done.
-->[SLIB] SCD30 read > done!
-->[SLIB] PM1:000 PM25:000 PM10:000 CO2:1249 CO2humi:63.900757% CO2temp:24.265663°C H:0.000000% T:0.000000°C
-->[SLIB] SCD30 read > done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants