

The Adafruit HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for applications requiring high accuracy and low noise, such as weighing scales and industrial control systems. It features a built-in programmable gain amplifier (PGA) that simplifies the process of interfacing with load cells and other sensors. The HX711 is widely used in projects where precise measurement of small signals is critical.








The Adafruit HX711 is optimized for high-precision measurements and offers the following key specifications:
| 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) |
| Programmable Gain | 32, 64, or 128 (Channel A only) |
| Data Rate | 10 Hz or 80 Hz |
| Interface | Serial (Clock and Data pins) |
| Temperature Range | -40°C to +85°C |
The HX711 module has a total of 4 pins for power and communication, along with 4 additional pins for sensor connections. Below is the pinout:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (2.6V to 5.5V) |
| GND | Ground |
| DT (DATA) | Serial data output |
| SCK (CLOCK) | Serial clock input |
| Pin Name | Description |
|---|---|
| E+ | Positive excitation voltage for the load cell |
| E- | Negative excitation voltage for the load cell |
| A+ | Positive signal input for Channel A |
| A- | Negative signal input for Channel A |
| B+ | Positive signal input for Channel B |
| B- | Negative signal input for Channel B |
#include "HX711.h"
// Define HX711 pins
#define DT_PIN 3 // Data pin connected to Arduino digital pin 3
#define SCK_PIN 2 // Clock pin connected to Arduino digital pin 2
// Create an HX711 object
HX711 scale;
void setup() {
Serial.begin(9600); // Initialize serial communication
scale.begin(DT_PIN, SCK_PIN); // Initialize HX711 with defined pins
Serial.println("HX711 initialized. Place weight on the scale.");
}
void loop() {
if (scale.is_ready()) {
// Read raw data from the HX711
long reading = scale.get_units();
Serial.print("Weight: ");
Serial.print(reading);
Serial.println(" units");
} else {
Serial.println("HX711 not ready. Check connections.");
}
delay(500); // Wait 500ms before the next reading
}
No Data Output
Inconsistent Readings
HX711 Not Ready
scale.begin() function is called correctly.Incorrect Weight Measurements
Q: Can I use the HX711 with a 3.3V microcontroller?
A: Yes, the HX711 operates with a voltage range of 2.6V to 5.5V, making it compatible with 3.3V systems.
Q: How do I change the gain setting?
A: The gain is set by the number of clock pulses sent to the SCK pin during initialization. The HX711 library handles this automatically.
Q: Can I use both channels (A and B) simultaneously?
A: Yes, but note that Channel A supports higher gain (32, 64, or 128), while Channel B has a fixed gain of 32.
Q: What is the maximum weight the HX711 can measure?
A: The maximum weight depends on the load cell used. The HX711 itself does not impose a weight limit but provides high-resolution readings for the connected load cell.