HX711 Weighing Module NOT taking readings from Load Cell

I recently purchased an HX711 Weighing Module from DFRobot (Gravity: Arduino Digital Weight Sensor - DFRobot) and the 1 kg load cell that came with the weighing module. I am using it with bodge's code (HX711Serial) as well as his library (GitHub - bogde/HX711: An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales.).

My problem is that when I press down with force on the load cell it is not noticed on the serial output. It keeps showing the same number regardless of what I do to the load cell. I've tried changing arduinos, weighing modules, wires, load cells, reinstalling arduino and libraries to no avail.

Attached are pictures of my wiring diagram, pictures of the setup and a picture of the serial output. If anyone has any suggestions I am all ears! Thanks!

This is the code that I am using:

#include <HX711.h>

// HX711.DOUT	- pin #A1
// HX711.PD_SCK	- pin #A0

HX711 scale(A1, A0);		// parameter "gain" is ommited; the default value 128 is used by the library

void setup() {
  Serial.begin(38400);
  Serial.println("HX711 Demo");

  Serial.println("Before setting up the scale:");
  Serial.print("read: \t\t");
  Serial.println(scale.read());			// print a raw reading from the ADC

  Serial.print("read average: \t\t");
  Serial.println(scale.read_average(20));  	// print the average of 20 readings from the ADC

  Serial.print("get value: \t\t");
  Serial.println(scale.get_value(5));		// print the average of 5 readings from the ADC minus the tare weight (not set yet)

  Serial.print("get units: \t\t");
  Serial.println(scale.get_units(5), 1);	// print the average of 5 readings from the ADC minus tare weight (not set) divided 
						// by the SCALE parameter (not set yet)  

  scale.set_scale(2280.f);                      // this value is obtained by calibrating the scale with known weights; see the README for details
  scale.tare();				        // reset the scale to 0

  Serial.println("After setting up the scale:");

  Serial.print("read: \t\t");
  Serial.println(scale.read());                 // print a raw reading from the ADC

  Serial.print("read average: \t\t");
  Serial.println(scale.read_average(20));       // print the average of 20 readings from the ADC

  Serial.print("get value: \t\t");
  Serial.println(scale.get_value(5));		// print the average of 5 readings from the ADC minus the tare weight, set with tare()

  Serial.print("get units: \t\t");
  Serial.println(scale.get_units(5), 1);        // print the average of 5 readings from the ADC minus tare weight, divided 
						// by the SCALE parameter set with set_scale

  Serial.println("Readings:");
}

void loop() {
  Serial.print("one reading:\t");
  Serial.print(scale.get_units(), 1);
  Serial.print("\t| average:\t");
  Serial.println(scale.get_units(10), 1);

  scale.power_down();			        // put the ADC in sleep mode
 // delay(5000);
  scale.power_up();
}

I am having this same problem too! I had it working for me this last summer and now when I try it months later it is not working. It might be because I updated the Arduino software? I'm not sure, I'm in the same boat as you are and would like a solution too.

Hi,
Have you got the monitor set to 38400?

Tom.

Hi,
Did you try this example from the library, note different pins and terminal speed.

/* sample for digital weight scale of hx711
 * library design: Weihong Guan (@aguegu)
 * library host on
 *https://github.com/aguegu/ardulibs/tree/3cdb78f3727d9682f7fd22156604fc1e4edd75d1/hx711
 */

// Hx711.DOUT - pin #A2
// Hx711.SCK - pin #A3

#include <Hx711.h>
Hx711 scale(A2, A3);

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.print(scale.getGram(), 1);
  Serial.println(" g");
  delay(200);
}

With the least amount of code it will let you check if its hardware problem.

Tom.... :slight_smile:

So I tried the code that you posted with aguegu's Hx711 library and its not working correctly. It does not recognize when I put force on the load cell and the numbers in the serial keep increasing (screenshots below).

Could it be a wiring issue? I don't believe it is a hardware issue since I have tried swapping out my load cell, weighing module, wires and arduino with no better luck :confused:

serialOutput-increasing2.png

After I changed my load cell (for the 2nd time!) the problem stopped. The ones I was using (1kg, 30kg) did not work with it so I tried other ones (50kg, 100kg) and they worked fine.

I got my 50 kg (http://www.aliexpress.com/item/Parallel-Beam-Load-Cell-Sensor-50kg-110LB-Aluminum-Alloy-Material-Shielding-Cable/1082699513.html) and 100 kg (http://www.aliexpress.com/store/product/Parallel-Beam-Load-Cell-Sensor-100kg-217lb-Aluminum-Alloy-Material-Shielding-Cable/323170_1457657767.html) load cell working but not my 30 kg (http://www.amazon.com/0-30Kg-Scale-Electronic-Weighing-Sensor/dp/B006Z70CIC).

I’m unsure what the difference is between this one but maybe it does not work with the DFRobot weighing module? It may be because of the wires. I’m going to try and solder better ones onto the ends and see if that makes a difference, because I would like to get the 30kg working as well.

Hi,
Can you measure the following resistances in the 30kg unit for me please?
E+ to S+
E+ to S-
E- to S+
E- to S+

When you had the load cell set up did you have the arrow pointing down?

Thanks Tom.... :slight_smile:

E+ to S+ (red to yellow) 0.768
E+ to S- (red to white) 1.086
E- to S+ (black to yellow) 0.382
E- to S- (black to white) 0.384

This was done at the 2kohm setting on the multimeter.

I had the load cell with the arrow pointing down when I had it set up.

Hi,
Those reading were with no load what so ever on the cell?

It looks as though the cell is not balanced, E+ to any S should be equal, just like E- to any S is equal.
This will give you an output that is not zero with no load.
Your cell could be faulty.

The cell should have an arrow on it, that is the load end and it should point down.

Can you post a picture of your load cell and how you have mounted it please.

Thanks.... Tom....... :slight_smile:

I checked the resistance in the unit and got the same result. I checked the resistances in my functional 100 kg load cell and got the following results:

E+ to S+ (red to yellow) 0.29
E+ to S- (red to white) 0.29
E- to S+ (black to yellow) 0.29
E- to S- (black to white) 0.29

They are all equal as you stated a functional load cell should be. Is this a faulty load cell? Is there anything I can do to correct this issue?

There is big chance that your load cell to be working.

I got the multimeter and with 2K Ohm I got the following measurements

So I realized that the "RED" wire was not the E+, but the white!
So I switched on the circuit the red wire to white and white to red

So
Black E-
White E+
Red A+
Green A-

So if you see a pair of same values your load is working! Not ALL manufacturers has the same colors.

I got the sensor from AliExpress (Chinese guy) and in the product description has wrong association

I am having the same problem even when i changed the connections as you specified I am getting the same value. Please help me

Try

BLACK E+

WHITE E-

GREEN A-

RED A+

1 Like

zstergios:
There is big chance that your load cell to be working.

I got the multimeter... snip

Just wanted to say thank you!
I was having the same problem, wasn't until I saw your post that I decided to test this for myself (sigh).

Anyways cheers.

zstergios:
Try

BLACK E+

WHITE E-

GREEN A-

RED A+

I was struggling for 2 hours (including searching across the internet) and your solution seems to be the solution! Thank you!

one day of fiddling with the damn thing and this did the trick!.

thanks a lot guys, i'd should have known better than to asume that red+black means dc voltage, (where the hell did i picked up that!?!)

bump for renukshirsagar

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.