Objective
Learn how to measure atmospheric pressure and temperature using the BMP180 sensor with Arduino.
Required Components
- BMP180 Sensor
- Arduino Board (e.g., Arduino Uno)
- Jumper wires
- Breadboard
- Arduino IDE (for programming)
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
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
- Weather monitoring
- Altitude measurements
- Pressure correction systems
Conclusion
The BMP180 sensor is an accurate and efficient way to measure atmospheric pressure and temperature, making it suitable for a variety of projects.