Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › altitude

How to Connect a GY-68 BMP180 and Measure Pressure and Altitude

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To read pressure with a GY-68 BMP180, connect its power, ground, SCL and SDA pins to a compatible I2C controller, then read the BMP180’s EEPROM calibration coefficients and apply Bosch’s compensation equations to its raw temperature and pressure measurements. To estimate altitude, convert compensated pressure using a reference sea-level pressure; the result depends on that reference and is not an independent height measurement.

What the GY-68 BMP180 measures

The BMP180 is a digital barometric pressure sensor designed to communicate with a microcontroller over I2C. It includes an analog-to-digital converter, control unit and EEPROM. The EEPROM holds individual calibration data used to compensate raw temperature and pressure readings; those uncompensated values are not ready to use as final measurements. Bosch describes the device and its I2C interface in its BMP180 datasheet.

As an Amazon Associate I earn from qualifying purchases.

GY-68 refers to a breakout-board form factor rather than a guarantee that every board has identical power regulation or logic-level circuitry. DFRobot’s TOY0058 module documentation lists 5 V input and I2C output, with +5V, GND, SCL and SDA pins. Check the documentation or schematic for your specific board before connecting it to a 3.3 V-only controller.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I connect a GY-68 BMP180?

For a module with the documented four-pin layout, connect the GY-68 BMP180 barometric pressure sensor module as follows. Confirm the supply and logic-level requirements for your exact breakout before applying power.

#1 Best Overall
ACEIRMC 6pcs GY-68 BMP180 Temperature Barometric Pressure Sensor Module for Arduino (6pcs)
  • BMP180 is a high-precision, small size, ultra-low power pressure sensor that can be used in mobile devices, to measure temperature, pressure, and altitude.
  • Its performance excellence, the absolute accuracy of the lowest can reach 0.03hPa, and low power consumption, only 3μA.
  • BMP180 uses a powerful 8-pin leadless ceramic chip can be directly connected with a variety of microprocessor via I2C.
  • Pressure range: 300 ~ 1100hPa (+9000m to -500m)
  • Low power consumption: 5μA in standard mode. Lead-free, RoHS compliant
GY-68 pin Connect to
+5V A supply appropriate for the specific board
GND Host ground
SCL Host I2C clock
SDA Host I2C data

Bosch’s typical I2C application uses pull-up resistors from 2.2 kΩ to 10 kΩ, with 4.7 kΩ typical. Some breakout boards may already include pull-ups; inspect the board documentation rather than adding another set by default. Pull-up voltage must also be compatible with the host’s I/O pins.

How do I read pressure from BMP180?

Read the sensor’s individual calibration words and compensate its raw readings. Bosch specifies 11 calibration words stored from EEPROM addresses 0xAA through 0xBF, and advises checking that the words are not all zero or 0xFFFF. The sequence below follows the BMP180 datasheet’s measurement process.

Rank #2
HiLetgo BMP180 GY-68 Digital Barometric Pressure Sensor Module Replace BMP085 for Arduino
  • BMP180 is a high-precision, small size, ultra-low power pressure sensor that can be used in mobile devices
  • Its performance excellence, the absolute accuracy of the lowest can reach 0.03hPa, and low power consumption, only 3μA
  • BMP180 powerful 8-pin ceramic leadless chip carrier (LCC) ultra-thin package, you can directly through the I2C bus connected with a variety of microprocessors
  • Pressure range: 300 ~ 1100hPa (9000 meters above sea level ~ -500 meters)
  • Low power consumption: 5μA in standard mode
  1. Read calibration data at startup. Fetch the 11 words from EEPROM addresses 0xAA–0xBF and retain them for compensation. Reject or flag obviously invalid data such as all-zero or all-0xFFFF coefficients.
  2. Measure temperature. Write the temperature-conversion command 0x2E, wait at least 4.5 ms, then read the uncompensated temperature value (UT).
  3. Start a pressure conversion. Write the pressure-conversion command to control register 0xF4. Choose oversampling setting (oss) 0, 1, 2 or 3, corresponding to single, 2×, 4× or 8× internal sampling.
  4. Wait, then read pressure. Allow the conversion time for the selected mode, read uncompensated pressure (UP), and apply Bosch’s fixed-point compensation equations with the calibration coefficients.
  5. Use compensated results. The compensation equations produce pressure in pascals and temperature in 0.1 °C units; convert pressure to hPa by dividing pascals by 100.

Bosch’s 2015 datasheet gives maximum pressure-conversion times of 4.5 ms at oss 0, 7.5 ms at oss 1, 13.5 ms at oss 2 and 25.5 ms at oss 3. Higher oversampling takes longer and trades conversion time and current for reduced pressure noise. The datasheet specifies pressure output resolution of 0.01 hPa and temperature output resolution of 0.1 °C; resolution is not the same as measurement accuracy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The same datasheet describes an advanced software-resolution mode with 0.02 hPa RMS pressure noise and 0.17 m RMS noise, at a maximum conversion time of 76.5 ms. These are Bosch’s published figures for that mode, not a guarantee that every assembled module or application will achieve them.

Rank #3
QCCAN 8PCS GY-68 BMP180 Digital Barometric Pressure Sensor Module
  • BMP180 is a high-precision, small size, ultra-low power pressure sensor that can be used in mobile devices.
  • Pressure range: 300 ~ 1100hPa (9000 meters above sea level ~ -500 meters); Low power consumption: 5μA in standard mode.
  • Using a sensor as capable as the BMP180 you can achieve accuracy of 1m, with noise of only 17cm in ultra high resolution noise. The device will operate at only 0.3uA meaning low current draw for battery powered applications.
  • The BMP180 comes fully calibrated and ready to use. As the device operates over I2C we've added optional I2C pull ups that can be enabled using the PU (pull up) jumper on the board for your convenience and ease during breadboard.
  • Using I2C, the device provides pressure and temperature as 16bit values, which are used along with calibration data within the device are used to provide a temperature compensated altitude calculation.

How do I calculate altitude from BMP180 pressure?

Use compensated pressure in the barometric formula, with a chosen reference sea-level pressure:

altitude = 44330 × (1 − (p / p0)^(1 / 5.255))

  • p is the measured, compensated pressure.
  • p0 is the reference sea-level pressure in the same units, such as 1013.25 hPa.

Bosch gives this international barometric formula in its BMP180 datasheet. The calculated altitude is an estimate relative to p0. Weather and location change sea-level pressure, so a fixed reference can make the displayed altitude drift even when the sensor has not moved. For tracking relative changes, set p0 using a reliable pressure reading at a known elevation. Bosch also provides the inverse relationship for estimating sea-level pressure when measured pressure and absolute altitude are known.

Rank #4
hiBCTR 5-Pack BMP280 Barometric Pressure Sensor Module, 3.3V
  • HIGH-PRECISION SENSING: Delivers exceptional accuracy for environmental data, measuring barometric pressure with ±1 hPa absolute accuracy and temperature with ±1.0°C accuracy. This precision allows it to function as a reliable altimeter with an approximate accuracy of ±1 meter, perfect for detailed weather monitoring and altitude tracking projects.
  • IMPORTANT - PRESSURE & TEMPERATURE ONLY: This module uses the BMP280 sensor, which accurately measures BAROMETRIC PRESSURE and TEMPERATURE. It does NOT measure humidity. For projects requiring humidity data, please search for a module based on the BME280 sensor. This clarification ensures you select the correct component for your specific application.
  • DUAL I2C & SPI INTERFACE: Offers flexible connectivity with support for both I2C and SPI communication protocols, allowing for easy integration into a wide range of microcontroller projects. Please note, the default I2C address for this module is 0x76, which is the alternate address in many common libraries.
  • VERSATILE DIY APPLICATIONS: An ideal component for a multitude of projects including building home weather stations, enhancing GPS navigation with slope and dead-reckoning data, indoor navigation like floor and elevator detection, altitude sensing for drones and flying toys, and various other DIY electronics and scientific applications.
  • COMPACT 5-PACK KIT: This value pack includes 5 individual BMP280 sensor modules and 5 corresponding male header strips, providing excellent value for multiple projects or classroom use. Each board features a compact footprint of 1.52 x 1.20 cm for easy placement in space-constrained designs. We provide comprehensive after-sales support: complete digital documentation including user guides and technical references is available through our store customer service, and our support team is ready to assist with installation, programming, and troubleshooting to help you get started quickly.

As a sense-check on pressure sensitivity, Bosch reports that a 1 hPa pressure change corresponds to 8.43 m at sea level. This illustrates why pressure-derived altitude is sensitive to changes in the reference pressure and local weather.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to check when choosing an implementation

When comparing libraries or writing your own driver, look for these implementation details rather than relying on a successful I2C connection alone:

Quick Recap

Bestseller No. 1
ACEIRMC 6pcs GY-68 BMP180 Temperature Barometric Pressure Sensor Module for Arduino (6pcs)
ACEIRMC 6pcs GY-68 BMP180 Temperature Barometric Pressure Sensor Module for Arduino (6pcs)
Pressure range: 300 ~ 1100hPa (+9000m to -500m); Low power consumption: 5μA in standard mode. Lead-free, RoHS compliant
$6.99
Bestseller No. 2
HiLetgo BMP180 GY-68 Digital Barometric Pressure Sensor Module Replace BMP085 for Arduino
HiLetgo BMP180 GY-68 Digital Barometric Pressure Sensor Module Replace BMP085 for Arduino
Pressure range: 300 ~ 1100hPa (9000 meters above sea level ~ -500 meters); Low power consumption: 5μA in standard mode
$5.49
Bestseller No. 5
HiLetgo 5pcs High Precision BMP280-3.3 Atmospheric Pressure Sensor Replace BMP180/BMP186
HiLetgo 5pcs High Precision BMP280-3.3 Atmospheric Pressure Sensor Replace BMP180/BMP186
BMP280-3.3 Atmospheric Pressure Sensor; Health care application(e.g. sirometry); Vertical velocity indication(e.g. risk/sink speed)
$7.39
Best Value
HiLetgo 5pcs High Precision BMP280-3.3 Atmospheric Pressure Sensor Replace BMP180/BMP186
  • BMP280-3.3 Atmospheric Pressure Sensor
  • Health care application(e.g. sirometry)
  • Vertical velocity indication(e.g. risk/sink speed)
  • Size:(L*W)1.52* 1.20cm/0.60"*0.47"
  • Indoor navigation(floor detection,elevator detection)
  • Calibration: Does the code read and apply this sensor’s EEPROM coefficients, rather than treating raw UP and UT as compensated values?
  • Conversion mode: Is the chosen oversampling setting appropriate for the required noise and latency?
  • Electrical compatibility: Are the breakout’s supply, logic levels and I2C pull-ups safe for the controller?
  • Altitude reference: Can the code set or update p0 for local conditions or a known elevation?
  • Failure handling: Does it detect invalid calibration or reads, and wait for conversion completion before fetching results?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

altitudebarometric pressure sensorBMP180GY-68I2C

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.