Smart Irrigation
Smart Irrigation
The working of the soil moisture sensor is very easy to understand. It has 2 probes with exposed
contacts that act like a variable resistor whose resistance varies according to the water content
in the soil. This resistance is inversely proportional to the soil moisture which means that higher
water in the soil means better conductivity and hence a lower resistance. While the lower water
in the soil means poor conductivity and will result in higher resistance. The sensor produces an
analog voltage output according to the resistance.
The sensor comes with an electronic module that connects the probe to the Arduino. The module
has an LM393 High Precision Comparator which converts the analog signal to a Digital
Output which is fed to the microcontroller. We have covered an in-depth Arduino soil moisture
sensor tutorial which covers the working of soil moisture sensor module and how to use it with
the Arduino. You can check the tutorial if you want to learn more about the soil moisture sensor.
Pump
We need a small pump to irrigate the plant, but in the case of a garden, we need to drive a larger
pump that can provide a higher volume of water depending on the size of your garden which
can’t be directly powered by an Arduino. So in case you need to operate a larger pump, a driver
is necessary to provide enough current for the pump, to show that I am using a 5v relay. You can
also use an AC-powered pump and use a suitable relay. The working will remain the same as
shown in this project, you just have to replace the DC power input connected to the relay with an
AC power input and have to power your Arduino with a separate DC power source.
RELAY
The relay module ensures proper irrigation of the field turning it on when the value of moisture
is below the threshold value and turns off the supply when the moisture content is sufficient for
the crop or plant thereby preventing under irrigation or over irrigation.
Arduino * 1
moisture sensor * 1
5v relay module * 1
6v Mini water pump with small pipe * 1
Connecting wires
5v battery * 1
In this section, I will explain all the details with the help of the schematic diagram. The Arduino
UNO is the brain of this whole project. It controls the motor pump according to the moisture in
the soil which is given by the moisture sensor.
To power the circuit, I am using an external Battery. You can use any 9v or 12-volt battery. The
battery is connected to the Vin and ground pins of Arduino and we can also connect the motor to
this battery via a relay. Moisture sensor output is connected to the analog pin of Arduino. Do
remember to use the Arduino’s 5volt pin to power the sensor and relay module.
The next step is to connect the soil moisture sensor with the Arduino. Connect the VCC and gnd
of the sensor to the 5volt and ground pin of the Arduino. The analogue output of the sensor
connects to any analogue pin of the Arduino, here I’ve connected it to pin A0 (according to our
program).
Finally, connect the pump to the relay module. A relay module has 3 connection points which are
common, normally closed, and normally open. We have to connect the pump positive to
common and connect the normally open pin to the positive of the battery. You have to select the
battery as per your pump. The next step is to connect the ground of the pump to the ground of the
Arduino and finally, connect the small hose to the water pump.