Bosch BME680 Sensor


  • Hero Member

    I just created a sketch for controlling a BME680 sensor via I2C.
    For the ones who are interested in it, the sketch can be downloaded at:
    https://github.com/windkh/mysensors/tree/master/BME680Sensor

    Right now only the gas resistance value is transmitted as the air quality value (IAQ) can only be calculated when you make use of the closed source library from Bosch (which is by the way only available for ARM, X86, ...)

    The pressure is, like on the BME280 ,an absolute value. The sketch calculates the sealevel pressure from it.

    I am using the breakout board from watterott which can be found here:
    https://github.com/watterott/BME680-Breakout

    Right now you have to download this library in order to be able to compiile the sketch:
    https://github.com/windkh/BME680_Breakout
    This fork replaces the original I2C read and write routines from https://github.com/vicatcu/BME680_Breakout.

    Wiring:
    I am using a standard Arduino Uno with Radio attached to the standard pins with the mysensors 2.0 lib.
    To connect the breakout-board you need 4 wires:

    Breakout --> Arduino
    GND - GND
    NC
    VCC - 3.3V
    SCL - A5
    SDA - A4
    SDO
    CS

    The chip supports SPI and I2C. I used SCL and SDA for I2C and left SDO and CS disconnected.

    The next steps will be making the air quality values useful by finding an appropriate algorithm... stay tuned.



  • @heinz Thanks. I have tried it so far Adafruit lib and it gives me negative sea level ??!!

    How do you like the sensor? I what how accurate air quality is compare to other sensors?


  • Hardware Contributor

    @alexsh1 air quality is more accurate than other sensors but you need to use software from Bosch. It uses temperature, humidity and pressure to adjust measures gas value with some calibration data.
    As it needs a lot of memory you will need an SAMD, ESP or NRF5 processor to run it.


  • Hero Member

    I like the BME680 sensor as it has a very low power consumption. But it has also some disadvantages that have impact on the application and the environment it should be used.
    As far as I know the sensor was developed to be used in mobile phones or smart watches. Those devices are exposed to "fresh air" almost every day which makes it possible to estimate the air quality from the resistante of the sensor. The resistance of the sensor increases over the weeks and months as the internal chemical layer is exhausted or used up depending on the environment it is exposed to. The fading of the resistance can be compensated through smart algorithms that work on historical data (see post above). When the sensor is exposed to "fresh air" once a day, the algorithm can use this value as a kind of reference value to estimate the air quality index.
    But if you want to use this sensor for indoor applications, where the environment is very constant or changing very slowly, then I doubt that the algorithm is able to calculate an exact value for the air quality index.
    Knowing this means that you can use the sensor resistance also without the BSEC library and with your own simplified algorithm when "recalibration with fresh air" is done sometimes on your own. Another useful application could also be an outdoor weather station where the sensor is exposed to fresh air most of the time.
    All in all it is a cool product as it offers other measurements, too which spares hardware and minimizes the costs. In addition to that you can change the meaurement parameters of the sensor on your own as a good user manual of the sensor is also available.

    I am using the sensor in my kitchen to detect when someone is cooking. In this case I am not interested in the absolute resistance, but in the change over time. If the air quality gets worse in a very short time (resistance change per minute), then I can activate the ventilation system. The same could be done on the toilet 🙂

    best regards Heinz



  • @nca78 Damn! My node takes only 9uA (atmega328p based) and that’s including BME680. With SAMD I need to see what the sleeping consumption is. It has to last more than a year on 2xAA batteries





  • @heinz said in Bosch BME680 Sensor:

    I am using the sensor in my kitchen to detect when someone is cooking. In this case I am not interested in the absolute resistance, but in the change over time. If the air quality gets worse in a very short time (resistance change per minute), then I can activate the ventilation system. The same could be done on the toilet 🙂

    Thank you for your excellent feedback. I actually have not been thinking about such an application. Modifying kitchen sounds like an excellent idea.
    Are you using BSEC Lib?


  • Hero Member

    @alexsh1
    No I am not using the BSEC library. I read the raw values of the resistance and calculate the first derivative for triggering the ventilation system. The ventilation system is turned on, when
    (delta resistance)/minute > threshold

    Sometimes the ventilation is also triggered when I open my fridge. Then the smell of food coming out of the fridge also fires the trigger.

    It is said that the sensor is very sensitive to any kind of silicone which is basically everywhere in the air when you have dishes created from silicone in your kitchen. Silicone poisens/blinds the sensor immediately for several hours.
    So be careful when making experiments with it.



  • @heinz said in Bosch BME680 Sensor:

    @alexsh1
    No I am not using the BSEC library. I read the raw values of the resistance and calculate the first derivative for triggering the ventilation system. The ventilation system is turned on, when
    (delta resistance)/minute > threshold

    Sometimes the ventilation is also triggered when I open my fridge. Then the smell of food coming out of the fridge also fires the trigger.

    It is said that the sensor is very sensitive to any kind of silicone which is basically everywhere in the air wVErhen you have dishes created from silicone in your kitchen. Silicone poisens/blinds the sensor immediately for several hours.
    So be careful when making experiments with it.

    OK, so you are using the first derivative (rate of change/time). Clear
    This is amazing - it triggered when one opens the fridge? Must be very sensitive.

    Ok, let me tinker with the sensor and I'll post my feedback here.


 

386
Online

7.6k
Users

8.5k
Topics

91.2k
Posts