Interfacing Bosch BME680

Hi,

I am trying the sample code in this regard. I have changed the I2C pins in the overllay file and bme register address to 0x77 as follows. It seems working but I have many questions.

&i2c0 {
	compatible = "nordic,nrf-twi";
	status = "okay";
	bme680: bme680@77 {
		compatible = "bosch,bme680";
		label = "BME680";
		reg = <0x77>;
	};
};

1. I think this is using the Zephyr built in bme680 driver, isn't it?

2. I am evaluating both BME680 and BME688.  How can I change code to suit BME688?

3. My case is a battery powered sensor, so I have to make it as much power efficient as possible. The sample program doesnt seem to meet that goal. I tried commenting out each channel and it doesn't seem that affect the power consumption.  I tried using 'sensor_sample_fetch_chan (dev, SENSOR_CHAN_AMBIENT_TEMP) just to fetch temp channel, but still same. Any idea why?

4. I want to read/write registers of the sensor, but Sensor API doesn't seem to provide any interface. How can I do  this?

Cheers,

Kaushalya

  • Hello,

    kaushalyasat said:
    I can see with my modified timing,

    What modified timing did you perform? Please do not change timing in the drivers as this can cause issues with the root Bosch defined drivers. Our developers do not recommend changing these values due to the result that you got.

    kaushalyasat said:
    but does it matter you run the west update from within SDK folder or zephyr folder?

    Happy to see you were able to find the correct path and compile.

    Kind regards,
    Øyvind

  • Hi Øyvind,

    Thanks. 

    Please do not change timing in the drivers

    I need to relax the sample timing to support my power budget requirements. Does this mean I cant use any other timing than specified in the drivers?

    If it is possible, how can I change the sample timing?

    Happy to see you were able to find the correct path and compile.

    Thanks again. Is it within SDK folder or within Zephyr folder? It would be great if you can update the driver page to correctly instruct a newcomer which folder he/she should use to update west for BSEC drivers.

    Cheers,

    Kaushalya

  • Hey Kaushalya, 

    kaushalyasat said:

    I need to relax the sample timing to support my power budget requirements. Does this mean I cant use any other timing than specified in the drivers?

    If it is possible, how can I change the sample timing?


    I will need to discuss internally with the developers. 

    kaushalyasat said:
    Thanks again. Is it within SDK folder or within Zephyr folder?

    This is a driver found in sdk-nrf, so you should call west commands in the nrf folder. 

    kaushalyasat said:
    It would be great if you can update the driver page to correctly instruct a newcomer which folder he/she should use to update west for BSEC drivers.

    Yes, that is a very good point. I will notify internally! 

    Kind regards,
    Øyvind

Related