Site icon Circuit Ideas for You

Arduino Air Pressure Circuit with Sensor HX710B

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:

Circuit Working:

Arduino Air Pressure Circuit Diagram with Sensor HX710B

Parts List:

ComponentsQuantity
Arduino Uno1
HX710B Sensor1
16×2 LCD Display1
Potentiometer 10k1

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:

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.

Exit mobile version