

The BMP280 is a high-precision digital barometric pressure sensor designed to measure atmospheric pressure and temperature. It is widely used in applications such as weather stations, drones, and IoT devices for altitude measurement, environmental monitoring, and weather forecasting. The BMP280 is compact, energy-efficient, and communicates via I2C or SPI interfaces, making it an excellent choice for embedded systems and portable devices.








The BMP280 offers high accuracy and low power consumption, making it suitable for a variety of applications. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 1.71V to 3.6V |
| Operating Current | 2.7 µA (typical in sleep mode) |
| Pressure Measurement Range | 300 hPa to 1100 hPa |
| Temperature Measurement Range | -40°C to +85°C |
| Pressure Resolution | 0.16 Pa |
| Temperature Resolution | 0.01°C |
| Communication Interfaces | I2C (up to 3.4 MHz), SPI (up to 10 MHz) |
| Operating Temperature | -40°C to +85°C |
The BMP280 is typically available in a small breakout board with the following pin configuration:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (1.71V to 3.6V) |
| GND | Ground connection |
| SCL | Serial Clock Line for I2C or SPI Clock |
| SDA | Serial Data Line for I2C or SPI Data (MOSI) |
| CSB | Chip Select for SPI (active low) or I2C address |
| SDO | SPI Data Out (MISO) or I2C address selection |
Note: For I2C communication, the CSB pin is typically tied to VCC, and the SDO pin determines the I2C address (0x76 or 0x77).
To use the BMP280 with an Arduino UNO, follow these steps:
VCC pin to the Arduino's 3.3V pin.GND pin to the Arduino's GND.SCL pin to the Arduino's A5 pin.SDA pin to the Arduino's A4 pin.CSB pin to VCC.SCL and SDA lines if not already present.SCL to Arduino's SCK pin.SDA to Arduino's MOSI pin.SDO to Arduino's MISO pin.CSB to a digital pin (e.g., D10) for chip select.Below is an example Arduino sketch to read pressure and temperature data from the BMP280 using I2C:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
// Create an instance of the BMP280 sensor
Adafruit_BMP280 bmp; // I2C interface by default
void setup() {
Serial.begin(9600);
// Initialize the BMP280 sensor
if (!bmp.begin(0x76)) { // Check if the sensor is connected at I2C address 0x76
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while (1); // Halt the program if the sensor is not found
}
// Configure the sensor
bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, // Normal mode
Adafruit_BMP280::SAMPLING_X2, // Temperature oversampling x2
Adafruit_BMP280::SAMPLING_X16, // Pressure oversampling x16
Adafruit_BMP280::FILTER_X16, // Filter coefficient x16
Adafruit_BMP280::STANDBY_MS_500); // Standby time 500ms
}
void loop() {
// Read and print temperature and pressure data
Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" *C");
Serial.print("Pressure = ");
Serial.print(bmp.readPressure());
Serial.println(" Pa");
Serial.print("Approx. Altitude = ");
Serial.print(bmp.readAltitude(1013.25)); // Adjust sea level pressure as needed
Serial.println(" m");
delay(2000); // Wait 2 seconds before the next reading
}
1013.25 hPa in the example) to match your local conditions.Sensor not detected:
Incorrect readings:
No data output:
Serial.begin() value in the code.CSB pin is correctly configured and the SPI clock speed is within the sensor's limits.By following this documentation, you should be able to successfully integrate and use the BMP280 sensor in your projects.