GravityTroubleshooting

Gravity: Analog TDS Sensor Sample Code

userHead Account cancelled 2021-12-24 05:26:17 1101 Views1 Replies
Hello
I have a question about the Gravity TDS sensor.
In the library , the formula for calculating TDS looks like this:
TDS=(133.42*voltage* voltage * voltage -255.86* voltage * voltage +857.39* voltage)/(1.0+0.02(temp-25))*TDSFactor
And in the example page of the site https://wiki.dfrobot.com/Gravity__Analo ... 4#target_3
compensationVoltage=voltage/(1.0+0.02*(temp-25))
TDS=(133.42* compensationVoltage * compensationVoltage * compensationVoltage -255.86* compensationVoltage * compensationVoltage +857.39* compensationVoltage)*TDSFactor
These are calculations in different ways, which option is correct?
2022-05-09 19:05:21

The first formula is to convert the voltage value to the corresponding TDS value.The second formula performs temperature compensation, because the temperature has an influence on the TDS value, and temperature compensation can try to eliminate this influence.Both formulas are correct and required.

userHeadPic Youyou