Adafruit bme680 Gas sensor

Hello a friend of mine gave me a adafruit bme680 sensor. That has temperature, Humidity, Gas, Preasure, and Altitude. Nice sensor. Here Is the link to it. I'm using the adafruit bme680 Library here. I have uploaded the example sketch.

  This is a library for the BME680 gas, humidity, temperature & pressure sensor

  Designed specifically to work with the Adafruit BME680 Breakout

  These sensors use I2C or SPI to communicate, 2 or 4 pins are required
  to interface.

  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing products
  from Adafruit!

  Written by Limor Fried & Kevin Townsend for Adafruit Industries.
  BSD license, all text above must be included in any redistribution

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include "Adafruit_BME680.h"

#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

#define SEALEVELPRESSURE_HPA (1013.25)

Adafruit_BME680 bme; // I2C
//Adafruit_BME680 bme(BME_CS); // hardware SPI
//Adafruit_BME680 bme(BME_CS, BME_MOSI, BME_MISO,  BME_SCK);

void setup() {
  while (!Serial);
  Serial.println(F("BME680 test"));

  if (!bme.begin()) {
    Serial.println("Could not find a valid BME680 sensor, check wiring!");
    while (1);

  // Set up oversampling and filter initialization
  bme.setGasHeater(320, 150); // 320*C for 150 ms

void loop() {
  if (! bme.performReading()) {
    Serial.println("Failed to perform reading :(");
  Serial.print("Temperature = ");
  Serial.println(" *C");

  Serial.print("Pressure = ");
  Serial.print(bme.pressure / 100.0);
  Serial.println(" hPa");

  Serial.print("Humidity = ");
  Serial.println(" %");

  Serial.print("Gas = ");
  Serial.print(bme.gas_resistance / 1000.0);
  Serial.println(" KOhms");

  Serial.print("Approx. Altitude = ");
  Serial.println(" m");


The thing I'm unsure of is the gas sensor It's saing Kohms. I have never heard of that before. All the past gas sensors i have seen say ppm or Co i think. But i have never seen Kohms. Can someone please help me to understand this?


You will need to read the data sheet to understand how to interpret the gas sensor resistance reading. Bosch offer some software that you can download that can take the reading, along with the sensor's other readings, to calculate an Air Quality Index value. There are different downloads for various MCU types including ARM, AVR, Rasberry Pi etc. Whether that software is compatible with Arduino IDE, I don't know. I don't think the sensor can give a reading in PPM.

This is KiloOhms, the resistance of the sensor, to use the sensor properly, you would need to calibrate it, Not a realistic task for the home user! I would read the quality at startup, then use this as a reference point for future readings, i.e. if it changes then the saturation has changed.

I tried this sensor and was disappointed. I even used the Bosch "proprietary" code.

I may be missing something (which would be great) but it seems this type of sensor will only give you relative readings and then the sensor will drift and need recalibration.

Their algorithm works if the sensor were in your phone. It will sniff during the day and assume the best condition is the baseline. OK but I wanted a stationary installation. If that location has high VOC's for an extended period of time, this condition will eventually become the norm or OK condiiton.

I second that. My sensor did not provide any meaningful absolute data. I could see the level go up and down during the day and when opening the window. But the base level drifted over time.
It is a real shame because I like the BME280 and was hoping for an upgrade.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.