

The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for weigh scales and industrial control applications. It features a built-in low-noise programmable gain amplifier (PGA) that allows direct interfacing with bridge sensors such as load cells. The HX711 is widely used in applications requiring accurate weight measurement, such as digital scales, industrial automation, and IoT-based weighing systems.








The HX711 is designed to provide high-resolution ADC conversion with minimal external components. Below are its key technical details:
| Parameter | Value |
|---|---|
| ADC Resolution | 24-bit |
| Operating Voltage | 2.6V to 5.5V |
| Typical Operating Current | ~1.5mA |
| Standby Current | <1µA |
| Input Channels | 2 (Channel A and Channel B) |
| PGA Gain | 32, 64, or 128 (programmable) |
| Data Rate | 10 Hz or 80 Hz (selectable) |
| Interface | Serial (Clock and Data pins) |
| Operating Temperature Range | -40°C to +85°C |
The HX711 has 16 pins, but only 10 are typically used in most applications. Below is the pinout description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (2.6V to 5.5V). |
| 2 | AVDD | Analog power supply (connect to VCC). |
| 3 | VFB | Feedback voltage for internal regulator (connect to ground via capacitor). |
| 4 | AGND | Analog ground. |
| 5 | BGND | Bridge sensor ground. |
| 6 | B- | Negative input for the bridge sensor. |
| 7 | B+ | Positive input for the bridge sensor. |
| 8 | A- | Negative input for Channel A. |
| 9 | A+ | Positive input for Channel A. |
| 10 | DGND | Digital ground. |
| 11 | PD_SCK | Power-down and serial clock input. |
| 12 | DOUT | Serial data output. |
| 13 | VREF | Reference voltage for ADC (connect to AVDD). |
| 14 | CAP | External capacitor connection for internal regulator. |
| 15 | DVDD | Digital power supply (connect to VCC). |
| 16 | NC | Not connected. |
The HX711 is commonly used to interface with load cells for weight measurement. Below are the steps to use the HX711 in a circuit:
Below is an example of how to interface the HX711 with an Arduino UNO to read weight data:
#include "HX711.h" // Include the HX711 library
// Define HX711 pins
#define DOUT 3 // Data output pin connected to Arduino pin 3
#define CLK 2 // Clock pin connected to Arduino pin 2
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
scale.set_scale(); // Set the scale factor (calibration required)
scale.tare(); // Reset the scale to zero
Serial.println("HX711 initialized. Place weight on the scale.");
}
void loop() {
// Read weight data from the HX711
if (scale.is_ready()) {
float weight = scale.get_units(); // Get the weight in user-defined 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
}
set_scale() function requires a calibration factor, which depends on the load cell and the weight being measured. Perform calibration by placing a known weight on the load cell and adjusting the scale factor until the correct weight is displayed.No Data Output:
Unstable Readings:
Incorrect Weight Measurements:
Q: Can I use the HX711 with a 3.3V microcontroller?
A: Yes, the HX711 operates at 2.6V to 5.5V, making it compatible with both 3.3V and 5V systems.
Q: How do I select the gain for the HX711?
A: The gain is set by the number of clock pulses sent to the PD_SCK pin after a data retrieval. For example:
Q: Can I use both channels (A and B) simultaneously?
A: Yes, but note that Channel A offers higher precision (128x or 64x gain), while Channel B has lower precision (32x gain).
By following this documentation, you can effectively integrate the HX711 into your projects for accurate weight measurement.