Overview

The BME280 is a 3-in-1 digital environmental sensor manufactured by Bosch Sensortec. It measures ambient temperature, relative humidity, and barometric pressure with high precision, fast response times, and low power consumption.

It is widely used in weather stations, IoT environmental monitoring nodes, home automation systems (ESPHome, Home Assistant), and altitude tracking devices (altimeters). Breakout modules include an onboard 3.3V LDO regulator and level shifter circuitry for 3.3V/5V microcontroller compatibility over I2C or SPI.

Quick reference

Module VCC3.3 V to 5.0 V DC (onboard LDO)
Chip VDD / VDDIO1.71 V to 3.6 V DC
Communication interfacesI2C (up to 3.4 MHz), 3-wire / 4-wire SPI (up to 10 MHz)
Default I2C address0x76 (SDO = LOW) / 0x77 (SDO = HIGH)
Temperature range40C-40^\circ\text{C} to +85C+85^\circ\text{C} (±0.5 C\pm 0.5\text{ }^\circ\text{C} accuracy)
Humidity range0% to 100% RH (±3% RH\pm 3\%\text{ RH} accuracy, 1 s response time)
Pressure range300 hPa to 1100 hPa (±1.0 hPa\pm 1.0\text{ hPa} absolute accuracy)

Pinout

Standard 6-Pin Breakout Module Header

PinNameTypeDescription
1VCCPowerSupply voltage (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
3SCL / SCKDigital InputI2C Serial Clock / SPI Clock pin
4SDA / SDIDigital I/OI2C Serial Data / SPI Serial Data Input
5CSB / CSDigital InputChip Select pin (HIGH = I2C mode, LOW = SPI mode)
6SDO / ADRDigital I/OI2C Address select pin / SPI Serial Data Output

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Chip)VDDV_{DD}1.711.83.6VDC
Supply Current (Humidity)IDD,HI_{DD,H}340µA1 Hz humidity forced mode
Supply Current (Pressure)IDD,PI_{DD,P}714µA1 Hz pressure forced mode
Sleep CurrentIDD,SLI_{DD,SL}0.10.3µASleep mode
Temperature ResolutionTresT_{res}0.01°C20-bit output
Relative Humidity ResolutionHresH_{res}0.008% RH16-bit output
Pressure ResolutionPresP_{res}0.0018hPa20-bit output (0.18 m altitude resolution)

Communication & Registers

Mode Selection & Addresses

  • I2C Mode: CSB pin pulled HIGH (or left floating with internal pull-up).
    • Address 0x76: SDO pin connected to GND.
    • Address 0x77: SDO pin connected to VCC.
  • SPI Mode: CSB pin pulled LOW by microcontroller during transactions.

Key Registers

AddressRegisterAccessDescription
0xD0IDRChip Identification (returns 0x60 for BME280)
0xE0RESETWSoftware reset (write 0xB6 to reset)
0xF2CTRL_HUMR/WHumidity oversampling control (must write before CTRL_MEAS)
0xF4CTRL_MEASR/WPressure & Temperature oversampling and sensor mode select
0xF5CONFIGR/WRate, IIR filter constant, and 3-wire SPI select
0xF70xFCDATARBurst read 6 bytes: Pressure [F7:F9], Temp [FA:FC], Humidity [FD:FE]
Note

BME280 vs BMP280 Identification:

  • BME280 (ID register 0xD0 = 0x60): Measures Temperature, Pressure, and Humidity.
  • BMP280 (ID register 0xD0 = 0x58): Measures Temperature and Pressure only (no humidity sensor).

Wiring

BME280 Breakout PinMicrocontroller (Arduino Uno / ESP32)Notes
VCC3.3V (or 5V)Power supply
GNDGNDGround
SCLSCL (A5 on Uno, GPIO22 on ESP32)I2C Clock
SDASDA (A4 on Uno, GPIO21 on ESP32)I2C Data

Common mistakes

  • Confusing BME280 with BMP280: Both sensors share near-identical 6-pin breakout board layouts. However, BMP280 lacks the humidity sensing element. Checking register 0xD0 (0x60 vs 0x58) confirms the exact chip.
  • Wrong default I2C address in code: Many Arduino/ESPHome libraries default to 0x77, whereas common purple BME280 breakouts hardwire SDO to GND, selecting address 0x76.
  • Writing CTRL_HUM after CTRL_MEAS: According to the Bosch datasheet, changes to CTRL_HUM (0xF2) only take effect after writing to CTRL_MEAS (0xF4). Software must write 0xF2 before 0xF4.

Notes

  • Barometric pressure varies with altitude according to the hypsometric formula: Altitude (m)=44330×(1(PmeasuredPsea_level)1/5.255)\text{Altitude (m)} = 44330 \times \left(1 - \left(\frac{P_{measured}}{P_{sea\_level}}\right)^{1/5.255}\right)

Assets & downloads