Agricultural lands are subjected to various kinds of dangers and threats natural disasters like flood,
heavy rainfall etc causes loss of crops and in certain cases loss of human life is inflicted upon. The
vast majority of land structure in Nepal is agricultural and is heavily affected by vandalism caused
by wild animals. The news of wild elephants rampage in Eastern Nepal is an incident which is
heard from years to years. This wild animals and their rampage can be stopped if proper detection
and protection system are used against them. The crops and paddy fields cannot always be fenced.
The possibility of crops being eaten by cows and crows are pretty much persistent. This leads to
huge loss of crops. So in order to prevent this course of actions a proper protection system should
be devised. The use of GSM module 808 is used with Arduinomega2560, Buzzer, PIR sensors and
Flame sensors. If any intruders or obstruction is felt the system warns the farmer.


i) To prohibit the animals from entering the farm
ii) Using GSM module to alert the farmers.

Statement of problems

In the world, the economy of many countries are dependent on agriculture. In spite of the economic
development agriculture is the backbone of economy. Agriculture is the main stay of economy. It
contributes to the GDP. Agriculture meets the food requirements of the people and produces several
raw materials for industries. But because of animal interference and fire in agricultural land, there
will be a huge loss of crops, which made us think about our project.

Existing methods

I) Physical Barriers: This is the most ineffective way of protecting the fields. The farmers usually
erect wooden logs and bamboo sticks at the borders of their fields. Some even resort to use dried
plants and bushes. Clearly this method almost proves to be almost useless as the barriers don’t have
the required physical strength to withstand animal attacks. Construction of brick walls, although a
good method, is very expensive. Thus physical barriers prove to be almost ineffective in protecting
fields from the animal attacks.

ii) Human Puppets and effigies: This is yet another way in which farmers erect human puppets
and effigies in their fields. This method may prove to be helpful in warding off birds but is
ineffective against wild animals.
iii)Electric Fences: Some frustrated farmers may put up electric fences around their fields. This is
illegal and is very dangerous. It may cause fatal injuries to animals and even lead to human
causalities due to shock hazards. It also leads to a great wastage to electric power.
iv) Manual Surveillance: Farmers also report to manual surveillance of their fields, which is both
time consuming and highly ineffective, as they can’t keep an eye on whole of their farm at the same
time. Due to this they , may hire persons for watching over the fields for whole of the days and
nights, which proves to be highly expensive as the persons hired need to be paid full wages.


Since recorded history, the impacts of pests on food crops has been important. Many practices of
“traditional” and “modern” agriculture have evolved because of pest problems. Without doubt, pests
of food crops influenced the course of civilizations- for example, the ancient Greeks and Romans
knew of and used pesticides in the Mediterranean Basin. Crop losses from pests during those times
were probably even more severe in the humid tropics, just as they are today. We have known that
not only the pests harm the overall crop products but animals and birds have a significant amount
of role in doing so. Human civilization has evolved in many ways from the caveman nature to the
modern lifestyle of technology. One of the most common technique used for protecting our crops
from birds which is still in use is scarecrows. The history of the scarecrows date back to the
Egyptian era the Egyptian used the first scarecrows in recorded history to protect wheat fields along
the Nile river from flocks of quail and still in use but what about animals. Historically throughout
most of the world domesticated livestock would roam freely and were fenced out of areas, such as
gardens or fields of crops, where they were unwanted. Over time, especially when crop agriculture
became dominant and population density of both humans and animals was significant, livestock
owners were made to fence their animals in. The earliest fences were made of available materials,
usually stone or wood, and these materials are still used for some fences today. In areas where field
stones are plentiful, fences have been built up over the years as the stones throughout history every
man made inventions have upgraded as time passes. Wire fences, barbed wire , electric wire etc
have been developed. But as the era of technology has risen significantly everything that we see
have been modernized similarly modernization in agriculture is not a new thing. The use of
electronic equipment and the internet in agriculture is not a new thing. Srikanth N et al proposed
crops in farms are many times ravaged by local animals like buffaloes, cows, goats, birds, and fire
etc. this leads to huge losses for the farmers. It is not possible for farmers to barricade entire fields
or stay on the field 24 hours and guard it. So here we propose automatic crop protection system
from animals and fire were the use of arduinomega2560 ,GSM module 808, buzzers and PIR
sensors are used. If any intruders are sensed then the system automatically informs the farmer and
buzzer produces a sound that drives away the animals. Dr .Wilson proposed electric fences can be
used to protect farmhouses, farmlands, forest, bungalows, etc from animals. In a way, these simulate
the job of a cowboy or forest guard. As time passes the technological growth also advances
the concept of virtual fencing is a new topic and might be one of the best methods for crop


The proposed system uses arduinomega2560 ,GSM module 808, PIR sensor, Flame sensor and
buzzer. This system uses a motion sensor to detect wild animals approaching near the field. In such
a case the sensor signals the micro controller to take action. The micro controller now sounds an
alarm to woo the animals away from the field as well as alerts the farmer by sending them a call.
This ensures complete safety of crops from animals thus protecting the farmer loss.

Hardware requirements


The Arduinomega2560 is a micro controller board based on the
ATmega2560(data sheet). It has 54 digital input/output pins( of which 14 can be used as PWM
outputs) . 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB
connection, a power jack , an ICSP header, and a reset button. It contains everything needed to
support the micro controller , simply connect it to a computer with a USB cable or power it with an
AC-to- DC adapter or battery to get started. The Mega is compatible with most shields designed for
the Arduino Duemilanove or Diecimila.

Arduino MEGA 2560 Microcontroller Rev 3


A buzzer is a loud noise maker. Most modern ones are civil defense or air-raid sirens,
tornado sirens, or the sirens on emergency service vehicles such as ambulances, police cars and fire
trucks. There are two general types, pneumatic and electronic.

Electronicspices Big Buzzer with Small Enclosed Piezo Electronic Buzzer  Alarm 95DB with Wires - Pack of 2: Industrial & Scientific

Flame sensors

A flame sensor module that consists of a flame sensor, resistor, capacitor,
potentiometer, and comparator LM393 in an integrated circuit. It can detect infrared light with a
wavelength ranging from 700nm to 1000nm.The far-infrared flame probe converts the strength
changes of the external infrared light into current changes. Some features of flame sensors are:
i) Equipped with power light and a signal output indicator
ii) Support a detection angle of approximately. 60 degrees; particularly sensitive to flame spectrum.
iii) Contain an adjustable precision potentiometer for sensitivity adjustment .
iv) With a comparator LM393 to output both digital and analog signals at the same time
v) Connected directly with I/O port of MCU, needless of external circuit
vi) Sensitive to flame, also responsive to general light; generally used for flame
vii) Detect flame or light of a wavelength ranging from 760 to 1100 nm.
viii) Output clean signals by a comparator, with good waveform and driving capability as strong as
more than 15mA
ix) Working voltage: 3.3V – 5V; PCB size: 2.3 x 2.3 cm

IR Flame Sensor Module | ElectroPeak

PIR sensors

All living objects, whose body temperature is more than 0 degree C, emit the heat in form of
infrared radiation through their body, also called as thermal radiations. This Radiated energy is
invisible to human eye. These Signals can be detected by using PIR sensor which is specially
designed for such purpose. In Passive Infrared (PIR) Sensor, passive word indicates PIR Sensor
does not generate or radiate any energy for detection purposes.
PIR Sensors don’t detect or measure “HEAT”; they detect the infrared radiation emitted or reflected
from objects.
They are small, inexpensive, low power and easy to use. They are commonly found at home,
medical, factories etc. areas. PIRs are basically made of a pyroelectric sensor, which can detect
levels of infrared radiation. Above figure of PIR element shows the round metal can with a
rectangular crystal in the center. Every object emits some low-level radiation, and the hotter objects
emits more radiations. The sensor is split in two slots, which are wired up so that they cancel each
other out. If one half sees more or less IR radiation than the other, the output will swing high or low.
Input signals from both terminals of PIR element are amplified using amplifier circuit and
compared using comparator circuit. The PIR element is covered by lens to increase range of

Buy PIR Sensor At Cheap Price in Nepal- Ghumti Pasal

GSM module 808

SIM808 module is a GSM and GPS two-in-one function module. It is
based on the latest GSM/GPS module SIM808 from SIMCOM, supports GSM/GPRS Quad-Band
network and combines GPS technology for satellite navigation. It features ultra-low power
consumption in sleep mode and integrated with charging circuit for Li-Ion batteries, that make it get
a super long standby time and convenient for projects that use rechargeable Li-Ion battery. It has
high GPS receive sensitivity with 22 tracking and 66 acquisition receiver channels. Besides, it also
supports A-GPS that available for indoor localization. The module is controlled by AT command via
UART and supports 3.3V and 5V logical level. Some of the feature of GSM module 808 are shown
as follows:
I) Quad-band 850/900/1800/1900MHz
ii) GPRS multi-slot class12 connectivity: max. 85.6kbps(down-load/up-load)
iii) GPRS mobile station class B
iv) Controlled by AT Command (3GPP TS 27.007, 27.005 and SIMCOM enhanced AT Commands)
v) Supports charging control of Li-ion battery
vi) Supports real time clock.
vii)Supports voltage range from 3.4 to 4.4 V
7viii) Integrated GPS/CNSS and supports A-GPS
ix) Supports 3.0V to 5.0V logic level
x) Supports Low power consumption, 1mA in sleep mode
xi) Supports GPS NMEA protocol
xii) Standard SIM card

GPRS GSM Module | GeeksValley

Software requirements

Algorithm of the proposed system

Step1: Giving Power supply to Arduino from RPS.
Step2: Checking signal in the GSM module.
Step 3: Sending power to PIR sensors from RPS via Arduino.
Step 4: Detection of an obstacle near the IR senosr.
Step 5: Raising an alarm due to animal detection.

Arduino IDE

I) Arduino IDE is an open source software that is mainly used for writing and compiling the code
into the Arduino Module.
ii)It is an official Arduino software, making code compilation too easy that even a common person
with no prior technical knowledge can get their feet wet with the learning process.
Iii) It is easily available for operating system like MAC, Windows, Linux and runs on the Java
platform that comes with inbuilt functions and commands that play a vital role for
debugging ,editing and compiling the code in the environment.
iv) A range of Arduino modules available including Arduino Uno , Arduino Mega and many more.

Cicuit Diagram


The hardware and software used are highly feasible for the system. The easy availability, simple
operation and cheap maintenance of the devices used fulfill the need of the system.
The devices used in this system are easily available and require interfacing with microcontroller. So,
it is quite fair to say that the devices are technically feasible for the proposed system.
The devices used in the system are economic in price and are easily available. This system is very
beneficial as it provides best result at low price.


Interfacing Arduinomega2560 with GSM,PIR,Flame sensors and Buzzer:

As shown in the connection diagram the Tx pin of GSM is connected with the PWM enabled pin
no.11 of the arduinomega2560 and similarly the Rx pin is connected with the PWM enabled pin
no.10 of the arduinomega2560.The Vcc, GND, and DO(Digital Output) of the flame sensors are
connected to +5V of the Arduinomega2560, GND of Arduinomega2560 and to the PWM enabled
pin no 7 of the arduinomega2560. The supply wire of the buzzer is connected with PWM enabled
pin no 13 and the ground wire is connected to the ground pin of the arduinomega2560.The
Vcc,GND and the OUT pin of the PIR sensor is connected with the +5V, GND pin and PWM
enabled pin no.6 of the arduinomega2560.After doing all these connections the hardware part was
completed and we moved to the coding part.

Coding part

#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>

#define PIN_TX    11
#define PIN_RX    10
SoftwareSerial mySerial(PIN_TX,PIN_RX);
DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,

//Mobile phone number,need to change
#define PHONE_NUMBER  "+9779811376119"   

//DFRobot_SIM808 sim808(&Serial);
#define FLAME 7
int pinSensor=6;
int pinBuzzer=13;
int pirSensor=0;
void setup(){
void loop(){
  if(digitalRead(pinSensor)==HIGH || digitalRead(FLAME)==LOW)
    Serial.println("object detected");
    Serial.println("not detected");

void calling() {
  Serial.println("Sim808 init success");
  Serial.println("Start to call ...");

  //*********Call specified number***************


The problem of crop vandalization by wild animals and fire has become a major social problem in
current time. It requires urgent attention as no effective solution exists till date for this problem.
Thus this project carries a great social relevance as it aims to address this problem. This project will
help farmers in protecting their or- chards and fields and save them from significant financial losses
and will save them from the unproductive efforts that they endure for the protection their fields.
This will also help them in achieving better crop yields thus leading to their economic well being.
Further improvement in the system and better availability of resources in the agricultural lands will
further yield in the improvement of the production. As our project cannot differentiate between the
actual farmers and the intruder it might cause error since it cannot identify the objects.


Integrating features of all the hardware components used have been developed by using this
methodology. Presence of every module has been reasoned out and placed
contributing to the best working of the unit.


In the future, there will be very large scope, this project can be made based on wireless networks.
Wireless sensor network and sensors of different types are used to collect the information of crop
conditions and environmental changes and these in- formation is transmitted through network to the
farmer that initiates corrective actions. Farmers are connected and aware of the conditions of the
agricultural field at anytime and anywhere in the world. The use of Raspberry Pi camera further
helps in object detection and also clearly helps in identifying the intruder. A great possibility of
virtual fencing of animals can also be implemented.


Deepan Adhikari
Nischal Shrestha
Pawan Chapagain

Recommended For You

About the Author: admin


  1. Please send the clear picture interfacing of the project smart crop protection using GSM and arduino .

Leave a Reply

Your email address will not be published.