What's the story of the BME680?

After a longer log phase with the code from
GitHub - G6EJD/BME680-Example: Using the BME680 to measure temperature, pressure, humdity and air quality (which is the most valuable i found in the net), i'm at a loss...

The air quality (Interiour Air Pollution)is more or less coresponding with humidity (Interiour Humidity), see a graph over 7 days:

  • The delta between airQ and Humidity is varying very little
  • When i torture the sensor with glue, a waterproof pen or a gas lighter there is just a little shift in the raw gas resistence value

Questions: Is the BME680 gas sensor more or less useless or am i on the wrong path?
Any hints for gas/air quality functions for the bme 680?


Here is a basic IAQ formula. Notice how the IAQ is weighted by humidity. That's why there is a track with humidity.

float fCalulate_IAQ_Index( int gasResistance, float Humidity)
  float hum_baseline = 40.0f;
  float hum_weighting = 0.25f;
  float gas_offset = 0.0f;
  float hum_offset = 0.0f;
  float hum_score = 0.0f;
  float gas_score = 0.0f;
  gas_offset = oGasResistanceBaseLine - float( gasResistance );
  hum_offset = float( Humidity ) - hum_baseline;
  // calculate hum_score as distance from hum_baseline
  if ( hum_offset > 0.0f )
    hum_score = 100.0f - hum_baseline - hum_offset;
    hum_score /= ( 100.0f - hum_baseline );
    hum_score *= ( hum_weighting * 100.0f );
  } else {
    hum_score = hum_baseline + hum_offset;
    hum_score /= hum_baseline;
    hum_score *= ( 100.0f - (hum_weighting * 100.0f) );
  //calculate gas score as distance from baseline
  if ( gas_offset > 0.0f )
    gas_score = float( gasResistance ) / oGasResistanceBaseLine;
    gas_score *= ( 100.0f - (hum_weighting * 100.0f ) );
  } else {
    gas_score = 100.0f - ( hum_weighting * 100.0f );
  return ( hum_score + gas_score );
} //void fCalulate_IAQ_Index( int gasResistance, float Humidity):

I do not use the BME680 to do IAQ. The BME680, to create the Index, figures out the Index with the the first 50 or so readings. Thus IAQ is influenced by your start up Air Quality. Do not forget the meaning of the word Index.

I created my Index gas resistance value by taking 100's of readings during the wee hours of a spring morning.

Mashing stuff onto the BME680 will mess with its ability to do IAQ readings. The IAQ readings are done by hot wire.

Here is the Indexed value I use for IAQ, const float oGasResistanceBaseLine = 149598.0f;

Hmm, i see. I do also around 100 measuring before taking data. The code i use is close to yours in functionality.

In my graph the two curves are practically identical!! I don't let your code run yet but it seems to me the results will also follow more or less the humidity?!?

I don't get the physical correlation between air quality and humidity. The air can be bad if it's wet or dry, right? In my understanding these curves should be totally independent?!?

As i remember, the sensor has an internal memory for it's baseline so it can act his age. In general it seems to me that Bosch is hiding the clear function of the sensor and it's algorithms.

Why do we have to calculate IAQ anyway with code from unclear source?
Isn't that a IC with it's own logic? Why not just simple bme.getAirQuality(); ?

Your mentioned const baseline of 149598 is for this specific sensor or do you let the sensor run for three hours before calculating a IAQ?
Do you develop your code? On what base? Did i miss tech specs from Bosch?

In general or do you use a combination of sensors? What else is the bme680 for?
I don't get it with this sensor and it's lib.

Sorry my harsh questions but it's now the fourth time i re-code the bme IAQ function because i don't trust the results after furting into the sensor...
Don't get me wrong, i'm a little upset against Bosch, not you.
Thxs a bunch for your answers!

The readme says:

Neither of these is air quality, but a proxy for air quality. You definitely want more sensors to judge air quality properly. For instance CO2 content, VOCs, NOx, particulates, ozone, etc etc. This is expensive to do properly as it takes a large range of sensors.