Documentation

5kg Load Cell with HX711 Amplifier Weighing Sensor Kit for Arduino, Raspberry Pi & ESP32 | ShillehTek Product Manual
Documentation / 5kg Load Cell with HX711 Amplifier Weighing Sensor Kit for Arduino, Raspberry Pi & ESP32 | ShillehTek Product Manual

5kg Load Cell with HX711 Amplifier Weighing Sensor Kit for Arduino, Raspberry Pi & ESP32 | ShillehTek Product Manual

manualshillehtek

Overview

This kit is a complete digital scale front-end: a 5 kg aluminum bar load cell paired with the HX711, the 24-bit ADC that has become the standard way to read strain gauges with a microcontroller. The load cell converts weight into a tiny differential voltage (about 1 mV per volt of excitation at full load — a few millivolts total), and the HX711 amplifies that signal 128x and digitizes it into clean 24-bit readings your board fetches over a simple two-wire connection: DT (data) and SCK (clock).

Wiring is color-coded and hard to get wrong: the load cell's red, black, white, and green wires go to the HX711's E+, E-, A-, and A+ terminals, and the HX711's four output pins — GND, DT, SCK, VCC — go to your microcontroller. The bar cell mounts as a cantilever: bolt one end to a base, bolt your weighing platform to the other end (watch the arrow on the cell — it points in the direction of the applied load), and every gram on the platform flexes the aluminum beam by a calibrated whisper.

After a quick one-time calibration with any object of known weight, expect steady gram-level readings across the 0-5 kg range — the recipe behind kitchen scales, filament monitors, parts counters, beehive trackers, pet-food dispensers, and lab experiments on Arduino, ESP32, Raspberry Pi, and Pico.

At a Glance

Capacity
5 kg
ADC
HX711, 24-bit
Interface
2-wire: DT + SCK
Supply Voltage
2.6 - 5.5V
Sample Rate
10 SPS (80 SPS option)
Output Pins
GND, DT, SCK, VCC

Specifications

Parameter Value
Amplifier / ADC HX711 24-bit sigma-delta with programmable gain
Channels A (gain 128 or 64, used by the load cell) + B (gain 32, spare)
Supply Voltage 2.6 - 5.5V (logic level follows VCC)
Output Rate 10 SPS default (80 SPS via the chip's RATE pin on some boards)
Interface 2-wire serial: DT (data out) + SCK (clock in) — not I2C/SPI
Load Cell Type Full-bridge strain gauge, aluminum single-point bar
Rated Capacity 5 kg
Sensitivity 1.0 ± 0.15 mV/V
Combined Error ≤ 0.05% of full scale
Load Cell Wires Red E+, Black E-, White A-, Green A+
Bar Dimensions ~75 x 12.7 x 12.7 mm, threaded mounting holes both ends
Achievable Resolution Gram-level across 0-5 kg after calibration

Pinout Diagram

Two connections to make. Load cell to HX711: red to E+, black to E-, white to A-, green to A+ (E is the excitation the HX711 supplies to the bridge; A is the amplified sense channel). HX711 to your board: VCC and GND for power, DT and SCK to any two GPIO pins — the HX711 speaks its own simple clocked protocol, so no special I2C/SPI pins are required. The B-/B+ pads are a spare second channel you can ignore.

5kg load cell and HX711 amplifier wiring diagram showing Red E+, Black E-, White A-, Green A+ load cell wires and GND, DT, SCK, VCC output pins

Wiring Guide

Arduino Wiring

Power the HX711 from 5V; DT and SCK go to two ordinary digital pins.

HX711 Pin Arduino Pin
VCC 5V
GND GND
DT D3
SCK D2
Tip: Mount before you measure. Bolt the end of the bar marked with the arrow's tail to a rigid base and your platform to the other end, with spacers so the beam can flex freely. A load cell resting loose on a desk cannot read accurately no matter how good the code is.

ESP32 Wiring

Power the HX711 from 3V3 — the chip runs happily there, and its DT output then swings at 3.3V, exactly what ESP32 inputs want.

HX711 Pin ESP32 Pin Details
VCC 3V3 Keeps DT at 3.3V logic
GND GND
DT GPIO 16
SCK GPIO 4
Warning: Do not power the HX711 from VIN/5V on 3.3V boards — its DT pin would then output 5V into the ESP32. On 3.3V supply everything stays in-spec with no level shifting.

Raspberry Pi Wiring

Same 3.3V rule as the ESP32. DT and SCK land on two free GPIOs.

HX711 Pin Raspberry Pi Pin Details
VCC Pin 1 (3.3V) Never a 5V pin
GND Pin 6 (GND)
DT Pin 29 (GPIO 5)
SCK Pin 31 (GPIO 6)
Warning: Pi GPIO is 3.3V-only with no protection — power the HX711 from Pin 1 (3.3V) so DT never rises above 3.3V.

Raspberry Pi Pico Wiring

HX711 Pin Pico Pin Details
VCC 3V3(OUT) (pin 36) Do NOT use VBUS (5V)
GND GND (pin 38)
DT GP14 (pin 19)
SCK GP15 (pin 20)

Code Examples

Calibration is a one-time, two-step ritual every scale needs: tare with nothing on the platform, place a known weight, and compute scale_factor = raw_change / known_weight. Each example below prints raw values first so you can find your own factor, then converts to grams.

Arduino

Install the "HX711" library by Bogdan Necula (bogde) from the Library Manager.

hx711_scale_arduino.ino
// 5kg Load Cell + HX711 - Arduino Example
// DT -> D3, SCK -> D2, VCC -> 5V, GND -> GND
// Library: "HX711" by Bogdan Necula (bogde)

#include "HX711.h"

const int DT_PIN = 3;
const int SCK_PIN = 2;

// Start with 1.0, then calibrate:
// factor = (raw with weight - raw empty) / weight in grams
float CALIBRATION_FACTOR = 1.0;

HX711 scale;

void setup() {
  Serial.begin(9600);
  scale.begin(DT_PIN, SCK_PIN);

  Serial.println("Remove all weight... taring in 3 s");
  delay(3000);
  scale.tare();                       // zero the empty platform
  scale.set_scale(CALIBRATION_FACTOR);
  Serial.println("Ready. Place a known weight to calibrate,");
  Serial.println("or start weighing if already calibrated.");
}

void loop() {
  if (scale.is_ready()) {
    // Average 10 readings for a steady value
    float grams = scale.get_units(10);
    long raw = scale.get_value(10);   // tared raw counts (for calibration)

    Serial.print("Raw: ");
    Serial.print(raw);
    Serial.print("  |  Weight: ");
    Serial.print(grams, 1);
    Serial.println(" g");
  } else {
    Serial.println("HX711 not responding - check wiring");
  }
  delay(500);
}

ESP32 (Arduino IDE)

hx711_scale_esp32.ino
// 5kg Load Cell + HX711 - ESP32 Example
// DT -> GPIO 16, SCK -> GPIO 4, VCC -> 3V3, GND -> GND
// Library: "HX711" by Bogdan Necula (works on ESP32)

#include "HX711.h"

const int DT_PIN = 16;
const int SCK_PIN = 4;

float CALIBRATION_FACTOR = 1.0;  // set after calibrating

HX711 scale;

void setup() {
  Serial.begin(115200);
  scale.begin(DT_PIN, SCK_PIN);

  Serial.println("Remove all weight... taring in 3 s");
  delay(3000);
  scale.tare();
  scale.set_scale(CALIBRATION_FACTOR);
  Serial.println("Ready.");
}

void loop() {
  if (scale.wait_ready_timeout(1000)) {
    float grams = scale.get_units(10);
    Serial.printf("Weight: %.1f g\n", grams);
  } else {
    Serial.println("HX711 not responding - check wiring");
  }
  delay(500);
}

Raspberry Pi (Python)

Dependency-free: this reads the HX711 protocol directly with RPi.GPIO.

hx711_scale_rpi.py
#!/usr/bin/env python3
# 5kg Load Cell + HX711 - Raspberry Pi Example (no library needed)
# DT -> GPIO 5 (pin 29), SCK -> GPIO 6 (pin 31), VCC -> 3.3V (pin 1)

import time
import RPi.GPIO as GPIO

DT, SCK = 5, 6
CALIBRATION_FACTOR = 1.0   # (raw_with_weight - raw_empty) / grams

GPIO.setmode(GPIO.BCM)
GPIO.setup(DT, GPIO.IN)
GPIO.setup(SCK, GPIO.OUT, initial=GPIO.LOW)

def read_raw():
    # Wait until the HX711 signals data ready (DT goes low)
    while GPIO.input(DT) == 1:
        time.sleep(0.001)

    value = 0
    for _ in range(24):                 # clock out 24 data bits
        GPIO.output(SCK, GPIO.HIGH)
        GPIO.output(SCK, GPIO.LOW)
        value = (value << 1) | GPIO.input(DT)

    GPIO.output(SCK, GPIO.HIGH)         # 25th pulse = channel A, gain 128
    GPIO.output(SCK, GPIO.LOW)

    if value & 0x800000:                # sign-extend the 24-bit result
        value -= 1 << 24
    return value

def read_average(n=10):
    return sum(read_raw() for _ in range(n)) / n

print("Remove all weight... taring")
time.sleep(2)
zero = read_average(20)
print("Tared. Raw zero = {:.0f}".format(zero))

try:
    while True:
        raw = read_average(10)
        grams = (raw - zero) / CALIBRATION_FACTOR
        print("Raw: {:8.0f}  |  Weight: {:8.1f} g".format(raw - zero, grams))
        time.sleep(0.5)
except KeyboardInterrupt:
    print("Stopped by user")
finally:
    GPIO.cleanup()

Raspberry Pi Pico (MicroPython)

hx711_scale_pico.py
# 5kg Load Cell + HX711 - Pico MicroPython Example (no library needed)
# DT -> GP14, SCK -> GP15, VCC -> 3V3(OUT), GND -> GND

from machine import Pin
import time

dt = Pin(14, Pin.IN)
sck = Pin(15, Pin.OUT, value=0)

CALIBRATION_FACTOR = 1.0   # (raw_with_weight - raw_empty) / grams

def read_raw():
    while dt.value() == 1:          # wait for data ready
        time.sleep_ms(1)

    value = 0
    for _ in range(24):             # clock out 24 data bits
        sck.value(1)
        sck.value(0)
        value = (value << 1) | dt.value()

    sck.value(1)                    # 25th pulse = channel A, gain 128
    sck.value(0)

    if value & 0x800000:            # sign-extend
        value -= 1 << 24
    return value

def read_average(n=10):
    return sum(read_raw() for _ in range(n)) / n

print("Remove all weight... taring")
time.sleep(2)
zero = read_average(20)
print("Tared. Raw zero =", int(zero))

while True:
    raw = read_average(10)
    grams = (raw - zero) / CALIBRATION_FACTOR
    print("Raw: {:8.0f}  |  Weight: {:8.1f} g".format(raw - zero, grams))
    time.sleep(0.5)

Frequently Asked Questions

How do I calibrate the scale?
Run the code with the platform empty and note the raw reading (it is ~0 after taring). Place an object of known weight — a 500 g water bottle, a phone with a spec-sheet weight, anything — and note the new raw value. Divide the raw change by the weight in grams: that is your calibration factor. Enter it into the code and readings come out in grams. Redo it if you remount the cell or change platforms.
Why does my weight read negative?
The load is flexing the beam the opposite way from what the electronics expect. Either flip the load cell so the labeled arrow points with the applied force, or simply swap the white (A-) and green (A+) wires at the HX711 — both invert the sign. A negative sign with correct magnitude is a wiring orientation issue, never damage.
My readings drift over the first few minutes. Is that normal?
Yes — strain gauges and the HX711 both warm up, so expect a few grams of drift in the first 2-3 minutes after power-on. Let it warm up, then tare. Remaining slow drift usually comes from temperature swings or a mounting that shifts; rigid bolted mounting and re-taring between measurements keep long-term readings honest.
Can I power it from 3.3V?
Yes — the HX711 runs from 2.6-5.5V, and its logic pins follow the supply. That is exactly why the ESP32, Pi, and Pico wiring tables power it from 3.3V: DT then outputs 3.3V-safe levels with no level shifter. On a 5V Arduino, 5V supply is the natural choice.
How accurate can this kit actually get?
With rigid mounting, warm-up, taring, and averaged readings, hobby builds commonly hold within a gram or two across the 0-5 kg range — the cell's rated combined error is 0.05% of full scale (about 2.5 g). Vibration, drafts, cable strain on the platform, and flexy mounting are what push real-world error higher, not the electronics.
Can I read it faster than a few times per second?
The HX711 produces 10 samples per second in its default configuration, and averaging (as the examples do) trades speed for stability. Some boards expose the chip's RATE pin — tying it high switches to 80 SPS at the cost of more noise per sample. For weighing, 10 SPS averaged is almost always the better trade.
What are the B-/B+ pads for?
A second input channel with fixed gain 32. You could hang another bridge sensor on it and switch channels in software, but channel A at gain 128 is the right home for this load cell, and most projects never touch B.

Related Tutorials