Categories
TUTORIALS

Indicate water conductivity with an LED

In this tutorial, you will build a device that detects the conductivity of water and use it to control the brightness of an LED light. The conductivity of pure water is very low, but it increases when substances are dissolved in it (Check out this page from the USGS for more on the science behind this). For example, salt water is more conductive than fresh water. By using water to complete a circuit between two wires we can measure how much resistance (the reciprocal of conductivity) there is on the circuit, and by extension how conductive the water is.

It builds on the conductivity sensor in Environmental Monitoring with Arduino by Emily Gertz and Patrick Di Justo and uses concepts and from the Vilros Ultimate Starter Kit Guide.

You will need the parts listed below to build the device.

Parts List

  1. Arduino Uno
  2. Breadboard
  3. Red LED
  4. One (1) 10K Ohm Resistor
  5. One (1) 330 Ohm Resistor
  6. Jumper cables
  7. Insulated wire
  8. Chassis-Mount Dual Female Binding Post

Put Together the Sensor

Cut two lengths of wire about 10cm long and strip one end 3cm and the other 1cm.

Loosen the nuts on the narrow posts and the nobs of the binding post.

Wrap the longer stripped ends around the narrow posts of the Binding Post and tighten the nuts down to hold the wires in place.

Place a long jumper cable through the holes in each of the knobs on the Binding Post and tighten down to hold them firmly in place. It took me a couple of tries to get them into a position that would stay, so you may need to reset them a few times.

You want the ends of the wires to be 1cm apart for the readings to be most accurate.

Connect the Hardware

Connect the Ground pin GND (red wire) and the power pin 5V (black wire) pins on the Arduino to the columns on one side of the breadboard with jumper cables.

Place the 10K Resistor so that it connects the Ground column with a row on the Breadboard.

Place one long jumper cable (green wire)  in the same row as the 10K Resistor. This will be part of the conductivity sensor. Leave at least one empty space in between them.

Place a jumper cable (orange wire) into the space between the 10K Resistor and the wire from the conductivity sensor and connect it to the Analog In 0 pin on the Arduino.

Connect another long jumper cable (yellow wire) to the power column. This is the other part of the conductivity sensor.

Place on the LED on the breadboard with the long and short legs on different rows.

Use the 330 Resistor to connect the row with the LED’s short leg to the Ground column.

Connect the row with the LED’s long leg to the PWM 3 pin on the Arduino with a jumper cable (blue wire).

 

Code

Load the following code onto your Arduino:

Using the Sensor

Simply place the ends of the wires into the water and see the readings pour in. The US Environmental Protection  Agency has some advice on how to take readings and what  different measurements mean. On that page they refer to micromhos which is another name for microSiemens. MicroSiemens is the standard name and but micromhos is somethimes used in the United States.

Leave a Reply

Your email address will not be published. Required fields are marked *