Overview
The HX711 is a 24-bit analog-to-digital converter (ADC) designed specifically for weigh scales and industrial control applications that use resistive bridge sensors like load cells. This pre-soldered large green breakout board breaks out two differential analog channels (A and B), the excitation supply for the load cell, and a simple two-wire serial interface for your microcontroller — so you can turn a raw strain gauge into a calibrated digital reading with just a few lines of code.
Because the HX711 runs on 2.7V-5V logic, it is fully compatible with Arduino, ESP32, Raspberry Pi, and Raspberry Pi Pico. It is the go-to module for DIY scales, digital kitchen scales, filament weighing, force sensing, grip strength trainers, and any project that needs to measure small changes in voltage from a Wheatstone bridge with excellent noise performance.
This pre-soldered version ships with the six load-cell pins (E+, E-, A-, A+, B-, B+) and the four microcontroller pins (VCC, DT, SCK, GND) already populated with male headers, so you can plug it into a breadboard or jumper wires and start reading grams within minutes.
At a Glance
Specifications
| Parameter | Value |
| Operating Voltage | 2.7V - 5V DC |
| Operating Current | < 1.5 mA (normal operation) |
| Standby Current | < 1 uA |
| ADC Resolution | 24-bit (two's complement) |
| Input Channels | Channel A (differential), Channel B (differential) |
| Channel A Programmable Gain | 128 or 64 |
| Channel B Fixed Gain | 32 |
| Output Data Rate | 10 SPS (default) or 80 SPS |
| Interface | 2-wire serial (DT + SCK) |
| Load Cell Excitation | Provided on E+ / E- pins (same as VCC) |
| Typical Load Cells | 1 kg, 5 kg, 10 kg, 20 kg, 50 kg, 200 kg |
| Operating Temperature | -40 to +85 C |
| Dimensions (PCB) | 38 x 21 mm (large pre-soldered version) |
Pinout Diagram
The large pre-soldered HX711 module has 10 header pins split across two connectors. Left header J1 (pins 1-6) — load cell side: E+ (red, excitation +), E- (black, excitation -), A- (white, channel A negative), A+ (green, channel A positive), B- (channel B negative), B+ (channel B positive). Right header J2 (pins 7-10) — microcontroller side: VCC (power in), SCK (serial clock), DT (data out), GND. For a standard 4-wire load cell you only need E+, E-, A+, A-. Channel B (B+/B-) is optional and can be used for a second sensor or skipped entirely.
Wiring Guide
Arduino Wiring
The HX711 runs happily on 5V from an Arduino Uno or Nano. DT and SCK are plain digital lines — any two GPIO pins will do. Wire your load cell's four wires to E+, E-, A+, A- on the module first, then connect the HX711's MCU side to the Arduino.
| HX711 Pin | Arduino Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| DT | Digital Pin 3 |
| SCK | Digital Pin 2 |
| E+ / E- / A+ / A- | Load cell wires |
scale.set_scale(-factor)).
ESP32 Wiring
The ESP32 works great with the HX711. Power the module from the ESP32's 3.3V pin for cleaner readings, or from VIN/5V if you need higher excitation. DT and SCK are plain digital lines, so pick any free GPIO.
| HX711 Pin | ESP32 Pin |
|---|---|
| VCC | 3.3V (or VIN / 5V) |
| GND | GND |
| DT | GPIO 4 |
| SCK | GPIO 5 |
| E+ / E- / A+ / A- | Load cell wires |
Raspberry Pi Wiring
The Raspberry Pi can talk to the HX711 using any two GPIO pins — there's no special peripheral needed since the HX711 uses a custom 2-wire protocol, not true SPI or I2C. Power the module from the Pi's 3.3V rail so the DT signal stays at 3.3V logic levels.
| HX711 Pin | Raspberry Pi Pin |
|---|---|
| VCC | Pin 1 (3.3V) |
| GND | Pin 6 (GND) |
| DT | Pin 29 (GPIO 5) |
| SCK | Pin 31 (GPIO 6) |
| E+ / E- / A+ / A- | Load cell wires |
Raspberry Pi Pico Wiring
The Pico uses 3.3V GPIO, which pairs nicely with the HX711 when you power the module from the Pico's 3V3 pin. Any two GP pins can be used for DT and SCK.
| HX711 Pin | Pico Pin |
|---|---|
| VCC | 3V3 (Pin 36) |
| GND | GND |
| DT | GP14 (Pin 19) |
| SCK | GP15 (Pin 20) |
| E+ / E- / A+ / A- | Load cell wires |
Code Examples
Arduino
// HX711 Load Cell Amplifier - Arduino Example
// Library: "HX711" by Bogdan Necula (Arduino Library Manager)
// DT -> Arduino Digital Pin 3
// SCK -> Arduino Digital Pin 2
#include "HX711.h"
const int DT_PIN = 3;
const int SCK_PIN = 2;
HX711 scale;
void setup() {
Serial.begin(9600);
Serial.println("HX711 Load Cell Demo");
scale.begin(DT_PIN, SCK_PIN);
// Replace this with your own calibration factor
// (see the "calibrate" section in the README of the HX711 library)
scale.set_scale(420.0983);
// Tare the scale so the current weight reads as zero
scale.tare();
Serial.println("Tare complete. Place an item on the scale.");
}
void loop() {
if (scale.is_ready()) {
float weight = scale.get_units(10); // average of 10 readings
Serial.print("Weight: ");
Serial.print(weight, 2);
Serial.println(" g");
} else {
Serial.println("HX711 not ready. Check wiring.");
}
delay(500);
}
Raspberry Pi (Python)
#!/usr/bin/env python3
# HX711 Load Cell Amplifier - Raspberry Pi Example
# Install: pip3 install hx711
# DT -> GPIO 5 (physical pin 29)
# SCK -> GPIO 6 (physical pin 31)
import RPi.GPIO as GPIO
import time
from hx711 import HX711
GPIO.setmode(GPIO.BCM)
DT_PIN = 5
SCK_PIN = 6
hx = HX711(dout_pin=DT_PIN, pd_sck_pin=SCK_PIN)
# Reset and tare
hx.reset()
hx.zero(readings=30)
# Replace with your calibrated scale factor (raw_value / known_weight_in_grams)
SCALE_FACTOR = 102.372
hx.set_scale_ratio(SCALE_FACTOR)
print("HX711 Load Cell Demo")
print("Place an item on the scale. Press Ctrl+C to quit.")
try:
while True:
weight = hx.get_weight_mean(readings=10)
print("Weight: {:.2f} g".format(weight))
time.sleep(0.5)
except (KeyboardInterrupt, SystemExit):
print("\nStopped by user")
finally:
GPIO.cleanup()
Raspberry Pi Pico (MicroPython)
# HX711 Load Cell Amplifier - Pico MicroPython Example
# Library: hx711.py by endail (copy to your Pico as hx711.py)
# DT -> GP14 (physical pin 19)
# SCK -> GP15 (physical pin 20)
from machine import Pin
from hx711 import hx711
import time
DT_PIN = Pin(14, Pin.IN, pull=Pin.PULL_DOWN)
SCK_PIN = Pin(15, Pin.OUT)
scale = hx711(SCK_PIN, DT_PIN)
scale.set_gain(128)
# Tare: read current zero point
print("Taring...")
tare = 0
for _ in range(20):
tare += scale.read()
time.sleep_ms(50)
tare //= 20
print("Tare value:", tare)
# Replace with your calibrated scale factor
SCALE_FACTOR = 420.0
print("HX711 Load Cell Demo")
print("Place an item on the scale.")
while True:
raw = scale.read()
weight_g = (raw - tare) / SCALE_FACTOR
print("Weight: {:.2f} g".format(weight_g))
time.sleep_ms(500)
ESP32 (MicroPython)
# HX711 Load Cell Amplifier - ESP32 MicroPython Example
# Library: hx711.py by SergeyPiskunov (copy to your ESP32 as hx711.py)
# DT -> GPIO 4
# SCK -> GPIO 5
from machine import Pin
from hx711 import HX711
import time
DT_PIN = Pin(4, Pin.IN, pull=Pin.PULL_DOWN)
SCK_PIN = Pin(5, Pin.OUT)
hx = HX711(d_out=4, pd_sck=5)
hx.set_gain(128)
# Tare
print("Taring...")
tare = 0
for _ in range(20):
tare += hx.read()
time.sleep_ms(50)
tare //= 20
print("Tare value:", tare)
SCALE_FACTOR = 420.0
print("HX711 Load Cell Demo")
print("Place an item on the scale.")
while True:
raw = hx.read()
weight_g = (raw - tare) / SCALE_FACTOR
print("Weight: {:.2f} g".format(weight_g))
time.sleep_ms(500)
Frequently Asked Questions
scale.set_scale(factor) in Arduino or the equivalent in your library. After that, readings will come out in grams.tare() and set_scale() helpers, and works with every common AVR and ARM Arduino board.