Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

BME180 Arduino: Complete Guide to Air Quality & Environmental Sensing

If you’ve been searching for “BME180 Arduino” projects, you’re not alone. This is one of the most common search queries from makers and engineers looking to build environmental monitoring systems. Here’s the thing though: there isn’t actually a sensor called BME180. What exists are the BMP180, BME280, and BME680 from Bosch Sensortec, and understanding which one you need can save you hours of debugging and frustration.

I’ve been designing environmental monitoring PCBs for industrial clients for years, and the naming confusion between these sensors costs hobbyists and professionals alike unnecessary headaches. This guide will clear up the confusion and get you building functional air quality monitoring systems with your Arduino.

Understanding the Bosch Environmental Sensor Family

Before diving into wiring diagrams and code, let’s sort out what sensors actually exist and what each one measures. Bosch Sensortec manufactures a family of environmental sensors that evolved over time:

Sensor ModelTemperaturePressureHumidityAir Quality (VOC)Price Range
BMP180$2-4
BMP280$2-5
BME280$4-8
BME680$10-15

The BMP180 was the original workhorse, great for weather stations and altitude tracking. The BME280 added humidity sensing. The BME680 takes it further with a metal-oxide (MOX) gas sensor for detecting volatile organic compounds, making it the go-to choice for actual air quality monitoring.

Why Users Search for BME180 Arduino

The “BME180” search term typically comes from one of three situations: mixing up the “P” and “E” in sensor names, combining features mentally from different sensors, or remembering a partial model number from a past project. If you’re looking for air quality sensing specifically, you need the BME680. If you just want temperature and pressure (like for a weather station or altimeter), the BMP180 or BMP280 will do the job at lower cost.

BME680: The Real Air Quality Sensor for Arduino

Since this guide focuses on air quality and environmental sensing, let’s concentrate on the BME680. This sensor packs four measurement capabilities into a single 3mm × 3mm package:

BME680 Technical Specifications

ParameterSpecification
Operating Voltage1.71V to 3.6V
InterfaceI2C (up to 3.4 MHz), SPI (up to 10 MHz)
Temperature Range-40°C to +85°C
Temperature Accuracy±1.0°C
Pressure Range300 to 1100 hPa
Pressure Accuracy±1.0 hPa
Humidity Range0 to 100% RH
Humidity Accuracy±3% RH
Gas SensorMOX-based VOC detection
Current Consumption0.15µA (sleep), up to 12mA (gas measurement)
I2C Address0x77 (default), 0x76 (SDO to GND)

The MOX sensor detects volatile organic compounds including formaldehyde from paints and furniture, ethanol, acetone, cleaning product fumes, and carbon monoxide. It outputs a resistance value that changes based on VOC concentration in the air.

BME680 Pinout and Arduino Wiring

Most BME680 breakout modules come with onboard voltage regulators and level shifters, making them compatible with 5V Arduino boards. Here’s the standard pinout:

BME680 PinFunctionArduino Uno Pin
VCCPower Supply (3.3-5V)5V
GNDGroundGND
SCLI2C ClockA5
SDAI2C DataA4
SDOAddress SelectLeave floating (0x77) or GND (0x76)
CSChip Select (SPI mode)Not connected for I2C

Wiring Diagram Notes

The I2C connection only needs four wires. Most breakout boards have built-in 10kΩ pull-up resistors on SDA and SCL, so you don’t need external ones. If you’re using a bare BME680 chip without a breakout board, add 4.7kΩ pull-ups to 3.3V on both I2C lines.

For Arduino Mega, use pins 20 (SDA) and 21 (SCL). For Arduino Leonardo, use pins 2 (SDA) and 3 (SCL). The ESP32 and ESP8266 work great too since they have native I2C support and 3.3V logic.

Installing Required Arduino Libraries

The BME680 needs two libraries from Adafruit. Open the Arduino IDE and navigate to Sketch → Include Library → Manage Libraries. Search for and install:

  1. Adafruit BME680 Library – The main driver library
  2. Adafruit Unified Sensor – Required dependency for sensor abstraction

Alternatively, Bosch provides their own BSEC library that calculates an Indoor Air Quality (IAQ) index. The BSEC library is more complex but gives you processed air quality values instead of raw resistance readings. Note that BSEC requires more memory and won’t fit on basic Arduino Uno boards, so use ESP32 or Arduino Mega for that approach.

Basic BME680 Arduino Code

Here’s a working sketch that reads all four parameters and displays them on the Serial Monitor:

#include <Wire.h>

#include <SPI.h>

#include <Adafruit_Sensor.h>

#include “Adafruit_BME680.h”

#define SEALEVELPRESSURE_HPA (1013.25)

Adafruit_BME680 bme;

void setup() {

  Serial.begin(115200);

  while (!Serial);

  Serial.println(“BME680 Environmental Sensor Test”);

  if (!bme.begin()) {

    Serial.println(“Could not find BME680 sensor!”);

    while (1);

  }

  // Configure oversampling and filter

  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 150ms

}

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 Resistance: “);

  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);

}

Understanding the Gas Resistance Output

The gas sensor outputs resistance in Ohms, not a direct air quality index. In clean air, you’ll see higher resistance values (typically 50-500 kΩ). When VOCs are present, the resistance drops. The relationship isn’t linear, and it depends on humidity and temperature.

For a true Indoor Air Quality (IAQ) index ranging from 0 (excellent) to 500 (extremely polluted), you need to either implement your own calibration algorithm or use Bosch’s BSEC library.

Calibration and Burn-In Requirements

Here’s something many tutorials skip: the BME680 gas sensor requires significant burn-in time before giving reliable readings.

Initial Burn-In

When you first receive the sensor, run it continuously for 48 hours. This stabilizes the MOX layer and establishes baseline resistance values. Skipping this step leads to wildly inconsistent readings.

Daily Warm-Up

Even after initial burn-in, the gas sensor needs 30 minutes of operation each time you power it on before the readings stabilize. The heater inside the sensor must reach thermal equilibrium, and the metal oxide surface needs time to interact properly with ambient gases.

Temperature Compensation

The gas sensor’s resistance is affected by ambient temperature and humidity. The BME680 conveniently measures both, allowing you to implement compensation algorithms. Bosch’s BSEC library handles this automatically, which is one reason it’s preferred for production air quality monitors.

Building an Air Quality Monitor With Display

Let’s build something more practical: an air quality monitor with an OLED display. You’ll need:

  • Arduino board (Uno, Nano, or ESP32)
  • BME680 sensor module
  • 0.96″ I2C OLED display (SSD1306)
  • Breadboard and jumper wires

Wiring Multiple I2C Devices

Both the BME680 and SSD1306 OLED use I2C, so they share the same SDA and SCL lines:

ComponentVCCGNDSDASCL
BME6805VGNDA4A5
OLED Display5VGNDA4A5

The OLED typically uses address 0x3C, while the BME680 uses 0x77, so there’s no address conflict.

Display Code Example

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>

#include <Adafruit_BME680.h>

#define SCREEN_WIDTH 128

#define SCREEN_HEIGHT 64

#define OLED_RESET -1

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

Adafruit_BME680 bme;

void setup() {

  Serial.begin(115200);

  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {

    Serial.println(“SSD1306 allocation failed”);

    while (1);

  }

  if (!bme.begin()) {

    Serial.println(“BME680 not found”);

    while (1);

  }

  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);

  display.clearDisplay();

  display.setTextSize(1);

  display.setTextColor(SSD1306_WHITE);

}

void loop() {

  if (!bme.performReading()) {

    return;

  }

  display.clearDisplay();

  display.setCursor(0, 0);

  display.print(“Temp: “);

  display.print(bme.temperature, 1);

  display.println(” C”);

  display.print(“Humid: “);

  display.print(bme.humidity, 1);

  display.println(” %”);

  display.print(“Press: “);

  display.print(bme.pressure / 100.0, 0);

  display.println(” hPa”);

  display.print(“Gas: “);

  display.print(bme.gas_resistance / 1000.0, 1);

  display.println(” kOhm”);

  // Simple air quality indicator

  display.println();

  display.print(“Air: “);

  if (bme.gas_resistance > 300000) {

    display.println(“Excellent”);

  } else if (bme.gas_resistance > 200000) {

    display.println(“Good”);

  } else if (bme.gas_resistance > 100000) {

    display.println(“Moderate”);

  } else {

    display.println(“Poor”);

  }

  display.display();

  delay(2000);

}

Comparing BMP180 vs BME280 vs BME680 for Your Project

Not every project needs full air quality monitoring. Here’s my recommendation based on application:

ApplicationRecommended SensorWhy
Weather StationBME280Temperature, humidity, pressure – all you need
Drone AltimeterBMP280Fast response, low power, altitude only
Smart Home ClimateBME280Humidity matters for HVAC control
Indoor Air QualityBME680VOC detection is essential
Industrial MonitoringBME680 + dedicated gas sensorsBME680 for general VOCs, MQ series for specific gases

The BME680 costs about twice what a BME280 does. If you don’t need VOC sensing, save the money and use BME280. If air quality is your goal, the BME680 is the minimum viable sensor, though professional applications often pair it with dedicated CO2 sensors like the MH-Z19 or SCD40.

Common Problems and Troubleshooting

Sensor Not Detected

Check your I2C connections. Run an I2C scanner sketch to verify the sensor responds at address 0x76 or 0x77. If you’re getting no response, verify your wiring, especially SDA/SCL. Some cheap modules have mislabeled pins.

Temperature Reads 2-3°C High

This is normal with the BME680. The internal heater for the gas sensor raises the chip temperature above ambient. Apply a fixed offset (typically -2°C) in your code, or mount the sensor away from your main PCB with adequate ventilation.

Gas Readings Are Unstable

The sensor needs the 48-hour burn-in period plus 30-minute warm-up time discussed earlier. Also check that you’re not sampling too frequently. Give at least 3 seconds between gas measurements to let the sensor re-stabilize.

Getting BMP280 Instead of BME280

This is a notorious problem when buying from cheap suppliers. The packages look identical, but BMP280 can’t measure humidity. Check the chip markings: BME280 has “U” in the marking code, BMP280 has “K”. The BME280 chip is also slightly more square in shape.

Useful Resources and Downloads

Here are the official resources I keep bookmarked for environmental sensor projects:

ResourceDescriptionLink
BME680 DatasheetOfficial Bosch specificationsbosch-sensortec.com
BME280 DatasheetOfficial Bosch specificationsbosch-sensortec.com
BMP180 DatasheetLegacy sensor documentationsparkfun.com/datasheets
Adafruit BME680 LibraryArduino driver librarygithub.com/adafruit
BSEC Arduino LibraryBosch air quality algorithmgithub.com/BoschSensortec
Arduino IDEDevelopment environmentarduino.cc/software

Frequently Asked Questions

Does the BME180 sensor exist?

No, there is no sensor called BME180. This is a common confusion between the BMP180 (pressure/temperature only) and BME280 (pressure/temperature/humidity). If you need air quality sensing, you want the BME680, which adds VOC gas detection to the feature set.

Can the BME680 measure CO2 directly?

No. The BME680’s gas sensor detects volatile organic compounds collectively, not specific gases like CO2. Bosch’s BSEC algorithm can estimate an “equivalent CO2” (eCO2) value based on VOC correlation, but it’s not a direct measurement. For actual CO2 monitoring, use a dedicated NDIR sensor like the MH-Z19 or SCD30.

Why do my BME680 gas readings fluctuate so much?

Gas sensor readings are inherently variable because they respond to any VOC in the environment, including human breath, cooking odors, cleaning products, and even outdoor air changes. Ensure you’ve completed the 48-hour burn-in period and allow 30 minutes warm-up time after each power-on. Using software averaging over multiple readings also helps smooth the output.

Can I use multiple BME680 sensors on one Arduino?

Yes, but it requires some planning. Each BME680 has a configurable I2C address (0x76 or 0x77 via the SDO pin), so you can connect two sensors directly. For more than two, you’ll need an I2C multiplexer like the TCA9548A. Alternatively, use SPI mode where each sensor gets its own chip select pin.

Which is better for a home weather station: BME280 or BME680?

For a pure weather station measuring temperature, humidity, and pressure, the BME280 is sufficient and more cost-effective. The BME680’s gas sensor adds air quality monitoring, which is useful indoors but less relevant for outdoor weather applications. The BME680 also consumes more power due to its heated gas sensor, which matters in battery-powered deployments.

Final Thoughts on Environmental Sensing With Arduino

The Bosch environmental sensor family provides excellent options for Arduino-based monitoring projects. While the “BME180” doesn’t exist, understanding the actual product lineup helps you choose the right tool for your application. For basic weather data, stick with the BME280. For indoor air quality and VOC detection, the BME680 is your sensor.

Remember that air quality sensing requires patience. Give your BME680 proper burn-in time, implement appropriate warm-up delays in your code, and consider using Bosch’s BSEC library if you need calculated IAQ values rather than raw resistance readings. With proper setup, these sensors deliver reliable environmental data for years.

Got questions about sensor selection or running into issues with your environmental monitoring project? Drop a comment below with your specific setup and symptoms.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.