BMP180 pressure sensor

The Bosch BMP180 barometric pressure and temperature sensor on the GY-68 breakout. Aliases: GY-68, BMP085 (its predecessor, same interface), barometer.

Pins

Pin What it does
VCC Supply, 3.3 to 5 V; the board has a 3.3 V regulator.
GND Ground.
SCL, SDA The I2C bus, address 0x77.
3V3 The regulator's output.

While it runs

The two sliders are the temperature and the air pressure.

Reading it on an Arduino

With the Adafruit BMP085 library, which drives the BMP180 and which Mokxi ships as Adafruit_BMP085.h:

#include <Adafruit_BMP085.h>
Adafruit_BMP085 bmp;

void setup() {
  Serial.begin(9600);
  bmp.begin();
}

void loop() {
  Serial.println(bmp.readTemperature());   // degrees C
  Serial.println(bmp.readPressure());      // pascals
  Serial.println(bmp.readAltitude());      // meters, against 101325 Pa
  delay(500);
}

What the model gets right

From the BMP180 datasheet:

Raw counts and a calibration. The chip reports an uncompensated temperature and pressure; eleven calibration words at 0xAA turn them into degrees and pascals with the datasheet's integer arithmetic. The model carries the datasheet's own example calibration and inverts that arithmetic, so the sheet's algorithm and the library read back the sliders to 0.1 C and a pascal.

Conversions take time. A temperature takes 4.5 ms and a pressure 4.5, 7.5, 13.5 or 25.5 ms by oversampling. The start-of-conversion bit reads 1 until it is done, and the data registers keep the last result until then.

Chip id and reset: 0x55 at 0xD0, and 0xB6 to 0xE0 resets it.

What it does not model

Noise, and so the averaging oversampling buys (a reading is exact at every setting, only slower), and the EOC pin of the bare chip.

Common mistakes

Reading the data before the conversion is done: you get the previous result.

Trusting the altitude: it is the barometric formula against standard sea-level pressure, and the weather moves it by tens of meters.

See it in action

Barometer prints the temperature, pressure and altitude. Open it at /templates.