

The LPS25HB is a digital barometer and pressure sensor manufactured by STMicroelectronics. It is designed to provide high-resolution pressure measurements with excellent accuracy and stability. The sensor operates over a wide range of pressures (260 hPa to 1260 hPa) and temperatures (-30°C to +105°C), making it ideal for a variety of applications.








The following table summarizes the key technical details of the LPS25HB:
| Parameter | Value |
|---|---|
| Pressure Range | 260 hPa to 1260 hPa |
| Temperature Range | -30°C to +105°C |
| Pressure Resolution | 0.01 hPa |
| Output Data Rate (ODR) | 1 Hz to 25 Hz |
| Supply Voltage | 1.7 V to 3.6 V |
| Communication Interfaces | I²C, SPI |
| Power Consumption (typical) | 4 µA (low-power mode) |
| Package Type | HLGA-10L (2.5 mm x 2.5 mm x 0.76 mm) |
The LPS25HB is available in a 10-pin HLGA package. The pinout is as follows:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply (1.7 V to 3.6 V) |
| 2 | GND | Ground |
| 3 | SCL/SPC | I²C clock line / SPI serial port clock |
| 4 | SDA/SDI/SDO | I²C data line / SPI data input/output |
| 5 | CS | SPI chip select (active low) |
| 6 | INT1 | Interrupt 1 output |
| 7 | INT2 | Interrupt 2 output |
| 8 | RES | Reserved (leave unconnected) |
| 9 | RES | Reserved (leave unconnected) |
| 10 | RES | Reserved (leave unconnected) |
The following example demonstrates how to interface the LPS25HB with an Arduino UNO using the I²C protocol:
#include <Wire.h>
// LPS25HB I2C address
#define LPS25HB_ADDRESS 0x5C
// Register addresses
#define LPS25HB_WHO_AM_I 0x0F
#define LPS25HB_PRESS_OUT_XL 0x28
#define LPS25HB_CTRL_REG1 0x20
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Check sensor identity
Wire.beginTransmission(LPS25HB_ADDRESS);
Wire.write(LPS25HB_WHO_AM_I);
Wire.endTransmission();
Wire.requestFrom(LPS25HB_ADDRESS, 1);
if (Wire.available()) {
byte whoAmI = Wire.read();
if (whoAmI == 0xBD) { // Expected WHO_AM_I value for LPS25HB
Serial.println("LPS25HB detected!");
} else {
Serial.println("Sensor not detected. Check connections.");
while (1); // Halt execution
}
}
// Configure the sensor (enable and set output data rate)
Wire.beginTransmission(LPS25HB_ADDRESS);
Wire.write(LPS25HB_CTRL_REG1);
Wire.write(0x90); // Power on, ODR = 1 Hz
Wire.endTransmission();
}
void loop() {
// Read pressure data
Wire.beginTransmission(LPS25HB_ADDRESS);
Wire.write(LPS25HB_PRESS_OUT_XL | 0x80); // Auto-increment address
Wire.endTransmission();
Wire.requestFrom(LPS25HB_ADDRESS, 3);
if (Wire.available() == 3) {
uint8_t xl = Wire.read();
uint8_t l = Wire.read();
uint8_t h = Wire.read();
int32_t pressure_raw = (int32_t)((h << 16) | (l << 8) | xl);
float pressure_hPa = pressure_raw / 4096.0; // Convert to hPa
Serial.print("Pressure: ");
Serial.print(pressure_hPa);
Serial.println(" hPa");
}
delay(1000); // Wait 1 second before next reading
}
Sensor Not Detected
No Pressure Readings
Inaccurate Measurements
Q: Can the LPS25HB measure altitude?
A: Yes, the sensor can calculate altitude based on pressure readings using the barometric formula.
Q: What is the maximum cable length for I²C communication?
A: The maximum length depends on the pull-up resistor values and the capacitance of the cable. Typically, it is limited to a few meters.
Q: Is the LPS25HB waterproof?
A: No, the sensor is not waterproof. Use a protective enclosure if operating in humid or wet environments.