Load cell temperature compensation

I am creating a scale for monitoring a beehive. So for that, i am using four load cells (50Kgs) in a wheatstone bridge with the module hx711 sending the data to a esp8266. I create the scale with the four load cells and tested with a constant weight, but i discovered a drift in the weight measuring from the load cells. Even the weight on the scale is constant, the weight measure is drifting. I made a graph showing how weight and the ambiente temperature (measuring with a DS18B20) changes over time and there is a obvius correlation between them.
image

image

Now, i am trying to compesate this drift with a formula, but i have no ideia how to create that formula that is the Delta Weight as a function of the Delta Temperature. Someone have ideas? I tried to interpolate the data and create a regression equation, but there are many variables, like depends on the initial temperature and the how quickly that temperature changes, so in certain conditions, the equation dont work well, because the variation of the temperature of the load cell is not linear with the ambient temperature. There is a method that do that relation between weight and temperature?

The thing is, i want to correct the drift in the code to avoid buying new material.

Which ones? (link?)

How are you measuring the temperature of the load cells?

No thats weight and temperature vs (unlabelled but I'm guessing) time.
Try plotting W vs T and calculate the correlation coefficient and regression equation.

That site shows you how to do temperature with code. What additional parts do you think are required?

Loadcell:
Célula De Carga Fina 50Kg - Sensor De Peso - Eletrogate | Arduino, Robótica, IoT, Apostilas e Kits

The temperature is the ambient temperature measured with a DS18B20.

The graphs show how temperature and weight changes over time. Its obvius in the graph that when temperature drop, the weight rise,when temperature rise, the weight drops, thats the relantioship. I plotted a regression equation, but only works in certain ranges, for example, if the temperature changes faster or slower in certain ranges, the equation dont work well anymore.

Sorry, i forgot to say that i am measuring ambient temperature. In the site, i need to measure the load cell temperature, that requires new material.

You need the load cell temperature for best compensation, as that site mentions. But even if you only have ambient temperature, you can still use that site's approach and formulas in your code.

Unfortunately, i cant, as he say: "We can see the ambient temperature sensor works quite well to counter the temperature effect during periods of slow temperature change, but the correction falls apart with faster changes (such as when the heater kicks in for the morning). When the temperature of the room changes quickly, the ambient temperature sensor will track the temperature of the air much more closely than the much heavier weigh-scale. The resulting effect is that temperature compensating against an ambient temperature sensor can lose track of the temperature of the load cell itself, resulting in similarly bad (and arguably worse) results."

One solution is to make your measurements only during periods of slow or no temperature change.

1 Like

Right, but do you expect to see "fast" changes in temperature, when the system is outdoors in operation?

Make a rough slope of the temperature (line of best fit... but free-hand it) and make a rough slope of the known (changing) weight (free-hand line of best fit). Add the two slopes together to get the slope that will make the temperature a zero slope.

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