The BME688, manufactured by Bosch (Part ID: UNO), is a versatile environmental sensor designed to measure temperature, humidity, pressure, and gas concentrations, including volatile organic compounds (VOCs). This sensor combines high accuracy and low power consumption, making it ideal for air quality monitoring, IoT applications, and smart home devices. Its compact design and advanced features allow it to provide reliable data in a wide range of environmental conditions.
The BME688 is a highly integrated sensor with the following key specifications:
Parameter | Value |
---|---|
Supply Voltage | 1.71V to 3.6V |
Operating Current | 2.1 µA (sleep mode), 3.7 mA (typical during gas measurement) |
Temperature Range | -40°C to +85°C |
Humidity Range | 0% to 100% relative humidity (non-condensing) |
Pressure Range | 300 hPa to 1100 hPa |
Gas Measurement | Detects VOCs and other gases (e.g., CO2 equivalents) |
Interface | I2C and SPI |
Dimensions | 3.0 mm x 3.0 mm x 0.93 mm |
The BME688 has an 8-pin LGA package. The pin configuration is as follows:
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Power supply voltage (1.71V to 3.6V) |
2 | GND | Ground connection |
3 | SCL/SPICLK | I2C clock line / SPI clock |
4 | SDA/SDI | I2C data line / SPI data input |
5 | CSB | Chip select for SPI (active low) |
6 | SDO | SPI data output |
7 | VDDIO | I/O voltage supply (1.2V to 3.6V) |
8 | NC | Not connected (leave floating or connect to GND for stability) |
Below is an example of how to interface the BME688 with an Arduino UNO using I2C:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME680.h>
// Create an instance of the BME680 sensor
Adafruit_BME680 bme;
// Define I2C address (default is 0x76, alternate is 0x77)
#define BME680_I2C_ADDR 0x76
void setup() {
Serial.begin(9600);
while (!Serial); // Wait for serial monitor to open
// Initialize the BME680 sensor
if (!bme.begin(BME680_I2C_ADDR)) {
Serial.println("Could not find a valid BME680 sensor, check wiring!");
while (1);
}
// 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
}
void loop() {
// Perform a measurement
if (!bme.performReading()) {
Serial.println("Failed to perform reading!");
return;
}
// Print sensor data
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");
delay(2000); // Wait 2 seconds before the next reading
}
Sensor Not Detected:
Inaccurate Readings:
High Power Consumption:
By following this documentation, users can effectively integrate the BME688 sensor into their projects and achieve accurate environmental measurements.