BME 680 connected and sending measurements but no VOC readings

Hello,

I’m brand new to Arduino and senseBox. I’m running Arduino 1.8.7 on Windows 10. Downgraded wifi firmware to 19.5.4 from 19.6.1. All sensors are working and sending data to openSenseMap except VOC.
https://www.opensensemap.org/explore/5ec0a78f3803f3001b2f296b

Other sensors on BME680 working fine, but no data from the gas sensor.

I am using the sketch emailed to me when I registered the device. I can’t find anything in code that looks awry. Any suggestions? VOC is especially important measurement for my intended field site.

Apologies for writing in English. Happy to receive replies in German or English;Google translate works surprisingly well!

Thank you!

Cheers,
Anne

It appears I have answered my own question.

  1. I ran the sketch bme680test.ino available at this link:
    https://platformio.org/lib/show/1922/Adafruit%20BME680%20Library

This confirmed that all the sensors on BME680 were working correctly.

  1. I Re-ran mcu_component_test and realized that I only had readouts for temperature, pressure, altitude, and humidty. No reading for VOC.

This led me to dig into the sensebox.ino and make revisions based on the bme680test.ino

  1. I made the following changes to the sensebox.ino

Find these lines towards end of sketch:
#ifdef BME680_CONNECTED
BME.begin(0x76);
BME.setTemperatureOversampling(BME680_OS_8X);
BME.setHumidityOversampling(BME680_OS_2X);
BME.setPressureOversampling(BME680_OS_4X);
BME.setIIRFilterSize(BME680_FILTER_SIZE_3);
#endif

Add another line to that section to read to read like this:
#ifdef BME680_CONNECTED
BME.begin(0x76);
BME.setTemperatureOversampling(BME680_OS_8X);
BME.setHumidityOversampling(BME680_OS_2X);
BME.setPressureOversampling(BME680_OS_4X);
BME.setIIRFilterSize(BME680_FILTER_SIZE_3);
BME.setGasHeater(320, 150); // 320*C for 150 ms
#endif

Now find these lines at bottom of sketch:
//-----BME680-----//
#ifdef BME680_CONNECTED
BME.setGasHeater(0, 0);
if( BME.performReading()) {
addMeasurement(LUFTTESENSOR_ID, BME.temperature-1);
addMeasurement(LUFTFESENSOR_ID, BME.humidity);
addMeasurement(ATMLUFSENSOR_ID, BME.pressure/100);
}
BME.setGasHeater(320, 150); // 320*C for 150 ms
if( BME.performReading()) {
addMeasurement(VOCSENSOR_ID, BME.gas_resistance / 1000.0);
}
#endif

Revise those lines to the following:
//-----BME680-----//
#ifdef BME680_CONNECTED
if( BME.performReading()) {
addMeasurement(LUFTTESENSOR_ID, BME.temperature-1);
addMeasurement(LUFTFESENSOR_ID, BME.humidity);
addMeasurement(ATMLUFSENSOR_ID, BME.pressure / 100.0);
addMeasurement(VOCSENSOR_ID, BME.gas_resistance / 1000.0);
}
#endif

This worked for me.

There must be a reason for this line of code: BME.setGasHeater(0, 0);
but when I left it in the sketch, the VOC measurement did not appear. If that is a critical component of the code please let me know as I’m open to other suggestions,

Thanks.
aa

1 Like