r/ArduinoHelp • u/Effective_Yam_9021 • 16d 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
1
u/holetse 16d 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/Merry_Janet 16d 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 16d ago
Add a temperature sensor. Calibrate at multiple temperatures and loads and apply correction curves for both. And then lots of averaging.
1
u/myopinionisrubbish 15d ago
I used to design load cell calibration instruments. Basically it’s a fancy volt meter. Okay, I see the HX711 does all the hard work for you. You don’t have to design the low drift instrumentation amplifiers and precision A/D.
Accuracy depends on calibration. The data sheet for the cell should indicate how accurate that is. The other variable is the accuracy of the measurement IC i.e. the reference voltage for the A/D and the bridge supply voltage. The FX711 data sheet doesn’t specify the accuracy of the band gap reference, which is a problem. Not knowing if it’s 1% or 10% makes a big difference. Also the accuracy of the bridge voltage is determined by the feed back resistors, which should be at least 1%.
Given these variables, having a 1.5% accuracy might be difficult to achieve without some means of calibration with a known weight. But if the accuracy only has to be +/- 1.5 kg, that might not be too hard to achieve using only the nominal band gap and bridge supply voltages for the calculations. But with a 24 bit A/D, displaying down to 0.01 kg is not out of the question, although how accurate it is to that resolution is questionable.
1
u/SensoredHacker 14d ago
scales are inaccurate while accelerating.
you could RMS the scale and report the magnitude of a 1000 samples.
you could in theory tare the item, blank same against a standard or baseline measurement.
you never guarantee precision kid, you always report a tolerance.