ArduinoGeneral

EC module calibration confusion

userHead o.whinnett.uk 2017-02-07 09:13:06 3474 Views3 Replies
I bought the EC module kit but I am confused about how to alter the code. I understand you get two points using calibration solutions at EC=1.413 and EC=2.76 giving you two corresponding voltages so you have (x1, y1) = (V1, 1.413) and (x2, y2) = (V2, 2.76) which allows you to plot a straight line and get an equation y = mx+c. My question is this - if you work out an equation such as y = 0.006568419x + 0.04311972 how would you alter the below code to successfully calibrate the meter? Can you alter the code for me using this example equation so I understand where to plug in the values?

[code] if(CoefficientVolatge<=448)ECcurrent=6.84*CoefficientVolatge-64.32; //1ms/cm<EC<=3ms/cm
else if(CoefficientVolatge<=1457)ECcurrent=6.98*CoefficientVolatge-127; //3ms/cm<EC<=10ms/cm
else ECcurrent=5.3*CoefficientVolatge+2278; //10ms/cm<EC<20ms/cm[/code]

Also do you need to have the two calibration solutions at 25°C Isn't it temperature compensated?
2017-02-10 23:58:53 :) userHeadPic Wendy.Hu
2017-02-10 16:29:54 Thank you so much! :) userHeadPic o.whinnett.uk
2017-02-09 23:00:33 Hi

There is another method to calibrate the module below the Scheme of Calibration, refer to the following picture, you can calibrate the module only by the code, which is easier.
[attachment=0]QQ图片20170209143142.png[/attachment]
As for the old method, for example, 0.006568419*1000=6.56 to exchange 6.84, 0.04311972*1000=43.11 to exchange 64.32. if there is only one equation, just this code will be ok: ECcurrent=6.56 *CoefficientVolatge-43.11;

And the temperature is just a a environmental requirements, not a temperature compensated.
Hope this will help you. :)
userHeadPic Wendy.Hu