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

Incorrect co2 readings for sht41 sensor in "single-shot" mode #2

Open
kolovoz14 opened this issue Jul 22, 2024 · 2 comments
Open

Incorrect co2 readings for sht41 sensor in "single-shot" mode #2

kolovoz14 opened this issue Jul 22, 2024 · 2 comments

Comments

@kolovoz14
Copy link

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 = <I2C_BITRATE_FAST>;
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?

@nobodyguy
Copy link
Owner

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.

@kolovoz14
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants