Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME680,I'm confused by the 'gas heater'

    BME680,I'm confused by the 'gas heater'

    chrisisbd
    New Poster

    I have a BME680 sensor interfaced using I2C to a Beaglebone Black SBC.  It's functioning OK but I'm confused by what the 'gas heater' does.

    I guess that the heater is to get the air quality measurements going but does it also affect the temperature and humidity readings?  

    I'm using the bme680 package from PyPi installed using pip.

     

    Running this it goes into 'polling' mode and I see results like:-


    13.79 C,967.85 hPa,66.97 %RH,71721.47698855039 Ohms
    13.81 C,967.82 hPa,66.79 %RH,72968.57114389726 Ohms
    13.84 C,967.82 hPa,66.63 %RH,74385.16382217684 Ohms
    13.86 C,967.83 hPa,66.49 %RH,75403.50410127621 Ohms
    13.88 C,967.83 hPa,66.33 %RH,77186.67437330067 Ohms
    13.90 C,967.82 hPa,66.20 %RH,79198.32071358454 Ohms
    13.93 C,967.81 hPa,66.05 %RH,79989.06250915483 Ohms
    13.95 C,967.80 hPa,65.92 %RH,81618.88174279875 Ohms
    13.97 C,967.80 hPa,65.80 %RH,82458.95418813737 Ohms
    13.99 C,967.80 hPa,65.70 %RH,83712.21745256371 Ohms
    14.01 C,967.81 hPa,65.60 %RH,84922.25079223014 Ohms
    14.03 C,967.82 hPa,65.49 %RH,85999.60147520891 Ohms
    14.05 C,967.84 hPa,65.39 %RH,87190.81907805824 Ohms
    14.07 C,967.84 hPa,65.31 %RH,88326.88348620672 Ohms
    14.09 C,967.84 hPa,65.21 %RH,89949.6685169239 Ohms
    14.11 C,967.84 hPa,65.10 %RH,90411.07882563051 Ohms
    14.13 C,967.85 hPa,65.03 %RH,91443.03457762799 Ohms
    14.15 C,967.85 hPa,64.94 %RH,92305.04944738351 Ohms
    14.16 C,967.85 hPa,64.86 %RH,95788.54299375357 Ohms
    14.18 C,967.81 hPa,64.77 %RH,97001.04988745697 Ohms
    14.20 C,967.82 hPa,64.69 %RH,98080.63309875103 Ohms
    14.22 C,967.82 hPa,64.63 %RH,98906.22345883874 Ohms
    14.23 C,967.82 hPa,64.56 %RH,100085.67844386413 Ohms
    14.25 C,967.86 hPa,64.47 %RH,101997.027371513 Ohms
    14.26 C,967.87 hPa,64.40 %RH,102950.26596207068 Ohms
    14.28 C,967.85 hPa,64.33 %RH,103433.59820529057 Ohms
    14.29 C,967.86 hPa,64.28 %RH,104167.16629089943 Ohms

     

    It looks as if it's simply getting warmer and warmer, the temperature isn't really rising lake that, so what's going on?

     

    I can't attach the python code I'm running so it's here.....

    #!/usr/bin/env python3

    import bme680
    import time

    print("""read-all.py - Displays temperature, pressure, humidity, and gas.

    Press Ctrl+C to exit!

    """)

    try:
    sensor = bme680.BME680(bme680.I2C_ADDR_PRIMARY)
    except (RuntimeError, IOError):
    sensor = bme680.BME680(bme680.I2C_ADDR_SECONDARY)

    # These calibration data can safely be commented
    # out, if desired.

    print('Calibration data:')
    for name in dir(sensor.calibration_data):

    if not name.startswith('_'):
    value = getattr(sensor.calibration_data, name)

    if isinstance(value, int):
    print('{}: {}'.format(name, value))

    # These oversampling settings can be tweaked to
    # change the balance between accuracy and noise in
    # the data.

    sensor.set_humidity_oversample(bme680.OS_2X)
    sensor.set_pressure_oversample(bme680.OS_4X)
    sensor.set_temperature_oversample(bme680.OS_8X)
    sensor.set_filter(bme680.FILTER_SIZE_3)
    sensor.set_gas_status(bme680.ENABLE_GAS_MEAS)

    print('\n\nInitial reading:')
    for name in dir(sensor.data):
    value = getattr(sensor.data, name)

    if not name.startswith('_'):
    print('{}: {}'.format(name, value))

    sensor.set_gas_heater_temperature(320)
    sensor.set_gas_heater_duration(150)
    sensor.select_gas_heater_profile(0)

    # Up to 10 heater profiles can be configured, each
    # with their own temperature and duration.
    # sensor.set_gas_heater_profile(200, 150, nb_profile=1)
    # sensor.select_gas_heater_profile(1)

    print('\n\nPolling:')
    try:

    while True:
    if sensor.get_sensor_data():
    output = '{0:.2f} C,{1:.2f} hPa,{2:.2f} %RH'.format(
    sensor.data.temperature,
    sensor.data.pressure,
    sensor.data.humidity)

    if sensor.data.heat_stable:
    print('{0},{1} Ohms'.format(
    output,
    sensor.data.gas_resistance))

    else:
    print(output)

    time.sleep(1)

    except KeyboardInterrupt:
    pass

     

     

     

     

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi chrisisbd,

    Have you not used BSEC for your air quality measurement?

    No! 🙂  The main reason that I'm using a BME680 is that I couldn't find a BME280 breakout board that allowed setting the address to the non-default 0x77 and ran from 5v.  Thus my basic use for the BME680 is simply to read Temperature, Humidity and Pressure.  I need two sensors, one for 'indoors' and one for 'outdoors'.  I have a BME280 at the default address of 0x76 and, as I said I can't find a board for another BME280 which runs on 5v and can be changed to 0x77.  

    The BME680 board I have is for 5v (i.e. there's a regulator producing 3.3v for the BME680) and it's easy to switch it to 0x77.

    If I simply don't activate the heater is the BME680 pretty similar to a BME280 functionally?

    Minhwan
    Community Moderator
    Community Moderator

    Hi @chrisisbd

     

    Yes, you are right. 

    BME680 is BME280 + VOC sensor. 

    Therefore, if you don't use VOC, BME680 is pretty much same as BME280. 

    Let us know if you have any questions. 

    Thank you. 

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist