Product Introduction #
The Barometric Pressure Sensor adopts BMP280 chip and integrates two main functions of temperature detection and atmospheric pressure detection. It can measure atmospheric pressure to provide information on current altitude or air pressure, and can also be able to measure ambient temperature and provide accurate temperature data for temperature compensation or other environmental monitoring applications. In navigation applications, the barometer can also enhance the GPS positioning effect, or combine with IMU sensors to achieve three-dimensional indoor navigation.
Application reference: weather station, indoor navigation, pneumatic altimeter, UAV, etc.
Parameter Specification #
Parameter | Value/Description |
Operating voltage | 5V |
Air pressure detection range | 300~1100hPa |
Air pressure detecting relative accuracy | ±0.12hPa(±1m) |
Temperature measurement range | 0℃~65℃ |
Temperature measurement accuracy | 0.01℃ |
Output protocol | I2C |
Operating temperature | -10°C~+50°C |
Size | 3.2cm*2.4cm |
Wiring Diagram #
Note: Expansion board is attached to esp32 controller board.
Barometric Pressure Sensor | ESP32 |
SCL | SCL |
SDA | SDA |
VCC | 5V |
GND | GND |
Sample Code #
#include
ACB_Atmospheric BMP;
void setup() {
Serial.begin(115200);//Serial port initialization
BMP.Atmospheric_init();
}
void loop() {
float Temp = BMP.read("Temp");//Define the variable to read the temperature value
float Press = BMP.read("Press");//Define variables to read atmospheric pressure values
float Altitude= BMP.read("Altitude");//Define variables to read altitude values
Serial.print("Temperature: ");
Serial.print(Temp);//Print the temperature value
Serial.println(" ℃");
Serial.print("Barometric pressure: ");
Serial.print(Press);//Print the barometric pressure value
Serial.println(" hPa");
Serial.print("Altitude: ");
Serial.print(Altitude); //Print altitude value
Serial.println(" m");
Serial.println("-------------------");
delay(2000); //Refresh every two seconds
}
Note: If you are using an Arduino board, then connect the SCL pin of the Barometric Pressure Sensor to the PIN A5 of the Arduino and the SDA pin to the PIN A4 of the Arduino, set the baud rate to 9600, and upload the program.
Test Result #
When you successfully connect the wiring according to the wiring diagram and successfully upload the correct program, the serial port monitor will print the current atmospheric temperature, atmospheric pressure intensity and altitude data of the atmospheric pressure sensor.
Related Resources #
Get One Now #
B2B Business: info@acebott.com