Open kolovoz14 opened 4 months ago
Hello August, thank you for the report. I haven't tested this combination of Zephyr version and SCD configuration. Most of my projects are using Zephyr 2.7 - 3.3. Recently I've got some custom boards with SCD40 and SCD41, so I'll try to find some time and debug it. Feel free to let me know if you find anything.
Hi Jan, thanks for the quick response. For the time being I will not have direct access to this sensor therefore I can't do other tests. I'll be looking forward to any updates.
Issue
When using sht41 sensor in "normal" or "low-power" mode everything is working fine. However when I set single-shot mode, CO2 reading values are incorrect:
for measure-mode = "single-shot" (without single-shot-power-down option) co2 value is not changing over time: [00:00:01.081,237] main: scd4x@62 Temperature: 23.54°, Humidity: 66.27%, CO2: 946 ppm
[00:00:06.183,715] main: scd4x@62 Temperature: 23.52°, Humidity: 66.32%, CO2: 946 ppm
[00:00:11.286,193] main: scd4x@62 Temperature: 23.53°, Humidity: 66.42%, CO2: 946 ppm
[00:00:16.388,671] main: scd4x@62 Temperature: 23.52°, Humidity: 66.59%, CO2: 946 ppm
[00:00:21.491,149] main: scd4x@62 Temperature: 23.49°, Humidity: 66.73%, CO2: 946 ppm
[00:00:26.593,627] main: scd4x@62 Temperature: 23.52°, Humidity: 66.95%, CO2: 946 ppm
[00:00:31.696,105] main: scd4x@62 Temperature: 23.49°, Humidity: 66.95%, CO2: 946 ppm
for measure-mode = "single-shot" with single-shot-power-down option co2 value is definitely incorrect: [00:00:01.124,938] main: scd4x@62 Temperature: 23.45°, Humidity: 67.31%, CO2: 47867 ppm
[00:00:06.270,446] main: scd4x@62 Temperature: 23.45°, Humidity: 67.21%, CO2: 47867 ppm
[00:00:11.415,985] main: scd4x@62 Temperature: 23.47°, Humidity: 67.14%, CO2: 48891 ppm
[00:00:16.561,523] main: scd4x@62 Temperature: 23.45°, Humidity: 67.11%, CO2: 48891 ppm
[00:00:21.707,061] main: scd4x@62 Temperature: 23.46°, Humidity: 67.07%, CO2: 48891 ppm
[00:00:26.852,600] main: scd4x@62 Temperature: 23.48°, Humidity: 67.06%, CO2: 48891 ppm
For comparison readings in "low-power" mode: [00:00:05.318,176] main: scd4x@62 Temperature: 27.84°, Humidity: 52.61%, CO2: 944 ppm
[00:00:35.025,909] main: scd4x@62 Temperature: 26.34°, Humidity: 56.92%, CO2: 947 ppm
[00:01:04.733,642] main: scd4x@62 Temperature: 25.41°, Humidity: 59.68%, CO2: 946 ppm
Project configuration
As a base project I used scd4x sample, I didn't modified main file and I used provided prj.conf file. I changed overlay file like this: &i2c0 { status = "okay"; clock-frequency =;
scd4x@62 {
status = "okay";
compatible = "sensirion,scd4x";
reg = <0x62>;
model = "scd41";
altitude = <0>;
measure-mode = "single-shot";
single-shot-power-down;
temperature-offset = <4>;
};
};
Used Stack
Nrf connect sdk 2.6.1 Zephyr 3.5.99
Has this configuration been tested? Or maybe it is a problem related to newer version of zephyr?