Ir directamente al contenido

All items ship from our office in Colorado USA - $5.95 Flat-Rate US shipping & free shipping on orders over $75!

HX711 Weight / Load Cell 2-Channel Pressure Sensor Amplifier Module User Guide

HX711 Weight / Load Cell 2-Channel Pressure Sensor Amplifier Module User Guide - Envistia Mall

📋 Overview

The HX711 Load Cell Amplifier Module uses a 24-bit high-precision A/D converter chip designed for high-precision electronic scale applications. It has two analog input channels and an integrated programmable gain amplifier, making it ideal for interfacing with load cells, bridge sensors, and strain gauges to measure weight accurately.

The module communicates with your microcontroller using a simple serial interface — no complex programming required. Just connect two data pins (DOUT and SCK) to any available GPIO pins on your Arduino or compatible board.


⭐ Key Features

  • 24-bit high-precision A/D converter chip (HX711)
  • Two selectable analog input channels (Channel A and Channel B)
  • Integrated programmable gain amplifier with selectable gain of 32, 64, and 128
  • Simple serial interface — requires only two pins (DOUT and SCK) to communicate with the microcontroller
  • On-chip power supply regulator for the load cell / analog supply
  • On-chip oscillator — no external components required
  • Simultaneous 50Hz and 60Hz supply rejection
  • Selectable output data rate: 10Hz or 80Hz
  • Current consumption (including on-chip analog power supply regulator): < 1.5mA, power-down mode: < 1µA
  • Operating supply voltage range: 2.6V – 5.5V
  • Operating temperature range: -40°C to +85°C
  • 16-pin SOP-16 package

🔧 What Is a Load Cell?

A load cell is a transducer that converts a force into an electrical signal that can be measured. The electrical signal changes proportionally to the force applied. Load cells typically use a strain gauge configuration — when force is applied, the strain gauge deforms, causing its electrical resistance to change. This change in resistance is very small, which is why the HX711 amplifier is needed to amplify the signal so it can be read by a microcontroller.

Strain gauge load cells are commonly available in ratings such as 1kg, 5kg, 10kg, 20kg, and 50kg. The rating indicates the maximum weight the load cell is designed to measure.


📌 Module Pinout

The HX711 module has two connection sides:

Load Cell Side (Sensor Input)

Pin Label Function
E+ Excitation Positive (Red wire)
E- Excitation Negative (Black wire)
A- Channel A Signal Negative (White wire)
A+ Channel A Signal Positive (Green wire)
B- Channel B Signal Negative (optional second sensor)
B+ Channel B Signal Positive (optional second sensor)

Microcontroller Side (Digital Output)

Pin Label Function
GND Ground
DT (DOUT) Data Output
SCK (CLK) Serial Clock Input
VCC Power Supply (2.6V – 5.5V)

🎨 Load Cell Wire Color Code

Most four-wire load cells follow this standard color coding:

Wire Color Function Connects To
Red Excitation+ E+
Black Excitation- E-
White Output- (Signal-) A-
Green Output+ (Signal+) A+

⚠️ Important: Some load cells may use different color conventions. Always check your specific load cell's documentation. If your readings show negative values, try swapping the White and Green wires on the A- and A+ terminals.


🏗️  Simplified Schematic

Envistia HX711 Load Cell Amplifier Simplified Schematic

⚙️ Setting Up the Load Cell

Before wiring, you need to mount the load cell properly. The load cell has a fixed end and a free end:

  1. Secure the fixed end — Mount one side of the load cell to a sturdy, stable base (table, platform, or frame) using screws and a mounting plate
  2. Attach a platform to the free end — Mount a small plate or platform to the other side where objects will be placed for weighing
  3. Ensure the arrow direction — Many load cells have an arrow printed on them indicating the direction of applied force. Make sure the arrow points downward (toward the ground) when mounted horizontally

💡 Tip: The load cell must be firmly secured on one end and free to flex on the other. If both ends are rigidly fixed, the load cell won't deform properly and readings will be inaccurate.


🔌 Wiring the HX711 to Arduino

📦 Parts Needed

  • 1× HX711 Load Cell Amplifier Module (this product)
  • 1× Strain gauge load cell (sold separately)
  • 1× Arduino Uno, Nano, or compatible board
  • Jumper wires

Connection Table

Load Cell → HX711:

Load Cell Wire HX711 Pin
Red E+
Black E-
White A-
Green A+

HX711 → Arduino:

HX711 Pin Arduino Pin
DT (DOUT) Pin 4
SCK (CLK) Pin 5
VCC 5V
GND GND

📝 Note: You can use any available digital GPIO pins on the Arduino for DT and SCK. Just update the pin numbers in your code accordingly.


💻 Installing the HX711 Library

This guide uses the HX711 library by bogde (one of the most popular and well-supported libraries for this module).

Installation Steps:

  1. Open the Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries…
  3. In the search bar, type "HX711"
  4. Find "HX711 Arduino Library" by bogde
  5. Click Install

🚀 Step 1: Calibrating the Scale

Calibration is the most important step. You must calibrate the scale before you can get accurate weight readings. The calibration process determines a calibration factor that converts the raw ADC values into real-world weight units (grams, kilograms, etc.).

What You Need for Calibration

  • A known weight (e.g., an object you've weighed on another scale — 100g, 200g, 500g, etc.)

Calibration Code

Upload this sketch to your Arduino, then open the Serial Monitor at 57600 baud:

/*
 * HX711 Calibration Sketch
 * Envistia Mall - Product Support
 *
 * Based on the HX711 library example.
 *
 * Connections:
 *   HX711 DT  -> Arduino Pin 4
 *   HX711 SCK -> Arduino Pin 5
 */

#include "HX711.h"

const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;

HX711 scale;

void setup() {
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);

  scale.set_scale();
  scale.tare();

  Serial.println("Nothing on the scale.");
  Serial.println("Place a known weight on the scale...");
}

void loop() {
  if (scale.is_ready()) {
    Serial.print("Reading: ");
    Serial.println(scale.get_units(10), 5);
  }
}

Calibration Procedure:

  1. Upload the sketch and open the Serial Monitor (57600 baud)
  2. Make sure nothing is on the scale — the sketch will automatically tare (zero) the scale
  3. Place your known weight on the load cell
  4. Write down the reading shown in the Serial Monitor
  5. Calculate the calibration factor:

    Calibration Factor = Reading ÷ Known Weight

    Example: If the reading is 89,650 and your known weight is 200g, then: Calibration Factor = 89,650 ÷ 200 = 448.25

  6. Save this calibration factor — you'll use it in the next step

🚀 Step 2: Weighing Objects

Once you have your calibration factor, use this sketch to read weight values. Replace the calibration_factor value with the number you calculated in Step 1:

/*
 * HX711 Weight Reading Sketch
 * Envistia Mall - Product Support
 *
 * Replace calibration_factor with your own value from Step 1.
 *
 * Connections:
 *   HX711 DT  -> Arduino Pin 4
 *   HX711 SCK -> Arduino Pin 5
 */

#include "HX711.h"

const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;

HX711 scale;

// Replace this with YOUR calibration factor from Step 1
float calibration_factor = 448.25;

void setup() {
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);

  scale.set_scale(calibration_factor);
  scale.tare();

  Serial.println("Scale is ready. Place objects to weigh.");
}

void loop() {
  if (scale.is_ready()) {
    Serial.print("Weight: ");
    Serial.print(scale.get_units(10), 2);
    Serial.println(" g");
  }
  delay(500);
}

💡 Tip: The get_units(10) function takes 10 readings and returns the average, which provides smoother and more stable results. You can increase this number for even more stability, but readings will update more slowly.


🚀 Step 3 (Optional): Digital Scale with Display and Tare Button

For a complete digital scale project, you can add an OLED display and a tare button. This allows you to see the weight on a screen and reset the scale to zero at any time.

📦 Additional Parts Needed

  • 1× 0.96" OLED display (SSD1306, I2C interface)
  • 1× Pushbutton
  • 1× 10kΩ resistor (for button pull-up, if not using internal pull-up)

Additional Wiring

Component Arduino Pin
OLED SDA A4
OLED SCL A5
OLED VCC 3.3V
OLED GND GND
Tare Button (one leg) Pin 12
Tare Button (other leg) GND

Additional Libraries Required

  • Adafruit SSD1306 — for the OLED display
  • Adafruit GFX — graphics library for the display

Install both via Sketch → Include Library → Manage Libraries…

Digital Scale Code

/*
 * HX711 Digital Scale with OLED Display and Tare Button
 * Envistia Mall - Product Support
 *
 * Connections:
 *   HX711 DT   -> Pin 4
 *   HX711 SCK  -> Pin 5
 *   OLED SDA   -> A4
 *   OLED SCL   -> A5
 *   Tare Button -> Pin 12 (other leg to GND)
 */

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "HX711.h"

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;
const int TARE_BUTTON_PIN = 12;

HX711 scale;

// Replace with YOUR calibration factor
float calibration_factor = 448.25;

void setup() {
  Serial.begin(57600);
  pinMode(TARE_BUTTON_PIN, INPUT_PULLUP);

  // Initialize OLED
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println("SSD1306 allocation failed");
    for (;;);
  }
  display.clearDisplay();
  display.setTextColor(WHITE);

  // Initialize scale
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  scale.set_scale(calibration_factor);
  scale.tare();

  Serial.println("Digital Scale Ready");
}

void loop() {
  // Check tare button
  if (digitalRead(TARE_BUTTON_PIN) == LOW) {
    scale.tare();
    Serial.println("Scale tared.");
    delay(300);  // Debounce
  }

  if (scale.is_ready()) {
    float weight = scale.get_units(10);

    // Display on OLED
    display.clearDisplay();
    display.setTextSize(1);
    display.setCursor(0, 0);
    display.println("Envistia Mall");
    display.println("Digital Scale");
    display.println("");
    display.setTextSize(2);
    display.print(weight, 1);
    display.println(" g");
    display.display();

    // Also print to Serial Monitor
    Serial.print("Weight: ");
    Serial.print(weight, 2);
    Serial.println(" g");
  }

  delay(200);
}

🎯 Common Applications

  • Digital kitchen scales and postal scales
  • Industrial weighing and process control
  • Automated filling and dispensing systems
  • Presence detection — detect whether an object is placed on a surface
  • IoT smart scales — connected scales using ESP32/ESP8266 with cloud dashboards
  • Agricultural monitoring — beehive weight tracking, feed bin levels
  • Force and strain measurement — tension/compression testing

🛠️ Troubleshooting

Problem Possible Cause Solution
No readings / "HX711 not found" Incorrect wiring Double-check DT and SCK connections. Verify VCC is connected to 5V and GND to GND.
Readings are always zero Load cell not connected properly Verify Red→E+, Black→E-, White→A-, Green→A+ connections.
Negative readings Signal wires swapped Swap the White (A-) and Green (A+) wires on the HX711.
Unstable / fluctuating readings Electrical noise or loose connections Use shorter wires, solder connections instead of breadboard, keep away from motors and power supplies. Increase averaging (e.g., get_units(20)).
Readings drift over time Temperature changes or mechanical creep Allow the load cell to warm up for 15–30 minutes. Re-tare periodically.
Incorrect weight values Wrong calibration factor Re-run the calibration procedure (Step 1) with an accurate known weight.
Scale doesn't return to zero Overloaded or mechanical issue Ensure you're not exceeding the load cell's rated capacity. Check that the load cell is properly mounted with one fixed end and one free end.
Library not found / compile error Library not installed Re-install the HX711 library via Library Manager (Sketch → Include Library → Manage Libraries).

💡 Tips for Best Results

  1. Mount the load cell properly — One end must be firmly fixed; the other end must be free to flex. If both ends are rigid, readings will be inaccurate.
  2. Check the arrow on the load cell — If your load cell has a directional arrow, ensure it points in the direction of the applied force (typically downward).
  3. Solder your connections — Breadboard connections introduce noise and intermittent contact issues. For reliable results, solder the wires.
  4. Use averagingget_units(10) averages 10 readings for smoother output. Increase to 20 or more for even better stability.
  5. Don't exceed the load cell's rated capacity — Overloading can permanently damage or deform the strain gauge.
  6. Allow warm-up time — Let the system stabilize for several minutes before taking precision measurements.
  7. Re-tare as needed — If the zero point drifts, press the tare button or call scale.tare() in your code.
  8. Use a stable surface — Vibrations and an uneven surface will affect readings.

🛒 Where to Buy the HX711 Load Cell Amplifier

Buy the HX711 Load Cell Amplifier Module at Envistia Mall →


📚 Resources & Downloads


This guide is provided by Envistia Mall for educational and technical reference purposes. The manufacturer and Envistia LLC (dba Envistia Mall) are not responsible for any damages or losses resulting from the use of this product. Always follow proper electrical safety practices when working with electronic components. Specifications are based on manufacturer data and are subject to change without notice.

Share this guide:
in

🛒 Related Products

Find the components mentioned in this guide in our store.

Browse Products →