Introduction: Simple, Scalable Raspberry Pi Garden Irrogation

Picture of Simple, Scalable Raspberry Pi Garden Irrogation

This is one of the projects I'm currently working on. The idea behind the project is to build a simple yet scalable and eficiant garden irrogation, using as little resources as posible.

The end product will be a IOT garden project, but I'll update you as i go.

Step 1: List of Parts

Picture of List of Parts

1 x Raspberry Pi with raspbian installed

1 x Drip irrigation kit

n x Relays

n x Moisture sensors for Arduino, we will use thair digital output.

n x Solanoid valves or water pumps

*n x - If you use more valve/sensor pairs your irrigation will be more eficiant.

Step 2: The Python Code and GPIO

Picture of The Python Code and GPIO

Read the code, it's simple and short.

Change GPIO pins or just add more if you need.

# Set up GPIO pins:


sensorPow = 18


# Schedule irrigation function to be run on every day 7 and 22 o'clock, you cen edit or add more times but keep in mind that the more you reed the sensor, the faster it will oxidate.

sched.add_job(irrigation, 'cron', hour='7,21')

Raspberry has no Real Time Clock so it has to be connected to the internet to keep track of time in this case.

Step 3: Connecting It All

Picture of Connecting It All

Here are a few notes on connecting the project:

1. Do not put the sensor to near to the irrigation nozzle.

2. Be careful around the highvoltage AC and isolate the relays from the rest of the project.

3. Becouse Raspberry has no analog inputs you can use digital output pin (DO) on sensors controller. The controller has a neat treshold regulator and labeled on the image.

Other options include analog/digital converters and arduino/avr microcontrollers, but i won't use them this time.


RobertS23 (author)2015-07-02

Nice and simple :)

Mind you, take a look at the code. It seems you are powering down sensors after the 1st one finishes, and IMO, that is not what you wanted to do.

The line 34:

GPIO.output(sensorPow, 0) #sensor power down

should be outside of the for loop to power down the sensors after all the readouts (and pumping) has finished.

Tkdwn (author)RobertS232015-07-02

Tnx, I'll give the code a revision!

About This Instructable




Bio: Electronics geek, Openwrt, Linux, hardware hacker, maker, SF fan.
More by Tkdwn:Make  bouncing Deathstars with 3D printing and homemade sugru!#labOS hacklabSoda bubble saver
Add instructable to: