0

BME680 Breakout Not Working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BME680 Breakout Not Working

by TMAR2016 on Tue Dec 10, 2019 3:44 pm

Hi,

The BME680 Breakout is my first sensor ever. I am trying to use it with a arduino uno. I downloaded the supporting libraries in the arduinio IDE and wired it in a IC2 configuration (0x76). When I run the example code the serial monitor will print "BME680 Test" but will not take any measurements. I have run the code without wires connected and I get the expected "Could not find a valid BME680 sensor, check wiring!" error message. Is there a step I missed? How can I get the sensor to take measurements and print on the serial monitor?

Thank you!

TMAR2016
 
Posts: 4
Joined: Tue Dec 10, 2019 3:01 pm

Re: BME680 Breakout Not Working

by dastels on Tue Dec 10, 2019 6:00 pm

Do you see "Failed to perform reading :(" repeatedly?

Dave

dastels
 
Posts: 7469
Joined: Tue Oct 20, 2015 3:22 pm

Re: BME680 Breakout Not Working

by TMAR2016 on Tue Dec 10, 2019 6:13 pm

This is the code I am using: (I modified it with print statements as an attempt to debug it)

void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println(F("BME680 test"));
Serial.println("I am going into the if statement");
if (!bme.begin(0x76)) {
Serial.println("Could not find a valid BME680 sensor, check wiring!");
while (1);
}
Serial.println("I am here");
// Set up oversampling and filter initialization
bme.setTemperatureOversampling(BME680_OS_8X);
bme.setHumidityOversampling(BME680_OS_2X);
bme.setPressureOversampling(BME680_OS_4X);
bme.setIIRFilterSize(BME680_FILTER_SIZE_3);
bme.setGasHeater(320, 150); // 320*C for 150 ms
Serial.println("I am initialized");
}

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

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

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

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

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

Serial.println();
delay(2000);
}

When I run this code my serial monitor outputs:


If I comment out the if statement in the setup, I get the error you describe (i.e. Failed to perform reading continuously repeating).
Has this happened to you?
Attachments
Capture.PNG
Capture.PNG (29.39 KiB) Viewed 370 times

TMAR2016
 
Posts: 4
Joined: Tue Dec 10, 2019 3:01 pm

Re: BME680 Breakout Not Working

by TMAR2016 on Tue Dec 10, 2019 6:18 pm

Update: The problem appears to be my (!bme.begin()) command. It will not make it past this line of code... Is this a library problem?

TMAR2016
 
Posts: 4
Joined: Tue Dec 10, 2019 3:01 pm

Re: BME680 Breakout Not Working

by dastels on Tue Dec 10, 2019 6:45 pm

You said you've connected the breakout's SDO to ground to have it at address 0x76? Why? Do you have another I2C device at 0x77?

dastels
 
Posts: 7469
Joined: Tue Oct 20, 2015 3:22 pm

Re: BME680 Breakout Not Working

by TMAR2016 on Tue Dec 10, 2019 7:05 pm

I don't have any other sensor attached to my Uno. I am operating at (0x76) because I found a comment on another website that said this could be my problem. If I remove the SDO ground cable (returning the device to (0x77)) I have the same problem. I tried using an I2C scanner, but I couldn't even get that sketch to detect my device...

TMAR2016
 
Posts: 4
Joined: Tue Dec 10, 2019 3:01 pm

Re: BME680 Breakout Not Working

by akmishra_99 on Sat Sep 18, 2021 11:59 am

I bought two BME680 breakout board from Adafruit, one of them works and other one does not work, it keeps telling me that no valid BME680 found("Could not find a valid BME680 sensor, check wiring!") , can I get replacement for not working BME680 breakout

-Thanks
-Alok

akmishra_99
 
Posts: 58
Joined: Thu Nov 27, 2014 8:59 pm

Please be positive and constructive with your questions and comments.