Calibrating Load Cells: Difference between revisions

From Phidgets Support
(Created page with "Analog sensors work by measuring a real world parameter such as temperature, pressure or weight and converting it into an analog voltage that is measurable by your computer....")
 
No edit summary
Line 1: Line 1:
Analog sensors work by measuring a real world parameter such as temperature, pressure or weight and converting it into an analog voltage that is measurable by your computer. Once the computer has this voltage you can perform a calculation in your program to convert it back into units you can work with (e.g. °C, kPa, or kg). Many sensors will include a formula in their documentation that describes this relationship between its voltage output and the measured quantity.  This is a reasonable solution when the part to part variance in a product line is very low, but it is often high enough that a formula that is exactly correct for one sensor may be inaccurate for another sensor of the same model. To solve this problem we generally recommend that you generate your own formula for each individual sensor you are using in your project.  This process, called calibration, is a very important step to achieve maximum accuracy.
At the most basic level, load cells measure a real world force by converting it into an analog voltage measurable by a Phidget. Once the Phidget has measured the voltage and sent it to your computer, you can convert it back to units you can work with (e.g. N, kg, lbs). This conversion is made easy due to the face that load cells are designed to output a signal that is directly proportional to the force applied. Apply twice as much force, get twice as much signal.


==How to Calibrate a Sensor==
However, due to manufacturing variations, load cells are fairly unique in the Phidgets product line as sensors that will require individual calibration to get meaningful results in an end application. Thankfully this process is relatively simple, as we will show here. 


In the general sense, the relationship between the output voltage of the sensor and the measured parameter can be described by some function f(x).  In order to determine what f(x) for a given sensor is, we first have to obtain some data.  As an example, we'll use a load cell.  Load cells are sensors that measure weight, and they always require some amount of calibration.  Here I have assembled a simple scale with a load cell rated for a maximum weight of 5kg.  You should always fully install the sensor in whichever system or application you intend to use it in before calibrating, just in case certain aspects of the construction have an effect on the measurements.
==How to Calibrate a Load Cell==
 
{|
|[[Image:Loadcell_scale.jpg|link=|375px]]||[[Image:Loadcell_scale_2.jpg|link=|375px]]
|}
 
To begin calibration, I will take a number of data points with objects that I know the weight of already. Normally you might want to use an actual precise set of weights, but weighing these objects with a fairly precise electronic scale was good enough for my purposes.  The more data points you take, the more accurate your final formula will be but this can be time consuming and impractical for a large number of sensors.  Looking at the graph of the data however, we can see that the data appears to be very linear. 
 
[[Image:Initial_data.png|link=|750px|center]]
 
This leads us to a major shortcut in calibrating a sensor:  2-point calibration.  Whenever possible, analog sensors are designed to have a linear response like this.  It's a massive simplification since you only need to take 2 data points in order to have a reasonably accurate trendline.  Since we have all the data already, let's determine the equation that best fits this data.  In a spreadsheet application like Excel this is an easy, automated process.


For most applications, load cells can be characterized simply in terms of a zero-level offset, and a conversion factor. The zero-level offset being the amount of signal the sensor produces under "no load" conditions, and the conversion factor representing how much the output signal changes for a given change in force. In this context "no load" is understood to mean the amount of force the sensor will see when the system is at rest.


[[Image:Linear_regression.png|link=|750px|center]]
To demonstrate the process of calibrating a load cell, I will use the KIT4007 weigh-scale, with a load cell rated for a maximum weight of 5kg.  You should always fully install the sensor in whichever system or application you intend to use it in before calibrating, just in case certain aspects of the construction have an effect on the measurements.


[[Image:KIT4007.jpg|link=|375px]]


I have generated this trendline using Excel's built in linear regression function and you can see that the line fits the data quite closely.  So we now have our function f(x):
To begin calibration, we will take two measurements: one with the scale empty, and one with a known weight. Depending on the desired accuracy of your system, finding a known weight can be as simple as weighing an object on a trusted scale, and recording the weight. Here I've used a stepper motor which was weighed to be 3.5309kg.
 
:<math>
\text{f(x)} = 5.125E6 \text{x} - 1.1595
</math>
 
Where x is our measured V/V from the load cell and f(x) is the calculated weight.  These measurements are in grams but notice that there are no units in my data points or the resultant graph or trendline.  This is one of the nice things about the process, it works for any unit.  The formula we end up with will convert our measured voltage into the same unit that we use to take the data points initially be it pounds or grams or tons. 
 
[[Image:3334+3323.jpg|link=|300px|right|thumb]]
As a quick example to prove this has actually worked, let's take a new object we know the weight of and see that the formula spits out the right number.  These 2 motors have a combined weight of 1810g:
 
When applied to the load cell I measure 0.00035 V/V:
 
[[Image:Unknown_measurement.png|link=|750px|center]]
 
Plugging this number into our formula we get a weight of 5.125E6*0.00035 - 1.1595 = '''1792.6g''' which is within 20g of our expected weight. For a 5kg load cell this result is accurate to about 0.4%.  Not too bad.  We could improve this with more calibration points, more accurate weights of the measured objects, by using more of the load cell's range (we only went up to about 2.5kg here), or more decimal points on the measurements we took from the device.
 
Now to show that we can make this a bit simpler, let's try a 2-point calibration for the same load cell. I will use the same data collected previously, but I will only use the highest and lowest points instead of making a trendline in Excel.  When doing a 2-point calibration, you usually want to use 1 point from rest (0 weight in this case) and 1 point from the highest value you expect to see (I will be using the point from ~2.5kg from before):


[[Image:Reference_Stepper_Weight.png|link=|750px|center]]


[[Image:Reference_Weight_On_Scale.png|link=|750px|center]]


For this example, we used the Phidget Control Panel example to manually read off the load cell readings.
{|
{|
|:<math>\text{(V/V}(x1) = -0.000001 \text{,Weight}(y1) = 0\text{)}</math>||:<math>\text{(V/V}(x2) = 0.000476 \text{,Weight}(y2) = 2421.5\text{)}</math>
!Weight (kg)!!Reading (V/V)
|-
|0.00 || 4.348e-5
|-
|3.3509 || 7.55e-4
|}
|}
:<math>
\text{Slope} = y2-y1/x2-x1 = 5.0765E6
</math>
Then we can try a test case to determine our b parameters for a y=mx+b style linear equation using one of our data points:
:<math>
y2 = m*x2 + b = 2421.5 = 5.0765E6 * 0.000476 + b
</math>
Solving for b gives us 5.07652, so our final equation is:


To calculate the load cell conversion factor (we'll call it '''M<sub>cal</sub>'''), simply divide the change in weight by the change in sensor reading.


:<math>
[[Image:LoadCellCalibrationEquation.png|link=|750px|center]]
\text{f(x)} = 5.0765E6 x + 5.07652
where '''R<sub>0</sub>''' and '''R<sub>1</sub>''' are the weights used, and '''F<sub>0</sub>''' and '''F<sub>1</sub>''' are the corresponding sensor readings.
</math>


Not exactly the same as our initial formula, but let's have a look at the results.  With this new formula let's try the same conversion as before with a measurement of 0.00035V/V.  This gives 5.0765E6*0.00035 + 5.07652 = '''1781.9g''' which is a comparable result for much less time spent taking measurements.  The greater the non-linearity in our sensor the more unreliable this will become, but for most sensors the non-linearity will be lower than the overall accuracy of the sensor so you can effectively ignore effects from non-linearity.
Finally, to use your new-found calibration factors you can plug in new sensor readings into the formula:
[[Image:LoadCellEquation.png|link=|750px|center]]
where '''R<sub>0</sub>''' is the zero reference measurement, '''R''' is the latest reading, and '''F''' is the corresponding calibrated weight (in kilograms, for this example).

Revision as of 19:39, 18 November 2021

At the most basic level, load cells measure a real world force by converting it into an analog voltage measurable by a Phidget. Once the Phidget has measured the voltage and sent it to your computer, you can convert it back to units you can work with (e.g. N, kg, lbs). This conversion is made easy due to the face that load cells are designed to output a signal that is directly proportional to the force applied. Apply twice as much force, get twice as much signal.

However, due to manufacturing variations, load cells are fairly unique in the Phidgets product line as sensors that will require individual calibration to get meaningful results in an end application. Thankfully this process is relatively simple, as we will show here.

How to Calibrate a Load Cell

For most applications, load cells can be characterized simply in terms of a zero-level offset, and a conversion factor. The zero-level offset being the amount of signal the sensor produces under "no load" conditions, and the conversion factor representing how much the output signal changes for a given change in force. In this context "no load" is understood to mean the amount of force the sensor will see when the system is at rest.

To demonstrate the process of calibrating a load cell, I will use the KIT4007 weigh-scale, with a load cell rated for a maximum weight of 5kg. You should always fully install the sensor in whichever system or application you intend to use it in before calibrating, just in case certain aspects of the construction have an effect on the measurements.

File:KIT4007.jpg

To begin calibration, we will take two measurements: one with the scale empty, and one with a known weight. Depending on the desired accuracy of your system, finding a known weight can be as simple as weighing an object on a trusted scale, and recording the weight. Here I've used a stepper motor which was weighed to be 3.5309kg.

Reference Stepper Weight.png
Reference Weight On Scale.png

For this example, we used the Phidget Control Panel example to manually read off the load cell readings.

Weight (kg) Reading (V/V)
0.00 4.348e-5
3.3509 7.55e-4

To calculate the load cell conversion factor (we'll call it Mcal), simply divide the change in weight by the change in sensor reading.

LoadCellCalibrationEquation.png

where R0 and R1 are the weights used, and F0 and F1 are the corresponding sensor readings.

Finally, to use your new-found calibration factors you can plug in new sensor readings into the formula:

LoadCellEquation.png

where R0 is the zero reference measurement, R is the latest reading, and F is the corresponding calibrated weight (in kilograms, for this example).