Pressure & Altitude
Interfacing MS5611 Pressure & Altitude with Arduino Uno
What is the MS5611?
MS5611 practical reference
A high-resolution barometric sensor with centimeter-level altitude precision, frequently used in flight controllers and drones. The MS5611 measures atmospheric pressure with extremely fine resolution and converts that reading into altitude using the standard barometric formula, making it a staple in multirotor flight controllers for altitude-hold, weather stations wanting precise pressure trends, and any project needing to detect small changes in elevation that cheaper pressure sensors would miss.
Key specifications
- Sensor type: MS5611 high-resolution barometric pressure sensor with integrated 24-bit ADC
- Operating voltage: 1.8V–3.6V DC (breakout boards regulate from 3.3-5V input)
- Operating current: ~1-1.5 µA in standby, ~12.5 µA average during conversion
- Pressure range: 10 mbar to 1200 mbar
- Pressure resolution: 0.012 mbar (roughly 10cm altitude resolution)
- Temperature accuracy: ±0.8°C (also provides onboard temperature reading used to compensate pressure)
- Interface: I2C (up to 400 kHz) or SPI, selectable depending on breakout wiring
- I2C address: 0x76 or 0x77 depending on the CSB pin state
Pinout and connection notes
Most breakout boards default to I2C mode; the CSB pin's state sets which of the two possible I2C addresses (0x76 or 0x77) the sensor responds on, which is useful when combining it with another sensor sharing the same default address on one bus. For altitude calculations, remember pressure readings need to be compensated against a known sea-level reference or a recent local baseline for meaningful relative-altitude results.
- VCC: Power, 1.8–3.6V DC (most breakouts accept 3.3-5V and regulate down)
- GND: Ground
- SCL / SCLK: I2C clock or SPI clock, depending on interface mode
- SDA / SDI: I2C data or SPI data-in, depending on interface mode
- CSB: Chip select — determines I2C address (0x76/0x77) or enables SPI mode when pulled LOW
- SDO: SPI data-out (only used in SPI mode)
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Setting Up MS5611 with Arduino Uno
Library
MS5611 by Rob Tillaart
Arduino IDE → Tools → Manage Libraries → search "MS5611" by Rob Tillaart → Install
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V / 3.3V | Check your breakout — some are 3.3V only. |
| GND | GND | |
| SDA | A4 | I2C data. |
| SCL | A5 | I2C clock. |
Swipe sideways to see every column →
- Altitude is derived from pressure using the standard atmosphere formula, referenced to sea-level pressure (1013.25 mbar) — for accurate altitude, calibrate that constant against a known local pressure reading (e.g. from a weather station) rather than trusting the default.
- This sensor is notably more precise than the cheaper BMP180/BMP280 for altitude work (used in drone flight controllers for that reason), at a higher price point.
- ms5611.read() blocks briefly while it triggers and waits for both the temperature and pressure conversions — don't call it faster than a few times a second.
Related Components
A3144
Digital Hall-effect switch for contactless magnetic detection
BME280
Combined pressure, humidity, and temperature sensing — the go-to all-in-one environmental sensor.
BMP180
Barometric pressure and temperature sensor with excellent library support — a weather station staple.
BMP280
Precise barometric pressure and temperature sensing over I2C or SPI — ideal for weather stations.
Related Guides & Projects
Arduino Uno R4 Minima Pinout: Every GPIO, ADC, DAC, and Op-Amp Pin Explained
A complete Arduino Uno R4 Minima pinout reference — digital I/O, ADC, DAC, op-amp, CAN, dual UART, and exactly what it leaves out compared to the WiFi variant.
Mastering PWM on Arduino: Dimming LEDs and Controlling Motors
Understand what PWM actually is on Arduino, dim an LED smoothly, and safely control a DC motor's speed with a driver chip -- plus the mistakes (like wiring a motor straight to a pin) that damage boards.
4-Digit 7-Segment Counter with TM1637 & Arduino
Drive a TM1637-based 4-digit 7-segment display with Arduino Uno to show a real-time up/down counter, elapsed timer, and scrolling text. Covers library setup, brightness control, and custom segment mapping.
Arduino Uno R4 Minima vs WiFi: Which One Should You Choose?
Same processor, same memory, different price. Here's what the WiFi variant's extra hardware actually gets you, and when the Minima is the smarter buy.