The HX710B Digital Barometric Pressure Sensor, manufactured by HuiSheng DongYe, is a highly accurate device designed to measure and regulate air pressure in pneumatic systems. This sensor is widely used in various applications, including weather stations, altimeters, and industrial automation systems. Its digital output makes it easy to interface with microcontrollers and other digital systems, providing precise pressure readings.
Parameter | Value |
---|---|
Supply Voltage | 2.7V to 5.5V |
Operating Current | 1.5mA (typical) |
Pressure Range | 300 hPa to 1100 hPa |
Resolution | 24-bit ADC |
Interface | I2C |
Operating Temperature | -40°C to +85°C |
Pin No. | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (2.7V to 5.5V) |
2 | GND | Ground |
3 | SCL | I2C Clock Line |
4 | SDA | I2C Data Line |
5 | DRDY | Data Ready (Interrupt output, optional) |
6 | NC | Not Connected |
#include <Wire.h>
#define HX710B_ADDRESS 0x76 // I2C address of the HX710B sensor
void setup() {
Serial.begin(9600);
Wire.begin(); // Initialize I2C communication
initializeSensor();
}
void loop() {
long pressure = readPressure();
Serial.print("Pressure: ");
Serial.print(pressure);
Serial.println(" Pa");
delay(1000); // Wait for 1 second before the next reading
}
void initializeSensor() {
Wire.beginTransmission(HX710B_ADDRESS);
Wire.write(0x1E); // Reset command for the sensor
Wire.endTransmission();
delay(100); // Wait for the sensor to reset
}
long readPressure() {
Wire.beginTransmission(HX710B_ADDRESS);
Wire.write(0xF7); // Command to read pressure
Wire.endTransmission();
Wire.requestFrom(HX710B_ADDRESS, 3); // Request 3 bytes of data
if (Wire.available() == 3) {
long pressure = Wire.read() << 16;
pressure |= Wire.read() << 8;
pressure |= Wire.read();
return pressure;
} else {
return -1; // Return -1 if data is not available
}
}
By following this documentation, users can effectively integrate the HX710B Digital Barometric Pressure Sensor into their projects, ensuring accurate and reliable pressure measurements.