Arduino Load Cell -

WEIGHING THE WEIGHTS

The unit can take about 4.5kg safely. When calibrating always check the accuracy of the things you are calibrating against..

Nominal Mass (kg)

Actual Mass (kg)

Output Reading

Output Reading - off-set

No weight

10 (the off-set)

0

0.5 + tray

0.604

62

52

1.0 + tray

1.18

136

126

1.5 + tray

1.665

199

189

2.5 + tray

2.461

302

292

3.0 + tray

2.947

365

355

3.5 + tray

3.523

439

429

4.0 + tray

4.008

502

492

Actual Mass (kg)

Predicted Mass (kg)

Error (%)

Error (g)

0.604

0.604

0.1

0.4

1.18

1.173

0.6

6.6

1.665

1.659

0.4

6.5

2.461

2.452

0.4

9.4

2.947

2.937

0.3

10.3

3.523

3.507

0.5

16.5

4.008

3.992

0.4

16.4

I placed the weights on the load cell and recorded the analogue readings. The results are given in the table below. The reading I took when there was no weight on the load cell is called the offset. We need to subtract this from the output reading to create the calibration line.

Calibrating the unit

The calibration is carried out by noting the analogue output from a set of known weights

To complete the calibration I need a mathematical expression that relates the analogue output reading to a mass in kilograms. To do this I take my results above a plot a graph of load against output reading (minus the offset). This should be a straight line. I can then use the equation of this line to estimate the mass

of any load from the analogue reading. The graph of my results is shown below and I’ve used excel to generate a linear trend-line. The equation of this line gives me the relationship between the reading and the load. Those of you that are interested in statistics will note that the correlation coefficient is 1.0, i.e. there is a perfect fit of the data for this range of weights.

The x-axis is the analogue reading, therefore if my Arduino reads 250 the mass on the load cell is 1.93kg, as the weight of the tray is 0.119kg.

I am just going to do one more check. I am going to compare the loads estimated from the equation to those actually on the scale. The results are in the table below. They look pretty good, but remember if you want to weigh items outside of this range (i.e. less than 0.5kg and greater than 4.0kg) you should re-calibration the equipment. For values less than 0.5kg I suggest using a different resistor to adjust the gain.

The final part of this project for now is to extend the code to include the calibration line and provide an output reading as a weight. This can be downloaded from github, but don’t forget to replace the slope variable with your own value.

In this example the scale doesn’t return to zero when there is no weight on it. It is possible to zero it but not without compromising of the accuracy.

© Flow RC June 2014

Disclaimer: Flow RC cannot accept any liability for any mishaps that you may have if you attempt to copy these projects. Please read our terms and conditions.

Please contact us at: feedback@flowrc.co.uk