SparkFun BME280 Breakout Hookup Guide
Introduction
The BME280 Breakout Board is the easy way to measure pressure and humidity, and without taking up a lot of room. It gives you easy to solder 0.1" headers, runs I2C or SPI, takes measurements at less than 1mA and idles less than 5uA (yes, microamps!).
The BME280 can be used to take pressure, humidity, and temperature readings. Use the data to get relative altitude changes, or absolute altitude if the locally reported barometric pressure is known.
Ranges:
- Temp: -40C to 85C
- Humidity: 0 - 100% RH, =-3% from 20-80%
- Pressure: 30,000Pa to 110,000Pa, relative accuracy of 12Pa, absolute accuracy of 100Pa
- Altitude: 0 to 30,000 ft (9.2 km), relative accuracy of 3.3 ft (1 m) at sea level, 6.6 (2 m) at 30,000 ft.
Covered In This Tutorial
This tutorial gives you all you need to get going with the BME280. First we'll take a look at the IC and hardware, then we'll use the SparkFun BME280 Arduino library to get data out of it by SPI or I2C.
The tutorial is split into the following pages:
- BME280 Hardware Overview -- Basic information about the hardware.
- Assembly -- Connect to the BME280 by I2C or SPI
- Installing the Arduino Library -- How to get it
- Using the Arduino Library -- explains the user API
- Theory and Example Data -- Showcase of the examples included with the library.
- Resources and Going Further -- Links to the datasheet and application notes, plus inspirational projects
Required Materials
Get the datasheet and application notes now. Keep a copy to refer to once you get off the charted path.
This tutorial explains how to use the BME280 Breakout Board with an RedBoard (or Arduino). To follow along, you'll need the following materials:
- BME280 Breakout Board
- Arduino UNO, RedBoard, or another Arduino-compatible board
- Straight Male Headers -- Or wire. Something to connect between the breakout and a breadboard.
- Breadboard -- Any size (even mini) should do.
- M/M Jumper Wires -- To connect between Arduino and breadboard.
- Logic Level Converter -- To shift SPI levels from 5v to 3.3v.
If you use a 3.3V-based micro -- like the Arduino Pro 3.3V or 3.3V Pro Mini -- there is no need for level shifting.
Suggested Reading
Connection of the BME280 uses some basic concepts shared by a lot of our products. If you want to get more familiar with these basic tasks, these articles can help you out.
- Serial Peripheral Interface (SPI)
- Inter-IC Communication (I2C)
- Logic Levels
- Bi-Directional Level Shifter Hookup Guide
If the concepts of pressure are weighing on you, check out these links.
- (external) Air Pressure Altitude Calculator -- Play around to get a feel for what the pressures are at different altitudes.
- Wikipedia: Atmospheric_pressure -- Has a nice equation for conversion of pressure and altitude (referenced for library code).
- MPL3115a2-pressure-sensor-hookup-guide -- pressure-vs-altimeter-setting -- Confused why the reading pressure doesn't match the reported pressure from your local weather station? Read this section.