Introduction: Water Probe With Arduino Uno

About: Ngo active in the field of digital mediation, based in Toulouse, France

In this tutorial you ll learn how to assemble your own DIY water probe to measure conductivity, hence the degree of pollution of any liquid.

The water probe is a relatively simple device. Its workings rely upon the fact that pure water does not actually carry an electric charge very well. So what we’re really doing with this device is assessing the concentration of conductive particles that are floating in the (mostly nonconductive) water.

Water is very seldom just the sum of its basic chemical formula: two atoms of hydrogen and one of oxygen. Typically, water is a mixture that also includes other substances that have dissolved into it, including minerals, metals, and salts. In chemistry, water is the solvent, the other substances the solutes, and combined they make a solution. Solutes create ions: atoms that carry an electric charge. These ions are what actually move electricity through water. That’s why measuring conductivity is a good way to learn how pure (really, how impure) a water sample may be: the more stuff that’s dissolved in the watery solution, the faster electricity will move through it.


Step 1: Assemble the Probe

A video of the assembly process is available here.

Solder a strip of male headers (about 10 pins) onto the PCB.

Beware that one pin needs to go into GND on the arduino board, another one into A5 and a third one into A0.
Grab the 10kOhm resistor. Solder one end onto the header pin which goes into GND on the arduino board, the other end of the resistor onto the header pin which end on A0 in the arduino board. This way the resistor will basically create a bridge between GND and A0 on the arduino board.

Grab two pieces of solid core wire (about 30cm long each) and strip both ends of each piece. Solder one end of the first wire onto the header pin which ends in A5; solder one end of the second piece of wire onto the header pin which ends in A0 on the arduino board.

Connect the other ends of the pieces of solid core wire to the binding post. One end goes into the red part of the post, the other end goes into the black part of the binding post.

Now cut two pieces of solid core wire (about 10 cm long each), and strip both ends of each wire. Connect one end of each piece of wire to the metal ends of the binding post. Use the bolts to secure the solid core wire in place. Curl the other ends.

Lastly, try placing the PCB on the arduino board, and make sure that one pin goes into GND, another into A0 and a third pin into A5.

Step 2: Program the Arduino Board

To have a functioning water probe, you ll need to upload a specific program onto the arduino uno board.

Here s the sketch you need to upload:

/* Water Conductivity Monitor Sketch for an Arduino gadget that measures the electrical conductivity of water. This example code is based on example code that is in the public domain. */ const float ArduinoVoltage = 5.00; // CHANGE THIS FOR 3.3v Arduinos const float ArduinoResolution = ArduinoVoltage / 1024; const float resistorValue = 10000.0; int threshold = 3; int inputPin = A0; int ouputPin = A5; void setup() { Serial.begin(9600); pinMode(ouputPin, OUTPUT); pinMode(inputPin, INPUT); } void loop() { int analogValue=0; int oldAnalogValue=1000; float returnVoltage=0.0; float resistance=0.0; double Siemens; float TDS=0.0; while(((oldAnalogValue-analogValue)>threshold) || (oldAnalogValue<50)) { oldAnalogValue = analogValue; digitalWrite( ouputPin, HIGH ); delay(10); // allow ringing to stop analogValue = analogRead( inputPin ); digitalWrite( ouputPin, LOW ); } Serial.print("Return voltage = "); returnVoltage = analogValue *ArduinoResolution; Serial.print(returnVoltage); Serial.println(" volts"); Serial.print("That works out to a resistance of "); resistance = ((5.00 * resistorValue) / returnVoltage) - resistorValue; Serial.print(resistance); Serial.println(" Ohms."); Serial.print("Which works out to a conductivity of "); Siemens = 1.0/(resistance/1000000); Serial.print(Siemens); Serial.println(" microSiemens."); Serial.print("Total Dissolved Solids are on the order of "); TDS = 500 * (Siemens/1000); Serial.print(TDS); Serial.println(" PPM."); if (returnVoltage>4.9) Serial.println("Are you sure this isn't metal?"); delay(5000); }

The complete code s also available here.

Step 3: Using the Water Probe

After you've uploaded the code, dip the two curly ends of the water probe into a liquid and open the serial monitor.

You should be getting readings from the probe, which give you a rough idea of the resistance of the liquid, hence its conductivity.

You can easily test whether your probe is working properly, by just connecting the two curly ends to a piece of metal. If the serial monitor returns the following message: “Are you sure this isn’t metal?”, you can be sure that the probe is giving you accurate readings.

For tap water, you should be getting a conductivity of about 60 microSiemens.

Now try to add some washing up liquid to the water and see what readings you get.

This time, the conductivity of the liquid raises up to about 170 microSiemens.

Step 4: Water Pollution

There is a straightforward connexion between water conductivity and water pollution. Since conductivity is an indication of the amount of foreign substances dissolved in water, it follows that the more conductive a liquid is, the more polluted it also is.

The consequences of water pollution are negative in many ways. One example is related to the concept surface tension.

Because of their polarity, water molecules are strongly attracted to one another, which gives water a high surface tension. The molecules at the surface of the water “stick together” to form a type of ‘skin’ on the water, strong enough to support very light objects. Insects that walk on water are taking advantage of this surface tension. Surface tension causes water to clump in drops rather than spreading out in a thin layer. It also allows water to move through plant roots and stems and the smallest blood vessels in your body – as one molecule moves up the tree root or through the capillary, it ‘pulls’ the others with it.

However, when foreign substances (ex. washing up liquid) are dissolved into water , this alters the surface tension of water altogether, causing a number of issues.

One experiment you can run at home will help illustrate surface tension and the consequences of polluting water.

Take a paper clip and delicately lower it onto a bowl full of water. The paper clip should then stay on the surface and float.

If, however, a single drop of washing up liquid or other chemical is introduced in the bowl of water, this will cause the paper clip to immediately sink.

The analogy here is between the paper clip and those insects that take advantage of the surface tension of water to walk on it. As foreign substances are introduced in a water reservoir (be this a lake, a stream, etc.) the surface tension is altered, and these insects will no longer be able to float on the surface. Ultimately this impacts on their lifecycle.

You can watch a video of this experiment here.