top of page

SMART IRRIGATION USING IOT

The aim of this project is to create an automated smart irrigation model that can sense soil moisture and water it until it reaches the desired moisture level.

As opposed to conventional irrigation, an automated irrigation system not only saves time and money, but it also ensures that water supplies are used efficiently.

si exp: List

COMPONENTS

si exp: Services
arduino-uno-board-500x500.jpg

Arduino Uno

Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.

CONNECTION SCHEMATIC

ARDUINO UNO         SOIL SENSOR

5V                    to       Vcc

GND                to       GND

A0                    to       A0

ARDUINO UNO         ESP-8266 WIFI MODULE

pin 3                    to       TX

pin 4                    to       RX

3.3V                     to       VCC

3.3V                     to       CH_PD

GND                    to       GND

ARDUINO UNO         MOTOR DRIVER MODULE

pin 8                   to     A2

5V                       to    ENABLE A

GND                   to     V-

GND                   to     A1

MOTOR DRIVER           WATER PUMP

MA1                    to       +ve  (red)

MA2                    to       -ve   (black)

si exp: CV

As mentioned before, this project requires a motor driver as a motor requires 9V which a typical microcontroller cannot provide. The YL69 probe is fixed into the soil/pot and the values are read and transmitted to the microcontroller using the YL38 interface. Using these data as inputs, the microcontroller controls the motor all based on an "if condition". And this is done until the moisture content reaches the desired value.

​

PROGRAMMING LOGIC

pin A0 - used to read data from the sensor

pin 8 - to activate /deactivate the pump

pins 3,4 - transmitting and receiving pins of esp8266 module

The values are read from the sensor using analogRead( ) function and map function is used to convert these values for better readability.

As we've seen already, when the soil moisture is low, the sensor's raw data is high. Therefore, the raw data is mapped in reverse (i.e) map(value,0,1023,100,0).

Now, we activate the pump if the mapped value is below the threshold.

Now, these values are continuously transmitted to the ThingSpeak api via esp8266 WiFi module.   

si exp: Text
si exp: Image
smart irrigation code.png
si exp: Image
smart irrigatio thingspeak.png
si exp: Image
bottom of page