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. ›HX710B Air Pressure Sensor Module (0-40 kPa)

Component guide · Beginner · 3 min read

HX710B Air Pressure Sensor Module (0-40 kPa)

Wiring, Code and Water Level

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 HX710B air pressure sensor module isHX710B air pressure sensor module pinoutWiring the HX710B air pressure sensor moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

The HX710B module pairs a small 0 to 40 kPa gauge pressure sensor (MPS20N0040D) with the HX710B 24-bit ADC, so an Arduino or ESP32 reads it with two digital pins, much like an HX711 load cell. It is cheap and popular for air pressure, cuff pressure demos and tank level via a tube. Readings are raw counts, so you calibrate offset and scale yourself.

Key specs at a glance

Sensor
MPS20N0040D piezoresistive bridge, 0 to 40 kPa gauge
ADC
HX710B, 24-bit, 10 or 40 samples per second
Supply
3.3 to 5 V
Interface
Two wire: OUT (data) and SCK (clock), not I2C
Port
3 mm barb for silicone tube
Media
Air only

Models in this guide

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

  • Option 1HX710B Air Pressure Sensor Module (0–40KPa) with Straight Pin Header₹128
  • Option 2HX710B Air Pressure Sensor Module (0-40 kPa) with Straight Header – Analog Voltage Output₹163
  • Option 3HX710B Pressure Sensor Module Interposer – 0-40 kPa, 3.3V/5V, SOP-16₹93
01

What the HX710B air pressure sensor module is

The HX710B is clocked like the HX711: wait for OUT to go low, then pulse SCK 24 times to read the value, plus one or more extra pulses to set the next mode. The HX710B library or a short function does this.

40 kPa is about 4 m of water, so the module can measure tank level when a tube is pushed down into the water and the trapped air pressure is read at the top.

02

HX710B air pressure sensor module pinout

The pins on the HX710B air pressure sensor module and what each one does.

PinFunction
VCC3.3 to 5 V
GNDGround
OUTData output
SCKClock input
PinFunction
VCC
3.3 to 5 V
GND
Ground
OUT
Data output
SCK
Clock input
03

Wiring the HX710B air pressure sensor module

Connect the HX710B air pressure sensor module like this.

HX710B air pressure sensor module pinArduino UnoESP32
VCC5V3V3
GNDGNDGND
OUTD2GPIO 16
SCKD3GPIO 4
VCC
Arduino Uno:
5V
ESP32:
3V3
GND
Arduino Uno:
GND
ESP32:
GND
OUT
Arduino Uno:
D2
ESP32:
GPIO 16
SCK
Arduino Uno:
D3
ESP32:
GPIO 4
04

Example code

Find COUNTS_PER_KPA by applying a known pressure, such as a water column of known height (1 cm of water = 0.098 kPa). Average readings for a steady value.

Read raw counts and convert to kPa (Arduino) · Arduino C++Verify & upload in Electrolark
const int OUT = 2, CLK = 3;
long offset = 0;
const float COUNTS_PER_KPA = 1.0e5;   // calibrate for your module

long readHX710() {
  while (digitalRead(OUT));                 // wait for data ready
  long v = 0;
  for (int i = 0; i < 24; i++) {
    digitalWrite(CLK, HIGH); delayMicroseconds(1);
    v = (v << 1) | digitalRead(OUT);
    digitalWrite(CLK, LOW);  delayMicroseconds(1);
  }
  digitalWrite(CLK, HIGH); delayMicroseconds(1); digitalWrite(CLK, LOW);  // 25th pulse: next read 10 Hz
  if (v & 0x800000) v |= 0xFF000000;        // sign extend
  return v;
}

void setup() {
  Serial.begin(9600);
  pinMode(CLK, OUTPUT); pinMode(OUT, INPUT);
  for (int i = 0; i < 10; i++) offset += readHX710();
  offset /= 10;                              // zero with the port open
}

void loop() {
  float kPa = (readHX710() - offset) / COUNTS_PER_KPA;
  Serial.println(kPa, 2);
  delay(200);
}
05

Setup and tuning

Zero at start

take the offset with the port open to air.

Calibrate

a water column or a reference gauge gives a second point for the scale.

Tubing

use soft silicone tube and check for leaks, which show as slow drift.

Not I2C

it will not appear on an I2C scanner.

06

What you need

Shop this list7 of 8 found in our store · ₹1,181

  • HX710B Air Pressure Sensor Module (0–40KPa) with Straight Pin Header: the part this guide coversHX710B Air Pressure Sensor Module (0–40KPa) with Straight Pin Header₹128
  • Generic HX710B Air Pressure Sensor Module (0-40 kPa) with Straight Header – Analog Voltage Output: another version this guide coversHX710B Air Pressure Sensor Module (0-40 kPa) with Straight Header – Analog Voltage Output₹163
  • Generic HX710B Pressure Sensor Module Interposer – 0-40 kPa, 3.3V/5V, SOP-16: another version this guide coversHX710B Pressure Sensor Module Interposer – 0-40 kPa, 3.3V/5V, SOP-16₹93
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • 0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
  • R385 diaphragm water pump 12V: a pump to control from the pressure readingR385 / R365 Diaphragm Water Pump 12V₹220Closest match, check the specs
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓HX711 load cell amplifier: the same style of 24-bit ADC for weight.
  • ✓NXP MPX pressure sensors: analog sensors with a datasheet formula.
  • ✓MEMS pressure sensors: barometric I2C sensors.
08

Common mistakes to avoid

  • !Expecting calibrated kPa without calibration.
  • !Scanning for it on I2C.
  • !Letting water into the sensor port.
  • !Exceeding 40 kPa, which damages the bridge.
09

Frequently asked questions

Is it the same as HX711?

Similar protocol; the HX710B has a fixed gain and is used with this pressure sensor.

Can it measure blood pressure?

It can read cuff pressure in a demo; it is not a medical device.

What is 40 kPa in other units?

About 0.4 bar, 5.8 psi or 4 m of water.

Does it work on 3.3 V?

Yes.

Why is the reading negative?

The offset was taken under pressure, or the bridge is reversed; re-zero with the port open.

Parts for this guide

  • HX710B Air Pressure Sensor Module (0–40KPa) with Straight Pin Header
    ₹128View
  • HX710B Air Pressure Sensor Module (0-40 kPa) with Straight Header – Analog Voltage Output
    ₹163View
  • HX710B Pressure Sensor Module Interposer – 0-40 kPa, 3.3V/5V, SOP-16
    ₹93View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 0.96" OLED Display 128x64
    ₹139View
  • R385 / R365 Diaphragm Water Pump 12V
    ₹220View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Pressure Transducers, Transmitters & Manometers

Projects that use it

Put this into practice: 1 step-by-step build in our project library uses parts from this guide.

Intermediate · 2 to 3 hoursWater pipe pressure and tank level monitor with two pressure sensorsView project
Browse all 1 project

Keep learning

How-toIntermediateLoad Cells and the HX711A load cell is a metal bar with strain gauges that changes resistance very slightly under weight.3 min read · SensorsComponent guideIntermediateNXP MPX5010DP, MPXV7002DP and MPX5700 Pressure SensorsNXP's MPX sensors measure air pressure with an analog voltage.5 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 · SensorsHow-toIntermediatePressure Transducers and TransmittersA pressure transducer turns fluid or gas pressure into an electrical signal.3 min read · Sensors

Sources

  • Avia Semiconductor HX710 datasheet
  • MPS20N0040D sensor datasheet

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 HX710B air pressure sensor module isHX710B air pressure sensor module pinoutWiring the HX710B air pressure sensor moduleExample 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)2 items · ₹332

HX710B Air Pressure Sensor Module (0–40KPa) with Straight Pin Header · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Zero is the average of 10 readings at start-up. Scale counts per kPa for your sensor.

Serial monitor9600 baud
5.99

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