Go Down

Topic: Water TDS Measurement (Read 2 times) previous topic - next topic


Hey everyone,
i was wondering if it's possible to make this type of TDS measurement work on a arduino. Here is the link http://hal.inria.fr/docs/00/63/56/52/PDF/TDS_Logger_RJP2011.pdf
He used a pic 18. I've done some experimenting with my arduino , breadboarded a circuit, wrote the code, and tested it with my oscilloscope. I don't think the arduino has the right kind of outputs...watching the oscilloscope the arduino pins seem to drain to ground then set to INPUT. You'd have to read the info in the link above to understand why that's a problem. :)   Someone PLEASE prove my wrong.... :) I'd love this to work...its so simple. I'd use a pic but, I'd have to learn to write code for one first and that seems alot trickier than arduino from want i've seen so far. I haven't been looking very long.
Thanks, Red



I am not in your field but I have done contract work with water sensing and have the right background to understand your problem. Arduino has the right pins for your application. You may have set the pins or circuits wrong. BTW, fig.1 is missing a resistor. Trying to charge a capacitor without a resistor is going to damage the pins.

Show some pictures of your circuit and post your code. I can try to help you.


It's been awhile since, I did those experiments. I'm getting close the to actually build the project now. posting on the forum was the last try at it with arduino before learning to program and buying hardware for the pic.  the circuit was exactly the same as fig 1 but, I had a resister in place for Rx (i didn't have a tds probe to play with). i tried many different values of resistors. Can't find the sketch i wrote back then. I think i may have deleted it after reading somewhere that the pins on the arduino where wrong kind. As far as the code i wrote, it basically went step by step with whats on page 3, in that paper i linked, changing pinModes to match the step and testing on the right pin using a while loop and a counter to see how long that pin was HIGH (i try many different delayMicroseconds in the while loop very small to larger to no delay at all).  It also showed a picture on page 4 of what the oscilloscope should look like. testing the circuit with my oscilloscope it looked like very straight  up and down spikes on the scope, like when pins  switched to an INPUT, the pin grounded and the voltage in the cap dropped very fast without going thru the resister. This  seemed to support what i read about the pins being wrong so, i gave up at the time.  I'll have to rebuild the experiment again. I'll be able to do a much better job of now, having a lot more practice writing code for the arduino.
thanks, red


Some basic background info:

Inside of a TDS meter is an electrical circuit which measures the resistance between its two electrodes when immersed in a liquid. This circuit applies an AC voltage to the electodes, and then measures the AC current which flows between the two electrodes. This reading is then corrected for temperature (if its a high quality instrument), and electrode geometry. The result is a measure of Total Ionic Content. The name Total Dissolved Solids is actually a misnomer, as a lot of dissolved solids will not read at all on a TDS meter since they do not ionize when they dissolve. Sugar is such a substance. If you were to dissolve a tablespoon of table sugar in a cup of distilled water and read it with a TDS meter, the resulting reading would be zero.

The reason AC is used instead of DC voltage on the electrodes is to keep the metals in the solution from plating onto the electrodes. With AC, anything that plates onto the negative electrode will in theory come off when the polarity reverses. AC also keeps the ions from migrating from one electrode to the other, thereby keeping the solution homogeneous.



If the curve you found drops too fast compared with fig. 4, your fake resistor rx is too small. Conductivity of some turbid water is very low. If you use a very large resistor to simulate the water, you will see a gradual drop in voltage instead of straight drops.

Go Up