Adafruit Barometric BMP388 Sensor - Qwiic
The BMP388 has better precision than ever, which makes it excellent for environmental sensing or as a precision altimeter. It can even be used in either I2C and SPI configurations. The BMP3xx is the next-generation of sensors from Bosch and is the upgrade to the BMP280 - with a low altitude noise as low as 0.1m and the same fast conversion time. And like the previous BMP280, you can use I2C or SPI. For simple easy wiring, go with I2C. If you want to connect a bunch of sensors without worrying about I2C address collisions, go with SPI.
This sensor has a relative accuracy of 8 Pascals, which translates to about ± 0.5 meters of altitude (compare to the BMP280's 12 Pascal/ ±1 meter). The datasheet sort of implies they intend this sensor to be used for drones and quadcopters, to keep altitude stable, but you could also use this for wearables or any project that wants to track height-above-sea-level. Note that for absolute height you'll still need to enter in the barometric pressure at sea level if the weather changes, but that's true of every altimeter sensor that uses pressure. You can also measure temperature with ±0.5°C accuracy.
Quick Spec
- Chip: BMP388
- Supply Voltage: 3V to 5V
- Operating Range: -40 ~ +85°C, 300 - 1250 hPa
- Digital Interface: I2C, SPI
- Relative Accuracy: ±8 Pa (±0.66 m)
- Absolute Accuracy: ± 50 Pa
- Temperature Coefficient Offset: ±0.75 Pa/K
- Current Consumption: 3.4uA @1 Hz pressure and temperature, 2uA in sleep mode
- Dimensions: 25.5 x 17.8mm
- Net Weight: 4g
Wiring Diagram
Sample Code
/***************************************************************************
This is a library for the BMP3XX temperature & pressure sensor
Designed specifically to work with the Adafruit BMP388 Breakout
----> http://www.adafruit.com/products/3966
These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products
from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
***************************************************************************/
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include "Adafruit_BMP3XX.h"
#define BMP_SCK 13
#define BMP_MISO 12
#define BMP_MOSI 11
#define BMP_CS 10
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BMP3XX bmp;
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println("Adafruit BMP388 / BMP390 test");
if (!bmp.begin_I2C()) { // hardware I2C mode, can pass in address & alt Wire
//if (! bmp.begin_SPI(BMP_CS)) { // hardware SPI mode
//if (! bmp.begin_SPI(BMP_CS, BMP_SCK, BMP_MISO, BMP_MOSI)) { // software SPI mode
Serial.println("Could not find a valid BMP3 sensor, check wiring!");
while (1);
}
// Set up oversampling and filter initialization
bmp.setTemperatureOversampling(BMP3_OVERSAMPLING_8X);
bmp.setPressureOversampling(BMP3_OVERSAMPLING_4X);
bmp.setIIRFilterCoeff(BMP3_IIR_FILTER_COEFF_3);
bmp.setOutputDataRate(BMP3_ODR_50_HZ);
}
void loop() {
if (! bmp.performReading()) {
Serial.println("Failed to perform reading :(");
return;
}
Serial.print("Temperature = ");
Serial.print(bmp.temperature);
Serial.println(" *C");
Serial.print("Pressure = ");
Serial.print(bmp.pressure / 100.0);
Serial.println(" hPa");
Serial.print("Approx. Altitude = ");
Serial.print(bmp.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(" m");
Serial.println();
delay(2000);
}
Resources
Shipping List
- 1 x Adafruit Barometric BMP388 Sensor - Qwiic
Adafruit Barometric BMP388 Sensor - Qwiic
- Brand: Adafruit
- Product Code: AF3966
- Weight: 0.004kg
- Product Status : Active
Stock
Warehouse | Stock Status | Location |
---|---|---|
Centurion | No Stock | |
Stellenbosch | No Stock |
We ship free of charge between branches to complete your order.
-
R195.00 (Inc Tax: R224.25)
Related Products
Tags: adafruit, barometric, baro, bmp, bmp388, bmp390, alt, pressure, altitude, sensor, qwiic, i2c, spi, 3v, 5v, precision, altimeter, temp, temperature