The HX711 amplifier is a 24-bit analog-to-digital converter (ADC) with a built-in programmable gain amplifier (PGA) that translates microvolt-level signals from resistive load cells into digital data a microcontroller can read. If you are building a digital scale, force-sensing robotic gripper, or automated pet feeder, this chip is the critical bridge between the analog physical world of strain gauges and the digital logic of your microcontroller.

What it changes in a real circuit: Before the HX711, reading a strain gauge accurately required a precision instrumentation op-amp (like an INA125), an active low-pass filter, and a high-resolution external ADC. The HX711 integrates the PGA and a 24-bit sigma-delta ADC on a single silicon die. This drops the bill of materials from over $15 down to a $2 breakout board, eliminates complex analog routing on your PCB, and allows basic 5V/3.3V microcontrollers to resolve weight changes down to fractions of a gram.

The Core Architecture: 24-Bit ADC Meets Instrumentation Amplifier

At its heart, the HX711 uses a sigma-delta ADC architecture. Unlike successive approximation register (SAR) ADCs found inside the Arduino Uno's ATmega328P (which are 10-bit and relatively noisy), a sigma-delta ADC oversamples the input signal at a high frequency and uses digital filtering to achieve massive resolution. This is why it excels at measuring slow-moving, highly precise DC signals like weight.

The integrated Programmable Gain Amplifier (PGA) is what makes the HX711 specifically suited for load cells. Think of the PGA like a microscope objective lens: a load cell outputs a microscopic voltage change, and the PGA magnifies that signal to fill the ADC's input range before the conversion happens, maximizing the signal-to-noise ratio. The HX711 features two independent input channels: Channel A (with selectable 128x or 64x gain) and Channel B (fixed 32x gain).

HX711 Specifications and Gain Configuration Matrix

Unlike standard ADCs that use I2C or SPI, the HX711 uses a proprietary serial protocol. The microcontroller acts as the master clock, and the specific channel and gain are selected by how many clock pulses you send after the data is ready. This is a crucial concept for writing or debugging your own driver code.

Clock Pulses Sent Active Channel PGA Gain Full-Scale Input Range (±) Typical Use Case
25 Channel A 128 20 mV Standard load cells (1kg to 50kg capacity)
26 Channel B 32 80 mV Secondary sensors, thermistors, or higher-output transducers
27 Channel A 64 40 mV High-capacity load cells (100kg+) or dual-load-cell setups
28 (Reserved) N/A N/A N/A Powers down the chip (deep sleep mode, < 1 µA)
Data Rate Selection: The output data rate is controlled by the RATE pin on the chip. Tying the RATE pin to GND yields 10 Samples Per Second (SPS), while tying it to VCC yields 80 SPS. Note that 80 SPS offers lower noise rejection than 10 SPS due to the digital filter bandwidth.

Worked Example: Calculating Microvolt Output to Digital Counts

Let's run the math on a real-world bench setup to see how the physical weight translates into the raw digital counts your microcontroller receives. This is the exact math used to determine your calibration factor in libraries like HX711.h.

The Setup:

  • Load Cell: 20 kg capacity, 2.0 mV/V sensitivity.
  • Excitation Voltage: 5.0V (provided by the HX711 module's E+ and E- pins).
  • Target Weight: 10 kg (exactly half capacity).
  • HX711 Configuration: Channel A, Gain 128 (25 clock pulses).

Step 1: Calculate the Load Cell's Raw Analog Output
A 2.0 mV/V sensitivity means the load cell outputs 2 millivolts for every volt of excitation at full capacity.
Full Scale Output = 2.0 mV/V × 5.0V = 10 mV at 20 kg.
Since we are measuring 10 kg (half load), the differential voltage across the A+ and A- pins is 5 mV.

Step 2: Apply the PGA Gain
The HX711 amplifies this 5 mV signal by 128 before feeding it to the ADC.
Amplified Signal = 5 mV × 128 = 640 mV (0.640V).

Step 3: Convert to Digital Counts
The HX711 is a 24-bit ADC, but it uses two's complement for bipolar measurements, giving us 23 bits of positive resolution (8,388,607 maximum positive counts). Assuming a typical breakout module ADC reference voltage (AVDD) of 2.5V, the conversion formula is:
Output Code = (Vin / Vref) × 2^23
Output Code = (0.640V / 2.5V) × 8,388,607 ≈ 2,147,483 raw counts.

When you place a known 10 kg weight on the scale and read 2,147,483 from the serial monitor, you divide the raw counts by the known weight to get your calibration factor (approx. 214,748 counts per kg) to hardcode into your firmware.

Where You Meet the HX711 Amplifier in Practice

You will encounter the HX711 in any DIY or light-industrial application requiring precise force measurement. However, which physical HX711 module you buy matters immensely for stability.

The "Blue vs. Green" Module Debate

If you buy a generic HX711 breakout, it will likely arrive on a blue or green PCB. While the silicon chip is the same, the supporting circuitry dictates your noise floor:

  • Blue Modules: Often omit the external clock crystal, relying on the HX711's internal RC oscillator. This oscillator drifts significantly with temperature. As the chip warms up during operation, your zero-point will wander, requiring constant software tare resets. They also frequently lack proper decoupling capacitors on the analog supply.
  • Green (or Red) Modules: Typically include an external 11.0592 MHz crystal oscillator and better ground plane isolation. SparkFun's engineering guides consistently recommend modules with external crystals for applications where thermal stability is required. Always choose the green module for espresso shot scales or long-term structural monitoring.

Pushing the 80 SPS Limit

In high-speed applications like espresso machine shot-weighing, where the flow rate changes rapidly and you need to trigger a relay the millisecond you hit 36 grams, 10 SPS is too slow. By pulling the RATE pin high, you switch to 80 SPS. The trade-off is a slight increase in the noise floor (Effective Number of Bits drops from ~20 to ~18), but the faster loop time allows for tighter PID control in automated fluid dispensing.

Common Confusions and Troubleshooting Gotchas

Why is it called an "amplifier" if it doesn't drive speakers?

Makers often confuse the HX711 with an audio or power amplifier. The HX711 contains an instrumentation amplifier. It does not amplify current to drive a load like a speaker or motor; it amplifies tiny differential voltages (microvolts) to a level that an ADC can digitize without the signal being swallowed by the system's noise floor.

Am I reading the chip or the module?

People commonly confuse the HX711 chip with the HX711 breakout module. The chip itself operates strictly on 2.6V to 5.5V and outputs a regulated voltage (AVDD) to power the load cell. The breakout module adds a 3.3V/5V logic level translator, a power LED, and sometimes a secondary LDO. When wiring to a 3.3V ESP32, ensure your module has the onboard logic translator, or you risk feeding 5V logic into the ESP32's GPIO pins, which will brick the microcontroller.

Why are my readings jumping by ±50 grams when nothing is on the scale?

A 24-bit ADC will faithfully digitize its own noise if the physical layout is poor. According to strain gauge theory outlined by All About Circuits, the analog traces must be kept as short as possible. If your load cell wires are longer than 10 cm, they act as antennas picking up 50/60 Hz mains hum. Keep the HX711 module mounted within 2 inches of the load cell, use shielded twisted-pair cable for the load cell wires, and connect the shield to the module's analog ground, not the digital microcontroller ground.

Understanding the HX711 amplifier goes beyond simply copying a wiring diagram. By mastering the relationship between clock pulses, PGA gain, and the physical millivolt output of your load cell, you can move past copy-pasted calibration factors and engineer highly stable, noise-resistant weighing systems.