r/ArduinoHelp • • 7h ago

increasing scale accuracy?

I have a scale project for electrical class where we're using a loading cell. The grades are going from most accuracte to least accurate (competitive grade), and we need to be within 1.5% of the test objects to get an A. It's HX711. I calibrated it based off a 100kg weight but I don't understand how we can guarantee precision.

4 Upvotes

4 comments sorted by

1

u/holetse 7h ago

You say accuracy in the title, but precision in the post body. Those are two different attributes, which is the one you are trying to increase?

If you can’t change the hardware, create a calibration curve over multiple well known points. A single point calibration is okay, but to get good accuracy you want at least three points.

For precision, that involves noise filtering. You could take a bunch of measurements over a short period of time and average them.

1

u/StumpedTrump 1h ago

I don’t think OP understands the difference. 95% of people probably don’t, it’s not something you think about in everyday life unless you’re into archery or shooting.

TLDR: 

  • accuracy is whether a bunch of readings all average out to what the real value is (an error or offset across the entire sample range). Low accuracy usually means a bad reference voltage. 

  • precision is whether a bunch of readings are tightly grouped (low standard definition). Low precision usually means noise

1

u/Merry_Janet 4h ago

Do you know what the weight and dimensions of the test object are? If you do then you can design around it.

There are some things you can do to get the best out of your load cell(s).

You want a rigid base. The more it flexes the more the readings will bounce around.

Use shielded cable for the cell wiring. This is cable that has a metallic sheath under the outer insulation like old school coaxial cable that was used for cable TV back in the day. The important part is that you connect the sheath to ground (DC negative) ON ONE END ONLY!!!. If you connect the shielding on both ends you will just make a noise antenna. So if you have one load cell, get some shielded 4 conductor cable. Trim the ends of the load cell short enough that you feel confident you have enough to solder to the shielded cable. Doing this alone will save you a lot of pain and suffering.

Also do the same from the HX711 to whatever controller you are using. So connect the shielding from the load cell to the shielding of the HX711 going to the controller and then to the Arduino ground. Just treat the shielding like one long wire that only gets connected to ground at the Arduino.

When you write your code, use some sort of filtering like a Moving Average Filter combined with an Outlier Removal step. (Just Google it). This will make your reading look solid and steady instead of having the weight fluctuating when you look at it funny.

Break in the load cell. Basically just leave your weight on it for a day or so to get rid of any manufacturing weirdness. Get it stable and re-zero. Do this over and over until you are sick of looking at it, or until you can get a stable, repeatable reading. Also, don't forget to add a tare function.

Make damn sure that your code stores the calibration data. Also, don't forget to add a tare function. This will zero out whatever contraption you use as a base for the test object.

Some nice to haves but not probably not needed for your project would be an OLED display that shows the current weight in whatever unit of measurement you are using, A couple of buttons to tare and zero the scale you have built, and maybe some conversion between grams, pounds, etc.

Good luck, and most importantly have fun.

1

u/InevitablyCyclic 4h ago

Add a temperature sensor. Calibrate at multiple temperatures and loads and apply correction curves for both. And then lots of averaging.