33% found this document useful (3 votes)
9K views

Iot Mini Project Main

This document describes a soil moisture monitoring system project using an Arduino Uno microcontroller and an FC-28 soil moisture sensor. The objectives are to measure soil moisture levels, provide output in both analog and digital modes, and help farmers determine optimal watering needs. The system uses an Arduino IDE to program the Arduino Uno, which is connected to the soil moisture sensor. The sensor measures moisture levels and provides analog or digital output to the Arduino. This data can help farmers monitor soil conditions and irrigation requirements.

Uploaded by

Nikesh niki
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
33% found this document useful (3 votes)
9K views

Iot Mini Project Main

This document describes a soil moisture monitoring system project using an Arduino Uno microcontroller and an FC-28 soil moisture sensor. The objectives are to measure soil moisture levels, provide output in both analog and digital modes, and help farmers determine optimal watering needs. The system uses an Arduino IDE to program the Arduino Uno, which is connected to the soil moisture sensor. The sensor measures moisture levels and provides analog or digital output to the Arduino. This data can help farmers monitor soil conditions and irrigation requirements.

Uploaded by

Nikesh niki
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

COIMBATORE INSTITUTE OF TECHNOLOGY

(A Government Aided Autonomous Institution affiliated to Anna University)

INTERNET OF THINGS
MINI PROJECT
SOIL MOISTURE MONITORING SYSTEM
AN APPLICATION OF SMART FARMING

SUBMITTED TO:
DR.NK.KARTHIKEYAN,

HOD, IT DEPARTMENT,

COIMBATORE INSTITUTE OF TECHNOLOGY.

SUBMITTED BY:
INDHUMADHI - 1807022

NAVEEN KUMAR - 1807035

NIKESH - 1807038

PRABAKARAN - 1807041

VISHNU AADITHIYA - 1807057

1
TABLE OF CONENT
1. ABSTRACT ……………………………………………. 3
2. OBJECTIVE ……………………………………………. 3
3. INTRODUCTION ……………………………………… 4
4. HARDWARE COMPONENTS………………………… 5
I. ARDUINO UNO
II. SOIL MOISTURE SENSOR FC-28
5. SOFTWARE ……………………………………………. 7
I. ARDUINO IDE
6. DESCRIPTION …………………………………………. 8
I. BLOCK DIAGRAM
II. WORKING OF SENSOR
III. FLOW CHART
IV. ANALOG MODE
V. DIGITAL MODE
7. IMPLEMENTATION …………………………………… 13
8. CONCLUSION ………………………………………….. 19
9. REFERENCES …………………………………………... 19

2
1. Abstract
Persistent increase in population of world is demanding more and more supply of food. Hence
there is a significant need of advancement in cultivation to meet up the future food needs. The
Internet of Things (IoT) is converting the agriculture industry and solving the immense problems
are the major challenges faced by the farmers today in the field. India is one of the 13th countries
in the world having scarcity of water resources. Due to ever increasing of world population, we
are facing difficulties in the shortage of water resources, limited availability of land, difficult to
manage the costs while meeting the demands of increasing consumption needs of a global
population that is expected to grow by 70% by the year 2050. The influence of population
growth on agriculture leads to a miserable impact on the farmers livelihood. To overcome the
problems it is important to know moisture levels in soil to maximize the output hence we design
a low cost system for monitoring the agriculture farm which continuously measure the level of
soil moisture of the plants. In this paper we are going to interface a Soil moisture sensor FC-28
with Arduino. This sensor measures the volumetric content of water inside the soil and gives us
the moisture level as output. The sensor is equipped with both analog and digital output, so it can
be used in both analog and digital mode. In this paper, we are going to interface the sensor in
both modes. This sensor is tested with several samples of soil and able to meet considerable
accuracy. Measuring soil moisture is an effective way to determine condition of soil and get
information about the quantity of water that need to be supplied for cultivation.

2. Objective
➢ To measures the volumetric content of water inside the soil.

➢ To provide the moisture level as output .

➢ We aim to provide output in both analog and digital mode using sensor.

➢ To determine condition of soil and get information about the quantity of water that need
to be supplied for cultivation.

3
3. Introduction
Food production takes up almost half of the planets land surface. About 40% of the earths land is
now given over to agriculture, and it consumes 85% of available fresh water. Due to
globalization and population growth this figure of water conservation has been increasing every
year. So it became a major challenge to every nation for reducing the farm water consumption.
For better irrigation system, it is very crucial to measure the soil moisture for agriculture
application, so that it will help farmers to manage their farm land more effectively.

IOT is the technology that enhance the Internet connectivity from digital devices to physical
objects and establishes communication between them. The data collected are stored and managed
at the cloud as well as shared between person to person, machine to machine, or person to
machine. The invent of IoT would discover the new ways that put full potential of agriculture
yield and mitigate the challenges that hinders the growth of crops. With the IOT, the monitoring
of weather forecast, soil temperature and humidity, soil moisture level, remote water valves, pest
control could be connected and information gathered from the sensors is exchanged to the
farmers via mobile phones. Soil moisture is an important component on a small agriculture scale
as well as large agriculture scale modeling. Vegetation and crops mainly depends on the root
level of moisture present in the soil. Knowledge of degree of soil wetness helps farmers to
understand the condition of field and accordingly they react on it. Soil moisture determines the
measure of soil water content which defines its expression in terms of mass or volume of water
content of the soil.

On the basis of mass, soil water content is expressed in the gravimetric soil moisture content θg
is given by:

θg = Mwater/Msoil,

where Mwater is the mass of the water in the soil, and Msoil is the mass of the dry soil present in
the field.

The volumetric soil moisture content of a soil θv, is defined by:

θv = V water/V sample,

where Vwater is the volume of water content in the soil and Vsample is the total volume of dry
soil +water+ air present in the sample of field.

Both the values θg and θv are usually expressed in percent. The relationship between the
gravimetric soil moisture content and volumetric soil moisture content is:

θv = θg(ρb/ρw),

where ρb is the dry soil bulk density and ρw is the soil water density.

4
4. HARDWARE COMPONENTS
1. Arduino UNO
2. Soil Moisture Sensor FC-28

I. Arduino UNO
It is a microcontroller board developed by Arduino.cc and based on Atmega328.Electronic
devices are becoming compact, flexible and cheap that are capable of doing more function as
compared to their predecessors that happened to cover more space, turned out costly with the
ability to perform fewer functions. It is an open-source platform, means the boards and software
are readily available and anyone can modify and optimize the boards for better functionality.
The microcontroller was introduced in the electronics industry with the purpose of making our
tasks easy that come with even a remote connection with automation in any way.
Microcontrollers are widely used in embedded systems and make devices work according to our
needs and requirements. We have already discussed the controllers like 8051, Atmega16,
Atmega328 and PIC16F877.Arduino Uno is a very valuable addition in the electronics that
consists of USB interface, 14 digital I/O pins, 6 analog pins, and Atmega328 microcontroller. It
also supports serial communication using Tx and Rx pins.

5
II. Soil Moisture Sensor FC-28
The FC28 Soil Moisture Sensor is a simple breakout for measuring the moisture in soil and similar
materials. The soil moisture sensor is pretty straight forward to use. The two large exposed pads
function as probes for the sensor, together acting as a variable resistor. The more water that is in
the soil means the better the conductivity between the pads will be and will result in a lower
resistance, and a higher SIG out. To get the FC28 Soil Moisture Sensor functioning all you will
need is to connect the VCC and GND pins to your Microcontroller based device and you will
receive a SIG out which will depend on the amount of water in the soil. One commonly known
issue with soil moisture sensors is their short lifespan when exposed to a moist environment.

SPECIFICATION

Input Voltage 3.3 – 5V

Output Voltage 0 – 4.2V


Input Current 35mA

Output Signal Both Analog and Digital

INTERFACE DESCRIPTION (4-wire)

VCC : 3.3V-5V
GND : GND
DO : digital output interface (0 and 1)
AO : analog output interface

6
5. SOFTWARE

I. Arduino IDE
The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a
text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them. It can be programmed using C and C++ language.

Programs written using Arduino Software (IDE) are called sketches. These sketches are
written in the text editor and are saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while saving
and exporting and also displays errors. The console displays text output by the Arduino
Software (IDE), including complete error messages and other information. The bottom
righthand corner of the window displays the configured board and serial port. The toolbar
buttons allow you to verify and upload programs, create, open, and save sketches, and open the
serial monitor.

The Arduino IDE supplies a software library from the Wiring project, which provides many
common input and output procedures. User-written code only requires two basic functions, for
starting the sketch and the main program loop, that are compiled and linked with a program
stub main() into an executable cyclic executive program with the GNU toolchain, also included
with the IDE distribution.[6] The Arduino IDE employs the program avrdude to convert the
executable code into a text file in hexadecimal encoding that is loaded into the Arduino board by
a loader program in the board's firmware. [7] By default, avrdude is used as the uploading tool to
flash the user code onto official Arduino boards.

7
6. DESCRIPTION

I. BLOCK DIAGRAM
There are two functional components in this project. They are the moisture sensors module and
the motor driver for motor pump. Thus the Arduino Board is programmed using the Arduino IDE
software. The function of the moisture sensor is to sense the temperature content present in the
soil, and also it measure moisture level in the soil. The motor driver interrupts the signal to,
water pump supplies water to the plants. This project uses microcontroller Arduino Uno board to
controls the motor and monitor soil moisture. Follow the schematic to connect the Arduino to the
motor driver, and the driver to the water pump. The motor can be driven by a 5 volt battery, we
can also supplies power from external source or from Arduino board. The Arduino Board is
programmed using the Arduino IDE software

8
II. WORKING OF SENSOR

The working of the Soil Moisture Sensor is very simple. It works on the principle of voltage
comparison. The following circuit will be helpful in understanding the working of a typical soil
moisture sensor.

As you can see, one input of the comparator is connected to a 10KΩ Potentiometer while the
other input is connected to a voltage divider network formed by a 10KΩ Resistor and the Soil
Moisture Probe.

Based on the amount of water in the soil, the conductivity in the probe varies. If the water
content is less, the conductivity through the probe is also less and hence the input to the
comparator will be high. This means that the output of the comparator is HIGH and as a result,
the LED will be OFF.

Similarly, when there is adequate water, the conductivity of the probe increases and the output of
the comparator becomes LOW. The LED then starts glowing.

9
III. FLOW CHART

10
IV. Analog Mode – Interfacing Soil Moisture Sensor and Arduino

To connect the sensor in the analog mode, we will need to use the analog output of the sensor.
When taking the analog output from the soil moisture sensor FC-28, the sensor gives us the value
from 0-1023. The moisture is measured in percentage, so we will map these values from 0 -100
and then we will show these values on the serial monitor.

CIRCUIT DIAGRAM

CONNECTION

The connections for connecting the soil moisture sensor FC-28 to the Arduino are as follows.

 VCC of FC-28 to 5V of Arduino


 GND of FC-28 to GND of Arduino
 A0 of FC-28 to A0 of Arduino

This can be represented as moisture value in terms of percentage using formula given below.

Moisture in percentage = 100 – (Analog output * 100)

11
V. Digital Mode – Interfacing Arduino and Soil Moisture Sensor

To connect the soil moisture sensor FC-28 in the digital mode, we will connect the digital output
of the sensor to the digital pin of the Arduino. The Sensor module contains a potentiometer with
it, which is used to set the threshold value. This threshold value is then compared with the sensor
output value using the LM393 comparator which is placed on the sensor module.

The LM393 comparator will compare the sensor output value and the threshold value and then
gives us the output through the digital pin. When the sensor value will be greater than the
threshold value, then the digital pin will give us 5V and the LED on the sensor will light up and
when the sensor value will be less than this threshold value, then the digital pin will give us 0V
and the light will go down.

CIRCUIT DIAGRAM

CONNECTION

The connections for connecting the soil moisture sensor FC-28 to the Arduino in digital mode
are as follows.

 VCC of FC-28 to 5V of Arduino


 GND of FC-28 to GND of Arduino
 D0 of FC-28 to pin 12 of Arduino
 LED positive to pin 13 of Arduino
 LED negative to GND of Arduino

12
7. IMPLELMENTATION

MODEL SETUP

 Arduino is connected to PC via USB cable and connections between arduino and soil
moisture sensor is given as per the circuit diagram .

13
DIGITAL MODE
Digital Code

int led_pin =13;

int sensor_pin =8;

void setup() {

pinMode(led_pin, OUTPUT);

pinMode(sensor_pin, INPUT);

void loop() {

if(digitalRead(sensor_pin) == HIGH){

digitalWrite(led_pin, HIGH);

} else {

digitalWrite(led_pin, LOW);

delay(1000);

14
OUTCOMES
CASE 1: SOIL WITH NO MOISTURE CONTENT
 When soil moisture sensor is dipped into dry soil with no moisture content, the output LED
of interfacing sensor is not glowing only the Power LED of interfacing sensor is glowing.

CASE 2: SOIL WITH MOISTURE CONTENT


 When soil moisture sensor is dipped into soil with moisture content, both output LED of
interfacing sensor and Power LED of interfacing sensor is glowing.

15
ANALOG MODE
Analog Code

int sensor_pin = A0;

int output_value ;

void setup() {

Serial.begin(9600);

Serial.println("Reading From the Sensor ...");

delay(2000);

void loop() {

output_value= analogRead(sensor_pin);

output_value = map(output_value,550,0,0,100);

Serial.print("Mositure : ");

Serial.print(output_value);

Serial.println("%");

delay(1000);

16
OUTCOMES
CASE 1: SOIL WITH NO MOISTURE CONTENT
 When soil moisture sensor is dipped into dry soil with no moisture content, the output LED
of interfacing sensor is not glowing only the Power LED of interfacing sensor is glowing.
 The moisture level is shown as negative percentage as there is no moisture in the soil.

SERIAL MONITOR VALUES:

17
CASE 2: SOIL WITH MOISTURE CONTENT
 When soil moisture sensor is dipped into soil with moisture content, both output LED of
interfacing sensor and Power LED of interfacing sensor is glowing.
 The moisture level is shown as positive percentage as there is moisture content in the soil.

SERIAL MONITOR VALUES:

18
8. CONCLUSION
Farmers have started to realize that the IoT is a driving force for increasing agricultural
production in a cost-effective way. It solve the problem of lack of agriculture labour through
automation. The system is to monitor the soil moisture using Arduino microcontroller. The
future of agriculture mostly depend on IOT technology. IOT based technology ensures the
efficient use of natural resources in the fiels of agriculture. It supports new technology and helps
to get good yield of agricultural products. The development of the agriculture sector will always
be a priority especially given the dynamics of the world today. Therefore, using IoT in
agriculture has a big promising future as a driving force of efficiency, sustainability, and
scalability in this industry.

9. REFERENCES

[1] Sanjukumar, R.V.Krishnaiah “ Advance Technique for Soil Moisture


Content Based Automatic Motor Pumping for Agriculture Land

[2] Khaled Reza, S.M., Shah Ahsanuzzaman Md. Tariq, S.M. Mohsin
Reza (2010), ‘Microcontroller Based Automated Water Level
Science, pp 220-224.

[3] https://www.circuitstoday.com/arduino-soil-moisture-sensor

[4] https://www.electronicwings.com/arduino/soil-moisture-sensor-
interfacing-with-arduino-uno

19

You might also like