MOISTURE BASED SPRINKLER CONTROL
Aaron James Courter
B.S., California Polytechnic State University, San Luis Obispo, 2004
PROJECT
Submitted in partial satisfaction of
the requirements for the degree of
MASTER OF SCIENCE
in
MECHANICAL ENGINEERING
at
CALIFORNIA STATE UNIVERSITY, SACRAMENTO
FALL
2010
© 2010
Aaron Courter
ALL RIGHTS RESERVED
ii
MOISTURE BASED SPRINKLER CONTROL
A Project
by
Aaron James Courter
Approved by:
__________________________________, Committee Chair
Kenneth S. Sprott, Ph.D.
____________________________
Date
iii
Student: Aaron James Courter
I certify that this student has met the requirements for format contained in the University
format manual, and that this project is suitable for shelving in the Library and credit is to
be awarded for the Project.
__________________________, Department Chair
Susan L. Holl, Ph.D.
Department of Mechanical Engineering
iv
________________
Date
Abstract
of
MOISTURE BASED SPRINKLER CONTROL
by
Aaron James Courter
Across California, there is a water shortage and a conservation effort of water resources.
For many states in the U.S., particularly western states, Conservation is a frequent focus.
Cities and homeowners have a vested interest to conserve their limited water supplies.
The moisture based sprinkler control system will reduce the amount of water wasted
through irrigation by utilizing sensor inputs along with time-controlled watering
schedules. The moisture based sprinkler control minimizes water waste by not allowing
the watering of zones that are already saturated. Field trials of my prototype showed that
water conservation is achievable. Additionally, the moisture based sprinkler control
system avoids damage to lawn and flowers due to over-watering and under-watering
while saving consumers extra charges for water usage.
_______________________, Committee Chair
Kenneth S. Sprott, Ph.D.
_______________________
Date
v
ACKNOWLEDGMENTS
I would like to thank Professor Sprott for his technical advice and for the opportunity of
this unique project. It was a valuable experience for me to learn LabVIEW in the process
of this project. I would also like to thank Soil Moisture Company for donating their GBlock sensors as well as a moisture meter. Finally, I would like to thank my wife and
daughter for putting up with my absence during this project.
vi
TABLE OF CONTENTS
Page
Acknowledgements.…………………………………………………………………….vi
List of Figures………………………………………………………….……………….ix
Workstation Specifications…………………………………..…………..……………..x
Chapter
1. INTRODUCTION……………….…………………………………………..……...1
The Competition……………………………………..………………………..…1
Target Market.……………………………..………………………….…….…...2
2. DESIGN…………………………...……………………………………….…….….5
Components……………………………………………………….……….….…7
Transformer….…………………………………………………….……….……7
Valve & Solenoid………………………………………………………….…..…8
Relay………….……………………………………………………………….…8
Sensor…………..…………………………………………………………………9
LabVIEW…….…………………………………………………….……………10
3. PROTOTYPE…………………………………………………………………….…11
4. RESULTS……………………………………………………………….………….15
Verification Field Trial Test Plan..…………………………………..…….……15
Performance Criteria.…………………….…………………………..........……16
Testing Location..……………………….………….…………………...…….…16
Testing Procedure …………………………………….………………...………16
Observations…… …………………………………………………….…...……17
vii
5. CONCLUSION..………………………………………………………......…….…18
Appendix A: Bill of Materials……………...….………………………………….…..19
References……………………………………..…………………………………….....20
viii
LIST OF FIGURES
Page
1.
Figure 1: Pseudo Code………….……………………………………….……….6
2.
Figure 2: Moisture Control Sprinkler System Block Diagram………….….…....6
3.
Figure 3: 24v, Class 2 Transformer…………………………………….………..7
4.
Figure 4: Orbit Sprinkler Valve.....…………….…………………….…………..8
5.
Figure 5: Panasonic 255-1569-ND Relay….…………………….……….….…..9
6.
Figure 6: G-Block…………….………………………………….……….……...9
7.
Figure 7: National Instruments USB-6008...…………………….………….…..10
8.
Figure 8: LabVIEW Simulation Only ..………………………………….….…..12
9.
Figure 9: LabVIEW with Potentiometer Simulation ...………………….….…..12
10.
Figure 10: LabVIEW Simulation with L.E.D./Relay Output.……………....…..13
11.
Figure 11: LabVIEW Simulation with G-Block Analog Input..………...….…..13
12.
Figure 12: LabVIEW Moisture Control Sprinkler System……...….……….…..14
13.
Figure 13: Prototype Sprinkler Assembly….……………….……….……….….14
14.
Figure 14: Sprinkler in Operation………………………….………..……….….17
ix
WORKSTATION SPECIFICATIONS
Software used:

LabVIEW 8.2
x
1
Chapter 1
INTRODUCTION
Conservation is huge in the USA, especially in California. Water conservation is just one
of many areas targeted for change. On average, a homeowner’s sprinkler systems usage
with a 35psi line pressure and 3 sprinkler heads (5000 Series Rotor) per zone will use in
nearly 560 gallons per hour [1].
Many cities are offering rebates for lower water
consumption. As with the new gas “smart meters” most homes are being monitored on
their water consumption instead of being charged a flat fee. Some cities go as far as to
provide rebates water efficient appliances and fixtures. Roseville and Rancho Cordova
have similar water reduction efforts [2].
The Moisture Control Sprinkler System
provides an opportunity to reduce waste in watering your lawn or garden. By giving a
feedback loop not currently offered by other systems a direct line to your soil’s needs.
The Moisture Control Sprinkler System reads the soils moisture level and determines if
watering is required. If the soil were already wet due to rain, neighbors overspray or poor
drainage, water would not be wasted as the system will not enable the sprinkler valve to
open as well as it will shut off upon soil saturation.
The competition:
Other sprinkler systems out there have some sensory feedback.
Rain sensors are
currently available but they use one moisture sensor to feedback that it is raining,
regardless of whether the lawn is wet or not. It is specific to the location of the rain
sensor, which then shuts off the entire system. This style does not look at individual
2
zones for moisture nor does it allow for individual zone control [3]. Weather tracking
systems work similarly to that of the rain sensors with a high tech twist.
The
WeatherTRAK sprinkler system gets weather updates via the web, using an updating
service that tells the controller that it is scheduled to rain [4]. Again, this does not have
100% accuracy, as the weather prediction still needs some fine-tuning. Not to mention
that there is a service fee associated with the updates. This system has the same downfall
that the single rain sensor has as it shuts down the entire system and doesn’t stop
watering if the lawn is already wet.
The Moisture control sprinkler system uses individual moisture sensors buried directly in
the soil. This instant feedback allows the controller to make a decision to water basted on
individual zones, therefore stopping overwatering of zones that might already be wet
from neighbors overflow, rain, and poor drainage.
Target Market:
The main customer targets for the Moisture control sprinkler system are homeowners,
home builders, and small business and government institutions. Each group would benefit
from the convenience the Moisture control sprinkler system offers, while the entire
community would benefit from conserving our water supply. Homeowners will want to
update their systems for conservation. Running sprinklers solely on timers without
feedback is inefficient. In Moisture control sprinkler system, moisture sensor inputs
determine if water is needed to effectively irrigate. Customers would enjoy an easy to-use
3
computer interface conveniently setting watering schedules for specific zones, while
conserving water and saving money.
Homebuilders would be able to install the Moisture control sprinkler system in the
subdivisions where the Home Owners Association (HOA) requires you to use the
provided system for irrigation, or simply offer it as an upgrade to make the home more
attractive to buyers. The system will conserve water and save money allowing the new
homeowners to take advantage of the system right away. The Moisture control sprinkler
system could also be included in the mortgage of the house, similar to the way solar
panels can included today on most new developments.
Small business owners with irrigation needs could utilize the Moisture control sprinkler
system to save money as well. Business owners could enjoy decreased water bills, while
maintaining beautiful landscapes and lawns that would be getting the right amount of
water. Apartments, business parks, and condominium complexes would be a great fit for
this system.
Additionally, the Moisture control sprinkler system would appeal to cities for installation
in small parks and other public properties. Cities have a vested interest in conserving
water, and the convenience of transitioning to the Moisture control sprinkler system
would could also help play a role in influencing the buying decision [5]. The Moisture
control sprinkler system is not currently designed for use in large scale facility-controlled
4
environments, but it could be developed in future work. Feedback control would allow
for better property management for any size plot.
5
Chapter 2
DESIGN
The LabVIEW graphical user interface (GUI) allows the user to create a set point for the
moisture sensor. The user first completely saturates their lawn to ensure that the moisture
sensors are in wet soil prior to calibrating their “wet” set point. Once the calibration
button is pushed, the analog input from the sensor is read by the USB-6008 and written to
a log file which is used as the alarm set point for the zone. The user creates a watering
schedule in the GUI similar to a standard sprinkler timer. When the zone is scheduled for
watering, the system checks the sensor vs. its calibrated set point. If the zone’s moisture
meter has a lower moisture level than the set point, it will output a digital signal to the
relay therefore opening the solenoid to water for the duration specified by the user. If the
zone’s moisture meter’s level is equal or greater than that of the set point, the watering
bypass indicator is enabled and the sprinkler solenoid is not opened and the watering for
that zone is bypassed. Every time the schedule calls for a watering, the zone’s moisture
sensor is checked prior to watering and will not water if the zone is already wet due to
rain, neighbors overflow or poor drainage. Therefore saving money and conserving water
as well as possibly stopping damage to lawn or plants by overwatering.
6
Figure 1: Pseudo Code.
Figure 2: Moisture Control Sprinkler System Block Diagram.
7
Components:
The components of the Moisture Control Sprinkler System are a computer using
LabVIEW, sensors, and the relays to open and close the solenoid sprinkler valves. Figure
2 shows the interconnections of these components. The Moisture Control Sprinkler
System uses standard sprinkler components for cost and ease of replacement parts. The
valve solenoids are powered by a standard sprinkler 24v transformer that converts
120VAC from a standard household outlet to 24volts to open the individual valves. The
valves are standard sprinkler valves, allowing the Moisture control sprinkler system to be
added to pre-existing sprinkler plumbing.
Transformer:
I used a Rain Bird 24v transformer which is a standard sprinkler transformer as most of
the sprinkler valves use a 24v solenoid and I wanted to use standard components.
Rain Bird 637473-01 RevA has an Input of AC120V 60Hz 24W and an OUTPUT of
AC26.5V 650mA. This is a Class 2 Transformer.
Figure 3: 24v, Class 2 Transformer.
8
Valve & Solenoid:
Standard Orbit Water Master Automatic sprinkler valve ¾” NPT used on common
households for sprinkler systems. The Solenoid is a 24v 50/60Hz and requires a 0.30A
inrush current and a 0.19A holding current.
Figure 4: Orbit Sprinkler Valve.
Relay:
I originally selected a 24v “ice cube” relay but found that I would need to bump up the
DAQ’s output (5v) to 24v to enable the coil voltage and allow the relay to turn on. In
order to keep things easier and not require an amplifier open the 24v circuit for the
sprinkler valve with a 5v input signal I then selected a PhotoMOS relay part # 255-1569ND from Panasonic. This Relay is accepts AC or DC input for a wide range of
applications, as well as being a Power Photo MOS relay it features extremely low closedcircuit offset voltage. This enables control of low-level analog signals without distortion
[6]. The relay has a high isolation voltage and eliminates the need for a power supply to
9
drive the power MOSFET. Keeping the components as small as possible will allow for a
smaller final electronics package.
Figure 5: Panasonic 255-1569-ND Relay.
Sensor:
When researching moisture sensors I found a full range of options from making my own
using gypsum and nails [7] to a full electronics package for industrial measurements for
large scale agricultural crops [8]. For this project I chose a product form SoilMoisture
Equipment Corp. in Santa Barbara. Soil Moisture Inc. manufactures G-blocks as a
moisture sensor to be accompanied with their monitoring equipment.
SoilMoisture
Equipment Corp was very generous in donating some G-Blocks and their Moisture reader
5910A for my project. Their G-Blocks are cast gypsum blocks with crimped leads.
Figure 6: G-Block.
10
LabVIEW:
A large goal of my project was to learn LabVIEW while creating a product. In order
control hardware with LabVIEW I chose the National Instruments USB-6008. The
National Instruments USB-6008 provides basic data acquisition functionality for
applications such as simple data logging, portable measurements, and academic lab
experiments. It is affordable for student use, but powerful enough for more sophisticated
measurement applications. The USB-6008 has 8 analog inputs with 2 analog and 12
digital outputs (12-bit, 150 S/s) allowing me to read the analog input from the G-Blocks
and have digital outputs to control the relay [9].
Figure 7: National Instruments USB-6008.
11
Chapter 3
PROTOTYPE
In building my prototype, I first had to learn LabVIEW. I found that it’s much easier to
learn LabVIEW when you have a plan of what you want to try and accomplish instead of
just trying to teach myself. LabVIEW has a lot of tutorials and examples built into the
software as well as a great developer forum where you can ask the experts, but if that’s
not enough you can also contact National Instruments directly through their tech support.
I found the built in examples to be a little cumbersome especially if you don’t know what
to call the idea or item you’re looking for. The Developers forum was the most helpful
for me as most of the members are well used to the newbie questions. I first wrote up my
Pseudo code shown in Figure 1 to layout what I wanted the system to do. Once I was
comfortable with the logic, I built a simulation prototype in LabVIEW in order to test my
code with simulated inputs and outputs using a sliding scale for my inputs and LED’s for
outputs.
12
Figure 8: LabVIEW Simulation Only.
Once the simulation worked as expected I then updated my simulation to run the USB6008. I used a potentiometer to simulate the moisture sensors variable resistance and
outputs turning on actual LEDs for the relay switch using a breadboard.
Figure 9: LabVIEW with Potentiometer Simulation.
13
Figure 10: LabVIEW Simulation with L.E.D./Relay Output.
With the hardware simulation complete, I then added the moisture sensors into the
simulation and then the relay and valve set. With the VI and front panel complete and
simulated in LabVIEW, I then built the sprinkler prototype for my functional testing.
Figure 11: LabVIEW Simulation with G-Block Analog Input.
14
Figure 12: LabVIEW Moisture Control Sprinkler System
Then Sprinkler prototype was built out of sprinkler grade schedule 40 ½” PVC with a
pop-up sprinkler inline after the valve pack connected to the water hose. See figure 13 for
the completed assembly and See Appendix A for the Bill of Materials (BOM).
Figure 13: Prototype Sprinkler Assembly.
15
Chapter 4
RESULTS
I limited the amount of zones for the prototype to one with the option to add a second
valve pack and sprinkler in the future. While most homes or parks would likely have
multiple zones, the required updates would be a cut and paste of the control with a
variation on the sprinkler timer setup. The field trial included three trial runs that
presented different scenarios for the system. In the first scenario, the zone requires
watering, system waters zone for duration of timer. In a second trial run, the zone does
not activate because the moisture content in the soil is still high enough from the
previously supplied amount of water therefore not triggering the call for water. For the
third trial run, the zone required water but during the watering, the sensor reaches its
alarm limit and shuts of the sprinkler off before the timer is complete. Overall, I
considered prototype verification a success.
Verification Field Trial Test Plan:
The objective of field-testing the Moisture Control Sprinkler System prototype was to
validate the performance of the system in the potential usage location. The following test
plan outlines criteria and procedures used during the field test trial run.
16
Performance Criteria:
I used the following criteria to help me validate the performance of the system:
1. All units including moisture sensors, relay circuitry, valves, pipes and sprinklers
function as expected after the system was built.
2. System switching logic from on to off as well as the system turning off at the correct
times (i.e. when desired soil moisture content is reached or the timer run time is met).
Testing Location:
I put the system on the lawn of my house. I did not burry the system under my lawn, as
this would be undesirable in case troubleshooting was necessary. The prototype was
connected to my house water via the garden hose and was not directly plumbed into my
sprinkler system.
Testing Procedure:
I built the plumbing above ground for easy of test and portability.
1. Install the pipes, valves and sprinklers.
2. Connect wires between the USB-6008, transformer, relay circuitry and the valve.
3. Secure the wire connection with zip-ties and tape.
4. Run the program in LabVIEW to start the sprinkler timer: timer set for time of test.
17
Observations:
The G-blocks read nearly as an open circuit when completely dry at initial startup but
once they became saturated they performed as expected. The Gypsum G-Blocks became
ease to break apart when wet, suggesting they may breakdown with a few season cycles.
The reading of the sensors and the response of the relay was a bit slower than anticipated
but after changing the refresh rate on the while loop in LabVIEW things became a little
faster.
Figure 14: Sprinkler in Operation.
18
Chapter 5
CONCLUSION
My projects main two objectives for me were to get more exposure and experience using
the National Instruments software LabVIEW and to develop a moisture sensor feedback
controlled sprinkler system. I feel that both of these objectives were achieved. While
LabVIEW is a very expansive program, I feel that I have gained a greater comfort level
that will allow me to continue creating more programs and broaden my stride towards
becoming proficient at LabVIEW. The Moisture Controlled Sprinkler System worked
well using LabVIEW and G-blocks as sensors and is a great start for conserving water.
There are future opportunities to update the program to make it more intuitive and user
friendly possibly building a circuit board for this product and remove the necessity of
LabVIEW and replace the programming with C++ or VB. There are also opportunities to
add more feedback loops such as temperature or light sensors, flow meters, adding more
zones for larger parcels. In my research, I have found many more cost effective sensors
that do not degrade over time like the Gypsum style of the G-Blocks. Further studies
could include finding the optimal moisture level for types of lawns and plants in order to
allow the control system to be more effective. The level of complexity that can be built
into the system is nearly endless.
19
APPENDIX A



















Bill of Materials
Labview DAQ & software
o USB-6008
Manual Ball Valve.
In-line Solenoid valve.
o Voltage required: 24v
Schedule 40: ½” PVC pipe ~10ft length.
½” PVC to hose adapter.
½” PVC Tee or 4way Tee.
½” PVC caps
½” Sprinkler riser
½” Sprinkler head (Pop-up)
Moisture sensor.
o G-Blocks
Bread board
Relay
Zip-Ties
Electrical tape
Laptop for LabVIEW
o Labview code
PVC cutter
PVC cement
Wire for system
Dish for soil sample
o Soil or dirt
o Pseudo grass
20
REFERENCES
[1] Rainbird.custhelp.com,
http://rainbird.custhelp.com/app/answers/detail/a_id/8/kw/pressure
[2] Cityofranchocordova.org, http://www.cityofranchocordova.org/Index.aspx?page=390
[3] Sprinklerwarehouse.com,
http://www.sprinklerwarehouse.com/DIY-Installing-a-rain-sensor-s/6826.htm
[4] Hydropoint.com, http://hydropoint.com/pdfs/benefits/ET_plus_Benefits.pdf
[5] Roseville.ca.us,
http://www.roseville.ca.us/planning/water_efficient_landscape_ordinance.asp
[6] Panasonic-electric-works.de,
http://www.panasonic-electricworks.de/catalogues/downloads/photomos/ds_x615_en_aqz10_20.pdf
[7] Cheapvegetablegardener.com,
http://www.cheapvegetablegardener.com/2009/03/how-to-make-cheap-soil-moisturesensor.html
21
[8] Specmeters.com,
http://www.specmeters.com/WatchDog_Weather_Stations/WatchDog_Model_2800_Wea
ther_Station.html
[9] Sine.ni.com, http://sine.ni.com/nips/cds/view/p/lang/en/nid/201986