r/ArduinoHelp • • 25d 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

9 comments sorted by

View all comments

1

u/Merry_Janet 25d 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/Effective_Yam_9021 24d ago

thank you for the advice. unfortunately, we have no idea about the true weight of the objects (before or during). we're giving him our best "guess" based off our scale

1

u/Merry_Janet 23d ago

Boy that is unfortunate. So now you get to design a scale around something that you have no idea what it is. Maybe that's part of the test?

Did the instructor at least supply or tell you which load cell to use? It would be even more unfortunate if the test object is 5Kg and you are using a 100Kg load cell.

Surface area matters too. There's a huge difference between say a shoebox and a pallet of miscellaneous objects. I'm going to guess that the instructor is probably going to use a 5 gallon bucket full of random objects that they pre-weighed before the test.

The fact that you're only using a single load cell implies it's not going to be something like a sheet of plywood.

Well, good luck. Just follow the advice that myself and others have given and you'll do fine.

If you get stuck, hit me up and I will walk you through any problems you might have.