Introduction: AutoPlant - Automatic Plant Watering

Picture of AutoPlant - Automatic Plant Watering

AutoPlant 1.0, The Irrigation Machine.

There are some guides on how to make an Irrigation Machine, how ever most of them need a power outlet of 220v
for the pump to work.

I managed to find a 3-6v water pump on Ebay and made my own version.
There are some future development which I will add, well, in the future, like moisture settings, water level checker and more.

Now, however the AutoPlant do as folow :
1. When turned on once an hour the Arduino sends a pulse through a transmitter probe (screw) that is buried in the ground next to the plant.
2. Next to the transmitter probe buried the receiver probe which receive the pulse through the ground if it moist enough, the ground act like a resistor and by measuring the pulse the arduino knows the moist level.
3. According to the program settings, if the moisture is less then the program settings, the arduino turns on the water pump and add water until the program settings of the high moisture level is reached unless to much time is passed then it figures there must be no water in the reservoir and shuts down the pump until high moisture level is reached by manual watering and the whole process starts again.

Step 1: Parts List

Picture of Parts List

1 5v Arduino pro mini
2 220ohm reisistors
1 5v regulator
1 9v battery
1 3-6v water pump
2 long screws
1 breadboard
1 on/off switch
1 transistor

Step 2: Making the Probes

Picture of Making the Probes

Making the probes is quite easy, I've seen many around the internet, you could ether solder a long enough
cable to each of them or use these bolts as i did securing the cable in place by force.

You should bury them in the pot's ground about 1cm apart, make sure they do not touch each other.

Step 3: The Pump

Picture of The Pump

As i mentioned before, i used a 3-6v submersible pump which means i only need one pipe to go to the plant as the
pump itself sits inside the reservoir.

DO NOT connect the pump directly yo the arduino, never do that, you might burn it, I used a voltage regulator to downgrade from the battery 9v to 5v and turned the pump on/off using a transistor.

Also make sure there are no back current going back to the arduino by pulling down the current using a resistor to ground.

Step 4: The Circuitry

Picture of The Circuitry

Follow the diagram, the arduno's pins act as follow :
Pin 9 HIGH = pump on, LOW = pump off.
Pin 8 - Transmitter Probe
Pin A3 - Receiver Probe

Vcc - 5v (through the on/off switch)
GND - Ground (-)

Step 5: The Code

The void loop checks the probes every 60 minuts and if the ground is dry starts the waterOn function which turn the pump on until the high moist level is reached or 5 seconds pasts.
if moist level reached turns off pump and goes back to the void loop, if 5 second pasts and the level did not reached then turns off pump and blink error (pumpErr function) until moist level reched (manual watering)

NOTE : The serial communication commands were added for debugging reasons and can be dropped.

/*
The AutoPlant reads the humidity level through 2 probes, one sends 5V pulse through the ground (Digital Pin 8) the outher
reads the pulse from the ground (A3), the weter the ground the more pulse is transfered through it.
when the ground is dry the AutoPlant turns a 5V pump to add water to the plant (through Digital Pin 9)
*/
int probeVal;
#define wetnessLow 500
#define wetnessHigh 800
#define waterTime 5000
void setup() {
pinMode (13, OUTPUT); /* Led Indecator */
pinMode (9, OUTPUT); /* Pump on/off */
pinMode (8, OUTPUT); /* Probe Transmiter */
pinMode (A3, INPUT); /* Probe Reciver */
Serial.begin (9600);
}
void loop() {
Serial.println ("loop");
digitalWrite (8, HIGH);
probeVal = analogRead (A3);
digitalWrite (8, LOW);
if (probeVal <= wetnessLow) {
waterOn();
}
delay (60000);
}
void waterOn() {
Serial.println ("waterOn");
digitalWrite (13, HIGH);
digitalWrite (9, HIGH);
digitalWrite (8, HIGH);
long Time = (millis());
long pumpTime = millis();
/* Pump on, fills the water until probe reciver matches waternessHigh */
while (analogRead (A3) <=wetnessHigh) {
if (millis() == Time+700) {
digitalWrite (13, !digitalRead (13));
Time = millis();
}
/* If no matching of the waternessHigh until waterTime runs the pumpErr function */
if (millis() >= pumpTime + waterTime){
Serial.println ("iffff");
pumpErr() ;
}
}
digitalWrite (13, LOW);
digitalWrite (9, LOW);
digitalWrite (8, LOW);
}
void pumpErr() {
Serial.println ("pump Err");
digitalWrite (9, LOW);
while (analogRead (A3) <=wetnessHigh) {
digitalWrite (13, HIGH);
delay (200);
digitalWrite (13,LOW);
delay (200);
digitalWrite (13, HIGH);
delay (200);
digitalWrite (13,LOW);
delay (1000);
}
}

Comments

OmkarJ2 (author)2015-10-22

hi guys....

i need some help.. will b glad if sum1 helps me out...

ya actually i must let u know dat im in d 9th grade... n im working on a project based on arduino but im facing sum problms with my code....

my project is about the automatic irrigation system... one who is dealing wid arduino may find this out veryyy familiar but im trying to do sum thing different with it...

d basic thing is dat the moisture sensor checks the moisture level of the soil and if it finds it low than the required level... the submersible pump pumps d water and irrigates the plant

.... but wht im doing different is dat..... im going to connect an HC-05 module (bluetooth) and i want that my IRRIGATION SYSTEM AUTHENTICATES ONLY WHEN AN ANDROID DEVICE GETS CONNECTED TO IT....

and i want this output through an app called bluetooth terminal of an android device..

Automatic irrigation system..

Farm no.1

(having 24 plants)

System initialising....

Calculating soil moisture...

soil moisture=xyz

Alert!! Soil moisture is low.. // ( if or else needed )

Calculating temperature...

temperature=xyz

temperature favourable for irrigation.... // ( no need of using "if" or "else"... idea is to show the temperature.. thats all... )

Soil moisure is low.. plants need to be irrigated...

Irrigation system initialising..

watering...

..

.

irrigation done!!!!

NEW soil moisture=xyz

NEW temperature=xyz

// and after this a delay of 5 sec.. and the system starts again..

Automatic irrigation system..

Farm no.1

(having 24 plants)

System initialising....

Calculating soil moisture...

soil moisture=xyz

YUP!! the moisture level is good.. no need of watering...

Calculating temperature...

temperature=xyz

temperature favourable for irrigation....

but the moisture level is well off... no need of irrigation..

NEW soil moisture=xyz

NEW temperature=xyz

PLS someone help me out for code... i know that the superiors will no more than half an hr.. for it.....

pls send me the code on my email.. omkarj1422001@gmail.com

i hope that sum people wud even hv liked this idea... SO plssssss help me people..

CheezeM (author)OmkarJ22015-10-22

Head on over to http://www.amazon.com/gp/product/087779930X?keywords=dictionary&qid=1445532323&ref_=sr_1_1&sr=8-1 and that should help you out a lot!

djames28 (author)2015-09-02

you should connect up a sola panel :)

kwetiaw (author)2015-02-07

care to show a video of it in action? how long the 9v battery lasted?

udubinsky (author)kwetiaw2015-02-08

The battery did not hold long enough so i changed it with a transformer, it held about a day

Akin Yildiz (author)2014-12-20

once again, wow just genious. i really like your posts... you should check out my work ! thank you very much for sharing

About This Instructable

6,060views

97favorites

License:

Add instructable to: