Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use HX711 Red: Examples, Pinouts, and Specs

Image of HX711 RedDesign with HX711 Red in Cirkit Designer

Introduction

The HX711 Red is a precision 24-bit analog-to-digital converter (ADC) specifically designed for applications requiring high accuracy and stability, such as weighing scales and industrial control systems. It features an integrated low-noise programmable gain amplifier (PGA) that allows direct interfacing with load cells, making it an ideal choice for weight measurement systems. The HX711 Red simplifies the process of converting small analog signals from load cells into digital data that can be processed by microcontrollers.

Explore Projects Built with HX711 Red

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Controlled Load Cell and Ultrasonic Sensor System with Status LEDs: A project utilizing HX711 Red in a practical application
ESP32-Controlled Load Cell and Ultrasonic Sensor System with Status LEDs

This circuit features an ESP32 microcontroller connected to a set of LEDs (green, orange, red), an HX711 bridge sensor interface, a load cell, and an HC-SR04 ultrasonic sensor. The ESP32 controls the LEDs and communicates with the HX711 to read data from the load cell, which can measure weight or force. Additionally, the ESP32 triggers the HC-SR04 to measure distance via ultrasonic pulses and reads the echo signal to determine the distance to an object.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The HX711 Red has 16 pins, but only a subset is typically used in most applications. Below is the pin configuration:

Pin Number Pin Name Description
1 VCC Power supply input (2.6V to 5.5V).
2 VFB Feedback voltage for internal regulator (connect to VCC for external supply).
3 VBG Bandgap reference voltage output (not commonly used).
4 AVDD Analog power supply (connect to VCC).
5 AGND Analog ground.
6 AINP Positive input for Channel A.
7 AINN Negative input for Channel A.
8 AINB Positive input for Channel B.
9 AINB- Negative input for Channel B.
10 DGND Digital ground.
11 PD_SCK Power-down and serial clock input.
12 DOUT Serial data output.
13 DVDD Digital power supply (connect to VCC).
14 NC Not connected.
15 NC Not connected.
16 NC Not connected.

Usage Instructions

How to Use the HX711 Red in a Circuit

  1. Power Supply: Connect the VCC pin to a 2.6V–5.5V power source and ground the AGND and DGND pins.
  2. Load Cell Connection:
    • Connect the load cell's positive signal wire to AINP and the negative signal wire to AINN for Channel A.
    • Alternatively, use Channel B for a second load cell or other analog input.
  3. Microcontroller Interface:
    • Connect the PD_SCK pin to a digital output pin on your microcontroller.
    • Connect the DOUT pin to a digital input pin on your microcontroller.
  4. Gain Selection: The gain is set by the number of clock pulses sent to the PD_SCK pin during data retrieval:
    • 25 pulses: Gain = 128 (default, for Channel A).
    • 27 pulses: Gain = 64 (for Channel A).
    • 26 pulses: Gain = 32 (for Channel B).
  5. Data Retrieval:
    • Wait for the DOUT pin to go LOW, indicating data is ready.
    • Send the appropriate number of clock pulses to PD_SCK to read the 24-bit data.

Important Considerations

Example Code for Arduino UNO

Below is an example of how to interface the HX711 Red with an Arduino UNO to read weight data from a load cell:

#include "HX711.h" // Include the HX711 library

// Define connections to HX711
#define DOUT  3  // Data output pin connected to Arduino pin 3
#define CLK   2  // Clock pin connected to Arduino pin 2

HX711 scale; // Create an instance of the HX711 class

void setup() {
  Serial.begin(9600); // Initialize serial communication
  scale.begin(DOUT, CLK); // Initialize the HX711 with the defined pins
  scale.set_scale(); // Set the scale factor (calibration required)
  scale.tare(); // Reset the scale to 0
  Serial.println("HX711 initialized. Place weight on the scale.");
}

void loop() {
  if (scale.is_ready()) { // Check if the HX711 is ready
    long reading = scale.get_units(); // Get the weight in units
    Serial.print("Weight: ");
    Serial.print(reading);
    Serial.println(" units");
  } else {
    Serial.println("HX711 not ready. Check connections.");
  }
  delay(500); // Wait for 500ms before the next reading
}

Notes on Calibration

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the DOUT pin is properly connected to the microcontroller.
    • Verify that the HX711 is powered and the VCC voltage is within the specified range.
    • Check for loose or broken connections in the circuit.
  2. Inaccurate Readings:

    • Perform proper calibration using a known weight.
    • Minimize electrical noise by using shielded cables and decoupling capacitors.
    • Ensure the load cell is mounted securely and not subject to external vibrations.
  3. DOUT Pin Always HIGH:

    • Verify that the load cell is connected correctly.
    • Check if the load cell wires are damaged or disconnected.
  4. Fluctuating Measurements:

    • Use a stable power supply to reduce noise.
    • Ensure the load cell is not exposed to temperature changes or mechanical disturbances.

FAQs

Q: Can I use the HX711 Red with a 3.3V microcontroller?
A: Yes, the HX711 Red operates within a voltage range of 2.6V to 5.5V, making it compatible with both 3.3V and 5V systems.

Q: How do I select between Channel A and Channel B?
A: The channel is selected based on the number of clock pulses sent to the PD_SCK pin during data retrieval. Refer to the "Gain Selection" section for details.

Q: What is the maximum weight the HX711 Red can measure?
A: The maximum weight depends on the load cell used. The HX711 Red itself does not impose a weight limit but converts the load cell's analog signal into digital data.

Q: Can I connect multiple load cells to the HX711 Red?
A: The HX711 Red supports two differential input channels (Channel A and Channel B). However, only one channel can be read at a time. For multiple load cells, consider using multiple HX711 modules.