Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›ST LPS22HB, LPS22HH, LPS28, LPS33HW

Component guide · Beginner · 3 min read

ST LPS22HB, LPS22HH, LPS28, LPS33HW and LPS27HHW Pressure Sensors

Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the ST LPS22 and LPS28 pressure sensor isST LPS22 and LPS28 pressure sensor pinoutWiring the ST LPS22 and LPS28 pressure sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

ST's LPS sensors are small MEMS barometers that report absolute air pressure and temperature over I2C or SPI. The LPS22HB and LPS22HH cover 260 to 1260 hPa for weather and altitude, the LPS28DFW extends to 4060 hPa, and the LPS33HW and LPS27HHW have a gel-filled port that survives water. The Adafruit STEMMA QT boards plug in with a Qwiic cable and work at 3.3 or 5 V.

Key specs at a glance

LPS22HB / LPS22HH
260 to 1260 hPa, about 0.1 hPa accuracy (HH lower noise)
LPS28DFW
Dual full scale up to 4060 hPa, water resistant
LPS33HW / LPS27HHW
260 to 1260 hPa, water resistant with gel port
Interface
I2C (0x5C or 0x5D) or SPI; I3C on LPS28
Supply
1.7 to 3.6 V chip; Adafruit boards accept 3.3 to 5 V
Output rate
Up to 200 Hz

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Adafruit LPS22 Pressure Sensor – STEMMA QT / Qwiic – LPS22HB₹1,103
  • Option 2Adafruit LPS28 (LPS28DFW) Pressure Sensor Module – I2C/MIPI I3CSM Interface₹1,989
  • Option 3Adafruit LPS33HW Water Resistant Pressure Sensor – STEMMA QT₹1,729
  • Option 4STMicroelectronics LPS22HBTR MEMS Piezoresistive Digital Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10₹204
  • Option 5STMicroelectronics LPS22HHTR MEMS Absolute Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10₹379
  • Option 6STMicroelectronics LPS27HHW Pressure Sensor, 260-1260 hPa, Waterproof, 24-bit, 0.5 hPa Accuracy, I²C/SPI, LGA-10₹379
01

What the ST LPS22 and LPS28 pressure sensor is

These sensors measure absolute pressure, so they show weather changes and altitude. Sea-level pressure is about 1013 hPa and pressure falls roughly 0.12 hPa per metre near the ground.

The water-resistant versions can sit behind a vent or in a wet enclosure and are used in wearables and rain-exposed weather stations. The bare chips (LPS22HBTR, LPS22HHTR, LPS27HHW) are LGA parts for your own PCB.

02

ST LPS22 and LPS28 pressure sensor pinout

The pins on the ST LPS22 and LPS28 pressure sensor and what each one does.

PinFunction
VIN / VDDSupply (3.3 V; 5 V on Adafruit boards)
GNDGround
SCL / SCKI2C or SPI clock
SDA / SDII2C data or SPI data in
SDO / SA0Address select or SPI data out
CSHigh for I2C, low for SPI
INT / DRDYData ready or threshold interrupt
PinFunction
VIN / VDD
Supply (3.3 V; 5 V on Adafruit boards)
GND
Ground
SCL / SCK
I2C or SPI clock
SDA / SDI
I2C data or SPI data in
SDO / SA0
Address select or SPI data out
CS
High for I2C, low for SPI
INT / DRDY
Data ready or threshold interrupt
03

Wiring the ST LPS22 and LPS28 pressure sensor

Adafruit STEMMA QT boards connect with a Qwiic cable and have level shifting. Bare chips are 3.3 V only and need a careful LGA layout.

ST LPS22 and LPS28 pressure sensor pinArduino UnoESP32
VCC / VIN3.3V (5V only if the board has a regulator)3V3
GNDGNDGND
SDAA4 (through a level shifter on bare 3.3 V boards)GPIO 21
SCLA5GPIO 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
04

Example code

Use Adafruit_LPS33 or Adafruit_LPS35HW for the LPS33HW, and Adafruit_LPS28 for the LPS28DFW. Replace 1013.25 with your local sea-level pressure for accurate altitude.

Read pressure and temperature (Adafruit LPS2X library) · Arduino C++Verify & upload in Electrolark
#include <Adafruit_LPS2X.h>
Adafruit_LPS22 lps;

void setup() {
  Serial.begin(115200);
  if (!lps.begin_I2C()) { Serial.println("LPS22 not found"); while (1) delay(10); }
  lps.setDataRate(LPS22_RATE_10_HZ);
}

void loop() {
  sensors_event_t p, t;
  lps.getEvent(&p, &t);
  float alt = 44330.0 * (1.0 - pow(p.pressure / 1013.25, 0.1903));
  Serial.printf("%.2f hPa  %.2f C  %.1f m\n", p.pressure, t.temperature, alt);
  delay(1000);
}
05

Setup and tuning

Address

SDO/SA0 low gives 0x5C, high gives 0x5D.

Altitude

relative height changes are far more accurate than absolute altitude.

Weather

log pressure every 10 minutes; a fall of 3 hPa in 3 hours hints at bad weather.

Placement

keep it away from fans and direct sun, which cause pressure and heat errors.

06

What you need

Shop this list11 of 12 found in our store · ₹6,448

  • Adafruit LPS22 Pressure Sensor – STEMMA QT / Qwiic – LPS22HB: the part this guide coversAdafruit LPS22 Pressure Sensor – STEMMA QT / Qwiic – LPS22HB₹1,103
  • Adafruit LPS28 (LPS28DFW) Pressure Sensor Module – I2C/MIPI I3CSM Interface: another version this guide coversAdafruit LPS28 (LPS28DFW) Pressure Sensor Module – I2C/MIPI I3CSM Interface₹1,989
  • Adafruit LPS33HW Water Resistant Pressure Sensor – STEMMA QT: another version this guide coversAdafruit LPS33HW Water Resistant Pressure Sensor – STEMMA QT₹1,729
  • STMicroelectronics LPS22HBTR MEMS Piezoresistive Digital Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10: another version this guide coversSTMicroelectronics LPS22HBTR MEMS Piezoresistive Digital Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10₹204
  • STMicroelectronics LPS22HHTR MEMS Absolute Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10: another version this guide coversSTMicroelectronics LPS22HHTR MEMS Absolute Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10₹379
  • STMicroelectronics LPS27HHW Pressure Sensor, 260-1260 hPa, Waterproof, 24-bit, 0.5 hPa Accuracy, I²C/SPI, LGA-10: another version this guide coversSTMicroelectronics LPS27HHW Pressure Sensor, 260-1260 hPa, Waterproof, 24-bit, 0.5 hPa Accuracy, I²C/SPI, LGA-10₹379
  • 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
  • 0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
  • 4-channel logic level converter (BSS138): to connect 5 V and 3.3 V signals safely4-Channel Logic Level Converter (BSS138)₹20
  • Solderless breadboard: to build without solderingSolderless Breadboard₹68
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓BME280 and BMP280: Bosch barometers, with humidity on the BME280.
  • ✓BMP390 and BMP581: lower noise for altitude.
  • ✓MS5803: for water depth and higher pressures.
08

Common mistakes to avoid

  • !Using an LPS22 library on an LPS33 without checking the chip ID.
  • !Expecting gauge pressure readings.
  • !Mounting in sunlight or next to a fan.
  • !5 V on a bare 3.3 V chip.
09

Frequently asked questions

LPS22HB or LPS22HH?

The HH is newer with lower noise and current; code is very similar.

Can it go underwater?

LPS33HW, LPS27HHW and LPS28DFW are water resistant; check the depth rating.

Does it measure humidity?

No, only pressure and temperature.

How accurate is altitude?

About 1 m for changes, worse for absolute altitude.

Can it run from a coin cell?

Yes, it draws a few microamps at low output rates.

Parts for this guide

  • Adafruit LPS22 Pressure Sensor – STEMMA QT / Qwiic – LPS22HB
    ₹1,103View
  • Adafruit LPS28 (LPS28DFW) Pressure Sensor Module – I2C/MIPI I3CSM Interface
    ₹1,989View
  • Adafruit LPS33HW Water Resistant Pressure Sensor – STEMMA QT
    ₹1,729View
  • STMicroelectronics LPS22HBTR MEMS Piezoresistive Digital Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10
    ₹204View
  • STMicroelectronics LPS22HHTR MEMS Absolute Pressure Sensor, 26-126 kPa, I2C/SPI, HLGA-10
    ₹379View
  • STMicroelectronics LPS27HHW Pressure Sensor, 260-1260 hPa, Waterproof, 24-bit, 0.5 hPa Accuracy, I²C/SPI, LGA-10
    ₹379View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • 0.96" OLED Display 128x64
    ₹139View
  • 4-Channel Logic Level Converter (BSS138)
    ₹20View
  • Solderless Breadboard
    ₹68View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Pressure Transducers, Transmitters & Manometers

Keep learning

ComparisonBeginnerBME280 vs BMP280The BMP280 measures temperature and air pressure; the BME280 adds relative humidity.3 min read · SensorsComponent guideIntermediateBMP390 and BMP581 Pressure SensorsThe Bosch BMP390 and BMP581 are high-precision barometric pressure sensors that resolve altitude changes of about 10 to 25 cm, several times better than the BMP280.4 min read · SensorsComparisonBeginnerBarometric Pressure SensorsBarometric pressure sensors measure air pressure, from which you can calculate altitude or track weather.3 min read · SensorsComponent guideIntermediateMEMS and Differential Pressure SensorsUse MEMS and differential pressure sensors: HX710B 0-40 kPa modules, MPX5700, Asair ADP I2C sensors, airflow, filters, tubing and calibration.3 min read · Sensors

Sources

  • STMicroelectronics LPS22HB, LPS22HH, LPS33HW and LPS28DFW datasheets
  • Adafruit LPS2X and LPS28 library documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the ST LPS22 and LPS28 pressure sensor isST LPS22 and LPS28 pressure sensor pinoutWiring the ST LPS22 and LPS28 pressure sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)4 items · ₹1,395

Adafruit LPS22 Pressure Sensor – STEMMA QT / Qwiic – LPS22HB · 4-Channel Logic Level Converter (BSS138) · Solderless Breadboard · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output
Serial monitor115200 baud
1008.20 hPa  26.40 C  42.1 m

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question