Back to Tutorial

ESP32 with BMP180 Pressure & Temperature Sensor


BMP180 Sensor: Digital Barometric Pressure Sensor

The BMP180 is a digital barometric pressure sensor developed by Bosch Sensortec. It is commonly used in weather stations, altimeters, and GPS navigation systems. It can measure atmospheric pressuretemperature, and estimate altitude.


🔧 Key Features

FeatureDescription
Pressure Range300 to 1100 hPa (hectopascal)
Temperature Range0 to 65°C
Altitude Resolution~0.17 meters
InterfaceI²C (default), also supports SPI
Supply Voltage1.8V to 3.6V
Low PowerIdeal for battery-operated devices
SizeVery compact (3.6 x 3.8 x 0.93 mm package)

🧠 How It Works

1. Pressure Measurement

  • The sensor has a piezo-resistive element which changes resistance with pressure.
  • built-in ADC (analog-to-digital converter) digitizes this analog signal.
  • Compensation algorithms (from Bosch) correct for temperature and calibration offsets.

2. Temperature Measurement

  • A temperature sensor is built in to help with pressure compensation and also provides ambient temperature.

🔌 Connections (I²C Mode)

BMP180 PinArduino/ESP32 Pin
VCC3.3V
GNDGND
SDASDA (A4 on Uno)
SCLSCL (A5 on Uno)

📦 Typical Applications

  • Weather monitoring stations
  • GPS devices (for altitude correction)
  • Drones and quadcopters (altitude hold)
  • Smartphones and wearable tech
  • Hiking and climbing gear
HOW TO OPERATE

#include <Wire.h>
#include <Adafruit_BMP085.h>

Adafruit_BMP085 bmp;

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

void loop() {
Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" *C");

Serial.print("Pressure = ");
Serial.print(bmp.readPressure());
Serial.println(" Pa");

Serial.print("Altitude = ");
Serial.print(bmp.readAltitude());
Serial.println(" m");

delay(2000);
}
iotwebplanet.com - 1

Share this post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Tutorial