Simple, Scalable Raspberry Pi Garden Irrogation

13,864

98

3

Introduction: Simple, Scalable Raspberry Pi Garden Irrogation

About: Electronics geek, Openwrt, Linux, hardware hacker, maker, SF fan.

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

https://github.com/VBranimir/GardenPIO/blob/master/gardenpio.py

Read the code, it's simple and short.

Change GPIO pins or just add more if you need.

# Set up GPIO pins:

sensor=[27,22,23]

sensorPow = 18

pump=[17,24,25]

# 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

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.

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    3 Discussions

    0
    RB51
    RB51

    Question 1 year ago on Introduction

    Is there a schematic for the circuit?

    0
    RobertS23
    RobertS23

    4 years ago on Introduction

    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.

    0
    Tkdwn
    Tkdwn

    Reply 4 years ago on Introduction

    Tnx, I'll give the code a revision!