Gas resistance values from BME688 on Thingy:53

I'm interested in using the gas detector on the BME688 on my Thingy53. I've compiled and run zephyr/samples/sensor/bme680 using nRF Connect toolchain 2.3.0, and it produces reasonable output for temperature, pressure, and humidity. However the gas detector resistance value printed seems very high (more than 12 megaohms) and is unchanging, even when I breathe on it or put it in a sealed container with a few ml of isopropanol.

Does the Zephyr driver need to be updated to deal with differences between the 680 and the 688? This Bosch FAQ seems to suggest so. I understand there will be additional work required to use Bosch's fancy proprietary models, but I'd like to just see if the hardware is working.

Any suggestions for next steps?

Other tickets I found on DevZone:

Similar problem with stuck values, apparently unresolved.

A (partially?) successful attempt to use Bosch libraries, but no confirmation of success reading gas values.

  • Hello, 

    Can you provide more information on your setup? How did you try build the sample? I will try to reproduce on my side.

    Does the Zephyr driver need to be updated to deal with differences between the 680 and the 688?

    According to Adafruit Industries, the BME688 is a drop-in replacement of BME680.

    Note that there is a pull request which adds missing DTS nodelabels found here: https://github.com/zephyrproject-rtos/zephyr/pull/55632


    From what I understand you need to use the BSEC Software which is a library running on the device microcontroller to operate the BME688, to analyze the sensor data and to calculate all sensor outputs like ambient humidity, index for air quality or gas scan results. The BSEC software can be configured by config strings generated by the BME AI-Studio software. The BSEC library offers a complete, easy to integrate software fusion solution out of one hand and thus eliminates the need for own fusion software development. It can be downloaded below together with a comprehensive software implementation guide. See Bosch Sensortec BME688 software product page.

    From our Asset Tracker v2, which uses the BME680, the documentation states: 

    The sensor module supports integration with the BSEC signal processing library using the external sensors, internal convenience API. If enabled, the BSEC library is used instead of the BME680 Zephyr driver to provide sensor readings from the BME680 for temperature, humidity, and atmospheric pressure. In addition, the BSEC driver provides an additional sensor reading, indoor air quality (IAQ), which is a metric given in between 0-500 range, which estimates the air quality of the environment.

    As the BSEC library requires a separate license, it is not a default part of nRF Connect SDK, but can be downloaded externally and imported into the nRF Connect SDK source tree.


    Kind regards,
    Øyvind

  • My setup, build, programming and test is as follows:

    Wiring: Thingy:53 connected via JTAG cable to nRF5340-DK Debug Out, and devkit connected via USB at J2 to computer. Thingy53 switched on, then devkit switched on.

    Software and build: in VSCode with nRF Connect plugin, Welcome>Create a new application, pick SDK 2.3.0, in Application Template pick zephyr/samples/sensor/bme680. Pick an application name. Then under Applications>bme680 (or whatever name), create build configuration with board thingy53_nrf5340_cpuapp_ns, otherwise default arguments, then Build Configuration. 

    Programming: In VSCode, Actions>Flash (erase and flash to board).

    Testing: Power off and unplug devices. Plug Thingy53 USB-C direct to computer and power on. Find the appropriate COM port in nRF Terminal in VSCode. Note values being printed on screen. Note T and H values shift when exhaling into air slots on back of Thingy53. Note the G value does not. I'd expect some kind of deflection even from breath, but organic solvent vapors should really do something.

    In my example here, the temperature changes from 25 to 30 C and the humidity from 31% to 81%.

    From what I understand about these sensors, the BME688 is very similar but not quite identical hardware/interface wise to the 680. The 688 datasheet mentions a VARIANT_ID register which returns 0x01 on the 688, and Bosch's API does query this and do something with it. I didn't see anything similar in the Zephyr 680 driver, though clearly lots of things about the hardware and driver are working.

    I'll check out Asset Tracker v2 example. I didn't know the BSEC stuff swapped out the driver as well, that's promising.

  • DougR said:
    Software and build: in VSCode with nRF Connect plugin, Welcome>Create a new application, pick SDK 2.3.0, in Application Template pick zephyr/samples/sensor/bme680. Pick an application name. Then under Applications>bme680 (or whatever name), create build configuration with board thingy53_nrf5340_cpuapp_ns, otherwise default arguments, then Build Configuration

    Following your setup I was able to reproduce the issue on my side. Tested with Thingy:53 v0.7.0 og v1.0.0 

        
    //Thingy:53 v0.7.0
    
    T: 25.780000; P: 99.532000; H: 23.314000; G: 12976914.000000
    T: 26.070000; P: 99.527000; H: 22.937000; G: 12976914.000000
    T: 26.370000; P: 99.527000; H: 22.528000; G: 12976914.000000
    T: 26.630000; P: 99.523000; H: 22.151000; G: 12976914.000000
    T: 26.860000; P: 99.527000; H: 21.812000; G: 12976914.000000
    T: 27.080000; P: 99.525000; H: 21.489000; G: 12976914.000000
    T: 27.270000; P: 99.523000; H: 21.195000; G: 12976914.000000
    T: 27.430000; P: 99.525000; H: 20.908000; G: 12976914.000000
    T: 27.620000; P: 99.527000; H: 20.686000; G: 12976914.000000
    T: 27.790000; P: 99.528000; H: 20.496000; G: 12976914.000000
    T: 27.950000; P: 99.525000; H: 20.298000; G: 12976914.000000
    T: 28.100000; P: 99.525000; H: 20.119000; G: 12976914.000000
    T: 28.270000; P: 99.527000; H: 19.947000; G: 12976914.000000
    T: 28.410000; P: 99.527000; H: 19.757000; G: 12976914.000000
    T: 28.530000; P: 99.525000; H: 19.574000; G: 12976914.000000
    T: 28.650000; P: 99.523000; H: 19.404000; G: 12976914.000000
    T: 28.770000; P: 99.523000; H: 19.240000; G: 12976914.000000
    T: 28.910000; P: 99.525000; H: 19.092000; G: 12976914.000000
    T: 29.010000; P: 99.527000; H: 18.940000; G: 12976914.000000
    T: 29.140000; P: 99.527000; H: 18.816000; G: 12976914.000000
    T: 29.230000; P: 99.527000; H: 18.691000; G: 12976914.000000
    T: 29.330000; P: 99.528000; H: 18.565000; G: 12976914.000000
    T: 29.420000; P: 99.530000; H: 18.450000; G: 12976914.000000
    T: 29.490000; P: 99.528000; H: 18.327000; G: 12976914.000000
    T: 29.590000; P: 99.525000; H: 18.239000; G: 12976914.000000
    T: 29.670000; P: 99.527000; H: 18.137000; G: 12976914.000000
    T: 29.700000; P: 99.528000; H: 18.053000; G: 12976914.000000
    T: 29.710000; P: 99.528000; H: 17.963000; G: 12976914.000000
    T: 29.770000; P: 99.525000; H: 17.891000; G: 12976914.000000
    T: 29.800000; P: 99.527000; H: 17.838000; G: 12976914.000000
    T: 29.830000; P: 99.527000; H: 17.804000; G: 12976914.000000
    T: 29.850000; P: 99.528000; H: 17.742000; G: 12976914.000000
    T: 29.890000; P: 99.528000; H: 17.708000; G: 12976914.000000
    T: 29.950000; P: 99.528000; H: 17.650000; G: 12976914.000000
    T: 30.030000; P: 99.528000; H: 17.601000; G: 12976914.000000
    T: 30.150000; P: 99.527000; H: 17.557000; G: 12976914.000000
    T: 30.270000; P: 99.525000; H: 17.503000; G: 12976914.000000
    T: 30.320000; P: 99.527000; H: 17.446000; G: 12976914.000000
    T: 30.390000; P: 99.525000; H: 17.365000; G: 12976914.000000
    T: 30.430000; P: 99.527000; H: 17.312000; G: 12976914.000000
    T: 30.500000; P: 99.528000; H: 17.256000; G: 12976914.000000
    T: 30.520000; P: 99.528000; H: 17.197000; G: 12976914.000000
    T: 30.570000; P: 99.525000; H: 17.158000; G: 12976914.000000
    T: 30.640000; P: 99.527000; H: 17.098000; G: 12976914.000000
    T: 30.630000; P: 99.527000; H: 17.038000; G: 12976914.000000
    T: 30.660000; P: 99.528000; H: 17.025000; G: 12976914.000000
    T: 30.640000; P: 99.527000; H: 16.963000; G: 12976914.000000
    T: 30.660000; P: 99.527000; H: 16.925000; G: 12976914.000000
    T: 30.630000; P: 99.527000; H: 16.888000; G: 12976914.000000
    T: 30.630000; P: 99.527000; H: 16.878000; G: 12976914.000000
    T: 30.660000; P: 99.528000; H: 16.865000; G: 12976914.000000
    T: 30.720000; P: 99.527000; H: 16.859000; G: 12976914.000000
    T: 30.750000; P: 99.527000; H: 16.810000; G: 12976914.000000
    T: 30.810000; P: 99.527000; H: 16.793000; G: 12976914.000000
    T: 30.870000; P: 99.523000; H: 16.763000; G: 12976914.000000
    T: 30.950000; P: 99.523000; H: 16.745000; G: 12976914.000000
    T: 31.000000; P: 99.523000; H: 16.704000; G: 12976914.000000
    T: 31.020000; P: 99.523000; H: 16.670000; G: 12976914.000000
    T: 31.030000; P: 99.527000; H: 16.625000; G: 12976914.000000
    T: 31.100000; P: 99.525000; H: 16.584000; G: 12976914.000000
    T: 31.150000; P: 99.525000; H: 16.548000; G: 12976914.000000
    T: 31.190000; P: 99.527000; H: 16.525000; G: 12976914.000000
    T: 31.190000; P: 99.527000; H: 16.470000; G: 12976914.000000
    T: 31.200000; P: 99.525000; H: 16.457000; G: 12976914.000000
    T: 31.230000; P: 99.527000; H: 16.422000; G: 12976914.000000
    T: 31.180000; P: 99.523000; H: 16.400000; G: 12976914.000000
    T: 31.220000; P: 99.523000; H: 16.376000; G: 12976914.000000
    T: 31.280000; P: 99.525000; H: 16.355000; G: 12976914.000000
    T: 31.320000; P: 99.527000; H: 16.348000; G: 12976914.000000
    T: 31.370000; P: 99.523000; H: 16.310000; G: 12976914.000000
    T: 31.390000; P: 99.525000; H: 16.296000; G: 12976914.000000
    T: 31.380000; P: 99.521000; H: 16.251000; G: 12976914.000000
    T: 31.360000; P: 99.523000; H: 16.231000; G: 12976914.000000
    T: 31.410000; P: 99.525000; H: 16.228000; G: 12976914.000000
    T: 31.440000; P: 99.525000; H: 16.204000; G: 12976914.000000
    T: 31.470000; P: 99.527000; H: 16.187000; G: 12976914.000000
    T: 31.490000; P: 99.525000; H: 16.173000; G: 12976914.000000
    T: 31.490000; P: 99.527000; H: 16.138000; G: 12976914.000000
    T: 31.510000; P: 99.523000; H: 16.114000; G: 12976914.000000
    T: 31.530000; P: 99.523000; H: 16.094000; G: 12976914.000000
    T: 31.520000; P: 99.521000; H: 16.110000; G: 12976914.000000
    T: 31.510000; P: 99.525000; H: 16.105000; G: 12976914.000000
    T: 31.560000; P: 99.525000; H: 16.102000; G: 12976914.000000
    T: 31.560000; P: 99.523000; H: 16.092000; G: 12976914.000000
    T: 31.570000; P: 99.527000; H: 16.092000; G: 12976914.000000
    T: 31.600000; P: 99.525000; H: 16.085000; G: 12976914.000000
    T: 31.640000; P: 99.527000; H: 16.066000; G: 12976914.000000
    T: 31.670000; P: 99.528000; H: 16.049000; G: 12976914.000000
    T: 31.650000; P: 99.528000; H: 16.048000; G: 12976914.000000
    T: 31.640000; P: 99.528000; H: 16.047000; G: 12976914.000000
    T: 31.680000; P: 99.532000; H: 16.039000; G: 12976914.000000
    T: 31.730000; P: 99.528000; H: 16.015000; G: 12976914.000000
    T: 31.750000; P: 99.530000; H: 16.002000; G: 12976914.000000
    T: 31.780000; P: 99.528000; H: 15.969000; G: 12976914.000000
    T: 31.830000; P: 99.528000; H: 15.957000; G: 12976914.000000
    T: 31.830000; P: 99.527000; H: 15.947000; G: 12976914.000000
    T: 31.820000; P: 99.527000; H: 15.917000; G: 12976914.000000
    T: 31.850000; P: 99.525000; H: 15.927000; G: 12976914.000000
    T: 31.800000; P: 99.525000; H: 15.986000; G: 12976914.000000
    T: 31.800000; P: 99.525000; H: 16.001000; G: 12976914.000000
    T: 31.830000; P: 99.527000; H: 15.972000; G: 12976914.000000
    T: 31.860000; P: 99.528000; H: 15.943000; G: 12976914.000000
    T: 31.890000; P: 99.527000; H: 15.915000; G: 12976914.000000
    T: 31.890000; P: 99.525000; H: 15.860000; G: 12976914.000000
    T: 31.970000; P: 99.525000; H: 15.825000; G: 12976914.000000
    T: 32.050000; P: 99.527000; H: 15.790000; G: 12976914.000000
    T: 32.120000; P: 99.527000; H: 15.774000; G: 12976914.000000
    T: 32.180000; P: 99.528000; H: 15.712000; G: 12976914.000000
    T: 32.170000; P: 99.525000; H: 15.666000; G: 12976914.000000
    T: 32.210000; P: 99.527000; H: 15.639000; G: 12976914.000000
    T: 32.210000; P: 99.527000; H: 15.589000; G: 12976914.000000
    T: 32.180000; P: 99.527000; H: 15.568000; G: 12976914.000000
    T: 32.150000; P: 99.525000; H: 15.553000; G: 12976914.000000
    T: 32.190000; P: 99.525000; H: 15.553000; G: 12976914.000000
    T: 32.290000; P: 99.528000; H: 15.564000; G: 12976914.000000
    T: 32.350000; P: 99.528000; H: 15.527000; G: 12976914.000000
    T: 32.400000; P: 99.527000; H: 15.496000; G: 12976914.000000
    T: 32.380000; P: 99.528000; H: 15.450000; G: 12976914.000000
    T: 32.400000; P: 99.528000; H: 15.422000; G: 12976914.000000
    T: 32.370000; P: 99.527000; H: 15.405000; G: 12976914.000000
    T: 32.440000; P: 99.525000; H: 15.413000; G: 12976914.000000
    T: 32.410000; P: 99.523000; H: 15.392000; G: 12976914.000000
    T: 32.420000; P: 99.528000; H: 15.357000; G: 12976914.000000
    T: 32.480000; P: 99.528000; H: 15.376000; G: 12976914.000000
    T: 32.540000; P: 99.528000; H: 15.368000; G: 12976914.000000
    T: 32.590000; P: 99.525000; H: 15.346000; G: 12976914.000000
    T: 32.670000; P: 99.528000; H: 15.285000; G: 12976914.000000
    
    
    

    //Thingy:53 v1.0.0
    
    T: 26.580000; P: 99.584000; H: 22.168000; G: 12946860.000000
    T: 26.770000; P: 99.582000; H: 22.306000; G: 12946860.000000
    T: 26.920000; P: 99.588000; H: 22.207000; G: 12946860.000000
    T: 27.050000; P: 99.580000; H: 21.953000; G: 12946860.000000
    T: 27.130000; P: 99.580000; H: 21.639000; G: 12946860.000000
    T: 27.210000; P: 99.580000; H: 21.257000; G: 12946860.000000
    T: 27.300000; P: 99.582000; H: 20.941000; G: 12946860.000000
    T: 27.420000; P: 99.582000; H: 20.693000; G: 12946860.000000
    T: 27.520000; P: 99.582000; H: 20.525000; G: 12946860.000000
    T: 27.590000; P: 99.580000; H: 20.356000; G: 12946860.000000
    T: 27.640000; P: 99.584000; H: 20.174000; G: 12946860.000000
    T: 27.690000; P: 99.580000; H: 20.031000; G: 12946860.000000
    T: 27.780000; P: 99.584000; H: 19.960000; G: 12946860.000000
    T: 27.860000; P: 99.582000; H: 19.902000; G: 12946860.000000
    T: 27.940000; P: 99.580000; H: 19.815000; G: 12946860.000000
    T: 27.960000; P: 99.580000; H: 19.719000; G: 12946860.000000
    T: 27.990000; P: 99.582000; H: 19.582000; G: 12946860.000000
    T: 28.070000; P: 99.584000; H: 19.473000; G: 12946860.000000
    T: 28.170000; P: 99.582000; H: 19.384000; G: 12946860.000000
    T: 28.240000; P: 99.584000; H: 19.302000; G: 12946860.000000
    T: 28.310000; P: 99.584000; H: 19.235000; G: 12946860.000000
    T: 28.380000; P: 99.582000; H: 19.172000; G: 12946860.000000
    T: 28.430000; P: 99.586000; H: 19.073000; G: 12946860.000000
    T: 28.440000; P: 99.584000; H: 18.985000; G: 12946860.000000
    T: 28.480000; P: 99.582000; H: 18.927000; G: 12946860.000000
    T: 28.540000; P: 99.582000; H: 18.858000; G: 12946860.000000
    T: 28.620000; P: 99.582000; H: 18.832000; G: 12946860.000000
    T: 28.690000; P: 99.582000; H: 18.763000; G: 12946860.000000
    T: 28.740000; P: 99.578000; H: 18.685000; G: 12946860.000000
    T: 28.750000; P: 99.580000; H: 18.614000; G: 12946860.000000
    T: 28.780000; P: 99.584000; H: 18.534000; G: 12946860.000000
    T: 28.830000; P: 99.582000; H: 18.500000; G: 12946860.000000
    T: 28.890000; P: 99.582000; H: 18.448000; G: 12946860.000000
    T: 28.780000; P: 99.584000; H: 18.391000; G: 12946860.000000
    T: 28.720000; P: 99.576000; H: 18.458000; G: 12946860.000000
    T: 28.740000; P: 99.576000; H: 18.588000; G: 12946860.000000
    T: 28.860000; P: 99.582000; H: 18.650000; G: 12946860.000000
    T: 28.910000; P: 99.580000; H: 18.577000; G: 12946860.000000
    T: 28.970000; P: 99.582000; H: 18.477000; G: 12946860.000000
    T: 29.030000; P: 99.580000; H: 18.389000; G: 12946860.000000
    T: 29.100000; P: 99.578000; H: 18.317000; G: 12946860.000000
    T: 29.140000; P: 99.580000; H: 18.246000; G: 12946860.000000
    T: 29.210000; P: 99.576000; H: 18.190000; G: 12946860.000000
    T: 29.260000; P: 99.574000; H: 18.137000; G: 12946860.000000
    T: 29.350000; P: 99.578000; H: 18.085000; G: 12946860.000000
    T: 29.270000; P: 99.574000; H: 18.000000; G: 12946860.000000
    T: 29.320000; P: 99.572000; H: 17.930000; G: 12946860.000000
    T: 29.350000; P: 99.578000; H: 17.897000; G: 12946860.000000
    T: 29.420000; P: 99.576000; H: 17.865000; G: 12946860.000000
    T: 29.500000; P: 99.572000; H: 17.838000; G: 12946860.000000
    T: 29.520000; P: 99.580000; H: 17.784000; G: 12946860.000000
    T: 29.540000; P: 99.580000; H: 17.775000; G: 12946860.000000
    T: 29.600000; P: 99.580000; H: 17.770000; G: 12946860.000000
    T: 29.520000; P: 99.580000; H: 17.739000; G: 12946860.000000
    T: 29.380000; P: 99.582000; H: 17.731000; G: 12946860.000000
    T: 29.410000; P: 99.580000; H: 17.824000; G: 12946860.000000
    T: 29.310000; P: 99.578000; H: 17.878000; G: 12946860.000000
    T: 29.410000; P: 99.582000; H: 17.906000; G: 12946860.000000
    T: 29.500000; P: 99.584000; H: 17.981000; G: 12946860.000000
    T: 29.610000; P: 99.586000; H: 17.997000; G: 12946860.000000
    T: 29.680000; P: 99.586000; H: 17.961000; G: 12946860.000000
    T: 29.660000; P: 99.584000; H: 17.857000; G: 12946860.000000
    T: 29.720000; P: 99.582000; H: 17.750000; G: 12946860.000000
    T: 29.740000; P: 99.584000; H: 17.660000; G: 12946860.000000
    T: 29.800000; P: 99.582000; H: 17.606000; G: 12946860.000000
    T: 29.850000; P: 99.584000; H: 17.538000; G: 12946860.000000
    T: 29.880000; P: 99.586000; H: 17.493000; G: 12946860.000000
    T: 29.910000; P: 99.588000; H: 17.440000; G: 12946860.000000
    T: 29.890000; P: 99.584000; H: 17.398000; G: 12946860.000000
    T: 29.840000; P: 99.586000; H: 17.429000; G: 12946860.000000
    T: 29.760000; P: 99.586000; H: 17.396000; G: 12946860.000000
    T: 29.630000; P: 99.586000; H: 17.393000; G: 12946860.000000
    T: 29.740000; P: 99.586000; H: 17.426000; G: 12946860.000000
    T: 29.770000; P: 99.586000; H: 17.506000; G: 12946860.000000
    T: 29.820000; P: 99.586000; H: 17.601000; G: 12946860.000000
    T: 29.790000; P: 99.584000; H: 17.614000; G: 12946860.000000
    T: 29.880000; P: 99.584000; H: 17.549000; G: 12946860.000000
    T: 29.930000; P: 99.586000; H: 17.495000; G: 12946860.000000
    T: 30.000000; P: 99.588000; H: 17.430000; G: 12946860.000000
    T: 30.050000; P: 99.586000; H: 17.352000; G: 12946860.000000
    T: 30.100000; P: 99.586000; H: 17.276000; G: 12946860.000000
    T: 30.120000; P: 99.589000; H: 17.237000; G: 12946860.000000
    T: 30.140000; P: 99.588000; H: 17.167000; G: 12946860.000000
    T: 30.120000; P: 99.588000; H: 17.120000; G: 12946860.000000
    T: 30.070000; P: 99.586000; H: 17.149000; G: 12946860.000000
    T: 29.820000; P: 99.582000; H: 17.281000; G: 12946860.000000
    T: 29.780000; P: 99.584000; H: 17.395000; G: 12946860.000000
    T: 29.820000; P: 99.586000; H: 17.530000; G: 12946860.000000
    T: 29.700000; P: 99.584000; H: 17.570000; G: 12946860.000000
    T: 29.720000; P: 99.586000; H: 17.551000; G: 12946860.000000
    T: 29.860000; P: 99.584000; H: 17.533000; G: 12946860.000000
    T: 29.850000; P: 99.584000; H: 17.472000; G: 12946860.000000
    T: 29.870000; P: 99.582000; H: 17.412000; G: 12946860.000000
    T: 29.960000; P: 99.586000; H: 17.370000; G: 12946860.000000
    T: 30.030000; P: 99.586000; H: 17.324000; G: 12946860.000000
    T: 30.100000; P: 99.586000; H: 17.271000; G: 12946860.000000
    T: 30.140000; P: 99.588000; H: 17.207000; G: 12946860.000000
    T: 30.220000; P: 99.588000; H: 17.151000; G: 12946860.000000
    T: 30.240000; P: 99.584000; H: 17.117000; G: 12946860.000000
    T: 30.300000; P: 99.589000; H: 17.089000; G: 12946860.000000
    T: 30.300000; P: 99.586000; H: 17.074000; G: 12946860.000000
    T: 30.350000; P: 99.588000; H: 17.046000; G: 12946860.000000
    T: 30.400000; P: 99.586000; H: 17.041000; G: 12946860.000000
    T: 30.360000; P: 99.588000; H: 16.971000; G: 12946860.000000
    T: 30.410000; P: 99.588000; H: 16.937000; G: 12946860.000000
    T: 30.440000; P: 99.586000; H: 16.914000; G: 12946860.000000
    T: 30.450000; P: 99.588000; H: 16.915000; G: 12946860.000000
    T: 30.460000; P: 99.588000; H: 16.940000; G: 12946860.000000
    T: 30.480000; P: 99.589000; H: 16.957000; G: 12946860.000000
    T: 30.490000; P: 99.588000; H: 16.943000; G: 12946860.000000
    T: 30.480000; P: 99.586000; H: 16.916000; G: 12946860.000000
    T: 30.490000; P: 99.586000; H: 16.893000; G: 12946860.000000
    T: 30.520000; P: 99.586000; H: 16.873000; G: 12946860.000000
    T: 30.540000; P: 99.586000; H: 16.835000; G: 12946860.000000
    T: 30.510000; P: 99.586000; H: 16.806000; G: 12946860.000000
    T: 30.490000; P: 99.584000; H: 16.771000; G: 12946860.000000
    T: 30.440000; P: 99.580000; H: 16.873000; G: 12946860.000000
    T: 30.420000; P: 99.584000; H: 16.942000; G: 12946860.000000
    T: 30.450000; P: 99.580000; H: 16.961000; G: 12946860.000000
    T: 30.470000; P: 99.580000; H: 16.951000; G: 12946860.000000
    T: 30.460000; P: 99.582000; H: 16.925000; G: 12946860.000000
    T: 30.460000; P: 99.582000; H: 16.884000; G: 12946860.000000
    T: 30.520000; P: 99.586000; H: 16.868000; G: 12946860.000000
    T: 30.430000; P: 99.582000; H: 16.813000; G: 12946860.000000
    T: 30.440000; P: 99.582000; H: 16.818000; G: 12946860.000000
    T: 30.470000; P: 99.580000; H: 16.809000; G: 12946860.000000
    T: 30.500000; P: 99.584000; H: 16.796000; G: 12946860.000000
    T: 30.420000; P: 99.584000; H: 16.770000; G: 12946860.000000
    T: 30.410000; P: 99.582000; H: 16.760000; G: 12946860.000000
    T: 30.460000; P: 99.582000; H: 16.737000; G: 12946860.000000
    T: 30.490000; P: 99.582000; H: 16.740000; G: 12946860.000000
    T: 30.490000; P: 99.584000; H: 16.725000; G: 12946860.000000
    T: 30.500000; P: 99.584000; H: 16.716000; G: 12946860.000000
    T: 30.470000; P: 99.580000; H: 16.693000; G: 12946860.000000
    T: 30.440000; P: 99.580000; H: 16.681000; G: 12946860.000000
    T: 30.460000; P: 99.584000; H: 16.697000; G: 12946860.000000
    T: 30.520000; P: 99.582000; H: 16.731000; G: 12946860.000000
    T: 30.560000; P: 99.582000; H: 16.729000; G: 12946860.000000
    T: 30.540000; P: 99.582000; H: 16.708000; G: 12946860.000000
    T: 30.580000; P: 99.580000; H: 16.688000; G: 12946860.000000
    T: 30.550000; P: 99.582000; H: 16.647000; G: 12946860.000000
    T: 30.490000; P: 99.584000; H: 16.619000; G: 12946860.000000
    T: 30.280000; P: 99.586000; H: 16.677000; G: 12946860.000000
    T: 30.320000; P: 99.584000; H: 16.782000; G: 12946860.000000
    T: 30.390000; P: 99.582000; H: 16.852000; G: 12946860.000000
    T: 30.440000; P: 99.582000; H: 16.838000; G: 12946860.000000
    T: 30.450000; P: 99.584000; H: 16.819000; G: 12946860.000000
    T: 30.450000; P: 99.584000; H: 16.763000; G: 12946860.000000
    T: 30.510000; P: 99.586000; H: 16.755000; G: 12946860.000000
    T: 30.510000; P: 99.586000; H: 16.745000; G: 12946860.000000
    T: 30.510000; P: 99.588000; H: 16.735000; G: 12946860.000000
    T: 30.460000; P: 99.588000; H: 16.707000; G: 12946860.000000
    T: 30.480000; P: 99.589000; H: 16.684000; G: 12946860.000000
    T: 30.520000; P: 99.588000; H: 16.671000; G: 12946860.000000
    T: 30.560000; P: 99.582000; H: 16.679000; G: 12946860.000000
    T: 30.570000; P: 99.584000; H: 16.661000; G: 12946860.000000
    T: 30.590000; P: 99.584000; H: 16.659000; G: 12946860.000000
    T: 30.630000; P: 99.586000; H: 16.671000; G: 12946860.000000
    T: 30.650000; P: 99.588000; H: 16.668000; G: 12946860.000000
    T: 30.670000; P: 99.586000; H: 16.659000; G: 12946860.000000
    T: 30.710000; P: 99.589000; H: 16.661000; G: 12946860.000000
    T: 30.730000; P: 99.589000; H: 16.625000; G: 12946860.000000
    T: 30.740000; P: 99.589000; H: 16.615000; G: 12946860.000000
    T: 30.760000; P: 99.589000; H: 16.587000; G: 12946860.000000
    T: 30.770000; P: 99.588000; H: 16.557000; G: 12946860.000000
    T: 30.750000; P: 99.586000; H: 16.510000; G: 12946860.000000
    T: 30.710000; P: 99.584000; H: 16.494000; G: 12946860.000000
    T: 30.730000; P: 99.582000; H: 16.503000; G: 12946860.000000
    T: 30.740000; P: 99.584000; H: 16.484000; G: 12946860.000000
    T: 30.710000; P: 99.582000; H: 16.484000; G: 12946860.000000
    T: 30.650000; P: 99.580000; H: 16.481000; G: 12946860.000000
    T: 30.660000; P: 99.580000; H: 16.481000; G: 12946860.000000
    T: 30.610000; P: 99.580000; H: 16.478000; G: 12946860.000000
    T: 30.630000; P: 99.578000; H: 16.489000; G: 12946860.000000
    T: 30.670000; P: 99.582000; H: 16.502000; G: 12946860.000000
    T: 30.670000; P: 99.580000; H: 16.517000; G: 12946860.000000
    T: 30.690000; P: 99.582000; H: 16.539000; G: 12946860.000000
    T: 30.730000; P: 99.584000; H: 16.523000; G: 12946860.000000
    T: 30.610000; P: 99.578000; H: 16.493000; G: 12946860.000000
    T: 30.580000; P: 99.582000; H: 16.511000; G: 12946860.000000
    T: 30.470000; P: 99.580000; H: 16.470000; G: 12946860.000000
    T: 30.440000; P: 99.582000; H: 16.473000; G: 12946860.000000
    T: 30.490000; P: 99.580000; H: 16.518000; G: 12946860.000000
    T: 30.530000; P: 99.584000; H: 16.534000; G: 12946860.000000
    T: 30.570000; P: 99.584000; H: 16.525000; G: 12946860.000000
    T: 30.520000; P: 99.582000; H: 16.514000; G: 12946860.000000
    T: 30.560000; P: 99.582000; H: 16.491000; G: 12946860.000000
    T: 30.590000; P: 99.580000; H: 16.487000; G: 12946860.000000
    T: 30.570000; P: 99.582000; H: 16.510000; G: 12946860.000000
    T: 30.590000; P: 99.580000; H: 16.481000; G: 12946860.000000
    T: 30.570000; P: 99.580000; H: 16.510000; G: 12946860.000000
    T: 30.590000; P: 99.580000; H: 16.497000; G: 12946860.000000
    T: 30.640000; P: 99.582000; H: 16.494000; G: 12946860.000000
    T: 30.670000; P: 99.578000; H: 16.491000; G: 12946860.000000
    T: 30.670000; P: 99.580000; H: 16.502000; G: 12946860.000000
    T: 30.600000; P: 99.580000; H: 16.478000; G: 12946860.000000
    T: 30.590000; P: 99.582000; H: 16.487000; G: 12946860.000000
    T: 30.670000; P: 99.582000; H: 16.502000; G: 12946860.000000
    T: 30.640000; P: 99.582000; H: 16.540000; G: 12946860.000000
    T: 30.680000; P: 99.584000; H: 16.588000; G: 12946860.000000
    T: 30.690000; P: 99.584000; H: 16.624000; G: 12946860.000000
    T: 30.720000; P: 99.582000; H: 16.656000; G: 12946860.000000
    T: 30.710000; P: 99.582000; H: 16.661000; G: 12946860.000000
    T: 30.700000; P: 99.584000; H: 16.620000; G: 12946860.000000
    T: 30.720000; P: 99.586000; H: 16.586000; G: 12946860.000000
    T: 30.720000; P: 99.582000; H: 16.555000; G: 12946860.000000
    T: 30.720000; P: 99.586000; H: 16.510000; G: 12946860.000000
    T: 30.740000; P: 99.588000; H: 16.474000; G: 12946860.000000
    T: 30.700000; P: 99.588000; H: 16.453000; G: 12946860.000000
    T: 30.660000; P: 99.584000; H: 16.440000; G: 12946860.000000
    T: 30.620000; P: 99.584000; H: 16.437000; G: 12946860.000000
    T: 30.630000; P: 99.588000; H: 16.448000; G: 12946860.000000

  • Hi  I had a same problem.

    There's small difference between bme680 and bme688's register map.

    If you want to use gas sensor, you should set "run_gas" register in GAS_1_CTRL (0x70).

    However, ncs-zephyr's driver (which is in this directory : zephyr/drivers/sensor/bme680/bme680.c)
    doesn't set the "run_gas" bit field. 

    Because It's been to long that I figured this problem, I'm not sure the register's address and value was correct. But I ensure that it is not appropriate to use directly zephyr's bme680 driver to bme688.

    I changed the source like this which are in "zephyr/drivers/sensor/bme680"

    =========== ORIGIN  ===========

    bme680.c

    err = bme680_reg_write(dev, BME680_REG_CTRL_HUM, BME680_HUMIDITY_OVER);
    	if (err < 0) {
    		return err;
    	}
    
    	err = bme680_reg_write(dev, BME680_REG_CONFIG, BME680_CONFIG_VAL);
    	if (err < 0) {
    		return err;
    	}
    
    	err = bme680_reg_write(dev, BME680_REG_CTRL_GAS_1,
    			       BME680_CTRL_GAS_1_VAL);
    	if (err < 0) {
    		return err;
    	}
    
    	err = bme680_reg_write(dev, BME680_REG_RES_HEAT0,
    			       bme680_calc_res_heat(data, BME680_HEATR_TEMP));
    	if (err < 0) {
    		return err;
    	}

    bme680.h

    #define BME680_CHIP_ID 0x61
    
    #define BME680_LEN_FIELD     15
    #define BME680_LEN_COEFF_ALL 42
    #define BME680_LEN_COEFF1    23
    #define BME680_LEN_COEFF2    14
    #define BME680_LEN_COEFF3    5

    =========== NEW  ===========

    bme680.c

    	err = bme680_reg_write(dev, BME680_REG_CTRL_HUM, BME680_HUMIDITY_OVER);
    	if (err < 0) {
    		return err;
    	}
    
    	err = bme680_reg_write(dev, BME680_REG_CONFIG, BME680_CONFIG_VAL);
    	if (err < 0) {
    		return err;
    	}
    
    	// err = bme680_reg_write(dev, BME680_REG_CTRL_GAS_1,
    	// 		       BME680_CTRL_GAS_1_VAL);
    	// if (err < 0) {
    	// 	return err;
    	// }
    	err = bme680_reg_write(dev, BME680_REG_CTRL_GAS_0,
    			       0); // BME68X_ENABLE_HEATER	0x00
    	if (err < 0) {
    		return err;
    	}
    
    	uint8_t gas_1_ctrl_val;
    	gas_1_ctrl_val = BME680_CTRL_GAS_1_VAL | 0xa0;
    	err = bme680_reg_write(dev, BME680_REG_CTRL_GAS_1, gas_1_ctrl_val);
    	if (err < 0) {
    		return err;
    	}
    
    	err = bme680_reg_write(dev, BME680_REG_RES_HEAT0,
    			       bme680_calc_res_heat(data, BME680_HEATR_TEMP));
    	if (err < 0) {
    		return err;
    	}
    

    bme680.h

    // #define BME680_LEN_FIELD                15
    #define BME680_LEN_FIELD     17
    #define BME680_LEN_COEFF_ALL 42
    #define BME680_LEN_COEFF1    23
    #define BME680_LEN_COEFF2    14
    #define BME680_LEN_COEFF3    5

    Check the datasheet and register map I enveloped.
    bme688 --> BME688 Datasheet (bosch-sensortec.com)

    bme680 --> Newsletter-Template-DE (adafruit.com)

    Sincerely,

  • Sorry to jump in directly here but as I am also having Thingy:53 board and interested in BME688 driver.

    I tried using the /bme680 driver example in the samples folder and faced the same issue. I think is right that the driver needs to be modified for adjusting to BME688 sensor.

    Another option is that Bosch also provides basic API to read sensor data. That could be also done but I have little experience on this front. I saw Edge-impulse firmware on Github has followed this direction.

Related