Software apps and online services
Hand tools and fabrication machines
70% of the worlds water is used for irrigation. Much of this is wasted due to irrigation systems watering plants and crops when they don’t need it. This can occur in many ways, one being if your sprinklers are on a timer and water your yard after it rains. My project seeks to help solve this problem by using a Particle Photon and soil moisture sensor to only water your yard/plants when needed. The soil moisture sensor will tell the Photon if the soil is wet or dry. If the soil is dry the Photon will turn on your sprinkler system and send a text to your phone telling you that your sprinklers are being turned on.
My inspiration for this project came while I was on Spring break at the beach. It had been raining all day and finally cleared up so I decided to go on a bike ride. As I was riding I saw many houses that had their sprinklers on and I thought to myself this is a huge waste of water because it just rained, the plants already have enough. I continued thinking, maybe there is some way to water your yard only when its needed instead of at a scheduled time like normal sprinkler systems, and I created this project.About
The soil moisture sensor tells the Photon if the ground is wet or dry. If the soil is dry the Photon turns on your sprinklers, an LED, and send a text to your phone via IFTTT. If the soil is wet then the LED and sprinklers and turned off.
Connections to Photon
- Soil Moisture Sensor VCC - VIN or 3v3
- Soil Moisture Sensor GND - GND
- Soil Moisture Sensor SIG - A0
- Sprinkler Valve Negative - GND
- Sprinkler Valve Positive - D6
- LED Anode with 330 ohm resistor - D5
- LED Cathode - GND
The soil moisture sensor has two probes which are acting as a variable resistor. When there is more water in the soil, there is better conductivity and results in a lower resistance and a higher SIG output. With less water in the soil there is less conductivity and high resistance, so there is a lower SIG output. Click here for more information.
***Make sure you calibrate your sensor and put this value into the code here
more information on how to calibrate your sensor at https://learn.sparkfun.com/tutorials/soil-moisture-sensor-hookup-guide#calibration- ***
For the sprinkler valve I used the Orbit Jar Top Sprinkler valve. This sprinkler valve runs on 24v so I have a power converter because the Photon releases 3.3v. This might be different for the sprinkler valve you use. Make sure you read how many volts your valve uses. For most sprinkler valves the wires are not polarity sensitive so it does not matter which on is positive or negative.Step 2: Setting Up IFTTT
If you have used IFTTT before this will be simple, but for those of you who haven't here are instructions.
3. You will need to create a new applet (click your username in the top right corner and click New Applet)
4. Click "this" in the "if this then that" statement, and choose Particle as your service
5. Choose New Event Published as the trigger
6. In the If(Event Name) blank type exactly what is in between the quotation marks in the Particle.publish("event-name") line of code. In this case it would be: Soil moisture low, turning on sprinklers!
7. You can leave the Is(Event Contents) spot blank. Make sure the Device Name or ID matches your Particle Photon and then click Create Trigger
8. Click "that" to add an action service
9. Click SMS if you want to receive a text message. You could also choose email or something else if you wish.
10. Choose send SMS message so you receive a text message
11. Complete the action fields and click create acton
12. Click Finish to complete your applet
The code is attached below. Make sure you add the wet soil value (specific to your sensor) and check to make sure the the text in between the quotation marks on the Particle.publish("_") line of code is the same as the event name on IFTTT.