Air pressure is around us all time, but we cannot see it; but with HX710B sensor and Arduino, we can measure it easily, as this project for Arduino Air Pressure Circuit with Sensor HX710B show pressure value on LCD in real time.
Just connect wires, upload code and see pressure on screen, also the circuit is easy, code is simple and result is clean and is good for beginners who want to learn sensor reading.
Arduino Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
long readHX710B() {
long data = 0;
while (digitalRead(A1) == 1);
for (int i = 0; i < 24; i++) {
digitalWrite(A0, 1);
delayMicroseconds(1);
data = data << 1;
digitalWrite(A0, 0);
delayMicroseconds(1);
if (digitalRead(A1) == 1) data++;
}
digitalWrite(A0, 1);
delayMicroseconds(1);
digitalWrite(A0, 0);
delayMicroseconds(1);
if (data & 0x800000) data |= 0xFF000000;
return data;
}
void setup() {
lcd.begin(16, 2);
pinMode(A1, INPUT);
pinMode(A0, OUTPUT);
}
void loop() {
long raw = readHX710B();
float pressure = (raw - 1000) * 0.001;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Raw:");
lcd.print(raw);
lcd.setCursor(0, 1);
lcd.print("P:");
lcd.print(pressure);
delay(300);
}
Code Explanation:
- Include LCD library.
- Define LCD pins.
- Function readHX710B read 24 bit value.
- Clock pulses sent using Arduino.
- Data bits collected one by one.
- Sensor raw value converted into signed number.
- In the loop, the program calculates the raw value.
- Pressure value, calculated using simple formula.
- LCD show both raw and pressure.
Circuit Working:

Parts List:
| Components | Quantity |
|---|---|
| Arduino Uno | 1 |
| HX710B Sensor | 1 |
| 16×2 LCD Display | 1 |
| Potentiometer 10k | 1 |
This circuit checks air pressure in small pipes, air tanks, tyres and balloons; then, the Arduino sends clock pulses to the HX710B, and the HX710B provides digital data based on the pressure.
After that, Arduino read data from DT(OUT) pin and convert this value to pressure and then LCD display does the final reading.
Next, potentiometer VR1 adjust brightness of letters.
Note:
We can use this circuit for tyre and balloon pressure.
Connect sensor through safe air tube and do not give tyre pressure directly to HX710B because it is sensitive; so use small nozzle to reduce pressure shock.
Finally, Arduino will show final pressure on LCD.
Formula with Calculation:
HX710B gives count value and pressure goes up when count goes up.
Formula is: Pressure = (RawValue – Offset) × Scale.
Example:
RawValue = 80000
Offset = 1000
Scale = 0.001
So Pressure = (80000 – 1000) × 0.001
Pressure = 79000 × 0.001
So pressure = 79 units (unit depends on calibration).
How to Build:
To build a Arduino Air Pressure Circuit with Sensor HX710B follow the below steps:
- First, assemble all the parts as shown in circuit diagram.
- Next, Arduino 5V go to LCD VCC, HX710B VCC and potentiometer VCC 1st pin, then Arduino GND go to LCD GND, HX710B GND and potentiometer GND 3rd pin.
- After that, LCD RS pin go to Arduino digital pin 12 and LCD E pin go to Arduino digital pin 11.
- Then LCD D4 pin go to Arduino digital pin 5 and LCD D5 pin go to Arduino digital pin 4.
- Now LCD D6 pin go to Arduino digital pin 3, LCD D7 pin go to Arduino digital pin 2 and LCD V0 (contrast pin) go to middle pin of potentiometer.
- Further, HX710B DT(OUT) pin go to Arduino A1 and HX710B SCK pin go to Arduino A0.
- Finally, connect Backlight+ pin to 5V of Arduino and connect Backlight- pin to GND of Arduino
Conclusion:
Overall, this project show about Arduino Air Pressure Circuit with Sensor HX710B, it also show how Arduino make reading easy and how LCD help display value.
Furthermore, the circuit is good for learning sensor reading and is simple with easy coding.