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

How to Use HX711: Examples, Pinouts, and Specs

Image of HX711Design with HX711 in Cirkit Designer

Introduction

The HX711 AD Module, manufactured by Makro, is a precision 24-bit analog-to-digital converter (ADC) designed for applications requiring high accuracy and stability. It is widely used in weigh scales, industrial control systems, and other applications where small changes in voltage need to be measured. The HX711 simplifies the process of interfacing load cells or other sensors with microcontrollers by providing a high-resolution digital output.

Explore Projects Built with HX711

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 Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled: A project utilizing HX711 in a practical application
Smart Weighing System with ESP8266 and HX711 - Battery Powered and Wi-Fi Enabled

This circuit is a multi-sensor data acquisition system powered by a 18650 battery and managed by an ESP8266 microcontroller. It includes a load sensor interfaced with an HX711 module for weight measurement, an IR sensor, an ADXL345 accelerometer, a VL53L0X distance sensor, and a Neo 6M GPS module for location tracking. The system is designed for wireless data transmission and is supported by a TP4056 module for battery charging.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The HX711 AD Module is designed to provide high precision and ease of use. Below are its key technical details:

Parameter Value
Manufacturer Makro
Part ID HX711 AD Module
ADC Resolution 24-bit
Operating Voltage 2.6V to 5.5V
Typical Operating Current ~1.5mA
Standby Current <1µA
Input Channels 2 (Channel A and Channel B)
Gain Channel A: 128 or 64, Channel B: 32
Data Rate 10Hz or 80Hz
Interface Serial (2-wire: Data and Clock)
Operating Temperature -40°C to +85°C

Pin Configuration and Descriptions

The HX711 module has a total of 4 pins for interfacing with a microcontroller. Below is the pinout:

Pin Name Description
VCC Power supply pin (2.6V to 5.5V). Connect to the microcontroller's power source.
GND Ground pin. Connect to the ground of the circuit.
DT (Data) Serial data output pin. Used for communication with the microcontroller.
SCK (Clock) Serial clock input pin. Used to synchronize data transfer.

Usage Instructions

The HX711 is commonly used to interface load cells with microcontrollers. Below are the steps to use the HX711 in a circuit:

Connecting the HX711 to a Load Cell

  1. Connect the Load Cell to the HX711:

    • The HX711 has two differential input channels (A and B). Connect the load cell's output wires to Channel A (recommended for higher precision).
    • Ensure proper wiring of the load cell: Excitation+ (E+), Excitation- (E-), Signal+ (S+), and Signal- (S-).
  2. Connect the HX711 to the Microcontroller:

    • Connect the DT pin of the HX711 to a digital input pin on the microcontroller.
    • Connect the SCK pin of the HX711 to another digital output pin on the microcontroller.
    • Power the HX711 by connecting VCC and GND to the microcontroller's power and ground.

Example Circuit Diagram

Load Cell --> HX711 --> Microcontroller (e.g., Arduino UNO)

Arduino UNO Example Code

Below is an example code to interface the HX711 with an Arduino UNO:

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

// Define HX711 pins
#define DT_PIN 3  // Data pin connected to Arduino digital pin 3
#define SCK_PIN 2 // Clock pin connected to Arduino digital pin 2

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

void setup() {
  Serial.begin(9600); // Initialize serial communication
  scale.begin(DT_PIN, SCK_PIN); // Initialize the HX711 with the defined pins
  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 reading
    Serial.print("Weight: ");
    Serial.print(reading); // Print the weight value
    Serial.println(" units");
  } else {
    Serial.println("HX711 not ready. Check connections.");
  }
  delay(500); // Wait for 500ms before the next reading
}

Important Considerations

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Check the wiring between the HX711, load cell, and microcontroller.
    • Ensure the load cell is properly connected to Channel A or B.
    • Verify that the power supply voltage is within the specified range (2.6V to 5.5V).
  2. Fluctuating or Noisy Readings:

    • Use a stable power source and decoupling capacitors to reduce noise.
    • Ensure proper grounding of the circuit.
    • Shield the load cell wires to minimize electromagnetic interference.
  3. HX711 Not Responding:

    • Verify the DT and SCK pin connections.
    • Check if the HX711 is in standby mode (current consumption <1µA). If so, reset the module.

FAQs

Q1: Can the HX711 measure multiple load cells simultaneously?
A1: The HX711 has two input channels (A and B), but only one channel can be read at a time. For multiple load cells, use multiple HX711 modules.

Q2: How do I calibrate the HX711?
A2: Calibration involves determining the scale factor by applying a known weight to the load cell and adjusting the readings accordingly. Use the HX711 library's calibration functions for this purpose.

Q3: What is the maximum weight the HX711 can measure?
A3: The maximum weight depends on the load cell's capacity. The HX711 itself does not impose a weight limit but provides high-resolution readings for the connected load cell.

Q4: Can I use the HX711 with a 3.3V microcontroller?
A4: Yes, the HX711 operates at 2.6V to 5.5V, making it compatible with both 3.3V and 5V systems.

By following this documentation, you can effectively integrate the HX711 AD Module into your projects for precise weight and voltage measurements.