3
\$\begingroup\$

I connected a weight sensor like this one to this load cell amplifier based on hx711 and I use an Arduino (Uno or nano) to get the readings. I have no other components to my circuit and it is built on a breadboard.

Everything works fine except that my readings are never perfectly stable, it's either increasing or decreasing over time. For example, over the course of 2-3 hours, the reading will go from 47.50 grams to 48.30 grams and continue increasing for at least a couple days where I end up with a 3-4 grams difference(I never actually waited enough to see where it ends). Of course, this happens even if there is absolutely no additional pressure applied to the weight sensor.

I tried connecting the sensor to a 5v voltage regulator but get the exact same result. It looks like either the resistance builds in the sensor or the voltage is increasing/decreasing in the Arduino but I can't point a finger to what generates this behavior and what to do about it.

Any ideas are welcomed as I've been struggling to find a solution to this for days now.

Precisions

I'm building an automated cat feeder which drops the required amount of food into a drawer. Once full, the drawer gets out of the feeder and the cat can eat. Once empty, the drawer gets back inside until the next feed. The problem is that it is pretty hard to predict when the cat will be finished eating if the sensor data keeps increasing by itself. Sometimes, the cat can take a few hours to eat everything. If I close the drawer and there is still food in, the tare process is underminded and after a couple of days, the amount of food being dropped is far from what it should be.

\$\endgroup\$
4
  • \$\begingroup\$ Other than temp. drift is it loaded? or just sitting loose? could be out of spec parts with a thermal or offset voltage drift.. check offset drift at midscale and gain drift at end end of range \$\endgroup\$
    – D.A.S.
    Commented Sep 30, 2016 at 17:56
  • \$\begingroup\$ What is full scale reading. Without knowing this the drift figure is meaningless. \$\endgroup\$
    – Andy aka
    Commented Sep 30, 2016 at 18:22
  • \$\begingroup\$ Also, show the exact circuit you employed. \$\endgroup\$
    – Andy aka
    Commented Sep 30, 2016 at 18:23
  • \$\begingroup\$ Take a look at the specs from your link and do the math... probably not that far off from what you should expect... Repeatability %F.S 0.05, Creep(30min) %.F.S 0.05 Temperature effect on sensitivity %F.S/10℃ 0.05, Temperature effect on zero %F.S/10℃ 0.05, Zero balance %F.S ±0.5. Then also take in all of the other factors, like losses in the circuit, ADC Vref, ADC resolution, etc. \$\endgroup\$ Commented Sep 30, 2016 at 18:44

2 Answers 2

3
\$\begingroup\$

After many trials I found out that the issue came from 2 places:

1 - the scale.get_units() function provided in the hx711 library allows to specify the number of samples to average in order to get a more precise reading. When I changed the number of samples from 20 to 1, the values stopped jumping around and I got a more flat line. (+- 0.02 grams between values). There is probably a bug in the library since the result should have been the reverse.

2 - I had "noise" in my circuit and resoldering parts of it solved another intermittent variation in values I experienced.

I ran tests over a period of 8 hours and could notice the readings going slightly up, then down and probably back up if I waited longer. Variations were of 0.8 grams over 8 hours like shown here:

enter image description here

I now account for these variations using software to calculate a drift value.

Thanks for all the help!

\$\endgroup\$
0
\$\begingroup\$

You can't expect high performance weigh scale with cheap ADC and cheap cell. An industrial grade scale cost >1k$, still it drifts over time. In any application, the scale has to be tared. For exaple an ice dispenser machine is zeroed before it begins to bring ice into a bag.
The in-motion industrial checkweigher has an auto-tare function at each unloading. Usually there is a comparator window, in your example 47g+/-5g and a low pass or moving average filter, that subtracts the tare.
You should describe your application, but for sure there is no such low cost cell that will remain standstill, so it is up to you to decide when to perform the tare process.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.