Hi, I am designing weighing scale using AT89S52, C51 based controller, I have written a code, measuring weight after calibration, but I am not able to get linear weight, like at 0 kg i am getting 33gm, 0.5kg--->0.534kg, 1.0kg--->0.872kg, 1.5kg--->1.273kg, I dont understand how to get linear reading, can anybody help me on this????
I suppose that you are using a weighting scale with analog output (0-10V or 4-20mA). In that case, the user manual should provide the correlation between the voltage output and the actual weight.
According to your data, It seems that the output of the scale is not linear, so you might have to obtain the non-linear correlation between weight and output voltaje (or current). I suggest you to do that experimentally by weighting at least 4 known loads (the more loads you use, the more accurate should be the correlation), and measuring the output of the balance (you can also use the 0 - 1023 values provided by analogRead).
in order to obtain the correlation as a mathematic equation, you can use MS Excel and create a scatter plot of the real weight versus the output (voltage/current) or versus the read value (0 - 1023). Then, you can add the trendline (you select the model that fits better: linear, 2nd order, logarithmic, etc.) and show the equation of the trendline. I hope that a second order equation could fit well with your data and it could be solved by Arduino.
About This Community
|Asked: 6/24/20, 1:36 PM|
|Seen: 169 times|
|Last updated: 8/17/20, 7:54 AM|