If you want to know exactly how a load cell sensor works, the short answer is that it converts mechanical deformation into a micro-voltage change via a Wheatstone bridge, which an amplifier like the HX711 then digitizes into a 24-bit serial data stream. Understanding the physics and the math behind this translation is the difference between a scale that drifts by 500 grams and one that tracks down to a single gram. This guide breaks down the sensing principle, wiring, and the exact raw-to-unit math you need to interface a load cell with an Arduino or ESP32.
The Sensing Principle: How a Strain Gauge Load Cell Works
At its core, a load cell is a block of machined aluminum or steel with bonded strain gauges—thin foil grids whose electrical resistance changes when stretched or compressed. When you apply a physical load to the metal element, it bends microscopically. This bending stretches the strain gauges on the tension side (increasing their resistance) and compresses the gauges on the compression side (decreasing their resistance) through the piezoresistive effect.
These four strain gauges are wired together to form a Wheatstone bridge circuit. When you supply an excitation voltage (typically 5V) across the bridge, the balanced state yields zero differential voltage. As the metal bends under load, the bridge unbalances, producing a differential output voltage proportional to the applied force. This output is incredibly small—usually rated at 1mV/V to 2mV/V, meaning a 5V excitation with a full-scale load yields a mere 5mV to 10mV signal.
What the Output Actually Is (And Why It Is Not Analog)
A common beginner mistake is conflating the load cell's raw millivolt output with an analog signal that can be read directly by an Arduino's ADC (Analog-to-Digital Converter). The raw output is analog, but it is far too small (in the microvolt-to-millivolt range) and too noisy for a standard 10-bit microcontroller ADC to resolve accurately.
To solve this, we use a dedicated 24-bit analog-to-digital converter with a built-in programmable gain amplifier (PGA), almost universally the HX711 chip. The HX711 amplifies the microvolt signal by a factor of 128 or 64 and outputs a digital serial bitstream. Therefore, the signal arriving at your ESP32 or Arduino GPIO pins is strictly digital—a clocked sequence of 1s and 0s representing a 24-bit integer, not a 0-5V analog voltage.
Wiring, Pinout, and Power Supply Ranges
The HX711 acts as the bridge between the delicate analog load cell and your digital microcontroller. Below is the standard wiring matrix for a single-point load cell (like the TAL220 or CZL601) connected to an HX711 breakout and an ESP32.
| Load Cell Wire | Function | HX711 Pin | ESP32 / Arduino Pin | Notes & Supply Range |
|---|---|---|---|---|
| Red (E+) | Excitation + | E+ | - | Supplied by HX711 VCC |
| Black (E-) | Excitation - | E- | - | Ground reference for bridge |
| White (A+) | Signal + | A+ | - | Positive differential mV output |
| Green (A-) | Signal - | A- | - | Negative differential mV output |
| - | Power In | VCC | 3V3 or 5V | HX711 accepts 2.6V to 5.5V |
| - | Ground | GND | GND | Must share ground with MCU |
| - | Data Out | DT (DOUT) | GPIO 4 (or D2) | Digital serial data line |
| - | Clock In | SCK (PD_SCK) | GPIO 5 (or D3) | Digital clock signal from MCU |
The Raw-to-Unit Math: Calibration and Scaling
The HX711 library will hand you a raw 24-bit integer (ranging roughly from -8,388,608 to +8,388,607). To convert this raw ADC count into a physical unit like kilograms or pounds, you must apply a linear scaling equation. The math requires two variables: the Tare Offset and the Calibration Factor.
The formula is:
Weight = (Raw_ADC_Value - Tare_Offset) / Calibration_Factor
Step-by-Step Calibration Procedure
- Find the Tare Offset: With the scale completely empty, read the raw HX711 value 20 times and average it. This is your
Tare_Offset(e.g., 48,500). - Apply a Known Mass: Place a precisely known weight on the scale (e.g., a 5.000 kg dumbbell or a calibrated calibration weight).
- Read the Loaded Value: Average 20 raw readings under this known load (e.g., 255,400).
- Calculate the Factor: Subtract the Tare Offset from the Loaded Value, then divide by the known physical weight.
Math: (255,400 - 48,500) / 5.000 kg = 206,900 / 5 = 41,380.
YourCalibration_Factoris 41,380 counts per kilogram.
Once calculated, any future raw reading of 462,280 translates to: (462,280 - 48,500) / 41,380 = 10.00 kg.
Common Interference Sources and Mitigation
Because the HX711 is amplifying microvolt-level signals by 128x, it is highly susceptible to environmental noise. If your readings are jumping by hundreds of grams, check these three interference sources:
- 50/60Hz Mains Hum: Unshielded load cell wires act as antennas for AC mains fields. Fix: Keep load cell wires under 1 meter, twist the A+/A- and E+/E- pairs tightly, and route them away from AC power supplies and relay coils.
- Thermal Drift and Creep: Aluminum load cells expand with temperature, shifting the zero-point. Furthermore, under sustained heavy loads, the metal exhibits 'creep' (slow deformation over time). Fix: Implement a software auto-tare routine that triggers when the scale reads stable for 30 seconds, and avoid leaving heavy loads on the scale for hours.
- Mechanical Binding: If the mounting screws securing the load cell to your enclosure are over-torqued, or if the load cell is touching the side of its cutout, the mechanical strain bypasses the sensing element. Fix: Ensure the sensing gap is completely clear and torque mounting bolts to the manufacturer's spec (usually just hand-tight plus a quarter turn for hobbyist cells).
Decision Path: Picking the Right Load Cell and Amplifier
Do not waste time guessing which load cell geometry fits your project. Use this decision matrix to select the correct hardware based on your physical constraints and capacity requirements.
| Application Scenario | Capacity Needed | Required Geometry | Concrete Hardware Pick |
|---|---|---|---|
| Smart pet feeders, small hoppers, coffee dosing | < 5 kg | Single-point (miniature) | CZL601 (50kg rated, cheap, low resolution at small loads) |
| Bench scales, smart storage bins, luggage scales | 5 kg to 50 kg | Single-point (standard bar) | TAL220 20kg Aluminum Bar |
| Heavy duty floor scales, industrial hopper weighing | > 50 kg to 500 kg | S-Type (tension/compression) | S-Type 100kg Load Cell (requires 4-corner mounting) |
| High-precision laboratory or jewelry scales (<1g resolution) | < 500 g | Single-point (high sensitivity) | CZL601 (10kg version) + HX711 at 128 Gain |
The Default Recommendation
For 95% of hobbyist smart-scales, automated plant waterers, and bench-top inventory projects under 50kg, buy the TAL220 20kg aluminum single-point load cell paired with an Avia Semiconductor HX711 breakout board. The TAL220 provides excellent off-center load rejection (meaning you get the same reading whether the weight is on the edge or the center of the platform), and the 20kg capacity gives you a safe mechanical overload margin for standard 3D-printed scale platforms. You can verify the exact gain settings and timing diagrams in the SparkFun HX711 Hookup Guide to ensure your microcontroller code respects the 50 microsecond clock pulse requirements.






