HX711 Module Specifications and Gain Matrix
To use the HX711 effectively, you must understand its internal routing. The chip features two distinct input channels and a configurable gain matrix, controlled not by software registers, but by the number of clock pulses you send on thePD_SCK pin.
| Parameter | Channel A (Default) | Channel A (Alt) | Channel B |
|---|---|---|---|
| Gain Setting | 128 | 64 | 32 |
| Input Differential Range | ±20 mV (at 4.3V AVDD) | ±40 mV (at 4.3V AVDD) | ±80 mV (at 4.3V AVDD) |
| Clock Pulses to Select | 25 pulses (1 extra) | 27 pulses (3 extra) | 26 pulses (2 extra) |
| Typical Use Case | Primary load cell (high sensitivity) | Secondary sensor / high capacity cell | Temperature sensor / bridge offset |
| Input Impedance | Depends on gain (approx. 20 kΩ to 40 kΩ) | ||
Notice that the input differential range is tied to AVDD. On a standard module powered by 5V USB, the internal base-emitter voltage drop of the regulator transistor (Q1) means AVDD is actually ~4.3V, not 5V. This 4.3V becomes both your ADC reference voltage and the excitation voltage you feed to the load cell's E+ pin.
The Math: From Microvolts to 24-Bit Digital Counts
The most common failure point for DIY scale builders is misunderstanding how the physical load translates into the raw integer counts your microcontroller reads. Let us walk through a worked numeric example using a standard 50kg aluminum beam load cell.- Load Cell Rating: 50 kg
- Sensitivity: 1.0 mV/V (standard for cheap hobby cells)
- Excitation Voltage (AVDD): 4.3V (supplied by HX711 E+ pin)
- HX711 Channel A Gain: 128
Step 1: Calculate the analog output voltage at full load.
A 1.0 mV/V sensitivity means the bridge outputs 1 millivolt for every volt of excitation.
V_signal = 4.3V × 1.0 mV/V = 4.3 mV (or 0.0043V).
Step 2: Verify the signal fits the ADC range.
With a gain of 128 and a 4.3V reference, the HX711 max input is 4.3V / 128 = 33.59 mV. Our 4.3 mV signal is well within the safe range, utilizing about 12.8% of the ADC's full-scale capacity.
Step 3: Calculate the 24-bit digital output code.
The HX711 outputs a signed 24-bit two's complement integer. The maximum positive value is 2^23 - 1 (8,388,607).
Code = (V_signal / V_ref) × Gain × 2^23
Code = (0.0043 / 4.3) × 128 × 8,388,608
Code = 0.001 × 128 × 8,388,608 = 1,073,741 counts
When you place 50kg on the beam, your Arduino serial monitor will show a raw delta of approximately 1,073,741 counts from the zero-tare baseline.
This math reveals why calibration is mandatory. You are not reading 'kilograms'; you are reading a delta of ADC counts. In your code, you must divide this raw delta by a 'calibration factor' (in this case, 1073741 / 50 = 21474.8 counts per kg) to display human-readable weight.
Where You Meet This in Practice
You will encounter the HX711 almost exclusively in DIY force-measurement applications. Common bench and jobsite implementations include:- Smart Beehives and Pet Feeders: Using four 50kg corner load cells in parallel to monitor weight changes over time via an ESP32 and MQTT.
- Custom Brewing Scales: Tracking the exact grams of coffee extracted during an espresso pull, requiring the HX711's 80 SPS (samples per second) mode for fast transient response.
- Material Testing Jigs: Measuring the tensile strength of 3D-printed PLA brackets by pulling them with a stepper motor while logging HX711 data.
Most breakout boards leave the
RATE pin floating or pulled low, defaulting to 10 SPS (samples per second). If your application requires fast reaction times (like catching the peak force of a snapping cable), tie the RATE pin high to DVCC. This switches the ADC conversion rate to 80 SPS, though it slightly increases the noise floor.
Common Confusions and Bench Mistakes
When debugging a bouncing or drifting scale, makers usually fall victim to one of three fundamental misunderstandings about the HX711 architecture.
1. Confusing 24-Bit Resolution with 24-Bit Accuracy
The HX711 datasheet advertises 24-bit resolution, which implies over 16.7 million discrete steps. Beginners assume this means their 50kg scale can resolve down to 0.000003 kg. In reality, thermal drift, Johnson-Nyquist noise in the resistors, and EMI from nearby switching power supplies limit the Effective Number of Bits (ENOB) to roughly 16 to 18 bits. If your scale jitters by ±2 grams on a 50kg cell, that is not a defective chip; that is the physical noise floor of a $3 hobbyist load cell.
2. The ESP32 Logic Level Trap
The HX711 communicates via a proprietary 1-wire serial protocol using DOUT (data) and PD_SCK (clock). It is not I2C or SPI. More importantly, the DOUT pin outputs logic highs at the DVCC voltage. If you power the HX711 from a 5V Arduino, DOUT outputs 5V. If you connect this directly to a 3.3V ESP32 GPIO pin, you risk frying the ESP32's input buffer over time.
The Fix: Power the HX711 VCC pin from the ESP32's 3.3V output. The HX711 operates perfectly fine down to 2.6V. The trade-off is that your AVDD excitation voltage drops to ~2.8V, which halves your analog signal strength, but keeps your microcontroller safe and maintains ratio-metric accuracy.
3. Grounding and Shielding the Wheatstone Bridge
Because the HX711 is amplifying signals in the microvolt range, the wires connecting the load cell to the HX711 (E+, E-, A+, A-) act as antennas. A common bench mistake is running these wires parallel to 120V AC mains or stepper motor cables. Always use shielded 4-core cable for the load cell connection, and tie the shield drain wire to the HX711 module's GND pin only (never at both ends, which creates a ground loop).
Frequently Asked Questions
Why does my HX711 read negative numbers when I add weight?
Your load cell's signal wires (usually White and Green) are swapped. The HX711 is reading a negative differential voltage because the Wheatstone bridge is unbalancing in the opposite direction of the amplifier's expected polarity. Swap the A+ and A- wires on the HX711 terminal block.
Can I connect two load cells to a single HX711?
Yes, but not by using Channel A and Channel B simultaneously. You must physically wire the two load cells together into a single combined Wheatstone bridge (paralleling the Excitation lines and summing the Signal lines), or use a physical summing junction box. The HX711 Channel B is too low-gain (32x) for standard load cells and is intended for secondary sensors like thermistors.
My readings drift upwards by 5 grams every hour. Is the HX711 broken?
No, this is 'creep'. The adhesive bonding the strain gauge to the aluminum beam relaxes under constant load, and the metal itself exhibits minor viscoelastic deformation. This is a mechanical limitation of cheap load cells, not an electronic failure of the HX711 ADC.
For deeper integration details, refer to the SparkFun HX711 Hookup Guide for wiring diagrams, and consult the original Avia Semiconductor HX711 Datasheet for the exact timing diagrams required if you are writing your own bit-banging driver instead of using standard libraries.






