Reference

Last revision 2025/12/17

This article serves as a detailed reference for the BME688 sensor, covering communication protocols like I2C and SPI, API functions for sensor data analysis, and its enhancements over the BME680. It includes library resources, technical documents, and compatibility tests, making it a valuable resource for those working with environmental sensors.

Library

Communication Protocol Description

  • Interfaces: I2C (default) / SPI.
  • I2C Pins: SCL (C pin), SDA (D pin).
  • SPI Notes: Requires 3.3V power supply.
  • I2C Advantages: Plug-and-play, easy to use.

API Description

  • Object Initialization: DFRobot_BME68x_I2C bme(0x77); (0x77 = default I2C address).
  • Sensor Initialization: begin(); (returns 0 on success).
  • Data Conversion: startConvert(); (triggers sensor to take measurements).
  • Read Data: update(); (reads non-IAQ sensor data).
  • IAQ Support: supportIAQ(); (enables IAQ functionality).
  • IAQ Data Update: iaqUpdate(); (reads IAQ and sensor data).
  • IAQ Readiness Check: isIAQReady(); (returns 1 if IAQ data is available).
  • Temperature: readTemperature(); (returns °C with 2 decimal places).
  • Pressure: readPressure(); (returns Pa with 2 decimal places).
  • Humidity: readHumidity(); (returns %rh with 2 decimal places).
  • Gas Resistance: readGasResistance(); (returns ohms with 2 decimal places).
  • Altitude: readAltitude(); (returns meters with 2 decimal places).
  • Sea Level Pressure: readSeaLevel(float altitude); (calculates sea-level pressure from a known altitude).
  • Calibrated Altitude: readCalibratedAltitude(float seaLevel); (calculates altitude from sea-level pressure).
  • Heating Layer Control: setGasHeater(uint16_t heaterTemp, uint16_t heaterTime); (sets target temperature: 200~400°C, duration: ms).

Principle

The BME688 is a highly integrated MEMS (Micro-Electro-Mechanical Systems) environmental sensor that measures temperature, humidity, barometric pressure, and VOCs (volatile organic compounds). Key improvements over the BME680 include:

  • Temperature Accuracy: Enhanced IC design to reduce external heat interference.
  • Heating Layer: A bottom-mounted heating layer that minimizes ambient temperature effects on VOC measurements. Users can adjust the heating temperature to analyze specific gas responses for AI-driven applications.
  • Drop-in Compatibility: Software/hardware compatible with BME680, enabling easy replacement in existing systems.

Other Supplementary Information

Compatible Test

MCU Working well Working wrong Untested special specification
FireBeetle-Board328P IAQ is not supported
FireBeetle-ESP32 IAQ is not supported
FireBeetle-ESP8266 IAQ is supported
Leonardo/UNO/MEGA IAQ is not supported

IAQ(Indoor Air Quality) Comparison Table

IAQ

Was this article helpful?

TOP