Automatic Irrigation System

by mayankmpk008 in Circuits > Arduino

556 Views, 2 Favorites, 0 Comments

Automatic Irrigation System

WhatsApp Image 2021-04-26 at 7.33.10 PM.png

In this project, I will be showing you how to create an automated watering system. you can use the general principle for pretty much everything and everywhere. The system uses an Arduino and sensors to water your plants at the correct time.

Supplies

Arduino Uno

Arduino Uno shield

Breadboard Jumper Wires

relay

humidity and temperature sensor

Capacitive soil moisture sensor

photoresistor sensor

10k resistor

solenoid valve/water pump

12v 2amp adapter

Relay

download.jpg

the relay module that I would recommend is a dual-channel relay if you are only using a water pump/solenoid valve. if you are using more pumps/valves you need more relays.

Wiring to Arduino

Dual-channel- gnd-GND, IN1-digital pin-2, IN2-digital pin-3,vcc-5v

Wiring to water-pump

Dual-channel

IN1-NO-pump Positive1, COMMON-positive power

IN2-NO-pump Positive2, COMMON-positive power

(connect the negative terminal to negative power, scale this if you are using more pumps)

code=https://www.mediafire.com/file/0u2vbi68ju4z602/dual-channel_relay.zip/file

LDR Sensor

ldr.PNG

you a photoresistor sensor and a 10k resistor to make an LDR(light dependent resistors)

Connect one pin of the photoresistor sensor to 5v of the Arduino, connect the other pin of the photoresistor sensor to one pin of the resistor and connect it to analog 0, connect the other pin of the resistor to gnd

Testing the resistor

after building the circuit test the sensor, put the sensor at night outside to record the value, note the value down

code=https://www.mediafire.com/file/aqtwpj32l2bo6mn/light%252Bdependent%252Bresistors_%25282%2529.zip/file

Humidity and Temperature Sensor

DHT11-Pinout-for-Three-Pin-and-Four-Pin-Types-004a2-600x411.jpg

Arduino connection

GND-GND

VCC-5v

Data-analog 1

Testing the sensor

you need to download DHT library =http://www.mediafire.com/folder/hl6ynj8xj6ovxn5,hb0y4bkvucetqa6,oajv76wrl7r9jw7/shared

code=https://www.mediafire.com/file/vojy7rsoldxh9cs/humidity_and_temp.zip/file

Moisture Sensor

images.jpg

GND-GND

VCC-5v

Data-analog 2

insert the sensor into the soil till the line is at level with the soil

test the code

open the serial monitor and leave the sensor in the air the value should be 0% and submerge it in water and the value should be about 99%

code=https://www.mediafire.com/file/8bhihbvxryg385j/soil_moisture_sensor.zip/file

Watering System

WhatsApp Image 2021-04-26 at 7.33.10 PM.png
u.JPG

Pump

if you are going to use a pump get a container big enough to water the plants for some time, submerge the pump, and connect the wires to the relay and the output to the plants

Solenoid valve

if you are going to use a valve get a water bottle and make a hole in the cap and one on the bottom connect the valve to the cap using pipes, connect the wires to the relay and the output to the plants

Arduino and Shield

51477Hl0INL.jpg

everything should be connected to the shield because Arduino doesn't have 5 Vcc and GND pins

Code

download the code

before running it you need the measure the light level at night where your plants are going to and in the code the is a "?" change to the value of the sensor at night

and double-check the connection to the Arduino according to the code

code=https://www.mediafire.com/file/477ecbe7uvlrkwq/main_code.zip/file