

The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for applications requiring high accuracy and stability. It is widely used in weigh scales and industrial control systems due to its ability to interface directly with load cells. The HX711 features a built-in low-noise programmable gain amplifier (PGA), making it ideal for amplifying small signals from load cells and other sensors.








The HX711 is designed to provide high-resolution measurements with minimal external components. Below are its key technical details:
The HX711 has 16 pins, but in most applications, only 10 pins are used. Below is the pin configuration:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply (2.6V to 5.5V). |
| 2 | AVDD | Analog power supply (connect to VCC). |
| 3 | VFB | Feedback voltage for internal regulator (connect to ground via a capacitor). |
| 4 | AGND | Analog ground. |
| 5 | BGND | Bridge ground (connect to load cell ground). |
| 6 | B- | Negative input for load cell. |
| 7 | B+ | Positive input for load cell. |
| 8 | A- | Negative input for load cell (Channel A). |
| 9 | A+ | Positive input for load cell (Channel A). |
| 10 | DGND | Digital ground. |
| 11 | PD_SCK | Power-down and serial clock input. |
| 12 | DOUT | Serial data output. |
| 13-16 | NC | Not connected (leave unconnected). |
Below is an example of how to use the HX711 with an Arduino UNO to read weight data from a load cell. This code uses the popular HX711 library.
#include "HX711.h" // Include the HX711 library
// Define the pins connected to the HX711
#define DOUT 3 // Data output pin
#define CLK 2 // Clock pin
HX711 scale; // Create an instance of the HX711 class
void setup() {
Serial.begin(9600); // Initialize serial communication
scale.begin(DOUT, CLK); // Initialize the HX711 with the defined pins
// Set the scale to zero (tare)
Serial.println("Taring the scale...");
scale.set_scale(); // Set the scale factor to default
scale.tare(); // Reset the scale to zero
Serial.println("Scale tared.");
}
void loop() {
// Read the weight from the load cell
if (scale.is_ready()) { // Check if the HX711 is ready
long weight = scale.get_units(); // Get the weight in units
Serial.print("Weight: ");
Serial.print(weight);
Serial.println(" units");
} else {
Serial.println("HX711 not ready. Check connections.");
}
delay(500); // Wait for 500ms before the next reading
}
No Data Output:
Unstable Readings:
Incorrect Weight Measurements:
HX711 Not Ready:
Q1: Can the HX711 work with a 3.3V microcontroller?
Yes, the HX711 operates with a supply voltage as low as 2.6V, making it compatible with 3.3V systems.
Q2: How do I calibrate the HX711?
Use a known weight to determine the scale factor. Adjust the scale factor in your code using the set_scale() function.
Q3: Can I use both channels (A and B) simultaneously?
Yes, but note that Channel A has a programmable gain (128 or 64), while Channel B has a fixed gain of 32. Channel A is typically used for higher precision measurements.
Q4: What is the maximum weight the HX711 can measure?
The maximum weight depends on the load cell's capacity. The HX711 itself does not impose a weight limit but converts the load cell's output signal.
Q5: How do I reduce noise in the readings?
Use a stable power supply, shielded cables, and proper grounding. Additionally, average multiple readings in your code to filter out noise.