Description
Description
This module adopts high precision AD sampling chip and 0-40KPa air pressure sensor.
It can connect 2.5mm soft tube and detect the water level and other air pressure.
This module is used to measure the ambient pressure and the pressure difference of liquid levels.
Specification:
Voltage: 3.3-5V
Pressure: 0-40KPa
Dimensions: 18x13mm/0.71×0.51inch(2mm fixing hole)
Color: Red
This sensor has 4 pins:
Interafacing with arduino:
Require materials:
Arduino code:
Install the following library on Arduino.
Q2-HX711
Majenko Libraries
Upload the following code to your Arduino
/*
on Sep 21, 2020
by MohammedDamirchi
Home
*/
#include <Q2HX711.h>
#include <Average.h>
const byte MPS_OUT_pin = 2; // OUT data pin
const byte MPS_SCK_pin = 3; // clock data pin
int avg_size = 10; // #pts to average over
Q2HX711 MPS20N0040D(MPS_OUT_pin, MPS_SCK_pin); // start comm with the HX710B
Average<long> ave(avg_size);
void setup() {
Serial.begin(9600); // start the serial port
}
void loop() {
ave.push(MPS20N0040D.read());
Serial.println(ave.mean());
}
After running the code, you will see the following image in the serial monitor.
- VIN: Module power supply – 3.3-5 V
- GND: Ground
- SLC: I2C Clock
- OUT: Digital output data
![](https://www.faranux.com/wp-content/uploads/2022/03/HX710-pin-300x185.jpg)
- Arduino Uno R3 x 1
- Pressure sensor x 1
- Jumper wires x 4
![](https://www.faranux.com/wp-content/uploads/2022/03/HX710-wire-300x188.jpg)
![](https://electropeak.com/learn/wp-content/uploads/2020/10/HX710-serial.jpg)