HX711 Load Cell Amplifier Interface with Arduino

HX711 Load Cell Amplifier, Weighing Scale Design

In this arduino tutorial of HX711 Load Cell amplifier interface. We are interfacing 40Kg load cell to the arduino using HX711 Load cell amplifier module. HX711 is a precision 24-bit analogto-digital converter (ADC) designed for weigh scales and industrial control applications to interface directly with a bridge sensor. The input multiplexer selects either Channel A or B differential input to the low-noise programmable gain amplifier (PGA). Channel A can be programmed with a gain of 128 or 64, corresponding to a full-scale differential input voltage of ±20mV or ±40mV respectively, when a 5V supply is connected to AVDD analog power supply pin. Channel B has a fixed gain of 32. Onchip power supply regulator eliminates the need for an external supply regulator to provide analog power for the ADC and the sensor. Clock input is flexible. It can be from an external clock source, a crystal, or the on-chip oscillator that does not require any external component. On-chip poweron-reset circuitry simplifies digital interface initialization. There is no programming needed for the internal registers. All controls to the HX711 are through the pins.

Load Cell Connection diagram and its Pinout

HX711 Module

HX711 Module
HX711 Module

Datasheet: HX711

Most Load cell have four wires red, black, green and white. On HX711 board you will find E+, E-, A+, A- and B+, B- connections. Connect load cell

Red wire to E+

Black wire to E-

Green wire to A-

White wire to A+


Load Cell
Load Cell

Load cell comes in various weights depending on your application select the load cell weight specification, In this tutorial I have used 40Kg, Precision Grade C2 load cell. Load cell also have precision type. 

Precision classes explained: Which load cell for which application?

Load cells are ranked, according to their overall performance capabilities, into differing accuracy classes or grades. A specific accuracy grade specifies an error envelope for certain parameters, such as linearity, hysteresis, temperature effects, creep, etc. In practice, certain system accuracy parameters depend considerably on the application of use, physical load introduction to the transducer and disturbing factors such as Zener barriers and surge protection devices.

Load Cell Classification
Load Cell Classification

Load cells with different accuracy classes are required depending on the application. The chart provides an overview of typical applications, ranging from the lowest to the highest accuracy class.

Load cells with relatively low accuracy classified D1 to C2 are sufficient forsimple building materials scales used to weigh sand, cement or water.

Adding the right proportion of additives to building materials is essential. For this purpose, special building materials scales using accuracy class C3 load cells are available for mixing additives such as ash or sand .

Accuracy class C3 load cells are widely used in machine construction as well. Here, scales contribute to quality assurance, for example, when ball bearingsare checked.

However, increased accuracy is needed with shop-counter scales or scales used in filling machines. Grams or micrograms are required here. Load cells used in these applications comply with accuracy classes C3 to C6.

Load Cell connections to HX711 and Arduino

Load Cell Interface with Arduino
Load Cell Interface with Arduino

HX711 Module operates at 5V and communication is done using serial SDA and SCK pins.

Where to apply weight on load cell?

You can see a arrow is shown on Load cell. this arrow shows the direction of force on the load cell. You can make arrangement shown in figure using metal strips. Attach metal strip on the Load cell using bolts.

Load Cell Mounting
Load Cell Mounting

Programming Arduino UNO to Measure Weight in Kgs

Calibration Sketch

For this program to run you need HX711 Library Download from here hx711-master

Once you upload the code adjust your scale factor with known weight until you see the correct readings. Press a,s,d,f to increase calibration factor by 10,100,1000,10000 respectively. Press z,x,c,v to decrease calibration factor by 10,100,1000,10000 respectively.

Note: Before you start running calibration code keep your Load Cell horizontal so that it will not have any weight (Weight of your fixture arrangement). Fixture arrangement causes problem to base line scale.

Once you find the calibration factor update it in below code.

Final Code for Weight Measurement

This code gave me accuracy of less than +/- 3 grams on Precision grade C2 40Kg Load Cell

14 thoughts on “HX711 Load Cell Amplifier Interface with Arduino

  1. Hi!

    Nice tutorial!!

    I’ve set up all my stuff (with 20kg load cell) and everything is working fine.

    However, when I try to save the reading value in a variable, my value has only 2 decimals instead of 3 that is shown in the LCD.

    I can’t figure out why.

    my code is:

    void loop() {
    lcd.clear(); //Limpa LCD
    lcd.print(scale.get_units(),3); //Up to 3 decimal points
    float peso = scale.get_units(); // Here I get the same value shown in lcd but with only two decimals
    lcd.print(“g”); //Change this to kg and re-adjust the calibration factor if you follow lbs

    Any suggestion?

    Thanks in advance!!

  2. I have 4 three wired load cells. I have to connect with arduino using HX711. I want a arduino sketch and schematic diagram. Basically I’m a mechanical Engineer. so, I don’t know how to give wiring and all. pls help me in my case … Thanks

  3. Arduino UNO USB PORT should be connected to PC and the Result on PC.

    After programming and testing is it possible to use on LCD MODULE stand alone mode.
    Can you give me complete details. If there is any charges let me know. Thanks.
    George KUWAIT

    1. 1. First load calibration sketch then using serial terminal

      2. Place known weight on load cell, (after power on).

      Press a,s,d,f to increase calibration factor by 10,100,1000,10000 respectively
      Press z,x,c,v to decrease calibration factor by 10,100,1000,10000 respectively

      Until you see the correct weight. keep changing calibration factor and get correct calibration factor

Leave a Reply