Stufin
Home Quick Cart Profile

BME280 Temperature Sensor Module

Buy Now on Stufin

Supply Voltage

1.8 V to 5.5 V

Current Consumption

3.6 mA (typical), 5.5 mA (maximum)

Interface

IC (up to 3.4 MHz), SPI (up to 10 MHz)

Operating Temperature

-40C to 85C

Storage Temperature

-40C to 125C

Humidity

0% to 100% RH

Pressure

300 hPa to 1100 hPa

Measurement Accuracy

+ Temperature0.5C
+ Humidity3% RH
+ Pressure1 hPa

Measurement Resolution

+ Temperature0.01C
+ Humidity0.1% RH
+ Pressure0.01 hPa

Applications

  • Weather stations and environmental monitoring systems
  • Industrial automation and control systems
  • Home automation and smart building systems
  • Wearable devices and fitness trackers
  • Medical and healthcare devices
  • Automotive and aerospace systems
The BME280 Temperature Sensor Module is suitable for a wide range of IoT applications, including

Conclusion

The BME280 Temperature Sensor Module is a highly accurate, low-power, and compact environmental sensor module that provides reliable measurements of temperature, humidity, and pressure. With its high accuracy, low power consumption, and compact design, this module is an ideal choice for a wide range of IoT applications.

Pin Configuration

  • BME280 Temperature Sensor Module Pinout
  • The BME280 Temperature Sensor Module is a compact, low-power sensor module that measures temperature, humidity, and atmospheric pressure. It has 6 pins, which are explained below:
  • Pin 1: VCC (Power Supply)
  • Function: Power supply pin
  • Description: Connect this pin to a 3.3V or 5V power supply.
  • Note: The BME280 module operates on a voltage range of 1.71V to 3.6V, but 3.3V or 5V is recommended for optimal performance.
  • Pin 2: GND (Ground)
  • Function: Ground pin
  • Description: Connect this pin to the ground of your circuit or microcontroller.
  • Note: This pin is used to provide a return path for the power supply and to ground the sensor module.
  • Pin 3: SCL (Serial Clock)
  • Function: Serial clock pin for IC communication
  • Description: Connect this pin to the SCL pin of your microcontroller or other IC devices.
  • Note: The SCL pin is used to clock data into the BME280 module during IC communication.
  • Pin 4: SDA (Serial Data)
  • Function: Serial data pin for IC communication
  • Description: Connect this pin to the SDA pin of your microcontroller or other IC devices.
  • Note: The SDA pin is used to transmit data between the BME280 module and your microcontroller or other IC devices.
  • Pin 5: CSB (Chip Select)
  • Function: Chip select pin for SPI communication (optional)
  • Description: Connect this pin to a digital output of your microcontroller if you want to use SPI communication.
  • Note: If you're using IC communication, leave this pin unconnected or connect it to VCC.
  • Pin 6: NC (No Connection)
  • Function: No connection pin
  • Description: Leave this pin unconnected, as it is not used in the BME280 module.
  • Connection Structure:
  • To connect the BME280 module to your microcontroller or other devices, follow this structure:
  • VCC to 3.3V or 5V power supply
  • GND to ground of your circuit or microcontroller
  • SCL to SCL pin of your microcontroller or other IC devices
  • SDA to SDA pin of your microcontroller or other IC devices
  • CSB to digital output of your microcontroller (if using SPI) or leave unconnected (if using IC)
  • NC: leave unconnected
  • Remember to use a breadboard or PCB with the correct pin layout to ensure easy connection and avoid damage to the module.

Code Examples

BME280 Temperature Sensor Module Documentation
Overview
The BME280 Temperature Sensor Module is a popular temperature, humidity, and pressure sensor module widely used in IoT projects. It features a compact design, high accuracy, and low power consumption, making it an ideal choice for various applications. This module is based on the Bosch BME280 sensor, which integrates a temperature sensor, humidity sensor, and pressure sensor in a single package.
Pinout
The BME280 Temperature Sensor Module typically has the following pins:
VCC: Power supply pin (3.3V or 5V)
 GND: Ground pin
 SCL: I2C clock pin
 SDA: I2C data pin
 CSB: Chip select pin (optional)
Communication Protocol
The BME280 Temperature Sensor Module communicates using the I2C (Inter-Integrated Circuit) protocol. The default I2C address of the module is 0x76, but it can be changed to 0x77 by connecting the SDO pin to VCC or GND.
Code Examples
### Example 1: Basic Temperature and Humidity Reading using Arduino
This example demonstrates how to read temperature and humidity values from the BME280 module using an Arduino board.
```c++
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_BME280.h>
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
Adafruit_BME280 bme; // I2C
void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println(F("BME280 test"));
  
  bool status = bme.begin();
  if (!status) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }
}
void loop() {
  Serial.print("Temperature = ");
  Serial.print(bme.readTemperature());
  Serial.println(" C");
  
  Serial.print("Humidity = ");
  Serial.print(bme.readHumidity());
  Serial.println(" %");
  
  delay(1000);
}
```
### Example 2: Pressure Reading using Raspberry Pi (Python)
This example demonstrates how to read pressure values from the BME280 module using a Raspberry Pi and Python.
```python
import smbus2
import bme280
port = 1
address = 0x76
bus = smbus2.SMBus(port)
bme280.load_calibration_params(bus, address)
data = bme280.sample(bus, address)
temperature = data.temperature
humidity = data.humidity
pressure = data.pressure
print("Temperature: ", temperature, "C")
print("Humidity: ", humidity, "%")
print("Pressure: ", pressure, "hPa")
```
### Example 3: ESP8266 Wi-Fi Weather Station using BME280 (MicroPython)
This example demonstrates how to read temperature, humidity, and pressure values from the BME280 module and send them to a web server using an ESP8266 board and MicroPython.
```python
import machine
import bme280
import network
import urequests
# Initialize Wi-Fi
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect("your_wifi_ssid", "your_wifi_password")
# Wait for Wi-Fi connection
while not sta_if.isconnected():
    machine.idle()
# Initialize BME280
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))
bme = bme280.BME280(i2c=i2c)
while True:
    temperature = bme.temperature
    humidity = bme.humidity
    pressure = bme.pressure
    
    # Send data to web server
    url = "http://your_web_server_url/weather_data"
    data = {"temperature": temperature, "humidity": humidity, "pressure": pressure}
    response = urequests.post(url, json=data)
    
    # Check response status code
    if response.status_code == 200:
        print("Data sent successfully!")
    else:
        print("Error sending data:", response.text)
    
    machine.idle()
```
These examples demonstrate the basic usage of the BME280 Temperature Sensor Module in various contexts, including Arduino, Raspberry Pi, and ESP8266 platforms. You can modify and expand these examples to suit your specific IoT project requirements.