I am trying to use the BME688 sensor from Bosch to detect VOCs. I am using the Sparkfun 19096 breakout board, Arduino IDE 1.8.19 and SV-Zanshin library, as recommended. I can read the Temperature, Humidity and Pressure data on the serial monitor but the altitude and gas resistance data are wrong. They show negative numbers (-41.73 and -999.35 for alt and gas, respectively), which I assume it’s variable overflow, and the values don’t change. I can fix the issue with the negative number by modifying the data types and scaling the reading down. However, the fact that the sensor gas resistance reading doesn’t change at all even after 48 hours burn in and exposure to acetone and IPA is worrisome. Here is the full list of the specifications I am using.
macOS Monterey 12.6.2
Arduino IDE version 1.8.19
Sparkfun 19096 - https://www.sparkfun.com/products/19096
Adafruit - https://github.com/adafruit/Adafruit_BME680 - Doesn’t find sensor.
SV-Zanshin - https://github.com/Zanduino/BME680 (recommended by Sparkfun)
Bosch - https://github.com/BoschSensortec/Bosch-BME68x-Library - Doesn’t find sensor.
esp32 WROOM32 - https://www.az-delivery.de/en/products/esp32-developmentboard
Random Tutorials - https://randomnerdtutorials.com/esp32-bme680-sensor-arduino/ - This doesn’t find the sensor.
Arduino Example used:
BME688 I2C demo
Apologies if this was answered already. Many thanks! Greatly appreciated!
Solved! Go to Solution.
There is a wealth of information available on sensor status,in a typical application such as the one described, there should not be any virtual gas values expected. As noted in the data sheet, sensors may introduce virtual values to maintain a consistent sampling rate and predictable device timing.It is strongly recommended to communicate with sensors using the official Bosch Sensortec sensor API/drivers. The BME688 sensor API even offers a function named bme680_get_profile_dur(), which can predict the measurement cycle based on the sensor's configuration. You can find the BME688 driver and sensor API at this link.To benefit from IAQ output, you will also need to utilize the pre-compiled BSEC library provided here: BSEC software download. By examining the example code included in this package, you can see that it utilizes bme688_get_profile_dur() after initiating measurements, then confirms that the sensor successfully returns to sleep mode before reading out the data.
Thank you for your reply! I am now using the official Bosch Sensortec sensor API/drivers for Arduino IDE 2. I am using the MRK Wifi 1010 board and I compile and upload the BSEC2 library basic example that runs smoothly. However, this example doesn't compile for esp32 pico d4.
I only care about the raw data and not the iaq. So, I actually need the BME68x parallel_mode example. I can compile this for MKR and esp32 boards with I2C protocol that gives me the following error: "Sensor error: communication failue".
I attach the schematic for the circuits I am using. I checked using the I2C scanner library and the sensor address is 0x76.
Any suggestions why the BME68x examples don't find the sensor?
I found the solution to the problem.
The example scripts for BME68x library have default communication protocol SPI whereas the BME688 sensor board has I2C. By changing the code in the examples the sensor can read the raw data. I hope this information helps other people with similar problems.