BMP180 Pressure & Temperature Sensor

Contents

BMP180 Sensor Description

BMP180 chip, showing front and rear faces
Fig 1 - BMP180 sensor

The BMP180 temperature and barometric pressure sensor chip is manufactured by Bosch Sensortec., a subsidiary of the German Bosch Group. It's described in the product Datasheet as the function compatible successor of the BMP085.

The BMP085 was the first of a new generation of high precision digital pressure sensors. The second generation BMP180 offers better accuracy, wider voltage range with lower power consumption.

Both the BMP085 and BMP180 are out of production. At the time of writing (May, 2025) the BMP085 is almost impossible to acquire while the BMP180 is still readily available, especially on inexpensive breakout boards.

Temperature is measured with a bandgap temperature type sensor. This class of sensor relies upon the temperature dependent voltage characteristic of a silicon diode. It is the most common technology used in this type of temperature sensor.

Barometric pressure is measured with a piezo-resistive based sensor.

BMP085 BMP180
Package size (mm) 5 x 5 x 1.2 3.6 x 3.8 x 0.93
Pressure range (hPa) 300-1100 300-1100
Voltage 1.8 - 3.6 1.8 - 3.6
Typical peak conversion
current (µA)
650 650
Current @ 1 SPS, lowest
power setting (µA)
3.0 3.0
Typical standby current (µA) 0.1 0.1
Pressure - relative
accuracy (hPa)
±0.2 ±0.12
Pressure - absolute
accuracy (hPa)
±1.5 ±1.0
Temperature - absolute
accuracy @25°C (°C)
±0.5 ±0.5

The commonly available BMP180 breakout boards have a 3.3V LDO voltage regulator e.g. the 662K. Some (more expensive) boards have the SDA and SCl lines connected via logic level shifters. Those boards will be fine to use with 5V microcontrollers. There's a myriad of online posts that state the BMP180 I2C pins are 5V tolerant. However, you do that at your own risk!

Sensor Resolution and Accuracy

The BMP180 temperature uncompensated output is 16-bit, while the pressure uncompensated output is 16-bit to 19-bit depending on the selected resolution.

The pressure resolution is user configurable; achieved by setting a pressure over-sampling parameter. Increasing the over-sampling also increases the accuracy.

Sensor Packaging

The BMP180 IC is available in a single package type; a 7-pin (pads), LGA (Land Grid Array) package with metal lid. Its measurements are 3.6mm x 3.8mm x 0.93mm.

Pinout

The following pinouts are from the product Datasheet.

BMP180 chip pinout from the Datasheet
Fig 2 - BMP180 IC pinout

The BMP180 production chip only has the one serial interface; I2C. Interestingly the chip has additional pins (CSB and SDO) for SPI even though these are not connected internally.

Bosch advised customers in the Datasheet that BMP180 chips with an SPI interface enabled could be specially ordered.

I2C Interface

As noted above the only external interface offered by the production model BMP180 is I2C. It supports I2C standard, fast and high-speed modes up to a clock frequency of 3.4 Mbit/sec.

The BMP180 has a single fixed I2C address of 0x77.

BMP180 Registers

The exposes the following simple set of 8-bit user accessible registers:

  • 3 x Measurement registers
  • 1 x Measurement Control register
  • 1 x Soft Reset register
  • 1 x ID value register
  • 22 x registers with calibration constants

Temperature & Pressure Measurements

All measurements are one-shot user initiated. Temperature and pressure measurements are independent of each other i.e. separate commands are issued. The three Measurement registers are separately used for temperature and pressure results.

The user initiates a read. After the conversion has completed the sensor drops into a very low current sleep state till another read is initiated.

The datasheet (P11) has a flowchart of the measurement process. In summary:

  1. Initiate temperature measurement with command to the Measurement Control register
  2. Wait for conversion
  3. Read uncompensated temperature
  4. Initiate pressure measurement with command to the Measurement Control register. The command value sent to the register defines the required pressure resolution.
  5. Wait for conversion
  6. Read uncompensated pressure.
  7. Convert uncompensated temperature and pressure into physical units.
Converting uncompensated values

This is probably the hardest step of all as it involves some serious maths.

The first step is for the microcontroller to read in the calibration constants. This will usually be done in the driver's constructor.

These constants are unique for each BMP180 chip and are determined and written to EEPROM at the time of manufacture. Care needs to be taken as they are a mixture of signed and unsigned 16-bit integers.

Bosch provide an API and recommend that this is used to do the two uncompensated conversions. The API's are written in C, thus not an easy option when the language of choice is MicroPython.

However, Bosch do provide sample C code with all the mathematical equations shown in their product Datasheet. It involves some serious floating point maths which doesn't suit MicroPython with its native single precision floats.

However, it is easy to adapt the equations for integer maths using bit shifting operations. MicroPython excels in this case and retains good precision. See P15 of the Datasheet for the equations.

BMP180 Soft Reset

The BMP180 can be soft reset by writing a given command to the Soft Reset register. This reinitialises the IC and sets all register values to their power-on defaults.

BMP180 ID

Genuine Bosch BMP180 chips have the ID value 0x55 written to read-only memory at point of manufacture. This value can be read from the ID value register.

BM180 MicroPython Driver for micro:bit

A BMP180 MicroPython driver specifically for the micro:bit has been developed as part of this series on MicroPython for the microbit. The driver webpage also provides a detailed description of the driver's methods with sample code.

The driver is a full implementation of the BMP180 capabilities as described in the product Datasheet.