Components / Sensors / BME280 Environmental Sensor

BME280 Environmental Sensor

Measures temperature, humidity and pressure with supported interfaces.

MeasuresTemperature, humidity and air pressure
Range−40 to 85 °C; 0 to 100 %RH; 300 to 1100 hPa
Accuracy±1 °C; ±3 %RH; ±1 hPa (typical)
InterfaceI2C or SPI
SensorsReviewedMPN BME280Used in 53 projects
BME280
In short

What is the BME280 Environmental Sensor and what is it used for?

Measures temperature, humidity and pressure with supported interfaces. Makers use it to create a room environment logger.

Cheap boards are sometimes sold as BME280 but carry a BMP280, which has no humidity sensor.
In the real world

Weather monitoring and indoor sensing

How it works

Sensors convert a physical quantity into an electrical signal. Calibrate, verify module supply, interfaces and environmental limits.

Key specifications

Sensor specValue
MeasuresTemperature, humidity and air pressure
Range−40 to 85 °C; 0 to 100 %RH; 300 to 1100 hPa
Accuracy±1 °C; ±3 %RH; ±1 hPa (typical)
InterfaceI2C or SPI
I2C address0x76 (SDO to GND) or 0x77 (SDO to VDDIO)
Supply voltageChip 1.71 to 3.6 V; many breakouts accept 3.3 V or 5 V via a regulator
Operating temperature−40 to 85 °C

Pinout

VINSupply (check your breakout: 3.3 V only, or 3.3 to 5 V)
GNDGround
SCLI2C clock (SPI SCK)
SDAI2C data (SPI SDI)
SDOSelects address 0x76 or 0x77 (SPI SDO)
CSBLeave high or unconnected for I2C (SPI chip select)

How to use it

Wire VIN, GND, SDA and SCL. Most breakouts include I2C pull-ups. Keep the sensor away from the microcontroller and regulator, which warm the air around it.

#include <Adafruit_BME280.h>
Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  if (!bme.begin(0x76)) Serial.println("BME280 not found");
}

void loop() {
  Serial.println(bme.readTemperature());
  delay(2000);
}

Applications

Alternatives

Buy at

Common questions

What is the BME280 Environmental Sensor used for?

In products: weather monitoring and indoor sensing. In maker projects: create a room environment logger.

How does the BME280 Environmental Sensor work?

Sensors convert a physical quantity into an electrical signal. Calibrate, verify module supply, interfaces and environmental limits.

What voltage does the BME280 Environmental Sensor need?

Chip 1.71 to 3.6 V; many breakouts accept 3.3 V or 5 V via a regulator.

How do I connect the BME280 Environmental Sensor to an Arduino or ESP32?

I2C or SPI. Pins: VIN (Supply (check your breakout: 3.3 V only, or 3.3 to 5 V)), GND (Ground), SCL (I2C clock (SPI SCK)), SDA (I2C data (SPI SDI)), SDO (Selects address 0x76 or 0x77 (SPI SDO)), CSB (Leave high or unconnected for I2C (SPI chip select)).

What can I use instead of the BME280 Environmental Sensor?

DHT22 Sensor and DS18B20 Temperature Sensor.