Working Principle
The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed specifically for weigh scales and strain-gauge bridge sensors. A load cell is a metal bar with bonded strain gauges arranged in a Wheatstone bridge — when force bends the bar, gauge resistance changes by a few milliohms, producing a microvolt-level differential voltage. The HX711 amplifies this tiny signal (gain of 128 or 64), digitises it with 24-bit resolution, and delivers the result via a simple 2-wire serial interface.
Analogy: Think of the HX711 as an extremely sensitive microphone for force — it listens to the almost-imperceptible electrical whisper of a bending metal beam and amplifies it into a clear digital number.
Electrical Characteristics
| Parameter | Value |
|---|---|
| Supply Voltage | 2.6–5.5 V |
| ADC Resolution | 24-bit (effective ~20-bit noise-free) |
| Input Channels | 2 differential (Ch A: gain 64/128; Ch B: gain 32) |
| Input Voltage Range | ±20 mV (gain 128), ±40 mV (gain 64) |
| Sample Rate | 10 or 80 SPS (selectable) |
| Interface | 2-wire serial (SCK + DOUT) |
| Current Draw | <1.5 mA (operating), <1 µA (power-down) |
| Load Cell Excitation | Regulated from AVDD pin |
Interfacing with an MCU
The HX711 uses a proprietary 2-wire protocol (not I2C or SPI): DOUT (data out) and SCK (serial clock). Connect a 4-wire load cell to the breakout: E+ (excitation+), E− (excitation−), A+ (signal+), A− (signal−).
Calibration
Calibration is essential — the raw 24-bit value must be converted to physical units:
- Tare (zero): Read the average of 20+ samples with no load and store as the tare offset
- Scale factor: Place a known reference weight, read the average, calculate: scale = (reading − tare) / known_weight
- Verification: Test with 2–3 different known weights to confirm linearity
- Temperature drift: Re-tare periodically in changing temperature environments
Code Example
/*
* HX711 Load Cell Scale — Arduino
* Library: HX711 by bogde (Arduino Library Manager)
* Wiring: DOUT → Pin 3, SCK → Pin 2
*/
#include <HX711.h>
#define DOUT_PIN 3
#define SCK_PIN 2
HX711 scale;
/* Calibration — determine experimentally */
float calibration_factor = 420.0;
void setup() {
Serial.begin(9600);
scale.begin(DOUT_PIN, SCK_PIN);
Serial.println("HX711 Scale — Place nothing on scale...");
delay(2000);
scale.tare(20); /* Average 20 readings for tare */
scale.set_scale(calibration_factor);
Serial.println("Scale ready. Place items to weigh.");
}
void loop() {
if (scale.is_ready()) {
float weight = scale.get_units(10);
Serial.print("Weight: ");
Serial.print(weight, 1);
Serial.println(" g");
}
delay(500);
}
Real-World Applications
Kitchen Scales, Industrial Weighing & Structural Monitoring
The HX711 is the backbone of virtually all DIY and commercial electronic scales — from kitchen and postal scales to beehive monitoring, livestock feeders, and industrial silo load measurement. Combined with multiple load cells, it enables platform scales with sub-gram resolution. In structural engineering, bonded strain gauges with HX711 monitor bridge deflection and building settlement.
Limitations
- Slow sample rate: 10–80 SPS is too slow for vibration analysis or dynamic force measurement.
- Proprietary protocol: Not I2C/SPI — requires bit-banging or a dedicated library; can be timing-sensitive.
- Creep: Load cells exhibit slight drift under sustained loads over hours. Use cells rated for your max load.
- EMI sensitivity: The microvolt-level signals are easily disrupted by nearby motors or switching regulators.
- Effective resolution: Noise-free resolution is ~20 bits, not the full 24 bits advertised.