

The BME280, manufactured by Bosch Sensortec, is a high-performance digital sensor designed to measure humidity, temperature, and atmospheric pressure. It combines high accuracy, low power consumption, and compact size, making it an excellent choice for environmental monitoring, weather stations, and Internet of Things (IoT) applications. The sensor communicates via I2C or SPI interfaces, ensuring compatibility with a wide range of microcontrollers and development boards.








The BME280 offers precise environmental measurements with the following key specifications:
| Parameter | Value |
|---|---|
| Supply Voltage (VDD) | 1.71V to 3.6V |
| Interface | I2C (up to 3.4 MHz) / SPI (up to 10 MHz) |
| Humidity Measurement Range | 0% to 100% RH |
| Humidity Accuracy | ±3% RH |
| Temperature Measurement Range | -40°C to +85°C |
| Temperature Accuracy | ±1.0°C |
| Pressure Measurement Range | 300 hPa to 1100 hPa |
| Pressure Accuracy | ±1 hPa |
| Power Consumption (typical) | 3.6 µA (in normal mode) |
| Package Dimensions | 2.5 mm x 2.5 mm x 0.93 mm |
The BME280 comes in a small LGA package with the following pinout:
| Pin Name | Pin Number | Description |
|---|---|---|
| VDD | 1 | Power supply (1.71V to 3.6V) |
| GND | 2 | Ground |
| SCL/SPICLK | 3 | I2C clock line / SPI clock input |
| SDA/SDI/SDO | 4 | I2C data line / SPI data input/output |
| CSB | 5 | Chip select for SPI (active low) / I2C address selection |
| SDO | 6 | SPI data output / I2C address selection |
0x76 or 0x77 by connecting the SDO pin to GND or VDD, respectively.Below is an example of how to use the BME280 with an Arduino UNO via I2C. This code uses the Adafruit BME280 library.
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
// Create an instance of the BME280 sensor
Adafruit_BME280 bme;
// Define I2C address (default is 0x76)
#define BME280_I2C_ADDRESS 0x76
void setup() {
Serial.begin(9600);
while (!Serial); // Wait for serial monitor to open
// Initialize the BME280 sensor
if (!bme.begin(BME280_I2C_ADDRESS)) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1); // Halt execution if sensor is not found
}
Serial.println("BME280 sensor initialized successfully!");
}
void loop() {
// Read and print sensor data
Serial.print("Temperature: ");
Serial.print(bme.readTemperature());
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(bme.readHumidity());
Serial.println(" %");
Serial.print("Pressure: ");
Serial.print(bme.readPressure() / 100.0F); // Convert Pa to hPa
Serial.println(" hPa");
delay(2000); // Wait 2 seconds before the next reading
}
Sensor Not Detected:
0x76).Inaccurate Readings:
Communication Errors:
Q: Can the BME280 measure altitude?
A: Yes, the BME280 can calculate altitude based on atmospheric pressure readings. Use the formula:Altitude = 44330 * (1 - (Pressure / SeaLevelPressure)^(1/5.255)).
Q: What is the difference between the BME280 and BMP280?
A: The BME280 measures humidity, temperature, and pressure, while the BMP280 only measures temperature and pressure.
Q: Can the BME280 operate at 5V?
A: No, the BME280 operates at a maximum voltage of 3.6V. Use a level shifter if interfacing with a 5V system.