Tutorial to Interface HX711 Balance Module With Load Cell

181,814

93

29

Introduction: Tutorial to Interface HX711 Balance Module With Load Cell

Description

This module uses 24 high-precision A / D converter. This chip is designed for high-precision electronic scale and design, has two analog input channels, programmable gain of 128 integrated amplifier. The input circuit can be configured to provide a bridge voltage electrical bridge (such as pressure, load) sensor model is an ideal high-precision, low-cost sampling front-end module.

Specification

  • Two selectable differential input channels

  • On-chip power supply regulator for load-cell and ADC analog power supply

  • On-chip oscillator requiring no external component with optional external crystal

  • On-chip power-on-reset

  • Data Accuracy: 24 bit (24 bit analog-to-digital converter chip)

  • Refresh Frequency: 10/80 Hz

  • Operation supply voltage range: 4.8 ~ 5.5V

  • Operation supply Current: 1.6mA

  • Operation temperature range: -20 ~ +85℃

  • Demension: Approx. 36mm x 21mm x 4mm / 1.42" x 0.83" x 0.16"

Step 1: Material Preparation

In this tutorial, you will need :

1. Arduino Uno Board and USB

2. HX711 Balance Sensor

3. Load Cell (can be any weight of load cell ie 20KG, 60KG or 100KG)

4. Male Female Jumpers

5. Crocodile Clip Wires

5. Arduino IDE

Step 2: HX711 Pin Description

Step 3: Load Cell Wire Connection

The four wires coming out from the wheatstone bridge on the load cell are usually :

  • Excitation+ (E+) or VCC is red
  • Excitation- (E-) or ground is black
  • Output+ (O+), Signal+ (S+)+ or Amplifier+ (A+) is white
  • Output- (O-), Signal- (S-)+ or Amplifier- (A-) is green

Step 4: Hardware Installation

HX711 to Arduino Uno :

  • VCC to 5V
  • GND TO GND
  • SCK to D5
  • DT TO D6

Load Cell to HX711

  • E+ : RED
  • E- : BLACK
  • A- : WHITE
  • A+ : GREEN

Then, connect your Arduino Uno Board to your Computer via USB.

Step 5: HX711 Library

Communicating with the Balance Module requires a driver for the HX711 sensor. The simplest way to install the driver is to download the HX711 library. Download the ZIP file below > Open Zip File > Extract to your Arduino Uno Library folder. Refer the image above for your references.

Step 6: Sample Source Code

Download the sample source code below, open and upload this sample source code into your Arduino IDE.

NOTE : You can change your calibration factor before uploading the code OR you can adjust it later in the serial monitor box since the code allow you to add and substract the value of calibration factor.

Step 7: Serial Monitor

When you has succesfully uploaded the sample source code into your Arduino Uno Board. Open Serial Monitor and it will show u as shown in the picture above.

Step 8: Result

when the serial monitor give u a value for reading, it means that u has succesfully interface your load cell. Now, you can set your own calibration factor by adjusting the value using the '+' or 'a' to increase the value OR '-' or 'z' to decrease the value. You have to calibrate only once for each load cell.


NOTE : This tutorial only show you on how to interface HX711 with load cell. We did not use the correct calibration factor. You have to set your own calibration factor for your load cell. Check on this video and tutorial to learn on how to set the calibration factor for load cells. Remember that each load cell with different weight ie. load cell 20KG, 60Kg and 100KG have different value of calibration factor. Thus, you will have to set calibration factor for each load cell with different weight.

Step 9: Videos

This video shows how to interface HX711 Balance Module with Load Cell.

2 People Made This Project!

Recommendations

  • Battery Powered Contest

    Battery Powered Contest
  • Plywood Challenge

    Plywood Challenge
  • Plastic Contest

    Plastic Contest

29 Discussions

0
iyinirobots
iyinirobots

8 weeks ago

I will start making this project from tomorrow. I'll brief you in couple of days. Thx.

0
nkomecharles14
nkomecharles14

Question 2 years ago

hello.. i have difficulties with my loadcell from step 9 .. i dont actually understand how the software part functions... when i run the code i get "0.00g" on the serial monitor and the value does not changes no matter the load i use on the loadcell....

0
MF_Mathieu01
MF_Mathieu01

Answer 4 months ago

You probably don't care about this anymore, but the load cell could be the wrong way around.

I just had this issue and was messing around with the calibration factor for an hour before realizing it was the other way around.

0
Aalisons
Aalisons

Answer 2 years ago

I am having the same issue

0
Paugambi
Paugambi

Reply 2 years ago

Have you found an answer to this problem? Have tried different pins, etc and am still having no luck.

0
ForssFägerström
ForssFägerström

3 years ago

Do you have a specific reason for connecting the white and green wire of the load cell the way you did?

In your instructions, the white wire "Output+ (O+), Signal+ (S+)+ or Amplifier+ (A+)" is connected to pin 3 (A-) in J1, which goes to pin 7 (INNA, Ch. A Negative Input) of HX711, and the green wire "Output- (O-), Signal- (S-)+ or Amplifier- (A-)" is connected to pin 4 (A+) in J1, which goes to pin 8 (INPA, Ch. A Positive Input) of HX711.

Also, what do the notations "(S+)+" and "(S-)+" mean? Typo/copy-paste error?

0
TonyHansen
TonyHansen

Reply 6 months ago

I think the comments for
  • Output+ (O+), Signal+ (S+)+ or Amplifier+ (A+) is white (should be green)
  • Output- (O-), Signal- (S-)+ or Amplifier- (A-) is green (should be white)

    are just backwards. Other tutorials have them swapped. It’s easy to get them swapped because the boards I have are in the order E+, E-, A-, A+ instead of the more natural +-+- order.
0
kweston666
kweston666

9 months ago

Thanks for the instructable - it has helped me get going quickly with my project using the HX711. One thing though: I was slowed down by the use of the .rar compressed file for the example code. I don't have any program on my PC that extracts that type of file. This is just a few dozen lines of code, so I don't understand why it would need to be compressed. Simply inserting the text so someone could copy and paste would be easiest. Next easiest would be to make the uncompressed Arduino .ino file itself available for download (<2KB). Luckily I found this free online RAR extractor web page/service:
https://www.ezyzip.com/open-extract-rar-file-online.html
...that did the job for me.

0
kweston666
kweston666

Reply 9 months ago

In fact, to make it even easier for others (and myself, should I need it again), I'll just paste in the code contained HX711.rar right here:

/*
Setup your scale and start the sketch WITHOUT a weight on the scale
Once readings are displayed place the weight on the scale
Press +/- or a/z to adjust the calibration_factor until the output readings match the known weight
Arduino pin 6 -> HX711 CLK
Arduino pin 5 -> HX711 DOUT
Arduino pin 5V -> HX711 VCC
Arduino pin GND -> HX711 GND
*/

#include "HX711.h"

HX711 scale(5, 6);

float calibration_factor = 20; // this calibration factor is adjusted according to my load cell
float units;
float ounces;

void setup() {
Serial.begin(9600);
Serial.println("HX711 calibration sketch");
Serial.println("Remove all weight from scale");
Serial.println("After readings begin, place known weight on scale");
Serial.println("Press + or a to increase calibration factor");
Serial.println("Press - or z to decrease calibration factor");

scale.set_scale();
scale.tare(); //Reset the scale to 0

long zero_factor = scale.read_average(); //Get a baseline reading
Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
Serial.println(zero_factor);
}

void loop() {

scale.set_scale(calibration_factor); //Adjust to this calibration factor

Serial.print("Reading: ");
units = scale.get_units(), 10;
if (units < 0)
{
units = 0.00;
}
ounces = units * 0.035274;
Serial.print(units);
Serial.print(" grams");
Serial.print(" calibration_factor: ");
Serial.print(calibration_factor);
Serial.println();

if(Serial.available())
{
char temp = Serial.read();
if(temp == '+' || temp == 'a')
calibration_factor += 1;
else if(temp == '-' || temp == 'z')
calibration_factor -= 1;
}
}

0
MaestroP1
MaestroP1

Reply 7 months ago

I can suggest you to download 7zip, it's an open source software and handels pretty much every kind of compression (even tar.gz and tar) and is available on all computer platforms.
Cheers, happy making

0
amanenterpraisess
amanenterpraisess

Question 9 months ago on Step 3

How can I check lod cell , Defective or right condition please help...!!!

0
AntonB65
AntonB65

Question 10 months ago

Do someone know a code to put the hx711 to an graph bar with neopixels ?

0
mmahoney1
mmahoney1

Question 1 year ago on Step 9

I’m soldering my hx711 to the load cell and checking continuity between a- and a+ and e- and e+. Am I wrong that I should have continuity

0
Budihal
Budihal

Question 2 years ago on Step 5

Sir I need hx711 adc converter weighing load cell with 8051 ,I need both assembly ,c language code hole program ,because I m beginner so please

0
Budihal
Budihal

Answer 2 years ago

Please help me

0
Jaffar_sattar
Jaffar_sattar

Question 1 year ago

thanks in advance for somebody regarding helping me.i am using 10kg straight bar type simple load cell..... help me in full detail how to calibrate that. i am a new beginner. plz any body help me

1
Danangbagasw
Danangbagasw

1 year ago

do you have the code hx711 with mcu ?, cause i'm going to upload it to thingspeak

0
ChrisM980
ChrisM980

Question 1 year ago

Is it possible to get the weight from each load cell, or can we only get the total weight?