nobodyguy / sensirion_zephyr_drivers

SCD4X and SCD30 sensor drivers for Zephyr RTOS
Apache License 2.0
11 stars 1 forks source link

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

Open kolovoz14 opened 1 month ago

kolovoz14 commented 1 month ago

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 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?

nobodyguy commented 1 month 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.

kolovoz14 commented 1 month ago

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.