Modifying a Keyestudio TDS Module to Increase Its Limit Tenfold

I currently have a TDS (Total Dissolved Solids) module V1.0 from Keyestudio, designed to measure up to 1000ppm of dissolved ionic solids.

My goal is to enhance its maximum measurement capacity by ten times, without replacing the existing probe. DIY'ing a probe is not feasible for me, as commercial probes are usually coated with precious metals, and purchasing expensive platinum is beyond my budget. Through some research, I've learned that the module operates on the principle of an AC resistance measurement circuit, converting electrical conductivity (EC) readings into an analog voltage output. I am looking for advice or suggestions on how to achieve this modification without altering the probe. Any insights or guidance would be greatly appreciated.

Here are some additional insights regarding my ongoing project to modify its measuring range.

In-Depth Circuit Analysis:

  1. Oscillation and Measurement: The module uses a CD4060 for oscillation generation. The calculated frequency should be around 4 kHz, but my measurements showed approximately 2.4 kHz, which is reasonably close. (See the circuit diagram here: )
  2. Signal Amplification: The AC signal is amplified using an inverting amplifier with a gain of -0.068, as calculated from the formula shown in this image: Amplifier Calculation
  3. Probe and Signal Processing: The amplified signal is fed into one leg of the TDS probe, travels through the solution, and is picked up by the other probe leg. This part connects to a circuit section I'm currently unsure about, highlighted in the yellow box in the schematic. The signal is then rectified and filtered through a second-order passive RC filter.
  4. Data Output: The analog output signal is sampled by an Arduino to calculate the TDS value.

Experimental Results:

I conducted tests with the module using solutions of known conductivities. The results, shown in this table, indicate a fairly linear relationship: Conductivity Results

Using these results, I was able to fit a polynomial model for TDS calculation in Excel:

Seeking Clarifications and Suggestions:

  • The part of the circuit in the yellow square (on the schematic) is unclear to me. Any explanations would be helpful.
  • Based on my experiments, I believe changing the R12 resistor might adjust the module's upper measurement limit. Is this assumption correct, and if so, how can I calculate the necessary resistor value?

I am open to any comments or suggestions regarding these points or any other aspect of my project.

Is a simple inverting amplifier. The gain is -R10/Rtds, where Rtds is the unknown resistance of the probe. You can change R10 to increase or reduce the gain.

R12 is probably there to prevent oscillation or hangup if no probe or no conductive solution is present (in which case Rtds = infinity). Otherwise R12 has no effect on the circuit.

Since the LM324 is a very old design, with positive output voltage limited to about Vcc - 1.5V, you won't get much, if any, change in measurement range by changing the gain of the circuit. You need a rail-to-rail op amp to extend the output voltage range. I'm surprised that you get a voltage somewhat higher 2 V, but that is probably the upper limit.

You can certainly reduce R10 by a factor of ten, in which case the theoretical upper concentration limit of would be about 20,000 uS/cm, but you lose measurement resolution by a factor of 10.

A much easier way to extend the range toward more concentrated samples is to dilute the initial sample by a known amount.

1 Like

Thanks for your response. LMV324 is indeed a rail-to-rail op-amp that succeeds the old LM324.

Sorry, missed the V.

1 Like

I understand that diluting the solution by a factor of 10 is possible, but it's not practical in my case. I intend to use it in a saline fermentation vessel for periodic measurements. Additionally, I'm mindful that when measuring solutions with higher electrical conductivity (EC), polarization can occur on the probes. Articles explaining the theory of EC measurements suggest employing a higher frequency for solutions with high conductivity to prevent polarization, which could result in inaccurate readings.

Also, conductivity is not linear with salt concentration. The linear approximation works only for dilute solutions.

I'm aware that measurements may not exhibit linearity at higher concentrations but it's not a problem for me. There are model functions in the literature that correlate salt concentration with electrical conductivity. However, what holds importance for me is the electrical conductivity, as Total Dissolved Solids (TDS) is a derived parameter. The conductivity of isotonic salt solutions varies based on their chemistry. Since determining the exact ions present in a solution with just a 2-wire probe is not possible, I solely rely on electrical conductivity measurements as my primary basis.

R12 forms a voltage divider with the TDS probe, allowing for the actual resistance measurement. The voltage across R12 is then amplified by opamp C, passed through the rectifier and the peak detector to the analog output.

I may still have some note about the resistance expected by that probe in salt solutions. I recall it's in the 10s of kΩ for the lower salt concentrations.

Looks to me like changing R12 would change the range.

No, it does not.

By the action of the op amp, the voltage at Vin-, a virtual ground, must be very close to zero and very close to equal to that at Vin+, which is grounded. So, no significant current flows in R12, and it has no effect on the circuit unless the probe or solution is removed (in which case it forces the op amp output to be zero).

The gain of the op amp is R10/Rtds, or R10*sigma, where sigma is the conductivity, 1/Rtds.

Capture

Much nicer fit if you don't force it through the origin:

It is a pretty good design!

I’d like to keep this open as I explore the idea ; I see the time is about up and it’s about to close the thread if I don’t comment now

Voltage follower.
It prevents loading the sensor with the 10k input impedance of the rectifier.
Inverting is irrelevant, because of the full wave peak detector that follows.

Which one.
The A/D that follows must be absolute (most Arduinos default to ratiometric).
Things could be improved with a (genuine) ADS1115 (15-bit), set to 2.048volt Aref.
Leo..