Strange behavior of load cell / hx711


#1

I’m having trouble with a load cell connect via HX711 module. The output i’m getting isn’t stable. It’s not fluctuating, it’s just constantly dropping. I started out with a reading of 220991 and am now down to 204998 (and dropping). The rate of decent isn’t dropping either. See screenshot of the console to get an idea of what i mean.

The sensor is placed in a closed environment and the weight subjected to it is not moving or changing weight (via evaporation or so) either.

This is the code i’m using to read the sensor.


#include <HX711.h> // load cell lib

// HX711 circuit wiring
int LOADCELL_DOUT_PIN = A2; // load cell DT
int LOADCELL_SCK_PIN = A3; // load cell SCK

HX711 scale;

void setup() {
  Serial.begin(115200);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); // ini scale
}

void loop() {
  long current_value = scale.get_value(10);
  Particle.publish("HX711 value: ", String(current_value));
  delay (10000); 
}

Anybody got an idea what is going on?

Greetings,
Just


#2

There’s usually a pretty big temperature effect on the load cell. Is the environment getting warmer?

See https://web.archive.org/web/20160606084340/https://community.electricimp.com/blog/imp-load-cells/ for an old - 2014! - blog post showing a similar issue with a load cell + HX711.

(note: I’ve had problems with the latest chrome beta accessing archive.org… works fine in safari though. :man_shrugging: )


#3

Thanks for the link, will look into it, but the temperature can’t be the problem as the sensor is on room temperature for the duration of my measurements.


#4

There are a number of factors which might cause a short-term drop in the readings. I am not familiar with the HX711 load cell so these are just generic ideas related to using high precision ADCs.

The first thing I would look at is the reference voltage that is being used. If you are using the HX711 internal reference voltage supply then is the IC supply stable with no drop outs?

The impedance of the load on a ADC has to be high and for this reason it is best to have a unity gain op-amp (buffer amp) between the voltage being measured and the ADC. It could be the impedance is drifting out of the acceptable range and hence the silly answer? It is relatively simple to put an op amp IC on the input and see if this cures the problem.

If it is none of the above then you could try using a software low pass filter to ‘remove/ignore’ the dropout. Any number of filters can be used; rolling average, median, 1D kalman.


#5

The HX711 is the ADC, and is designed to work directly with load cells.

Reference voltage is less important as it is not sampling a voltage from an unrelated circuit - the supply to the wheatstone bridge is the same supply as the ADC (if it’s wired correctly, anyway) and hence it’s relatively immune to this. The HX711 also includes an AVDD regulator - with external transistor - for noise immunity.

See https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf

Filtering won’t help here as this isn’t random noise, this is a long term drift. Still think this may be temperature - the log above shows <1% over a couple of minutes, but the quoted low value has no time associated with it.

@justvervaart can you put a temperature sensor in the closed environment to check?


#6

@hfiennes i know for sure the temperature in the environment is not changing. Could it be that the sensor is heating up from the current going in?

How do i check if it is wired correctly? What could i have done wrong?


#7

I noticed that you’re not calling power_down() in the HX711 library after you’ve read the weight.

You should do this immediately after you do get_value() (and probably power_up() before you read). It’s possible that this is leaving the load cell biased and causing heating, but that’s only a guess… easy to try though.


#8

Sorry, I read dropping to mean ‘dropping out’ hence the low pass filter idea - agreed it is not appropriate.

Does this drift continue or does it level out after some time? Is there a ‘burn-in’ requirement for the HX711 or the load sensor.

I thought the point of the whetstone bridge was to balance any change in the resistance due temperature as this would apply equally and cancel out.


#9

I have worked with the hx711 for a long time and seen this change
It is about 1% witch is good for that chip
the sparkfun version has no shield on it , others do ??
if you are reading more than one cell then temp makes a great dif.
the diff. from the floor and a table top can make this kind of change
very small voltage changes (=.001 ) will give you this error
I have put a gnd wire on all cells to help this kind of prob.


#10

Thx all for the advice, I wanted to test some of them today, but somehow (how?) the problem just is not there anymore. Readings are stable now. I don’t understand.


#11

What do you mean by this? How do you connect a GND wire to the load cell other than the wire used for the excitation voltage?

Just curious, I plan to use a lot of these in a current project and I’m just looking out for tips to get the best results possible.

Thanks


#12

most load cell are connected to a metal frame, so grounded is not needed
but my are mounted on a wood box.
So I ran a gnd wire to each cell, I am using 4 full bridge load sells in parallel into the hx711


#13

Hi @justvervaart, How did you get the stable readings? What are the changes that affected to get stable readings?