Arduino + HX711 + 4 50kg load cells - measurement degrades over a few hours

Hello, programmers.

I have an application with Arduino + HX711 + 4 50kg load cells with the standard library for Arduino (HX711.h and HX711.cpp). After the scale and tare adjusted, the weight measurement degrades over a few hours causing errors in my measurements. Even if there is no considerable change, will the temperature cause this error? To correct this, I think about implementing a "dynamic tare" that adjusts itself from time to time. Is this the best solution? Another factor is that the measurement does not "lock", it oscillates +- 0.005g.

Thank you!

Locking would be a function of your software.

Do you suggest creating a channel limiting highs and lows with the lock in the center?

I suggest you look for the "oscillations" you have discovered and when that occurs, just stop the display with one of the values. Or average the values of the oscillation and use that for the display and don't change it.
Then you will ask how to determine the oscillation. If you can see it, you can program for it.

Ok, I got it. But this function get_units(x), where x is a number of samples, does for me. The point is that even keeping the same weight, the value comes with different values within this oscillation.

So, ignore them if they are oscillating, or reoccurring small values. If there are any floating point calculations involved, you will always get this.

Yes. The function returns variable of type float. I will try to change it to long type.
What about the main problem (After the scale and tare adjusted, the weight measurement degrades over a few hours causing errors in my measurements), do you have any suggestions?

Could the degradation be caused by evaporation? Are you measuring something containing moisture or other volatile substances?

Then just display one decimal place less. IF the oscillation is +-0.005, then display 0.00.

No, @johnwasser ... everything is on my desk and the temperature here is 20°C.

0.005 gm on a 50kg load cell is a tiny amount abc you are down in the noise level
I’d expect it to move about !

50kg = 50000.000 gms …….

I guess you will have to define what you consider degrading. As for the "oscillation" assuming you really meant to type 0.005 kg, That would mean the oscillation is 0.01%

Welcome to the real world. Nothing is perfectly stable. Most things change with temperature and added noise on low level signals cause issues with a sampling A/D

You will have to define your expectations, and the load cells you are using for a better suggestion as to what is possible and / or what can be done to make it better.

Graphing the drift in tare over time will be very illuminating, especially if you also record temperature alongside.

Ok, guys. Thanks for your answers!

The incidence of temperature on the sensor material is an issue. I have implemented a code to auto adjust tare. This solved the problem initially, but I'm still going to work on it because this solution is a bit complex and does not reach the cause of the problem.