Documentation

HX711 Pre-Soldered Large Load Cell Amplifier Module for Arduino | ShillehTek Product Manual
Documentation / HX711 Pre-Soldered Large Load Cell Amplifier Module for Arduino | ShillehTek Product Manual

HX711 Pre-Soldered Large Load Cell Amplifier Module for Arduino | ShillehTek Product Manual

manualshillehtek

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

Operating Voltage
2.7V - 5V
ADC Resolution
24-bit
Channels
2 (A & B)
Output Data Rate
10 or 80 SPS
Interface
2-wire Serial
Pins
E+, E-, A-, A+, B-, B+, VCC, DT, SCK, GND

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

HX711 pre-soldered load cell amplifier module pinout diagram showing E+, E-, A-, A+, B-, B+ load cell pins on the left and GND, DT, SCK, VCC microcontroller pins on the right

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
Tip: Most 4-wire load cells follow this convention — Red = E+, Black = E-, White = A-, Green = A+. If your cell drifts the wrong direction when you press down, just swap A+ and A- (or flip the sign in software with 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
Tip: The HX711 output (DT) swings to whatever you powered VCC with. If you feed the HX711 5V, the DT line outputs 5V — which is too high for the ESP32's 3.3V GPIO. To stay safe, power the HX711 from 3.3V, or add a voltage divider / level shifter on the DT line.

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
Warning: Raspberry Pi GPIO is 3.3V only. Do NOT power the HX711 from the Pi's 5V pin and then connect DT/SCK directly — the 5V output on DT can damage the Pi's GPIO. Either power the HX711 from 3.3V, or use a logic-level converter.

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
Tip: Keep the wires between the HX711 and the load cell as short as possible. Long load-cell leads pick up electrical noise and degrade accuracy. If you need a long run, use shielded cable and tie the shield to GND.

Code Examples

Arduino

hx711_arduino.ino
// 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)

hx711_rpi.py
#!/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_pico.py
# 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_esp32.py
# 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

How do I wire a 4-wire load cell to the HX711?
Connect the load cell's Red wire to E+, Black to E-, White to A-, and Green to A+. If the reading goes up when you expect it to go down, simply swap A+ and A- (or negate your scale factor in code). Then wire the HX711's VCC, GND, DT, and SCK pins to your microcontroller.
How do I calibrate the HX711 to read grams?
First tare the scale with nothing on it. Then place a known weight (say, 500 g) and read the raw value. Divide the raw value by 500 — that number is your scale factor. Pass it to scale.set_scale(factor) in Arduino or the equivalent in your library. After that, readings will come out in grams.
Can I use the HX711 with the ESP32 or Raspberry Pi at 3.3V?
Yes. The HX711 supports 2.7V to 5V on VCC, so you can safely power it from a 3.3V rail. This is actually the recommended setup with ESP32, Pico, and Raspberry Pi, because the DT pin's output voltage follows VCC — keeping VCC at 3.3V avoids damaging 3.3V-only GPIO pins.
My readings are noisy or drift a lot — what can I do?
A few fixes usually help: (1) Use short, well-shielded load cell wires, (2) mount the load cell on a rigid, flat surface, (3) power the HX711 from a clean supply (a separate 3.3V regulator, not noisy USB power), and (4) average 10+ readings in software instead of using single samples. Also give the module ~1 minute to warm up after power-on.
What library should I use with Arduino?
Use the "HX711" library by Bogdan Necula, available through the Arduino Library Manager. It is widely tested, has tare() and set_scale() helpers, and works with every common AVR and ARM Arduino board.
Can I run two load cells on one HX711 module?
Yes — the HX711 has two differential input channels. Channel A (A+/A-) supports gains of 128 or 64 and is what most libraries use by default. Channel B (B+/B-) has a fixed gain of 32 and is better suited to a smaller, less sensitive cell. Most libraries let you switch channels at runtime.
Why does my HX711 always return -1 or the same value forever?
This almost always means the microcontroller can't read DT. Double-check that DT and SCK are not swapped, that GND is shared between the module and the MCU, and that VCC is at least 2.7V. Also confirm your load cell's E+/E- wires are correctly connected — without an excitation voltage on the bridge, the ADC just sees noise.

Related Tutorials