The Vinduino project's goal is to provide an accessible measurement tool for irrigation management. While the Vinduino soil moisture measurement project was originally developed for saving the irrigation cost of our vineyard, it can equally well be used for other agricultural applications, a school science project, or even to reduce the water consumption of sprinklers in your own backyard. Although this is a "technical" project, we have tried to keep it low cost, accessible, and easy to build.
In the previous blog, we explained how to make and calibrate the gypsum soil moisture sensors, using stainless machine screws as electrodes, cast in Plaster of Paris. Now follows a description of the basic reader, using a low cost Arduino micro controller board, and a few widely available electrical components. This board can be obtained for less than $25 via Amazon.com, or you can find it at your local Radio Shack. You do not need a mains power adapter, the board gets it's juice from your PC USB port and it comes with a USB cable.
To accurately measure gypsum sensor resistance, we need an Arduino Uno board, connected to a PC with a USB cable, and a few electrical components. Per sensor, we need 2 diodes (1N4148) and 2 resistors of 1500Ω (update: for better accuracy, use 4700 Ohm resistors, see blog post 9/25/2014). One Arduino board can support up to 3 sensors.
The wiring is detailed in the layout drawing left. For more sensors, you just duplicate this circuit.
How does the sensor interface work?
From Kirchoff’s Law we know that voltage measured over two resistors connected in series, divide according to their respective resistance values. In our sensor interface we have one known resistor (1500Ω), and one unknown resistor value (this is our gypsum sensor)
By measuring the voltages over the known and the unknown resistor, using the analog inputs of the Arduino board, we can calculate the sensor resistance value.
To avoid electrochemical effects interfering with the soil moisture measurement, we only apply voltage to the sensor for a very short time, and we use alternating electric polarities while taking the sensor measurement. Here's where the two diodes come in. They block current coming from one direction, and conduct current coming from the other direction. By alternating the Arduino output pins pin 6 and 7 (see drawing: red or blue current path), we can make current flow in two directions through the sensor, depending on which micro-controller output pin is programmed to be active. The diodes cause some voltage loss when conducting, and we measure the voltage directly after the diodes (Analog pin A0 and A1) to compensate for that and get accurate measurement results.
The measurement results will appear on your PC screen, and you can copy and paste the data to make nice graphs in Excel.
In a next blog, we will describe the Vinduino software program for the Arduino board. You don't need to become a programmer, we did all the work for you. The board can be programmed by uploading it from your PC to the Arduino. The programming file will become available for download from this site.
Meanwhile, you may want to get yourself familiar with the Arduino board, and the available PC software, on the Arduino home page.
For an overview of all Vinduino project related postings click here