Hi,
I try to build a digital scale using a 5 kg load bar and a HX711 module.
I have the load bar secured on a support and connected to a HX711 module (I tried with both the green ones and the red ones -this has a shield- from eBay) and I managed to have them work partially.
So far I use an Arduino Mega 2560 and the test program from GitHub - bogde/HX711: An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales. .
I have two issues with them:
-
they (both red and green modules) start after calibration at relative 0, but in short time start going either up or down from 0 (without load) like 0 , 0.1, 0.2 , 0.3 ... or 0, -0.1,-0.2, -0.3 ... Some times, the variation is smaller, and some times is higher. If I put a known load (50g) it will see the correct weight like in the sequence: 3.3, 3.4, 3.5, 3.6 - add weight - 53.7, 53.8, 53.9 -- remove weight - 4.0, 4.1 ...
Does the calibration needs to be done until 0 is stable? or until it starts with 0?
For calibration I found a value of ~ 209.f for port A (64 gain)
-
I let the balance run for few hours (from the code I removed the sleeping code
//scale.power_down();
// put the ADC in sleep mode
delay(1000);
//scale.power_up();
) and I read the balance once a second.
In this setup the balance works and read values as described above.
After few hours of continuous work, without touching it or changing the code, I found the port A dead (return only 0.00) on both green or red sensors.
What do you think is wrong? Is this module not supposed to run all the time? does is need the sleep cycle?
Both sensors worked initially and port A died after few hours on continuous run. Port B is still running, but I would like to know if I did something wrong.
Any help or ideas on both issues is welcomed.
Ideas:
power or signal level mismatch
weak battery
too high sensor supply current (overloading on-board voltage regulator)
missing Gnd connection
weak mechanics (creaping sensor)
missing temperature compensation
too high total current on digital pins
sensor module reset by external interference (nearby motors switching on/off...)
...
Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?
Please not fritzy.
Can you please post a copy of your sketch, using code tags?
Please use code tags.. See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html
Tom...... 
sorin_63:
Is this module not supposed to run all the time? does is need the sleep cycle?
I've run my HX711 continuously for two weeks or so at a time.
Hi,
DrDiettrich:
As inputs I used Arduino Mega pins and voltage.
I connected Analog pins 0 and 1 to the HX711 and the power was taken from the Arduino 5V and ground.
The load beam is from a scale bought on eBay and I use the mounting from it - the beam still work great if I connected it back to the original balance.
I do not have any temp compensation - this may explain the 0 variation, but my understanding was that those modules have it done internally. I may be wrong here, so any advice on how to implement the temp compensation are welcome.
I do not have any external devices close to my work bench, outside the computer and the monitor, so I do not think there are any electrical interference.
DaveEvans:
do you still have it? can you post a picture of the circuit? did you use temperature compensation?
TomGeorge:
this is the code (the example from the library)
#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(9600);
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(209.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(1000);
//scale.power_up();
}
Yes, I still have it. The circuit was quite simple. I think I'll get a shielded HX711 for future work.

I started an attempt to figure out temperature compensation, but I haven't had time to finish. It doesn't look like it will be easy. Sometimes the response correlates well with temperature, and sometimes it doesn't.
Dave,
Thank you for your answer.
If you did not used temperature compensation, how stable was the 0 value (with no load)?
Also, what did you used as power for the sensor? 3.3V or 5V? from Arduino or stand alone?
Sorin
The uppermost graph shows how stable the scale was without load (see the "0 grams" in the upper right corner) and without temperature compensation by me.
The graph shows the deviations of weight and temperature from the averages for an entire run of about two or three days. I took measurements every ten or fifteen minutes. Each plotted point is from a running average of 10 measurements, but I discarded the max and min before calculating the average (so it is actually an average of eight measurements).
The weight units in the graph are 0.01 grams (centigram) and the temperature units are degrees F.
So, looking at the top graph, the maximum deviation is 0.07 grams (occurred at the start of the run). That's about 1/3000 of full scale (which is 200 grams).
The power came from a 5 volt wall wart.
Now I know what is killing my HX711 sensors
, but i do not know why, and any input regarding the reason will be appreciated.
The load cells (5kg) from the attached scales pictures are the sensors killers. I tried multiple and all of them kill sensors (both input ports, if connected). I measured them with a digital multilateral and they seems normal (around 750ohm per resistance, and a variation of 2mV when fully pressed and powered by 3.3V). In total they killed about 6-7 HX711 sensors. >:(
I tried another load cell from a different scale (15kg) and, with that one the sensors worked for days without any problems.
Do you have any similar experiences with the load cells from those small white scales?
Any idea what can be the cause? 2mV variation seems to be inside valid input parameters.
Anything nearby that could be generating static electricity? Spinning wheels, moving belts?
Nothing that can generate static electricity.
Both this type of "killer" load cell and the one of 15kg were tried in exactly the same environment: 3.3V power, both red and green HX711 sensors and Teensy 3.1 (I also tried with 5V and Arduino Mega) and the results are consistent with my prev message.
Everything generates static electricity. :'/ Still, usually in-circuit requires a large ESD event.
I see, but in my case I had the exact same environment when I used both the "killer" 5Kg load cell and the 15kg one.
At this point I'm just curious if somebody else experience the same issues and I'm willing to ship a "killer" load cell and a sensor to somebody with more experience to see if they get the same result and, maybe to learn what is wrong, either with the load cells or with the way I use them.
If there are any amateur willing to try it, please contact me at svatasoiu@yahoo.com
Where are you? I'm in Lacey, WA, USA. I have some HX711 dev boards and some knowledge of electronics.
I'm in Marlborough MA.
If you want to test them I'll send you a scale and one red and one green sensor, and you can compare with yours to see if they behave the same.
If you want to help, please contact me at svatasoiu@yahoo.com