Measure Atmospheric Pressure with BMP180 Sensor

Measure Atmospheric Pressure with BMP180 Sensor

Objective

Learn how to measure atmospheric pressure and temperature using the BMP180 sensor with Arduino.

Required Components

Working Principle

The BMP180 sensor measures the pressure and temperature in the atmosphere. It communicates with the Arduino using the I2C protocol for precise readings.

Circuit Diagram

BMP180 Sensor Circuit Diagram

Arduino Code


#include 
#include 
#include 

Adafruit_BMP085_Unified bmp;

void setup() {
    Serial.begin(9600);
    if (!bmp.begin()) {
        Serial.println("BMP180 sensor not detected");
        while (1);
    }
}

void loop() {
    sensors_event_t event;
    bmp.getEvent(&event);
    if (event.pressure) {
        Serial.print("Pressure: ");
        Serial.print(event.pressure);
        Serial.println(" hPa");
    }

    float temperature;
    bmp.getTemperature(&temperature);
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" °C");
    delay(1000);
}
            

Results

The serial monitor will display real-time atmospheric pressure and temperature data.

Applications

Conclusion

The BMP180 sensor is an accurate and efficient way to measure atmospheric pressure and temperature, making it suitable for a variety of projects.