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

BME68x values never change #525

Open
szczys opened this issue Dec 18, 2024 · 3 comments
Open

BME68x values never change #525

szczys opened this issue Dec 18, 2024 · 3 comments

Comments

@szczys
Copy link

szczys commented Dec 18, 2024

The environment sensor on the Thingy91x always reads the same value for the temperature, pressure, humidity, iaq, voc, and co2 sensors:

[00:00:34.319,213] <dbg> environmental_module: sample: temp: 20.781536; press: 99331.265625; humidity: 32.830726; iaq: 50; CO2: 500.000000; VOC: 0.499999
...
[00:01:05.287,200] <dbg> environmental_module: sample: temp: 20.781536; press: 99331.265625; humidity: 32.830726; iaq: 50; CO2: 500.000000; VOC: 0.499999
...
[00:04:05.678,894] <dbg> environmental_module: sample: temp: 20.781536; press: 99331.265625; humidity: 32.830726; iaq: 50; CO2: 500.000000; VOC: 0.499999

Testing setup

  1. Download latest release: hello.nrfcloud.com-v2.0.1-thingy91x-nrf91.hex
  2. Use nRF Connect for Desktop and J-Link to flash the binary to Thingy91x
  3. Use serial connection to device to observe logs of the environment data sensor

Expected behavior

All readings should change each time data is fetched from the sensor.

@jhn-nordic
Copy link
Contributor

If I recall correctly the BSEC library is configured in ULP mode. This means that the underlying library only samples every 5 minute. I would expect that if you wait 5 minutes you would see a change in the values.

@szczys
Copy link
Author

szczys commented Dec 19, 2024

Thanks for the info @jhn-nordic. I had previously looked at the Kconfig symbols for the library but I didn't read the help strings and now I see the default ultra-low-power mode is what sets this timing:

image

I have used the low-power setting to increase readings to once every 3 seconds:

CONFIG_BME68X_IAQ_SAMPLE_RATE_LOW_POWER=y

@szczys szczys closed this as completed Dec 19, 2024
@szczys
Copy link
Author

szczys commented Dec 19, 2024

I'm reopening this issue as I continue to observe behavior where the sensor values never change. This is usually the iaq/voc/co2 values that remain the same:

[00:00:58.895,385] <dbg> environmental_module: sample: temp: 21.665002; press: 98518.382812; humidity: 30.730369; iaq: 50; CO2: 500.000000; VOC: 0.499999
...
[00:01:16.041,137] <dbg> environmental_module: sample: temp: 21.797399; press: 98518.445312; humidity: 30.012851; iaq: 50; CO2: 500.000000; VOC: 0.499999
...
[00:01:26.723,541] <dbg> environmental_module: sample: temp: 21.860080; press: 98518.585937; humidity: 29.757345; iaq: 50; CO2: 500.000000; VOC: 0.499999
...
[00:01:37.542,083] <dbg> environmental_module: sample: temp: 22.067419; press: 98518.554687; humidity: 29.355165; iaq: 50; CO2: 500.000000; VOC: 0.499999

Reproduce

  1. Add bsec to the west.yml file
diff --git a/west.yml b/west.yml
index bd6f3c2..2f917ba 100644
--- a/west.yml
+++ b/west.yml
@@ -2,6 +2,9 @@
 # SPDX-License-Identifier: Apache-2.0

 manifest:
+  group-filter:
+    - +bsec
+
   self:
     west-commands: scripts/west-commands.yml
     path: project
  1. Update the BME68x mode setting (both of the following tried separately)

    • BME68X_IAQ_SAMPLE_RATE_LOW_POWER
    • BME68X_IAQ_SAMPLE_RATE_CONTINUOUS
  2. Build application and flash using jlink

    west build -b thingy91x/nrf9151/ns app/
    west flash --erase
    

Actual behavior:

  1. Device runs and connects as expected
  2. Periodic reading are displayed on the serial console (as well as when button is pressed)
  3. iaq/voc/co2 often are stuck at 50/500.000000/0.499999
  4. Sometimes after running for 7-14 minutes these sensors will start to report different values
  5. Sometimes these values will be stuck for over an hour (I haven't tested longer periods)

Expected behavior:

These sensor values should update every 3 seconds or continuously depending on what mode was selected in step 2 above.

@szczys szczys reopened this Dec 19, 2024
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