Introduction: Multiples BMP280 Sensors in Arduino Uno Via SPI

About: Just an enthusiastic hobbyist.

In this tutorial we will connect three BMP280 on Arduino Uno via SPI but you could connect up to eight BMP280 on Uno using digital ports D3 to D10 as nSS (Slave Select) for each sensor.

The result of the atmospheric pressure samples measured by the BMP280 will be shown on the 16x2 LCD LCM1602 display.

LCD display will be connected to Uno via I2C (or IIC) by PCF8574 module.

Step 1: ​Overview

The Bosch BMP280 barometric pressure and temperature sensor supports SPI and I2C (or IIC) communication with the microcontroller. It is a high precision sensor (0.16Pa or ±1m) and low consumption (2.7µA).

The BMP280 is the upgraded of BMP180 version that has many improvements: higher resolutions for pressure and temperature, lower power consumption, newly added interface SPI, lower noise measurements, lower RMS noise, smaller footprint, more measuring modes, higher measuring rate and newly added filter against environmental interference.

Bosch BMP280 datasheet

Step 2: BMP180 Versus BMP280

Data to compare the BMP280 sensor with the BME280 sensor.

Step 3: ​Hardware Parts List

Step 4: Building the Circuit

For the three BMP280, the circuit goes as follows:

Uno pin.........................................................................................BMP280 (1) pin
D13 SCK (Serial Clock, output from master)..........SCL
D12 MISO(Master IN Slave OUT).................................SDO
D11 MOSI (Master OUT Slave IN)................................SDA
D10 SSn (Slave Select).......................................................CSB

Uno pin.........................................................................................BMP280 (2) pin
D13 SCK (Serial Clock, output from master)..........SCL
D12 MISO(Master IN Slave OUT).................................SDO
D11 MOSI (Master OUT Slave IN)................................SDA
D9 SSn (Slave Select)..........................................................CSB

Uno pin.........................................................................................BMP280 (3) pin
D13 (SCK Serial Clock, output from master)..........SCL
D12 (MISO Master IN Slave OUT)...............................SDO
D11(MOSI Master OUT Slave IN).................................SDA
D8 SSn (Slave Select)..........................................................CSB

*All VCC and GND from BMP280 linked in 3.3V of Arduino power or protoboard power module.

For the LCD LCM1602 display and PCF8574 I2C module, the circuit goes as follows:

a. Put LCD and PCF8574 on protoboard as shown in the picture.

b. Jumper PCF8574 with Uno analog pins:

Uno pin.....................................PCF8574 pin
A4...............................................SDA
A5...............................................SCL

VCC and GND from PCF8574 linked in 5V of Arduino power or protoboard power module.

Note: If you are using protoboard power module, you must also connect the Arduino Gnd with the protoboard Gnd.

Step 5: The Sketch

Notes:

  1. - This sketch may have intermediate difficulty.
  2. - This Sketch requires the following libraries to be installed on Arduino:
    • LiquidCrystal_I2C.h
    • Adafruit_BMP280.h
    • Adafruit_Sensor.h
    • SPI.h

Download the sketch...

Step 6: Conclusion