How-to · Intermediate · 3 min read
Load Cells and the HX711
Build a Digital Scale
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
A load cell is a metal bar with strain gauges that changes resistance very slightly under weight. The HX711 is a 24-bit amplifier and ADC that reads those tiny changes and sends a number to your microcontroller over two pins. You connect four cell wires to the HX711, tare it at zero, place a known weight, and compute a scale factor. Bar cells from 1 kg to 50 kg are common.
Key specs at a glance
- HX711 resolution
- 24-bit ADC
- Gain
- 128 or 64 (channel A), 32 (channel B)
- Sample rate
- 10 or 80 samples per second (RATE pin)
- Supply
- 2.6 to 5.5 V
- Interface
- 2 pins: DOUT (DT) and SCK; not I2C
- Load cell output
- Typically 1 to 2 mV per volt of excitation at full load
How a load cell works
Inside a bar load cell are four strain gauges arranged as a Wheatstone bridge. When the bar bends, two gauges stretch and two compress, which unbalances the bridge and produces a signal of a few millivolts. A 5 kg cell rated at 1 mV/V, excited at 5 V, gives only 5 mV at full load, which is why you need the HX711's high gain and 24-bit resolution. Mount the cell with one end fixed to the base and the other end carrying the platform, with the arrow pointing in the direction of the load.
Wiring
Common 4-wire bar cells use: red E+, black E−, white A−, green A+. Some cells swap white and green; if the reading goes negative when you add weight, swap them or flip the sign in code.
HX711 to board: VCC to 3.3 V or 5 V, GND to GND, DT to a digital pin, SCK to another digital pin. The 3-wire half-bridge cells from bathroom scales need four of them wired together into a full bridge, or a combinator board.
Tare and calibration
Use the HX711 library by Bogdan Necula, or HX711_ADC. With nothing on the scale, call scale.tare() so the reading becomes zero. Place a known weight, such as a 500 g packet, and read the raw value. The scale factor is raw value ÷ known weight. Save it with scale.set_scale(factor), and store it in EEPROM so you do not recalibrate each boot. Average 10 or more readings for a steady display.
Try it: ADC resolution calculator
Change the values and the diagram and results update as you type.
Calibrate a load cell with an HX711 and Arduino
You need: Arduino Uno or Nano, HX711 module, Bar load cell, Base and platform plates with screws, Jumper wires · Tools: Computer with Arduino IDE, Known reference weight
Get the parts4 of 5 found in our store · ₹869
Arduino Uno or NanoArduino-Compatible UNO Starter Kit₹650
HX711 moduleHX711 Load Cell Amplifier and 50 kg Half-Bridge Load Cell₹39
Bar load cellLoad Cell Weight Sensor, Bar Type₹131- Base and platform plates with screwsFind this part
Jumper wiresDupont Jumper Wires (40 pcs)₹49
- 1Mount the cellScrew one end of the cell to the base and the other end to the platform so it can bend freely.
- 2Wire itConnect red, black, white and green to E+, E−, A− and A+, then DT and SCK to two digital pins.
- 3TareRun the sketch with an empty platform and call tare() to set zero.
- 4Measure a known weightPlace the reference weight and note the raw average reading.
- 5Set the scale factorDivide the raw value by the known weight, set it with set_scale() and save it in EEPROM.
Common mistakes to avoid
- Clamping both ends of the cell so it cannot bend.
- Overloading a small cell, which permanently bends it.
- Swapped A+ and A− giving negative readings.
- Expecting I2C: the HX711 uses its own two-wire protocol.
- Taking single readings instead of averaging.
Frequently asked questions
Is the HX711 I2C?
No. It uses its own clock and data protocol on any two digital pins.
Why does my scale drift?
Temperature changes, creep in the cell and a poor mount. Let it warm up, re-tare often and mount the cell rigidly.
Which load cell size should I buy?
Choose a rated load about 1.5 times your heaviest weight. Smaller cells give finer resolution.
Can I use the HX711 with ESP32?
Yes, at 3.3 V on any two GPIO pins. Some ESP32 cores need the library's timing setting for reliable reads.
How accurate is a hobby load cell scale?
Often within about 0.1 % of full scale after careful calibration, so around 5 g on a 5 kg cell.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 25 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


