BMP280 Barometric Pressure Sensor

by Spaceman Spiff in Circuits > Arduino

11926 Views, 23 Favorites, 0 Comments

BMP280 Barometric Pressure Sensor

18422392_10213055421245364_67317204878084327_o.jpg

The BMP280 is a small sensor that measures Barometric Pressure (the weight of the air), temperature, and as a result elevation as well. I became interested in this sensor to measure the elevation of a model rocket at it's peak, but can also be used for weather sensing, or even predicting optimal fish biting times!

The BMP280 is fairly easy to setup and use, is very cheap, and impressively accurate (±1 hPa).

Parts

18359115_10213055561928881_724860463283014805_o.jpg

For this setup you will need the following:

BMP280

Arduino Uno or one of its variants

Male to Female Jumper Wires

Wiring

18359371_10213055416845254_6995376372858114523_o.jpg
18404061_10213055416885255_8711416298719992494_o.jpg
18358935_10213055416925256_2512152670357099934_o.jpg

In this example connect the following BMP280 pins to the Arduino respectively, VCC to 3.3V, GND to GND, SCL to A5, and SDA to A4.

Libraries

change address.png

Before we get to the actual code you will need to install the following libraries:

Once the libraries are downloaded, place them in the Arduino>Libraries folder. Go to the Adafruit_BMP_280 library folder and open Adafruit_BMP280.h using notepad. Find the I2C address and change it to 0x76 (see photo). Save and close.

Sketch

bmpserialmonitor.png

Download and upload the attached sketch. Use the serial monitor to see what your new sensor is picking up. To use this in future projects, consider utilizing a Data Logging Shield to record your findings remotely.

Downloads