Component guide · Intermediate · 3 min read
MS5803-01BA and MS5803-14BA Pressure Sensor Module

I2C Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The MS5803 is a high-resolution 24-bit absolute pressure and temperature sensor with a metal cap and gel protection. The 01BA version covers 10 to 1300 mbar for altimeters and weather, while the 14BA reads up to 14 bar, about 130 m of water, for depth loggers and ROVs. It speaks I2C at 3.3 V and stores factory calibration coefficients that your code applies.
Key specs at a glance
- 01BA range
- 10 to 1300 mbar, resolution about 0.012 mbar
- 14BA range
- 0 to 14 bar, resolution about 0.2 mbar
- Temperature
- -40 to +85 C, also measured
- Interface
- I2C (address 0x76 or 0x77) or SPI
- Supply
- 1.8 to 3.6 V (3.3 V)
- Package
- Stainless cap with gel; water resistant on the sensing side
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
What the MS5803 pressure sensor module is
After reset the code reads six calibration words from the sensor's PROM, starts a pressure conversion and a temperature conversion, and uses the datasheet formula to compute compensated pressure. The SparkFun MS5803 library does this.
For depth, depth in metres = (pressure - surface pressure) / (density x 9.81); fresh water is about 1 m per 98 mbar.
MS5803 pressure sensor module pinout
The pins on the MS5803 pressure sensor module and what each one does.
| Pin | Function |
|---|---|
| VCC | 3.3 V |
| GND | Ground |
| SDA / SCL | I2C |
| CSB / ADD | Address select (0x76 or 0x77) |
| PS | Protocol select: high for I2C |
- VCC
- 3.3 V
- GND
- Ground
- SDA / SCL
- I2C
- CSB / ADD
- Address select (0x76 or 0x77)
- PS
- Protocol select: high for I2C
Wiring the MS5803 pressure sensor module
The red GY boards are 3.3 V only; use a level shifter with a 5 V Uno. For underwater use, pot the board and keep only the sensor cap exposed.
| MS5803 pressure sensor module pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC / VIN | 3.3V (5V only if the board has a regulator) | 3V3 |
| GND | GND | GND |
| SDA | A4 (through a level shifter on bare 3.3 V boards) | GPIO 21 |
| SCL | A5 | GPIO 22 |
- VCC / VIN
- Arduino Uno:
- 3.3V (5V only if the board has a regulator)
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4 (through a level shifter on bare 3.3 V boards)
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
Example code
The SparkFun library targets the 14BA; for the 01BA use a library with the 01BA formula, as the second-order compensation constants differ.
#include <Wire.h>
#include <SparkFun_MS5803_I2C.h>
MS5803 sensor(ADDRESS_HIGH); // 0x76; use ADDRESS_LOW for 0x77
double surface;
void setup() {
Serial.begin(115200);
Wire.begin();
sensor.reset();
sensor.begin();
surface = sensor.getPressure(ADC_4096); // mbar at start
}
void loop() {
double p = sensor.getPressure(ADC_4096);
double t = sensor.getTemperature(CELSIUS, ADC_512);
double depth = (p - surface) / 98.1; // metres of fresh water
Serial.printf("%.2f mbar %.2f C %.2f m\n", p, t, depth);
delay(1000);
}Setup and tuning
confirm 01BA or 14BA on the label; the formulas differ.
CSB high gives 0x76, low gives 0x77 on most boards.
ADC_4096 gives the lowest noise but takes about 9 ms.
never touch the gel; seal the rest of the board with epoxy or a 3D printed housing.
What you need
Shop this list7 of 8 found in our store · ₹9,120
Generic GY-MS5803-01BA High-Precision Pressure Sensor Module – 10-1300 mbar, I2C, 3V: the part this guide coversGY-MS5803-01BA High-Precision Pressure Sensor Module – 10-1300 mbar, I2C, 3V₹2,839
GY-MS5803-01BA Red Board Pressure Sensor Module – I2C Interface: another version this guide coversGY-MS5803-01BA Red Board Pressure Sensor Module – I2C Interface₹2,779
Generic GY-MS5803-14BA Red Board Pressure Sensor Module – I2C Interface, 0-14 Bar: another version this guide coversGY-MS5803-14BA Red Board Pressure Sensor Module – I2C Interface, 0-14 Bar₹2,909
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
microSD card module: to log depth or altitudeMicroSD Card Module (SPI)₹45Closest match, check the specs
Alternatives and when to choose them
- BMP390 and BMP581: barometric sensors for altitude.
- LPS22 and LPS28: ST barometric and water-resistant sensors.
- Barometric pressure sensors: how to choose one.
Common mistakes to avoid
- 5 V on a 3.3 V board.
- Using 14BA formulas on an 01BA.
- Touching or damaging the gel.
- Leaving the PCB exposed underwater.
Frequently asked questions
How deep can the 14BA go?
About 130 m of water at 14 bar absolute.
Can the 01BA measure altitude?
Yes, with about 10 cm resolution in still air.
Is the module waterproof?
Only the sensor cap; the board needs sealing.
I2C or SPI?
Both; most modules are wired for I2C.
Does it measure temperature?
Yes, for compensation and as a reading.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

