Gravity TDS Calibration

userHead Jason.Barrett 2023-07-05 01:25:13 684 Views4 Replies

Hello all,

 

I've been able to successfully calibrate my TDS probe, but my application requires 6 TDS probes operating simultaneously.  Can anyone assist me with the calibration process for multiple probes?  The probes will be on pins A0 - A5.  Thanks in advance.

2023-07-05 12:07:19

Sounds like a lot of work.  Let me ask you this: do you know if the calibration parameter is a simple multiplier that is applied consistently across the entire range of values or is it more complicated?    For example, if the actual TDS were say 90 and the sensor was reading 100, would the calibration factor be a simple zero point shift (ie -10), a multiplier (ie x 0.9), or some combination of the two?  

 

I'm thinking this function could me incorporated directly into the arduino code as it might be simpler then altering the TDS library. 

 

Sounds like I might have to do some experiments incorporating a range of calibration fluids to see what's up.

userHeadPic Jason.Barrett
Yeez_B wrote:

The calibration formula is not just a simple multiplier.

Usually, developers will use a high-precision multimeter and TDS detection equipment to simultaneously record the TDS sensor output voltage and the EC (TDS) value of the actual solution. And enter these two values into a software like MATLAB to fit a formula specific to this sensor.

 

You could find the fomula in the source code, which DFRobot poseted on their own Github:

https://github.com/DFRobot/GravityTDS

 

And the info you need is in the .cpp file from line 116 to 194.

I took a screenshot for you and added some annotations:

2023-07-05 17:45:28
Yeez_B wrote:

And after you get the kValue, then you could calculate the TDS value by another fomula, which is also in the .cpp file from line 75~79

But after looking at the code myself, I don't think you need to use an external EEPROM module to use six sensors at the same time.You only need to manually record the K to when each sensor is calibrated, and directly apply the formula in the above figure (in loop()) in the sample code. that's it.

 

Here is a little example, if you connect the TDS sensor in the A2 pin, and your calibrate K value is 2.8(remember change this value into your own calibrated K value).

But I'm afraid you have to test this code, I donot have too much TDS sensor.

 

You could contact me if you have any question working with this code.

 

2023-07-05 18:15:39
2 Replies
2023-07-05 01:45:00

Since the calibration parameter of the TDS sensor would be stored into the EEPROM of the Arduino.

So I think it's hard to use DFRobot official library could not allow you to calib and store six calibration parameter.

 

But I have a thought that you could use some external EEPROM module to store the data.

Like this one:

https://www.dfrobot.com/product-429.html

 

Store every calibration parameter in to each different EEPROM module. 

And the IIC address of this module is changeable

But this might need to re-write some of the TDS library. I think this could work theoretically.

 

I could write some of the code if you insterested in this solution. But this might takes a while for me.

userHeadPic Yeez_B