BlueDot BMP388 High Accuracy Pressure Sensor


Description


With the new barometric pressure sensor BMP388 from BOSCH Sensortec, this tiny board measures atmospheric pressure with a relative accuracy of only ± 8 Pa, enabling you to measure altitude with an accuracy of ± 0.66 meters! This a great improvement over the accuracy reached with the previous BMP280 pressure sensor (± 12 Pa, equivalent to ± 1.0 meters) and much better than the accuracy from the BME280 and BME680 environmental sensors (± 120 Pa). Since it enables very accurate altitude measurements, the BMP388 is well suited for drone applications. 

 

Here are the boards main features:

  • Temperature,  Pressure and Altitude Measurements. You can measure temperature and atmospheric pressure with high precision. Besides, the pressure measurements allows you to calculate your altitude with a precision of ± 0.66 meters.
  • 3.3V and 5V Power Supply. The on-board voltage regulator accepts anything from 2.6V to 5.5V to supply the BMP388 sensor. 
  • SPI and I2C Communication. Depending on your project, you may choose between SPI and I2C protocols to communicate with the sensor. 
  • Data Transfer with both 5V and 3.3V devices. While devices like the Arduino Uno interpret a 5V signal as a logic HIGH, the BMP388 uses 3.3V as a logic HIGH. The on-board logic level converter translates the 5V signals into 3.3V signals and vice-versa.
Get your BlueDot BME280 Board at Amazon!

Technical Data


Technical Data from BME280 Sensor

Assembly


The first step with the BMP388 High Accuracy Sensor is to solder the 6 pin header that comes along with the board. The easiest way to solder the board is to insert the header into a breadboard (long pins down) and solder the short pins to the board.

Assembly: Breakout Board with header pin
Assembly: Insert header pin into breadboard
Assembly: Solder BlueDot Board to header pin

Connecting via I2C


Connecting the BMP388 on the I2C bus is very easy. The first step is to connect the board to the power supply.

  • VCC Pin. Connect the VCC pin from the board to either 5V or 3.3V output from your Arduino. 
  • GND Pin. Connect the GND pin from the board to the GND from the Arduino.

Great! Now we need to connect the sensor to the I2C bus. The I2C communication uses basically two wires. The clock signal is generated by the Arduino and transferred to the sensor through the SCL line. The Arduino can send commands to the sensor using the SDA line. Just as well, all data from the sensor goes back to the Arduino through the SDA line. Because of that, the SDA line is bidirectional.

  • SDI Pin. Connect the SDI pin from the board to the SDA line on the Arduino. This corresponds to the pin A4 on the Arduino Uno.
  • SCK Pin. Connect the SCK pin from the board to the SCL line on your Arduino. This corresponds to the pin A5 on the Arduino Uno.
  • SDO Pin. Here we have two options. Leave the SDO pin unconnected to use the default I2C address (0x76). Instead we can connect the SDO pin to GND in order to use the alternative I2C address (0x77).
  • CS Pin. Leave it unconnected.
  • INT Pin. This is the interrupt from the BMP388 sensor. You may leave it unconnected. 
  • 3V3 Pin. This is the output from the voltage regulator. You can pull up to 100 mA from this output. Otherwise just leave it unconnected.
I2C Wiring for BlueDot BME280 Board

Connecting via Hardware-SPI


We can also communicate with the BMP388 sensor using the SPI protocol. Just like before, the first step is to connect the board to a power supply.

  • VCC Pin. Connect the VCC pin from the board to either 5V or 3.3V output from your Arduino. 
  • GND Pin. Connect the GND pin from the board to the GND from the Arduino.

Unlike the I2C protocol, the SPI communication uses 4 different lines. All data from the sensor is transferred back to the Arduino through the SDO line (Serial Data Output), while all commands from the Arduino are transferred through the SDI (Serial Data Input) line. The clock signal is generated from the Arduino and sent through the SCK line (Serial Clock). Finally, the CS or Chip Select line is used to tell the sensor when the communication is starting or ending.

  • SDI Pin. Connect the SDI pin from the board to the MOSI pin on the Arduino. The MOSI pin (Master Out Slave In) is located on the ICSP header.
  • SCK Pin. Connect the SCK pin from the board to the SCK pin on your Arduino. You will also find the SCK pin on the ICSP header.
  • SDO Pin. Connect the SDO pin from the board to the MISO pin on the Arduino. The MISO pin (Master In Slave Out) is also located on the ICSP header.
  • CS Pin. Connect the CS pin from the board to the digital pin 10 on the Arduino. If you like, you can use any other digital pin, just remember to change the program as well.
  • INT Pin. Unless you wish to use the interrupt from the sensor, you can leave it unconnected. 
  • 3V3 Pin. This is the output from the voltage regulator. You can pull up to 100 mA from this output. Otherwise just leave it unconnected.
Hardware-SPI Wiring for BlueDot BME280 Board

Not sure where the ICSP header is located? On the Arduino Uno it is the header on the far side of the board, close to the microcontroller.

ICSP Header on Arduino Uno

Connecting via Software-SPI


We can also use the SPI communication without using the ICSP header, using regular digital pins instead. In this case, the communication is called Software-SPI.

  • VCC Pin. Connect the VCC pin from the board to either 5V or 3.3V output from your Arduino. 
  • GND Pin. Connect the GND pin from the board to the GND from the Arduino.
  • SDI Pin. Connect the SDI pin from the board to the digital pin 13 on the Arduino. 
  • SCK Pin. Connect the SCK pin from the board to the digital pin 12 on the Arduino.
  • SDO Pin. Connect the SDO pin from the board to the digital pin 11 on the Arduino.
  • CS Pin. Connect the CS pin from the board to the digital pin 10 on the Arduino.
  • INT Pin. Unless you wish to use the interrupt from the sensor, you can leave it unconnected. 
  • 3V3 Pin. This is the output from the voltage regulator. You can pull up to 100 mA from this output. Otherwise just leave it unconnected.
Software-SPI Wiring with BlueDot BME280 Board

Installing Arduino Library


Although there is currently no Arduino Library from BlueDot available for this sensor, you can read the BMP388 using this great library written by Adafruit. You can download and install the library directly from the Arduino IDE. Just open the Arduino IDE and go to Sketch > Include Library > Manage Libraries... and search for the Adafruit BMP388 Library on the Library Manager. You can find this library under the name "Adafruit BMPXX Library".

Arduino IDE: Opening Library Manager
Arduino IDE: Installing BlueDot BME280 library

Alternatively, you can download the latest version of the library from their Github repository.


xkcd.com

xkcd: commented

Upload Example-Sketch


After installing the library we can open an example sketch. Just go to File > Examples > Adafruit BMP3XX Library and open the sketch bmp3xx_simpletest.

Arduino IDE: Uploading sketch example for BME280

The first step using this sketch is defining the communication protocol. Depending on how you wired your board, you can choose between I2C, Hardware SPI and Software SPI. The I2C mode is the default setup. 

 

  Adafruit_BMP3XX bmp; // I2C
//Adafruit_BMP3XX bmp(BMP_CS); // hardware SPI
//Adafruit_BMP3XX bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);

If you are using the Hardware SPI mode, then you need to write into the program, which digital pin is connected to the CS pin of the BMP388 sensor. If you are using the Software SPI mode, then you also need to define digital pins for the MISO (SDO), MOSI (SDI) and SCK pins. These can be defined at the very beginning of the sketch.

 

    #define BMP_SCK 13
    #define BMP_MISO 12
    #define BMP_MOSI 11
    #define BMP_CS 10

This is actually all you need to do before running the program.

 

  //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);
    

Now you are ready to run the sketch. 

Get your BlueDot BME280 Board at Amazon!

xkcd.com

xkcd: degrees

3D Model


A 3D model of the BlueDot BMP388 board is available as a STEP file (click here to download). A STEP file is a CAD file format widely used for exchanging CAD files between companies and can be easily read by most (if not all) CAD software applications.

 

You can also view 3D models online without installing any software on your computer. The images below were taken using Autodesk Viewer, a online, free to use tool from Autodesk. It does require a registration at Autodesk, but it is worth it!

3D Model from BlueDot BMP388 Board V1.
Measuring dimension from BMP388 board using Autodesk Viewer.

Schematics


Schematics for BlueDot BME280 Board

Downloads


Get your BlueDot BME280 Board at Amazon!

xkcd.com

xkcd: lightsaber