4DVolt

BMP180: pinout and wiring of the pressure sensor

The BMP180 measures atmospheric pressure and temperature over I2C, which lets you calculate altitude. See the pinout, how to wire it and test the pressure-to-altitude conversion in the simulator.

BMP180 sensor module
BMP180 module

Specifications

Measures
Pressure and temperature
Supply
1.8 V to 3.6 V (modules with regulator: 5 V)
Interface
I2C
I2C address
0x77 (fixed)
Pressure
300 to 1100 hPa (±0.12 hPa)
Temperature
0 to 65 °C (±1 °C)
Altitude
−500 m to 9000 m
Current
≈ 5 µA per reading/s

Pinout

Pin order changes between makers. Check your module silkscreen, especially if it has no voltage regulator.

BMP180 module (4 pins)

1 VIN / VCC Power supply (3.3 V; 5 V only if the module has a regulator)
2 GND Ground
3 SCL I2C clock
4 SDA I2C data

BMP180 simulator

Change the pressure and temperature the sensor measures and see the calculated altitude.

Sensor reading
Pa · °C
Calculated altitude
m

Every 8 m of climb the pressure drops about 1 hPa. Altitude uses the barometric formula with the reference sea-level pressure; set P0 to the local value for better accuracy.

How to wire it

Connect VIN to 3.3 V (or 5 V if the module has a regulator) and GND to ground. On the Arduino Uno connect SDA to A4 and SCL to A5; on the ESP32, SDA to GPIO 21 and SCL to GPIO 22.

The I2C address is always 0x77 and cannot be changed. It can share the bus with the MPU6050, which uses 0x68.

The chip stores factory calibration coefficients, which the library reads at startup to compensate the pressure and temperature readings.

Altitude comes from pressure: altitude = 44330 × (1 − (P / P0)^(1/5.255)), where P0 is the sea-level pressure (standard 1013.25 hPa). To be accurate, set P0 to the local pressure of the day.

Keep the sensor away from heat sources and direct wind, which change the measured temperature and pressure.

Example code (Arduino)

Install the "Adafruit BMP085 Library" (it works for the BMP180) and use this sketch.

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

Adafruit_BMP085 bmp;

void setup() {
  Serial.begin(9600);
  if (!bmp.begin()) {
    Serial.println("BMP180 not found. Check SDA/SCL.");
    while (1) {}
  }
}

void loop() {
  Serial.print("Temperature: ");
  Serial.print(bmp.readTemperature());
  Serial.print(" C  Pressure: ");
  Serial.print(bmp.readPressure() / 100.0);   // Pa -> hPa
  Serial.print(" hPa  Altitude: ");
  Serial.print(bmp.readAltitude());            // uses 1013.25 hPa
  Serial.println(" m");
  delay(1000);
}

Common mistakes

  • Powering a BMP180 without a regulator from 5 V: the chip accepts 3.6 V at most and burns out.
  • Mixing up the BMP180 and BMP280: the address and library differ, and the BMP280 does not work with BMP180 code.
  • Expecting exact altitude with the standard P0: sea-level pressure changes daily and the error can exceed tens of meters.
  • Not checking SDA and SCL: the library returns "not found" and the program hangs in begin().
  • Placing the sensor near hot regulators or resistors: the measured temperature rises and corrupts the compensation.

Always check the manufacturer's datasheet for your exact model: pin order can vary between modules.

Frequently asked questions

What is the BMP180 I2C address?

Always 0x77. The address is not configurable.

How does the BMP180 calculate altitude?

It measures pressure, and altitude is computed with the barometric formula from the sea-level pressure. Every 8 m of climb pressure drops about 1 hPa.

What is the difference between BMP180 and BMP280?

The BMP280 is newer, more accurate, uses less power and has address 0x76 or 0x77. The libraries are different.

Does the BMP180 work with an ESP32?

Yes. Use 3.3 V, SDA = GPIO 21 and SCL = GPIO 22.

Other components