BMP280 Pressure Sensor

Bosch's barometric pressure and temperature sensor, 300 to 1100 hPa at ±0.12 hPa relative accuracy, over I2C or SPI.

  • Pressure range300 to 1100 hPa (+9000 m to -500 m)
  • Pressure accuracy±0.12 hPa relative (≈ ±1 m), ±1.0 hPa absolute (0 to 65 °C)
  • Temperature-40 to +85 °C; ±0.5 °C at 25 °C, ±1.0 °C over 0 to 65 °C
  • Resolution0.0016 hPa pressure, 0.01 °C temperature (ultra high resolution)
BMP280 Pressure Sensor, Bosch's barometric pressure and temperature sensor, 300 to 1100 hPa at ±0.12 hPa relative accuracy, over I2C or SPI.
In short

The BMP280 is Bosch's digital barometric pressure and temperature sensor: 300 to 1100 hPa with ±0.12 hPa relative accuracy (about ±1 m of altitude), -40 to +85 °C, on a 1.71 V to 3.6 V supply with I2C or SPI (Bosch BMP280 datasheet rev 1.26, pp. 2, 7). On the GY-BMP280 module, wire VCC to 3.3 V, GND to GND, and SDA and SCL to the I2C pins; with SDO left low the address is 0x76, with SDO high 0x77 (p. 28). It has no humidity sensor: that is the BME280.

The BMP280 is an absolute barometric pressure sensor from Bosch Sensortec in a 2.0 × 2.5 mm metal-lid LGA package. It measures pressure from 300 to 1100 hPa, which Bosch equates to +9000 m to -500 m around sea level, and temperature from -40 to +85 °C, and talks I2C up to 3.4 MHz or SPI up to 10 MHz (Bosch datasheet rev 1.26, p. 2). Its relative accuracy of ±0.12 hPa, equivalent to ±1 m in height, makes it a common altimeter for drones, weather stations and floor detection (pp. 2, 3).

The chip runs from 1.71 V to 3.6 V and is rated 4.25 V absolute maximum on its supply pins (pp. 7, 9). The purple GY-BMP280 breakout puts it on a 6-pin header (VCC, GND, SCL, SDA, CSB, SDO) with 10 kΩ pull-ups on SCL, SDA and CSB and a 10 kΩ pull-down on SDO, but no voltage regulator and no level shifter, so the module's VCC must be 3.3 V. Some sellers ship a near-identical board with a regulator; check yours before wiring 5 V.

CSB selects the interface: held high it keeps I2C, and once it is pulled low the chip switches to SPI until the next power-on reset (p. 27). SDO sets the last bit of the I2C address, 0x76 to GND or 0x77 to VDDIO (p. 28). In forced mode at 1 Hz with the lowest oversampling it draws 2.8 µA, and 0.1 µA in sleep (p. 7). Its chip ID register reads 0x58 (p. 24), which is how libraries tell it apart from the BME280 (0x60).

BMP280 Pressure Sensor pinout

tinkered.ai/components/bmp280BMP280 Pressure S…VCCPowerGNDGroundSCLI2C SCL · SPI SCKSDAI2C SDA · SPI SDICSBDigital · SPI CSSDODigital · SPI SDO
PinFunctionType
VCCVCC (3.3 V: 1.71-3.6 V, no regulator)1.71 to 3.6 Vpower in
GNDGNDpower in
SCLI2C SCL, SPI SCKbidirectional
SDAI2C SDA, SPI SDIbidirectional
CSBDigital, SPI CSinput
SDODigital, SPI SDOinput

How to wire the BMP280 Pressure Sensor

Pin by pin, for the board you have.

BMP280 Pressure SensorArduino UnoNote
VCC3V3
GNDGND
SCLSCL
SDASDA
Open this circuit on an Arduino UnoThe full Arduino Uno guide

BMP280 Pressure Sensor code

Every example here compiles for its board.

Libraries: adafruit/Adafruit BMP280 Library
// BMP280 Pressure Sensor on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/bmp280
#include <Wire.h>
#include <Adafruit_BMP280.h>

Adafruit_BMP280 bmp;   // I2C

void setup() {
  Serial.begin(115200);
  if (!bmp.begin(0x76)) {            // 0x77 with SDO on 3.3 V
    Serial.print("BMP280 not found, chip id 0x");
    Serial.println(bmp.sensorID(), HEX);   // 0x60 = a BME280, 0xFF/0x00 = nothing at that address
    while (1) delay(10);
  }
  // normal mode, ×2 temperature, ×16 pressure, filter ×16, 500 ms standby
  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,
                  Adafruit_BMP280::SAMPLING_X2,
                  Adafruit_BMP280::SAMPLING_X16,
                  Adafruit_BMP280::FILTER_X16,
                  Adafruit_BMP280::STANDBY_MS_500);
}

void loop() {
  Serial.print("Temperature: ");
  Serial.print(bmp.readTemperature());
  Serial.println(" C");
  Serial.print("Pressure: ");
  Serial.print(bmp.readPressure() / 100.0);
  Serial.println(" hPa");
  Serial.print("Altitude: ");
  Serial.print(bmp.readAltitude(1013.25));   // the local sea-level pressure, hPa
  Serial.println(" m");
  delay(1000);
}
Compiled for arduino:avr:uno on 2026-10-30

Before you wire it

Do
  • VCC to the board's 3.3 V pin (3V3) on every board, the Uno, Nano, Mega and UNO R4 included. GND to GND.
  • No external pull-ups: the module has them. CSB and SDO stay unwired for 0x76.
  • In the firmware, bmp.begin(0x76) (or begin(0x77) with SDO on 3.3 V). Adafruit_BMP280's bare begin() asks 0x77 and finds nothing on a module as sold.
  • Call setSampling() after begin() with the mode you need (begin() sets normal mode, ×16/×16, no filter). Weather station: forced mode, ×1/×1, a reading every minute. Altimeter or a smooth reading: normal mode, ×2 temperature, ×16 pressure, filter ×16, 500 ms standby.
  • readAltitude(seaLevelhPa) is only as good as the sea-level pressure given (the local forecast's QNH, 1013.25 by default): for a height relative to where the sketch starts, store the first pressure and pass it instead.
  • SPI: Adafruit_BMP280 bmp(CS_PIN); on the board's hardware SPI pins (Uno: SCK D13, MOSI D11, MISO D12; Pico: GP18, GP19, GP16; ESP32: IO18, IO23, IO19), CSB on any GPIO. On a 5 V board (Uno, Nano, Mega, R4) SPI needs a logic level converter on SCK, MOSI and CSB: use I2C there instead.
Don’t
  • No 5 V on VCC: the module has no regulator and the chip is destroyed.
  • No CSB on GND with I2C wiring: it puts the chip in SPI mode and it never answers on I2C.
  • No bmp.begin() without the address on the GY-BMP280 (it asks 0x77).
  • No Adafruit_BME280/readHumidity() for a BMP280: it has no humidity, and its chip ID (0x58) fails Adafruit_BME280's check.
  • No reading pressure in hPa straight from readPressure(): it returns Pa (divide by 100 for hPa).
  • Power the GY-BMP280 from 3.3 V on every board, Uno included. The module has no regulator, and the chip is limited to 3.6 V operating and 4.25 V absolute maximum (Bosch datasheet, pp. 7, 9).
  • Its 10 kΩ pull-ups hold SDA and SCL at 3.3 V. On a 5 V Uno that is below the 0.7 × VCC (3.5 V) its I2C pins want for a high; it works because Wire.begin() also turns on the Uno's internal pull-ups to 5 V, which lift the lines a little. For margin, use a level shifter. SPI from a 5 V board needs one on SCK, SDI and CSB, since no interface pin may exceed VDDIO + 0.3 V (p. 9).
  • Leave CSB unwired (pulled up on the module) for I2C. If CSB is ever pulled low, the chip stays in SPI mode until it is powered off (p. 27).
  • SDO sets the address: 0x76 to GND, 0x77 to VDDIO, and it must not float (p. 28). The module's pull-down gives 0x76 when SDO is unwired.
  • Keep the sensor away from heat sources such as regulators and the microcontroller, and out of direct airflow, so the temperature it measures and compensates with is the air's.
  • Temperature accuracy is ±0.5 °C at 25 °C, ±1 °C over 0 to 65 °C.

Specifications

Pressure range
300 to 1100 hPa (+9000 m to -500 m)Bosch BMP280 datasheet rev 1.26, p. 2
Pressure accuracy
±0.12 hPa relative (≈ ±1 m), ±1.0 hPa absolute (0 to 65 °C)Bosch BMP280 datasheet rev 1.26, pp. 7, 8
Temperature
-40 to +85 °C; ±0.5 °C at 25 °C, ±1.0 °C over 0 to 65 °CBosch BMP280 datasheet rev 1.26, pp. 2, 8
Resolution
0.0016 hPa pressure, 0.01 °C temperature (ultra high resolution)Bosch BMP280 datasheet rev 1.26, p. 8
Chip supply
VDD 1.71 V to 3.6 V, 4.25 V absolute maximumBosch BMP280 datasheet rev 1.26, pp. 7, 9
Current
2.8 µA at 1 Hz forced mode, 720 µA peak while measuring, 0.1 µA sleepBosch BMP280 datasheet rev 1.26, p. 7
Interfaces
I2C up to 3.4 MHz; SPI 3 and 4 wire up to 10 MHzBosch BMP280 datasheet rev 1.26, p. 2
I2C address
0x76 (SDO to GND), 0x77 (SDO to VDDIO)Bosch BMP280 datasheet rev 1.26, p. 28
Chip ID
0x58 (register 0xD0)Bosch BMP280 datasheet rev 1.26, p. 24
Package
8-pin LGA metal lid, 2.0 × 2.5 × 0.95 mmBosch BMP280 datasheet rev 1.26, p. 2
Supply voltage
1.71 to 3.6 VBosch BMP280 datasheet rev 1.26, p. 7, 9
Maximum supply voltage
4.25 V absoluteBosch BMP280 datasheet rev 1.26, p. 7, 9
Interface
I2C
On-board I2C pull-ups
Yes (10 kΩ)
Dimensions
15.5 × 11.5 × 5.1 mm
Weight
3 g

From the Bosch Sensortec BMP280 (generic GY-BMP280 module)'s datasheet, published by Bosch Sensortec BMP280 (generic GY-BMP280 module).

Common mistakes

  1. Calling begin() without the address

    Adafruit_BMP280's bare begin() looks at 0x77, but a GY-BMP280 with SDO pulled down answers at 0x76 (Bosch datasheet, p. 28). Call bmp.begin(0x76), or wire SDO to 3.3 V for 0x77.

  2. Wiring VCC to 5 V

    The GY-BMP280 has no regulator and the chip's absolute maximum is 4.25 V (Bosch datasheet, p. 9). 5 V on VCC destroys it. Use the board's 3V3 pin.

  3. Treating it as a BME280

    The BMP280 has no humidity sensor. It reports chip ID 0x58 (Bosch BMP280 datasheet, p. 24), and BME280 libraries expect 0x60 (Bosch BME280 datasheet rev 1.24, p. 27), so they refuse the board. Use a BMP280 library.

  4. CSB tied to GND with I2C wiring

    A low CSB selects SPI and disables I2C until the next power-on reset (Bosch datasheet, p. 27). Leave CSB high or unwired for I2C.

  5. Altitude off by tens of metres

    Altitude is computed from pressure against a sea-level reference, 1013.25 hPa by default. Weather moves the real sea-level pressure, so give readAltitude() the local value, or store the first reading and measure height relative to it, which uses the sensor's ±0.12 hPa relative accuracy (p. 2).

BMP280 Pressure Sensor questions

What is the BMP280 I2C address?

0x76 with SDO to GND and 0x77 with SDO to VDDIO (Bosch datasheet, p. 28). Most GY-BMP280 modules pull SDO down, so they answer at 0x76; pass that address to begin().

Can I power the BMP280 from 5 V?

Not the common GY-BMP280 module: it has no regulator, and the chip takes 1.71 V to 3.6 V with 4.25 V absolute maximum (Bosch datasheet, pp. 7, 9). Power it from 3.3 V. Its I2C lines then idle at 3.3 V, which an Uno still reads correctly.

BMP280 vs BME280: what is the difference?

The BME280 adds a relative humidity sensor; the BMP280 measures only pressure and temperature (Bosch BMP280 datasheet, p. 2; BME280 datasheet rev 1.24, p. 2). Both use addresses 0x76 or 0x77. Check the chip ID in register 0xD0: 0x58 is a BMP280 (BMP280 datasheet, p. 24), 0x60 a BME280 (BME280 datasheet, p. 27).

Why is my BMP280 not found?

Most often the address: call begin(0x76) for a module with SDO low (Bosch datasheet, p. 28). Then check that VCC is 3.3 V, SDA and SCL go to the board's I2C pins, and CSB is not tied low, which switches the chip to SPI (p. 27). A board that answers but fails the chip ID check may carry a BME280 or a clone.

How accurate is BMP280 altitude?

Relative accuracy is ±0.12 hPa, equivalent to ±1 m (Bosch datasheet, p. 2), which suits height changes such as floors or a drone's climb. Absolute altitude depends on the sea-level pressure you supply, which changes with the weather.

Can I read the BMP280 over SPI?

Yes, 3 or 4 wire up to 10 MHz (Bosch datasheet, p. 2): SCL becomes SCK, SDA becomes SDI, SDO is the data out, and CSB is chip select. Pulling CSB low selects SPI until the next power-on reset (p. 27).

Build something with the BMP280 Pressure Sensor

  • Weather station

    Log pressure and temperature to spot falling pressure ahead of rain.

    Build this
  • Drone or rocket altimeter

    Track height from pressure changes during a flight.

    Build this
  • Floor-level detector

    Tell which floor of a building a device is on from its relative height.

    Build this
  • Barometer display

    Show hPa and a pressure trend on an OLED or e-paper screen.

    Build this
For AI assistants

This page as plain Markdown, for ChatGPT, Claude or your own agent. /components/bmp280.md

What will you build with it?