Irrigation System

This relatively simple system keeps track of the moisture in the soil and activates up to eight valves for watering plants when necessary.

Jun 30, 2021

5738 views

2 respects

Components and supplies

1

BTF-LIGHTING 5 Pin Electrical Connector 24AWG IP65 Male Female Connector 7.87in/20cm Extension Cable for Car

1

1/4" DC 12V Solenoid Valve N/C Normally Closed Water Inlet Flow Switch

1

12V Power Supply - RXZ12V2A-A

1

URATOT 60 Pieces 360 Degree Adjustable Irrigation Drippers with Barbed Connector

1

Kalolary irrigation fittings

1

Raindrip 016010T 1/4-Inch by 100-Feet Black Tubing

1

Favordrory 6 Pieces 304 Stainless Steel 3mm x 300mm Model Straight Metal Round Shaft Rods

1

Arduino Nano R3

1

3D Printer Heatsink Kit + Thermal Conductive Adhesive Tape, Cooler Heat Sink Cooling TMC2130 TMC2100 A4988 DRV8825 TMC2208 Stepper Motor Driver Module (22pcs)

1

22AWG 2 Conductor Wire, 20M/65.6ft Flexible Black PVC Jacketed Hookup Wire

1

22 Gauge 2 Conductor Electrical Wire, 20M/65.6ft Flexible Black PVC Jacketed Hookup Wire, 22 AWG Tinned Copper Extension Cord

1

Irwin Hanson 6-32NC Self-Aligning Die

1

Ogrmar ABS Plastic Dustproof Waterproof IP65 Junction Box Universal Durable Electrical Project Enclosure With Lock (8.6"x6.7"x4.3")

1

DZS Elec 2-Pack 5V 4-Channel Relay Module with Optocoupler Active Low Level Amplifier Trigger JD-VCC Relay Power VCC Power

1

Raindrip R325C 3/4-Inch Hose Thread Swivel to 1/4-Inch Tubing Adaptor

1

10pcs NRF24L01+ 2.4GHz Wireless RF Transceiver Module

1

Arduino Mega 2560

1

HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel 240X320 with PCB 5V/3.3V STM32

4

Lantee PG 9 Cable Gland

1

MAKERELE waterproof outdoor enclosure

Tools and machines

1

Soldering iron (generic)

1

3D Printer (generic)

Project description

Code

Nano Irrigation_System2.96.ino

c_cpp

HA Lovelace File (Nano System)

yaml

Template Sensors (Nano System)

yaml

HA Automation File (Nano)

yaml

Template Sensors (Nano System)

yaml

(obsolete)

c_cpp

HA Template Sensors (Nano System)

yaml

These template sensors were created to convert raw analog input data into moisture percent. For this system, there is no temperature compensation. Even so, the system will still do a good job of keeping plants watered.

(obsolete)

c_cpp

HA Lovelace File (Nano System)

yaml

MEGA Irrigation_System_w_Display_1.3_w_Mysensors_w_Drive_Board2.30.ino

c_cpp

I've added a precomiler #define called MY_MYSENSORS. If this line of code is defined, then MySensors will be compiled with the code. If not, MySensors will be left out and the system will compile with the display functionality, but without the MySensors interface to your home automation system.

Nano Irrigation_System2.96.ino

c_cpp

MEGA Irrigaton System with Display 1.3 (obsolete)

c_cpp

HA Customize File (Nano System)

yaml

(obsolete)

c_cpp

HA Python Scripts (Nano System)

yaml

Dallas_Sensor_Address_Display_Routine.ino

c_cpp

This program is used to get the addresses of the Dallas temperature sensors you will use in this project and to test their operation. The code is a modification of one of the examples provided on Github for the DallasTemperature.h library.

(obsolete)

c_cpp

Dallas_Sensor_Address_Display_Routine.ino

c_cpp

This program is used to get the addresses of the Dallas temperature sensors you will use in this project and to test their operation. The code is a modification of one of the examples provided on Github for the DallasTemperature.h library.

HA Python Scripts (Nano System)

yaml

MEGA Irrigaton System with Display 1.3 (obsolete)

c_cpp

HA Automation File (Nano)

yaml

HA Customize File (Nano System)

yaml

HA Template Sensors (Nano System)

yaml

These template sensors were created to convert raw analog input data into moisture percent. For this system, there is no temperature compensation. Even so, the system will still do a good job of keeping plants watered.

MEGA Irrigation_System_w_Display_1.3_w_Mysensors_w_Drive_Board2.30.ino

c_cpp

I've added a precomiler #define called MY_MYSENSORS. If this line of code is defined, then MySensors will be compiled with the code. If not, MySensors will be left out and the system will compile with the display functionality, but without the MySensors interface to your home automation system.

(obsolete)

c_cpp

Downloadable files

Arduino Nano Circuit Board

This board does not include temperature sensors and is good for up to 8 valves. (I have been running six valves for a month without issues). The Nano is challenged with very little RAM headroom at 8 valves, but works great at 6 valves.

Arduino Nano Circuit Board

MEGA Driver Board 2.58

This driver board will stack on an Arduino MEGA and drive 9 valves. This updated version includes LEDs on each of the drive transistor outputs.

MEGA Driver Board 2.58

MEGA Irrigaton System with Display 2.63

This spin provides the capability of adding a display and adding an NRF24 radio to interface with MySensors and a home automation system. There is flexibility in it's implementation. You can run the system without the NRFradio using the software for that purpose. The board can be assembled without the components for the radio - a connector, capacitor, LED , resistor and the radio. Of course, you must use the software sans MySensors. If you install the radio, then you can use the software with the MySensors interface. In my case, this allows communication with Home Assistant. This board provides the following interfaces: MySensors NRF24 Radio HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel Backlight control Moisture Sensor Interface Dallas Temp Sensor Interface Valve Control through PORTA

MEGA Irrigaton System with Display 2.63

Arduino Nano Circuit Board

This board does not include temperature sensors and is good for up to 8 valves. (I have been running six valves for a month without issues). The Nano is challenged with very little RAM headroom at 8 valves, but works great at 6 valves.

Arduino Nano Circuit Board

Nano Irrigation Board with Temperature Sensors

This board includes inputs for Dallas Semiconductor Temperature Sensors. My code hasn't been fully tested. I am upgrading to an Arduino MEGA which will incorporate the temperature sensors. I found the program and memory space of the Nano too limiting for over four valves.. You many have better luck.

Nano Irrigation Board with Temperature Sensors

MEGA Irrigaton System with Display 2.63

This spin provides the capability of adding a display and adding an NRF24 radio to interface with MySensors and a home automation system. There is flexibility in it's implementation. You can run the system without the NRFradio using the software for that purpose. The board can be assembled without the components for the radio - a connector, capacitor, LED , resistor and the radio. Of course, you must use the software sans MySensors. If you install the radio, then you can use the software with the MySensors interface. In my case, this allows communication with Home Assistant. This board provides the following interfaces: MySensors NRF24 Radio HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel Backlight control Moisture Sensor Interface Dallas Temp Sensor Interface Valve Control through PORTA

MEGA Irrigaton System with Display 2.63

Arduino Nano Circuit Board

System Controller good for up to 8 valves. The Nano is challenged with very little RAM headroom at 8 valves, but works great at 6 valves.

Arduino Nano Circuit Board

Arduino Nano Circuit Board

This board does not include temperature sensors and is good for up to 8 valves. (I have been running six valves for a month without issues). The Nano is challenged with very little RAM headroom at 8 valves, but works great at 6 valves.

Arduino Nano Circuit Board

Nano Irrigation Board with Temperature Sensors

This board includes inputs for Dallas Semiconductor Temperature Sensors. My code hasn't been fully tested. I am upgrading to an Arduino MEGA which will incorporate the temperature sensors. I found the program and memory space of the Nano too limiting for over four valves.. You many have better luck.

Nano Irrigation Board with Temperature Sensors

MEGA Driver Board 2.58

This driver board will stack on an Arduino MEGA and drive 9 valves. This updated version includes LEDs on each of the drive transistor outputs.

MEGA Driver Board 2.58

Documentation

Sensor Support

This is the part that holds the 3mm rods used as the electrodes for the moisture sensor and the Dallas Temperature Sensor.

Sensor Support

Watering Valve Enclosure

This enclosure will house three valves.

Watering Valve Enclosure

System Shutoff Valve Enclosure

System Shutoff Valve Enclosure

Watering Valve Enclosure Cover

It's a cover to keep the valves as dry as possible. The holes for the tubing in the side of the enclosure are fairly tight, so it should be possible to at least keep insects out.

Watering Valve Enclosure Cover

MEGA Electronics Support Plate

This plate attaches to the bottom of the waterproof enclosure and supports the 12Volt power supply and the MEGA stack.

MEGA Electronics Support Plate

Watering Valve Enclosure

This enclosure will house three valves.

Watering Valve Enclosure

Nano Electronics Support Plate

This plate holds the power supply and the Arduino board. It has holds for mounting in the specified waterproof enclosure.

Nano Electronics Support Plate

Display Support Post

This is used to hold the display above the sensor board.

Display Support Post

Sensor Support

This is the part that holds the 3mm rods used as the electrodes for the moisture sensor and the Dallas Temperature Sensor.

Sensor Support

Shutoff Valve Enclosure Cover

Shutoff Valve Enclosure Cover

Display Support Post

This is used to hold the display above the sensor board.

Display Support Post

Shutoff Valve Enclosure Cover

Shutoff Valve Enclosure Cover

Nano Electronics Support Plate

This plate holds the power supply and the Arduino board. It has holds for mounting in the specified waterproof enclosure.

Nano Electronics Support Plate

MEGA Electronics Support Plate

This plate attaches to the bottom of the waterproof enclosure and supports the 12Volt power supply and the MEGA stack.

MEGA Electronics Support Plate

System Shutoff Valve Enclosure

System Shutoff Valve Enclosure

Watering Valve Enclosure Cover

It's a cover to keep the valves as dry as possible. The holes for the tubing in the side of the enclosure are fairly tight, so it should be possible to at least keep insects out.

Watering Valve Enclosure Cover

Comments

Only logged in users can leave comments

Anonymous user

2 years ago

Can you please suggest me the solenoid valve to be used and where can I get it from. TIA.

zavracky

2 years ago

Thanks for your comment. Soooo sorry for missing the valves in my parts list. I bought the valves from Amazon. Search for these: DIGITEN DC 12V 1/4" Inlet Feed Water Solenoid Valve Quick Connect N/C normally Closed They're a plastic valve housing with a solenoid on top. They work great. Paul

zavracky

3 years ago

Oops. Just found a wiring error on the mega driver board rev1.1. The Shutoff Valve is connected to pin 48, which is the pin used by the mega_irrigation board for the display CS. This had a surprisingly minor effect on the operation of the system. I cut this line on the driver board and re-routed to pin49. This change has to be reflected in the code by changing SHUTOFF_VALVE from 48 to 49. I will post a modification to the driver board. I've also upgraded the driver board by adding LEDs to the driver outputs. This makes trouble shooting much easier. Also, I added two 74LS157s (smd versions) so that the board is configurable to work with either port A or Port C. This readies the system for upgrading to 16 valves. I will post a new mega irrigation system board to use the second group of 8 analog inputs from the Arduino Mega sometime in the future ( it's a minor change). Software will also need to be upgraded. I've built a second system using the rev 2.6 mega irrigation board and the rev 1.1 driver board so that I can test the system without the MySensors interface. So far it's working great. I think it could use some tweaking to upgrade the touch response time. It's currently usable, but could be better. Since I didn't use interrupts to measure the flow, there's a built in I second delay each time the flow routine is accessed. This is not an issue for the Home Assistant Implementation.

Anonymous user

4 years ago

Can you please suggest me the solenoid valve to be used and where can I get it from. TIA.

zavracky

2 years ago

Thanks for your comment. Soooo sorry for missing the valves in my parts list. I bought the valves from Amazon. Search for these: DIGITEN DC 12V 1/4" Inlet Feed Water Solenoid Valve Quick Connect N/C normally Closed They're a plastic valve housing with a solenoid on top. They work great. Paul