

The BME680 is a versatile environmental sensor developed by Bosch Sensortec. It is capable of measuring temperature, humidity, barometric pressure, and gas concentrations, including volatile organic compounds (VOCs). This makes it an ideal choice for applications requiring air quality monitoring, weather stations, and Internet of Things (IoT) devices. Its compact size and low power consumption make it suitable for portable and battery-powered systems.








| Parameter | Value |
|---|---|
| Supply Voltage | 1.71V to 3.6V |
| Operating Current | 2.1 µA (sleep mode), 0.09 mA (low power) |
| Temperature Range | -40°C to +85°C |
| Humidity Range | 0% to 100% RH |
| Pressure Range | 300 hPa to 1100 hPa |
| Gas Measurement Range | 0 to 500 ppm (VOCs) |
| Interface | I2C and SPI |
| Dimensions | 3.0 mm x 3.0 mm x 0.93 mm |
| Pin Name | Pin Number | Description |
|---|---|---|
| VDD | 1 | Power supply input (1.71V to 3.6V) |
| GND | 2 | Ground |
| SCL/SPC | 3 | I2C clock / SPI clock input |
| SDA/SDI | 4 | I2C data / SPI data input |
| SDO | 5 | SPI data output / I2C address selection |
| CSB | 6 | SPI chip select (active low) |
Below is an example of how to interface the BME680 with an Arduino UNO using the I2C protocol. This code uses the Adafruit BME680 library, which can be installed via the Arduino Library Manager.
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME680.h>
// Create an instance of the BME680 sensor
Adafruit_BME680 bme;
// Setup function to initialize the sensor
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud
while (!Serial); // Wait for the serial monitor to open
// Initialize the BME680 sensor
if (!bme.begin(0x76)) { // Use 0x77 if SDO is connected to VDD
Serial.println("Could not find a valid BME680 sensor, check wiring!");
while (1); // Halt execution if sensor initialization fails
}
// Configure sensor settings
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
}
// Loop function to read and display sensor data
void loop() {
if (!bme.performReading()) {
Serial.println("Failed to perform reading!");
return; // Skip the rest of the loop if reading fails
}
// Print sensor readings to the serial monitor
Serial.print("Temperature = ");
Serial.print(bme.temperature);
Serial.println(" °C");
Serial.print("Humidity = ");
Serial.print(bme.humidity);
Serial.println(" %");
Serial.print("Pressure = ");
Serial.print(bme.pressure / 100.0);
Serial.println(" hPa");
Serial.print("Gas = ");
Serial.print(bme.gas_resistance / 1000.0);
Serial.println(" kOhms");
Serial.println(); // Add a blank line for readability
delay(2000); // Wait 2 seconds before the next reading
}
Sensor Not Detected:
Incorrect Readings:
Communication Errors:
By following this documentation, you should be able to successfully integrate the BME680 sensor into your project and troubleshoot common issues effectively.