Hello,
I'm running a BME 688 from an ESP32-S3 and failing to get good VOC readings. I wrote some code following the esp-idf guidelines to communicate via I2C, manually reading and writing registers to get temperature, humidity, and VOC data. Temperature and humidity readings work as expected, but the VOC data is very inconsistent and I'm wondering if there might be a problem with the sensor.
The most clear indicator of failure is that the the new_data, heat_stab_r, and gas_valid_r bits all remain at 0 after I try to take a measurement. However, new data still seems to be collected: I'm able to get VOC readings that seem follow environmental changes, but then it gets stuck reading out 12514 when exposed to high VOC levels, and under normal atmosphere conditions it'll randomly jump between being in the 20,000s and low 10,000s (even dipping below the 12514 that I previously thought it only reached under high VOC conditions).
The sensor actually initially gave good readings for multiple consecutive days when run from a Raspberry Pi, that time using code from the Adafruit_CircuitPython_BME680 github repository. However, after transitioning to the ESP32-S3 and getting these weird results, I returned to the Raspberry Pi setup only to find that the BME688 now only ever reads the VOC resistance value to be 5684.
I'm wondering if something from the ESP32-S3 tests could have permanently messed up the VOC sensor? Otherwise I'm not sure why it would now fail with both the ESP32-S3 and Raspberry Pi setups. However I'm not confident in my ESP32-S3 code, so maybe it's still just a software issue. Any guidance would be much appreciated!
I've attached the relevant part of my ESP32-S3 code here, the function where I configuring the sensor and read the VOC data. Note: read_register and write_register are functions I wrote elsewhere in my code, they seem to work fine though (given temperature and humidity readings are fine), so I'm assuming this isn't the problem.