DFRobot/GravityTDS

TDS Constants

nasibfahim opened this issue · 1 comments

Hi! reviewing your code, i have two questions

this->ecValue=(133.42this->voltagethis->voltagethis->voltage - 255.86this->voltagethis->voltage + 857.39this->voltage)*this->kValue;

this->ecValue25 = this->ecValue / (1.0+0.02*(this->temperature-25.0)); //temperature compensation

this->tdsValue = ecValue25 * TdsFactor;

why do you use :

KValue=1 What this means? 
TdsFactor=0.5 What this means ? 

And where the equation to get the ec Value comes from? 

Thanks so much !

I think the K value is for doing the temperature compensation for getting an accurate EC value.

About the TDS factor is for doing the conversion from EC to TDS. He is using a fixed value depending on the location, usually in Europe the change is 0'6 and in EEUU is 0'5, these values are an aproximation but if you don't want very accuarate values it works fine.

About the equation, it is an equation given by the producer of the sensor. There you have to substitute the "V" with the voltages measured.

I hope it helped you