Introduction: DripSmart Customized Irrigation System (WORK IN PROGRESS)

As conserving energy and preventing food and water waste have become big focuses for environmentalists today, it is important that everyday citizens do their part as well. Many times, people kill their edible plants by watering them too much or too little, or they forget to take care of them when they go on vacation. When over watering occurs, it not only kills the plant, but also wastes Earth's limited supply of water.

DripSmart is an automated, solar powered irrigation system that waters plants based on their individual needs and how much moisture is already in the soil. This system helps to avoid over or under watering plants, therefore saving water, money, and the lives of many plants.

When brainstorming a project, our group noticed a pattern of water conservation in all of our ideas, and decided this was the strongest.

Step 1: Tools and Materials

Tools

  • PVC cutter
  • Assorted sized screw drivers

Materials

Step 2: Pump and Irrigation- Mechanical Component

This is how we set up our PVC and tubing for the irrigation system. Looking at the drawing included, the blue and gray box is the water pump that is sitting inside the water tank. The parts of PVC with the blue rectangles are the manual valves. The green parts are the automatic sprinkler valves. The black lines on the right represent the irrigation tubing.

Step 3: Solar Panel- Electrical Component

Materials:
- Solar panel
- 12 volt battery
- Voltage controller
- 2 Crimped wires

1. Take the two ends of the wire connected to the panel and place the positive into the positive gate on the voltage controller, and the negative onto the negative gate of the voltage controller.

2. Then connect a 12 volt battery to the positive and negative battery gates on the same voltage controller.

Step 4: Arduino Coding- Automatic Component

How to Build the Arduino Controlled Power Outlet

Here is the tutorial we followed

Materials needed:

  • Electrical outlet box
  • Electrical outlet
  • Electrical outlet box cover plate
  • Arduino redboard
  • Relay
  • Signal, VCC, and ground wires
  • A power cord (we cut ours from an old computer charger)

1. Cut off the wire on your power cord so that you have the plug and a long wire attached (see picture). For ours, we had two white wires that are the hot and neutral wires as well as a green ground wire. On other plugs there may be a white (neutral), black (hot), and green (ground) wire, for these the white is connected to the larger prong, the black is connected to the smaller prong, and the green is connected to the round prong.

2. Separate 3-4 inches of the three wires on the cut end of the power cord. Only strip (expose the copper) about 1 inch of the individual wires.

3. Cut a 4 inch piece of hot wire and strip off about 1 inch of the insulation on each side. Insert the exposed copper into the far left slot of your relay (the "NO" terminal). Next, connect the signal, VCC, and ground wires (male-females) to the the three prongs on the relay.

4. Thread your power cord through the gap/hole in the electrical outlet box. Insert the hot wire (black or one of your whites if your plug is similar to ours) into the middle port of your relay (common). Ensure that both wires that are tightly screwed into the relay.

5. Before this step make sure to position the wires and relay in the outlet box so that they fit well. Thread the three male-female wires out of the other hole in your electrical outlet box. Take the other end of your hot wire that is plugged into the far left slot and wrap the exposed copper around either of the gold screws on the RIGHT side of the outlet and screw it in tight. Take the remaining white wire and wrap the copper around one of the silver colored screws on the LEFT side of the outlet and tighten the screw. Take the green wire and wrap the copper around the green screw on the bottom left corner and tighten the screw.

6. Press the electrical outlet into the outlet box and screw it on.

7. Attach the cover plate onto the outlet box and screw it on.

8. For the arduino wiring, you can watch the videos and look at the pictures above. It is easier to see than to read.

Coding and Setup

There are several videos as well as pictures posted here to reference for your wiring.

Here is the code we used. Feel free to copy and paste it for your project.

*// directs where the relays will be plugged in*//
int relay1 = 13;

int relay2 = 6;

int relay3 = 5;

int relay4 = 4;

*// directs where the moisture sensors will be plugged in*//

int sensor1 = A0;

int sensor2 = A1;

int sensor3 = A2;

*// sets up the value that the moisture senors will begin reading at*//

int sensor1val = 0;

int sensor2val = 0;

int sensor3val = 0;

*// sets up relays as outputs and moisture sensors as inputs*//

void setup() {

pinMode(relay1, OUTPUT);

pinMode(relay2, OUTPUT);

pinMode(relay3, OUTPUT);

pinMode(relay4, OUTPUT);

pinMode(sensor1, INPUT);

pinMode(sensor2, INPUT);

pinMode(sensor3, INPUT);

Serial.begin(9600); }

*// sets up conitunous read for the moisture sensors, they will constantly check the moisture of the soil*//

void loop() {

sensor1val = analogRead(sensor1);

Serial.println(sensor1val);

sensor2val = analogRead(sensor2);

Serial.println(sensor2val);

sensor3val = analogRead(sensor3);

Serial.println(sensor3val);

*// If sensor 1 reads less than 500, then relay 4 will not turn on, which will not allow water to flow*//

if(sensor1val <= 500) {

digitalWrite(relay4, LOW); Serial.println("OFF"); }

*// If sensor 1 reads greater than 500, then relay 4 will turn on along with the relay that controls the pump (relay 1)*// *// which will allow water to flow, and then the delay will act for 10 seconds where the moisture will not read the soil*//

if(sensor1val >= 501)

{ digitalWrite(relay4, HIGH);

digitalWrite(relay1, HIGH);

Serial.println("ON");

delay(2000); }

*// If sensor 2 reads less than 500, then relay 2 will not turn on, which will not allow water to flow*//

if(sensor2val <= 500) {

digitalWrite(relay2, LOW);

Serial.println("OFF"); }

*// If sensor 2 reads greater than 500, then relay 2 will turn on along with the relay that controls the pump (relay 1)*// *// which will allow water to flow, and then the delay will act for 10 seconds where the moisture will not read the soil*//

if(sensor2val >= 501) {

digitalWrite(relay2, HIGH);

digitalWrite(relay1, HIGH);

Serial.println("ON");

delay(2000); }

*// If sensor 3 reads less than 500, then relay 3 will not turn on, which will not allow water to flow*//

if(sensor3val <= 500) { digitalWrite(relay3, LOW); Serial.println("OFF"); }

*// If sensor 3 reads greater than 500, then relay 3 will turn on along with the relay that controls the pump (relay 1)*// *// which will allow water to flow, and then the delay will act for 10 seconds where the moisture will not read the soil*// if(sensor3val >= 501) { digitalWrite(relay3, HIGH); digitalWrite(relay1, HIGH); Serial.println("ON"); delay(2000); }

*// delays how long relay 1 will be on for, so the pump pulses on and off when on*//

digitalWrite(relay1, LOW); delay(2000); }

/* This is extra code that we are still testing
if(sensor1val <= 400 || sensor2val <= 400 || sensor3val <= 400) { digitalWrite(relay1, LOW); Serial.println("OFF"); } else if(sensor1val >=401 || sensor2val >=401 || sensor3val >=401) { digitalWrite(relay1, HIGH); Serial.println("ON"); } */

Step 5: Waterproof Box- Structure Component

In order to protect the battery, relay, and Arduino, we decided to make a waterproof box. We're still working on building the box, but we've included some sketches with measurements to show the idea that we're going for. Our plan is to build a box, either out of wood, metal, or plastic, that covers most of our PVC structure and most importantly the wiring for the Arduino. We will drill small holes on the 2' side of the box to allow the irrigation barbs to come out and attach to irrigation tubing. We're also going to drill holes so the moisture sensors can go to where the plants are. We also have to drill a bigger hole on the opposite side of the box to allow for the PVC tubing to enter. We would have to epoxy the holes to make sure that water can't get into the box. The box would be 2.5' by 2' and 8 inches tall. To open the box for maintenance, we'd attach a latch with a lock at the top of the box.

Step 6: Conclusion

First off, we want to say that we are not done with this project and are continuing to revise right now. Some of the things we're working on are: consolidating the PVC pipe structure, organizing our wiring, water proofing the Arduino and wiring, overall making it more compact and visually appealing. We've discussed our project with some industry professionals and have gotten feedback such as making the moisture sensor wireless, connecting the Arduino to a weather app so when the forecast has rain our system won't water the plants, and finding the right size battery and solar panel so the system could run at night. These are just some ideas that we are working with and trying to make them achievable, if you think of any other ways we could improve our project please feel free to comment below! We appreciate all ideas!

Step 7: Project Sources

http://www.circuitbasics.com/build-an-arduino-controlled-power-outlet/