

The MS5837-02BA is a high-precision digital pressure sensor designed to measure both pressure and temperature. It features a compact design, low power consumption, and a high-resolution output, making it ideal for applications requiring accurate environmental monitoring. This sensor is commonly used in underwater pressure measurement, weather stations, and other industrial or scientific applications where precise pressure and temperature data are critical.








The MS5837-02BA offers excellent performance and versatility. Below are its key technical details:
| Parameter | Value |
|---|---|
| Pressure Range | 0 to 2 bar (0 to 200 kPa) |
| Temperature Range | -40°C to +85°C |
| Pressure Resolution | 0.016 mbar |
| Temperature Resolution | 0.002°C |
| Supply Voltage | 1.5V to 3.6V |
| Interface | I²C |
| Current Consumption | < 1 µA (standby mode) |
| Package Dimensions | 3.3 mm x 3.3 mm x 2.75 mm |
The MS5837-02BA has a simple pinout for easy integration into circuits. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply (1.5V to 3.6V) |
| 2 | GND | Ground |
| 3 | SDA | I²C data line |
| 4 | SCL | I²C clock line |
The MS5837-02BA is straightforward to use in a circuit, especially with microcontrollers like the Arduino UNO. Below are the steps and considerations for using this sensor:
VDD pin to a 3.3V power source and the GND pin to ground.SDA pin to the Arduino's A4 pin (I²C data line).SCL pin to the Arduino's A5 pin (I²C clock line).SDA and SCL lines if not already present on your board.Below is an example Arduino sketch to read pressure and temperature data from the MS5837-02BA:
#include <Wire.h>
#include <MS5837.h> // Include the MS5837 library
MS5837 sensor; // Create an instance of the MS5837 class
void setup() {
Serial.begin(9600); // Initialize serial communication
Wire.begin(); // Initialize I²C communication
if (!sensor.init()) {
// Check if the sensor initializes correctly
Serial.println("Sensor initialization failed!");
while (1); // Halt execution if initialization fails
}
sensor.setModel(MS5837::MS5837_02BA); // Set the sensor model
sensor.setFluidDensity(997); // Set fluid density (997 kg/m³ for freshwater)
}
void loop() {
sensor.read(); // Read pressure and temperature data
// Print pressure in mbar
Serial.print("Pressure (mbar): ");
Serial.println(sensor.pressure());
// Print temperature in °C
Serial.print("Temperature (°C): ");
Serial.println(sensor.temperature());
delay(1000); // Wait 1 second before the next reading
}
0x76. Ensure no address conflicts if multiple devices are on the same I²C bus.Sensor Not Responding on I²C Bus
SDA and SCL lines.Incorrect Pressure or Temperature Readings
Initialization Fails
0x76 and ensure the sensor is powered correctly.Q: Can the MS5837-02BA be used in saltwater?
A: Yes, but you must adjust the fluid density in the code to match saltwater (approximately 1025 kg/m³).
Q: What is the maximum depth the sensor can measure underwater?
A: The sensor can measure up to 20 meters underwater, corresponding to its 2 bar pressure range.
Q: Does the sensor require external calibration?
A: No, the MS5837-02BA is factory-calibrated, but you can apply additional calibration in software if needed.
This concludes the documentation for the MS5837-02BA.