HX711 always reads 0 no matter what i do

I have an arduino pro micro and a CZL-901 60KG rated load cell.
I am using an arduino pro micro which suplies 5V.
Things i tried:
-Check loadcell with multimeter. Around 380-400Ohms between R B and G W pairs, less resistance with cross pairs. So it should be working
-Tried 3 different HX711 modules. Both presoldered and manually soldered pins.
-Measured all outputs with multimeter voltage is correct. Arduino gives out 4.8 V HX711 voltage between E+ and E- is 4.1 stable
-I have wiring done like so. E+ to R, E- to B, A+ to W A- to G. I have tried swapping signal wires.
-Soldering has been done atleast 5 times so there is no connection issue.
Code is:

#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 4;

HX711 scale;

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

void loop() {

  if (scale.is_ready()) {
    long reading = scale.read();
    Serial.print("HX711 reading: ");
    Serial.println(reading);
  } else {
    Serial.println("HX711 not found.");
  }

  delay(200);
  
}

I get a clean 0

  1. Between those 0 i got it to work for around 5 seconds but it produced very noisy readings which only slightly correlated with pressure i gave.

@johntheo2046

There are many different HX711 libraries (wrote one of them) and it would be informative to know which one you use.

Things missing is calibration of the library, typical functions are tare() and setScale() or equivalents.

Upload the following sketch and check if you are getting any stable reading on the Serial Monitor.

/* This program takes 10 samples from LC + HX711B at
   1-sec interval and then computes the average.
*/

unsigned long x = 0, y = 0;
unsigned long dataArray[10];
int j = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(2, INPUT); //data line  //Yellow cable in my Setup
  pinMode(4, OUTPUT);  //SCK line  //Orange cable in my Set up
}

void loop()
{

  for (int j = 0; j < 10; j++)
  {
    digitalWrite(4, LOW);//SCK is made LL
    while (digitalRead(2) != LOW) //wait until Data Line goes LOW
      ;
    {
      for (int i = 0; i < 24; i++)  //read 24-bit data from HX711
      {
        clk();      //generate CLK pulse to get MSB-it at data-pin
        bitWrite(x, 0, digitalRead(2));
        x = x << 1;
      }
      clk();  //25th pulse
      Serial.println(x, DEC);
      y = x;
      x = 0;
      delay(1000);
    }
    dataArray[j] = y;
  }

  Serial.println("===averaging process=========");
  unsigned long C1 = 0;   //C1 = Count-1 against no fuel in the Tank

  for (j = 0; j < 10; j++)
  {
    C1 += dataArray[j];
  }
  Serial.print("Average Count = ");
  C1 = C1 / 10;
  Serial.println(C1, DEC);
}

void clk()
{
  digitalWrite(4, HIGH);
  delayMicroseconds(50);
  digitalWrite(4, LOW);
}

@GolamMostafa
I get a stable 0
===averaging process=========

Average Count = 0

0

0

0

0

0

I am using this one

@johntheo2046

OK, quite familiar with that one.

Can you run from the examples - HX_calibration.ino - and post its output?

Hi, @johntheo2046
Welcome to the forum.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Can you post some images of your project?
So we can see your component layout.

Tom.... :smiley: :+1: :coffee: :australia:

E+ voltage should be between 4.25 and 4.3volt exactly.
Check for continuity between E- and Arduino ground. Some green HX711 boards have a manufacturing fault, where the grounplane is missing.

Voltage between A+ and A- should be less than 20mV, otherwise the load cells could be connected wrong.
Leo..

1. Please, post the HX711 based Amp+ADC Module that you are using. I have used the following Module (Fig-1):



Figure-1:

2. Now, you have to find .: is it the Load Cell or that the HX711 Module is not bad using the following test arrangement (Fig-2):


Figure-2:

(a) Connect HX711 Module with UNO as per Fig-2.
(b) Connect R2-Pot-R1 network with HX711 Module.
(c) Uplaod the following sketch.

/* This program takes 10 samples from LC + HX711B at
   1-sec interval and then computes the average.
*/
#define DT A1
#define SCK A0

unsigned long x = 0, y = 0;
unsigned long dataArray[10];
int j = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(DT, INPUT); //data line  //Yellow cable in my Setup
  pinMode(SCK, OUTPUT);  //SCK line  //Orange cable in my Set up
}

void loop()
{

  for (int j = 0; j < 10; j++)
  {
    digitalWrite(SCK, LOW);//SCK is made LL
    while (digitalRead(DT) != LOW) //wait until Data Line goes LOW
    {
      ;     //wait
    }
    {
      for (int i = 0; i < 24; i++)  //read 24-bit data from HX711
      {
        clk();      //generate CLK pulse to get MSB-it at data-pin
        bitWrite(x, 0, digitalRead(DT));
        x = x << 1;
      }
      clk();  //25th pulse
      Serial.println(x, DEC);
      y = x;
      x = 0;
      delay(1000);
    }
    dataArray[j] = y;
  }

  Serial.println("===averaging process=========");
  unsigned long C1 = 0;   //C1 = Count-1 against no fuel in the Tank

  for (j = 0; j < 10; j++)
  {
    C1 += dataArray[j];
  }
  Serial.print("Average Count = ");
  C1 = C1 / 10;
  Serial.println(C1, DEC);
}

void clk()
{
  digitalWrite(SCK, HIGH);
  delayMicroseconds(50);
  digitalWrite(SCK, LOW);
}

(d) Slowly rotate the Pot and check that the readings/counts on the Serial Monitor changes. This indicates that HX711 Module is functional.

1 Like

@GolamMostafa
I am using the same hX711 module. Is there another way i can use to check if its functional that doesn't involve additional hardware like potentiometers and resistors? Also what does a stable 0 that i get with your previous code mean?



When you have stable 0, it means there is no signal coming up from HX711 Module. Do, to isolate the faulty device you have to go with my prescribed setup to conclude that HX711 Module is healty. No other alternative exists.

If you don't have 2.2k, get any two equal resistors and anh three terminal potentiometer.

@GolamMostafa
If the loadcell has resistance between wires that make sense doesn't that mean that it works? However the hx711 can't be faulty because this issue exists with 4 different hx711 modules i tried. How can they all be faulty.

You have to experimentally prove that all your four HX711 Modules are healthy which can only be done by acquiring signals from them. My setup of #10 (liked by @robtillaart) will help you to do that.

Once your HX711 Module works, then the next task will be to prove that load cell is healthy using the following connection (Fig-1):


Figure-1:

same batch, bought from the same shop …

seen before with al kinds of boards etc.

The module provides a regulated/stable E+ and E- (the S8550 transistor), which you bypass if you power the load cell that way.

The little sister of the HX711, the HX710, which doesn't have the regulator, does it that way.

The 2.7-5.5V annotation (Fig 1) is wrong.
2.7V is ok for the chip itself, but not for that whole circuit.
The S8550 is set to 4.3V with R1/R2 and needs at least 4.5V to do it's job.
Leo..

1 Like

I am sorry to say that the line (of #10) should be:
Now, you have to find : is it the Load Cell or that the HX711 Module is not bad using the following test arrangement (Fig-2):

I agree that the load cell should be connected as follows (Fig-1) to get excitation from E+ and E- points:


Figure-1:

The diagram is taken from datasheet.
hx711_english.pdf (160.4 KB)

From your description, it sounds like the HX711 isn’t getting a stable connection or correct wiring. Double-check that the load cell’s red/black/white/green wires match E+/E-/A+/A- exactly, and make sure the module’s gain and power supply are correct. Sometimes using a separate 5V supply for the HX711 instead of the Arduino 5V helps stabilize readings.

I know, but it's still incorrect.
At least for the resistor values that are used on all HX711 modules.
It should read 4.5-5.5V

Still waiting for the result of the load cell output voltage ( <20mV).