Вы находитесь на странице: 1из 26

Security System for farmland based on CCTV

Chapter 1
In India, agriculture is the main occupation; more than 50% of the population is
dependent on agriculture. It is the backbone of our economy. Despite the focus on
industrialization, agriculture remains a dominant sector of the Indian economy both in
terms of contribution to gross domestic product (GDP) as well as a source of
employment to millions across the country. So the development in agriculture will boost
economy in industry, trade and transport. To boost the economy there is a need to
increase the productivity of crops. The volume of production depends not only on the
capital investments and marketing strategies but also on the technology used during the
production and processing stage. Despite the use of modern technologies, a major threat
faced by farmlands is its security.
Nowadays, security is becoming an significant matter for farmers, despite that the threat
of a violence on farm is marginal, we must consider our liability to criminal deeds such
as robbery of farm equipment or chemicals, criminal disruption involving unsecured
equipment and machinery, destruction of bioengineered plants, common vandalism.
Unauthorized access to farm chemicals and application equipment are greatest security
danger to farms, nurseries and green houses where plants are developed. And as an adult
we know that insecticides should be stored away from children. In addition, insecticides
should be protected from intruders and thieves who may accidentally, or intentionally,
use these chemicals to damage other individuals, crop or non-crop lands, the
environment or even themselves. Be responsible for the safety of yourself, your family,
representatives, and your group. Set up your farm to endure the pressure of unauthorized
activity. Thus this study aims for the solution for the problem. This system will help to
secure and monitor the particular area to lessen the time and effort of farmers. In due
course, the proponents designed and implemented a system that utilizing a sensor and
CCTV which the advocate will use to identify the trespasser inside the secured area and
produce a yield. This yield is a security system that has an alarm which will trigger when
a movement of intruder recognized.

Dept. of E&CE Page 1 MIT Mysore

Security System for farmland based on CCTV


The block diagram of “Security System for Farmland Based on CCTV” is as shown in






The basic operation of the block diagram is, all of the components used will be interfaced to
the arduino microcontroller. Whenever the PIR sensor detects the motion, the system
immediately triggers an alarm detecting the presence of unauthorized person and sends SMS
through GSM modem and the CCTV will be activated. Upon this, the video will be
monitored in the owner’s phone and hence necessary controlled action will be taken, which is
the buzz ring of siren.


The objectives of our project are:

 To set up the farm in such a way to reduce the pressure of unauthorized activities.

 To secure and monitor the particular area of farmland to lessen the time and effort of

Dept. of E&CE Page 2 MIT Mysore

Security System for farmland based on CCTV

 To have an alert mechanism which includes recognition of undesirable individuals,

creature or an item in an ensured range so that at whatever point there is a suspicious
intruders, it will be identified and sets off the caution.

It is helpful to the society as it ensures a strong security for the farmland and also reduces
the suicide rate of farmers, due to the losses incurred.
As it is a security system which involves real time monitoring of the area in which it is
installed, it is useful and can be adopted in industries as well with no or little changes.


[1] “Smart farmland using raspberry PI crop vandalization prevention and intrusion
detection system” by Pooja G, Mohmad Umair Bagali:
Crop vandalization by wild animals is a major threat to the farmers. In this paper, the main
aim is to prevent the loss of crops and to protect the area from intruders and wild animals.
Hence, it describes the system based on surveillance with animal ward off system. It
distinguishes between intruders and authorized persons using RFID. Various PIR sensors
are deployed in the area to detect any motion and hence turns ON a camera whenever
movement is detected, providing real time monitoring.

[2] “Passive Infrared(PIR) based security system”, by Pema Chodon, Devi Maya

Adhikari, Gopal Chandra Nepal, Rajen Biswa, Sangay Gyeltshen and Chenchoa: The aim
of this paper is to develop PIR based security system which saves the power consumption
and the memory space of the recording system. Hence, in this paper, a PIR sensor based
security system is proposed, which saves the memory space of recording system as it starts
recording when the webcam is turned ON. Also, power consumed by lighting system at
night was reduced as it turns ON only when PIR gets activated. Both webcam and lighting
system gets ON when there is an intruder in the detection range of PIR sensors.

Dept. of E&CE Page 3 MIT Mysore

Security System for farmland based on CCTV

[3] “GSM Based Security System Using Microcontroller”, by Nale Divakar, Dipak
Pawar Sadashiv Nivrutti, Gajare Ganesh shivaji and Prof. Shivpuje D.B: The aim of this
paper is to develop a GSM based security system which is fully atomized and efficient
system, designed with the help of Microcontroller. In this, various types of alert signals are
generated, given to the owner as well as another person or system like police, on their cell
phones. Hence, it reduces the effort to carry any another object for getting alert signals.
With the help of CCTV camera system, this avoids extra use of energy using atomization.

[4] “Design and Implementation Of Farm Monitoring And Security System”, by Ibam
Emmanuel Onwuka, Mark O. Afolabi and Idowu O. John, Idowu A. Olalekan: The main
aim of this paper is to have a system that is wireless and can be controlled through mobile
devices even in remote areas. By creating wireless sensor nodes (WSN) to large scale
farming, access to farm lands can be monitored and security enforced, thereby contributing
to precision agriculture. A base station is developed which is connected to a system using
USB connection. For security of the farm, intrusion detection system is deployed on each
node. The FMSS monitors the environment and generates an alarm that scares intruders
away, but at the longer stay of the intruders, it generates an alert notification that is sent to
the farmers’ smart phone app. It is a microcontroller-based circuit to monitor and control
intrusion by alerting the farm owner after the use of alarm on the farmland in order to scare
aware intruders.

[5] “Smart Surveillance System Using PIR Sensor Network and GSM”, by M
Sathishkumar, S Rajini: This paper describes the security system based on embedded
system along with GSM and sensor networks. The human movement is detected using PIR
sensors. The alarm gets triggered detecting presence of person and SMS sent through GSM
modem. Only when security system is activated, the CCTV camera gets activated. It is
implemented using PIC microcontroller, camera, GSM and sensors.

Dept. of E&CE Page 4 MIT Mysore

Security System for farmland based on CCTV


Chapter 1: Gives the introduction, block diagram, scope and literature survey of the project.
Chapter 2: Gives the complete detail of all the hardware components used along with the
specifications of each and the pin diagrams are also included as needed.
Chapter 3: Gives the description of software requirements, which includes the software
used, that is Arduino IDE and the programming language, Embedded C.

Dept. of E&CE Page 5 MIT Mysore

Security System for farmland based on CCTV

Chapter 2


The hardware requirements of the project are:

 Outdoor box cameras/CCTV

 PIR Sensors
 DVR Card
 Connecting cables
 Arduino mega 2560
 Siren
 GSM Module
 Android Mobile

2.1 Outdoor box cameras/CCTV

CCTV Box Cameras are professional quality CCTV security cameras that allow the user
flexibility in designing a CCTV camera best suited for their needs. You can choose the type
of weather protection, camera resolution, video signal type, and the type of lens that best
suits your needs. Box cameras also allow easy replacement or upgrading of the
camera/enclosure/lens combination. By simply changing the box camera body, the video
pickup portion can be replaced. Replacing or upgrading the lens allows the user to change the
angle of view, without having to replace the entire camera. Box cameras are also dual voltage
cameras for the most part, meaning either 24VAC or 12VDC power can be used. In the long
run box cameras also outlast bullet and dome cameras, which makes them an ideal choice for
large scale installations. CCTV is shown in figure 2.1.

Dept. of E&CE Page 6 MIT Mysore

Security System for farmland based on CCTV

Fig 2.1: Outdoor box cameras/CCTV


• 1/3.2” Progressive Scan CMOS

• 4 megapixel resolution
• Day and night function with mechanical IR cut filter
• Minimum illumination 0.05 lux at F1.4
• 18x Zoom • Built-in f4.7-84.6 mm / f1.6 megapixel iris zoom lens
• 8 FPS at 2032 x 1920 resolution
• Selectable H.264, MPEG -4 SP, MJPEG compressions with dual streaming
• Serial port for external pan & tilt scanner
• 2D+3D Digital noise reduction
• Weatherproof IP66 rated casing
• Powered by PoE Class 3 / DC 12V
• Video Insight VMS license included

2.1.2 POWER

CCTV Camera Pros offers the best selection of individual CCTV camera power supplies,
also known as power adapters. We carry 24VAC and 12V DC individual adapters, as well as
power supply boxes that can distribute power to surveillance systems with 4, 8, and 16
cameras. Installers should check the manual of the security cameras that will be installed to
confirm whether the camera needs 12V DC or 24VAC power. Most CCTV cameras are
either 12V DC or dual voltage, which means that they can use either. Please note that
Dept. of E&CE Page 7 MIT Mysore
Security System for farmland based on CCTV
connecting a 12v security camera to a 24v power source will almost always burn the camera's
circuit board and render the camera useless.

2.2 PIR Sensors

A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR)
light radiating from objects in its field of view. They are most often used in PIR-
based motion detectors. It is as shown in fig 2.2.

Fig 2.2: PIR Sensor

2.2.1 Construction

Infrared radiation enters through the front of the sensor, known as the 'sensor face'. At the
core of a PIR sensor is a solid state sensor or set of sensors, made from pyroelectric
materials—materials which generate energy when exposed to heat. Typically, the sensors are
approximately 1/4 inch square (40 mm2), and take the form of a thin film. Materials
commonly used in PIR sensors include gallium nitride (GaN), caesium
nitrate (CsNO3), polyvinyl fluorides, derivatives phenylpyridine, and cobalt phthalocyanine.
The sensor is often manufactured as part of an integrated circuit.

Dept. of E&CE Page 8 MIT Mysore

Security System for farmland based on CCTV

2.2.2 Specifications

 IP66 Weatherproof for Indoor/Outdoor Surveillance

 700 Lines of Resolution / 960H CCTV
 Built-in PIR Motion Sensor
 Motion Activated Security Light
 Infrared Camera Alternative
 Alarm Relay In / Out
 Digital Alarm Output
 30 White LEDs
 1/3" Sony CCD (Super HAD Day/Night)
 2.8-12mm Varifocal Lens
 Captures Color Video in Low Light
 Sense-Up Image Intensifier Technology
 3-Axis Cable Through Body Mount
 Dual Voltage 12V DC / 24VAC
 Power supply included

2.2.4 Features

 Complete with PIR, Motion Detection.

 Dual Element Sensor with Low Noise and High Sensitivity.
 Supply Voltage – 5V.
 Delay Time Adjustable.
 Standard TTL Output.

2.3 DVR Card

DVR Cards also known as video capture cards are the heart of any PC DVR or computer
based Digital Video Recorder. These units, DVR cards and PC DVRs maintain to be
extremely popular means of professional video surveillance. Many of the industry's highest
performing camera systems are based on DVR card solutions and though there are many to
Dept. of E&CE Page 9 MIT Mysore
Security System for farmland based on CCTV
choose from, there are only a few worth considering. The DVR Card(s) is typically installed
in an available PCI slot of a computer. DVR cards are bundled with video surveillance
software which allows the user to record and display multiple cameras simultaneously from
the camera site or a remote location. It is as shown in fig 2.3.

Fig 2.3: DVR Card

 4 Channel
 H.264 Compression Technique
 100 fps
 Easy to installation
 Camera Technology: Analog Camera
 No. Of Ports: 4

2.4 Cable

Category cable such as cat-5 also is more resistant to interference caused by outside sources,
and its use means that IP cameras can be added as required at a later date. For CCTV use,
category cable is usually smaller than the equivalent coaxial cable, making for easier

Dept. of E&CE Page 10 MIT Mysore

Security System for farmland based on CCTV
installation, and is usually cheaper. There are a great many things to consider when installing
a new CCTV system. Which cable to use is not always one of them, but choosing the correct
CCTV cable can have
a massive impact upon how effective the system is. There are many different cables used in
CCTV systems but the choice of cable comes down to a small number of criteria. Budget is
often a massive concern, but the numbers of cameras involved, the length of cable run
required, the power requirements, and the need to integrate with other systems should all be
given significant consideration as appropriate. Traditionally coaxial cable has been
commonly used for CCTV purposes, and its use has been so prevalent that most CCTV
cameras are produced with a coaxial BNC connector. However coaxial cable does have its
limitations, so alternatives such as category and fiber cable are now used much more
regularly. It is as shown in fig 2.4.

Fig 2.4: CCTV Cable

2.5 DVR

A digital video recorder (DVR) is an electronic device that records video in a digital format
to a disk drive, USB flash drive, SD memory card, SSD or other local or networked mass
storage device. The term includes set-top boxes with direct to disk recording, portable media
players and TV gateways with recording capability, and digital camcorders. Personal
computers are often connected to video capture devices and used as DVRs; in such cases
the application software used to record video is an integral part of the DVR. Many DVRs are

Dept. of E&CE Page 11 MIT Mysore

Security System for farmland based on CCTV
classified as consumer electronic devices; such devices may alternatively be referred to
as personal video recorders (PVRs). It is shown in fig 2.5.

Fig 2.5: Digital Video Recorder


 Small File Sizes by H.264 Compression

Various Recording Resolution (704x480,704x240, 352x240)
 Up to 120fps@352 X 240 Recording
 Default Mouse, IR Remote Controller
 User-Friendly GUI
 Various Monitor Output
 Multi Motion Detection areas
 Multi-Channel Video Backup capability
 Pre-Alarm Recording
 Time and Date Sync from NTP Server

Dept. of E&CE Page 12 MIT Mysore

Security System for farmland based on CCTV
 Easy System S/W Update with USB Memory Stick and Network
 Multiplex (Simultaneous Live display, Recording, Search, Network, Back-up)
 Frame Rate
 & Quality Adjustment per Individual Camera Max 16 channels connections via IE browser
 VGA output is also required
 Hard Disk built-in SATA 1000GB 1 HDD
 Backup Mode HDD backup, USB backup and network download backup
 Network Protocols-TCP/IP, UDP, DHCP, DNS, IP
 Filter, PPPoE, DDNS, FTP, Alarm Server
 Motion Detection - Various sensitivity levels, Alarm can activate record, external alarm or
screen message prompt, Video Loss- Can activate external alarm or screen message prompt
should support Centralised monitoring system at H.O

2.6 Arduino mega 2560

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. 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. The fig 2.6 shows Arduino mega board. 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.


Dept. of E&CE Page 13 MIT Mysore

Security System for farmland based on CCTV


Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 14 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 256 KB of which 8 KB used by boot loader
Clock Speed 16 MHz


The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.

The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
 5V. the regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board regulator,
or be supplied by USB or another regulated 5V supply.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw
is 50 mA.

Dept. of E&CE Page 14 MIT Mysore

Security System for farmland based on CCTV
 GND. Ground pins.

The fig 2.7 shows the pin diagram of Arduino mega.


2.6.3 MEMORY

The ATmega2560 has 256 KB of flash memory for storing code (of which 8 KB is used for
the boot loader), 8 KB of SRAM and 4 KB of EEPROM (which can be read and written with
the EEPROM library).

Dept. of E&CE Page 15 MIT Mysore

Security System for farmland based on CCTV


Each of the 54 digital pins on the Mega can be used as an input or output, using pinMode (),
digitalWrite (), and digitalRead () functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default)
of 20-50 kOhms.

In addition, some pins have specialized functions:

 Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and
16 (TX); Serial 3: 15 (RX) and14 (TX). Used to receive (RX) and transmit (TX)
TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.
 External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19
(interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured
to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
See the attachInterrupt () function for details.
 PWM: 0 to 13. Provide 8-bit PWM output with the analogWrite () function.
 SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI
communication, which, although provided by the underlying hardware, is not
currently included in the Arduino language. The SPI pins are also broken out on the
ICSP header, which is physically compatible with the Duemilanove and Diecimila.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
 I2C: 20 (SDA) and 21 (SCL). Support I2C (TWI) communication using the Wire
library (documentation on the Wiring website). Note that these pins are not in the
same location as the I2C pins on the Duemilanove.
 AREF. Reference voltage for the analog inputs. Used with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.

Dept. of E&CE Page 16 MIT Mysore

Security System for farmland based on CCTV


The Arduino Mega2560 has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega2560 provides four hardware
UARTs for TTL (5V) serial communication. An ATmega8U2 on the board channels one of
these over USB and provides a virtual com port to software on the computer.

2.7 Siren
A siren is a loud noise-making device. Civil defense sirens are mounted in fixed locations
and used to warn of natural disasters or attacks. Sirens are used on emergency
service vehicles such as ambulances, police cars, and fire trucks. There are two general
types: pneumatic and electronic. The siren is as shown in fig 2.8.

Fig 2.8: Alarm Siren

2.7.1: Specifications of Siren

 For criminal intrusion detection in indoor or watchdog zone monitoring.

 RF frequency:-433.92Mhz.
 Up to 100min in open air.
 Encode type: Alkaline 6F22 9v.
 1yearin any application.
 Lowe power consumption and longer transmit rang.

Dept. of E&CE Page 17 MIT Mysore

Security System for farmland based on CCTV

2.8 GSM Module

GSM (Global System for Mobile communications) is a standard developed by the European
Telecommunications Standards Institute (ETSI) to describe the protocols for second-
generation digital cellular networks used by mobile devices such as tablets. It was first
deployed in Finland in December 1991. As of 2014, it has become the global standard for
mobile communications – with over 90% market share, operating in over 193 countries and
territories. It is as shown in fig 2.9

Fig 2.9: GSM Module

2.8.1 Specifications

1. Quad band 850/900/1800/1900MHz.

2. GPRS class 2/10.
3. Input Voltage : 9V-12V DC.
4. Dimensions : 100 x 53 x 15 (L x W x H)mm.
5. Weight : 40 gm.
6. Low power.
7. Operating temperature : 40 – 85C.

Dept. of E&CE Page 18 MIT Mysore

Security System for farmland based on CCTV

2.9 Android Mobile

Android is a mobile operating system developed by Google. It is used by several smart

phones and tablets. Examples include the Sony Xperia, the Samsung Galaxy, and the Google
Nexus One. The Android operating system (OS) is based on the Linux kernel. Unlike
Apple's iOS, Android is open source, meaning developers can modify and customize the OS
for each phone. Therefore, different Android-based phones often have different graphical
user interfaces GUIs even though they use the same OS. It is as shown in fig2.10

Fig 2.10: Android Mobile

2.9.1 Steps to access CCTV on Mobile

Step. 1:- CONNECT DVR TO MONITOR DIRECTLY. Just connect your CCTV DVR to
monitor via VGA or HDMI CABLE.

Step. 2:- CONFIGURE CCTV DVR SETTINGS. For configuration.





Dept. of E&CE Page 19 MIT Mysore

Security System for farmland based on CCTV

Chapter 3



An integrated development environment (IDE) is a software application that provides

comprehensive facilities to computer programmers for software development. An IDE
normally consists of a source code editor, build automation tools and a debugger. Most
modern IDEs have intelligent code completion. The software requirements of the project
make uses of Arduino IDE 1.8.2 version. Arduino is an open source, computer hardware and
software company, project, and user community that designs and manufactures
microcontroller kits for building digital devices and interactive objects that can sense and
control objects in the physical world. The project's products are distributed as open-source
hardware and software, which are licensed under the GNU lesser general public license
(LGPL) or the GNU general public license (GPL), permitting the manufacture of Arduino
boards and software distribution by anyone. It is shown in fig 3.1.


Dept. of E&CE Page 20 MIT Mysore

Security System for farmland based on CCTV


The Arduino Integrated Development Environment or Arduino software 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 genuine hardware to upload
programs and communicate with them. The arduino IDE toolbar is as shown below:


Checks your code for errors compiling it.

Compiles your code and uploads it to the configured board. See uploading below
for details.

Creates a new sketch


Presents a menu of all the sketches in your sketchbook. Clicking one will open it within
the current window overwriting its content.


Saves your sketch

Serial Monitor

Opens the serial monitor.


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 a feature of
cutting/passing and for searching/replacing text. The message area gives feedback while
saving and exporting and also displays errors. Figure 3.2 shows the window when we open
the Arduino IDE software. The console displays text output by the Arduino Software (IDE),
including complete error messages and other information. The bottom right hand corner of
Dept. of E&CE Page 21 MIT Mysore
Security System for farmland based on CCTV
the window displays the configured board and serial port. The toolbar buttons allow verifying
and uploading programs, creating, opening, and saving sketches, and open the serial monitor.
The toolbar buttons allow verifying and uploading programs, creating, opening and saving
the sketches and open the serial monitor. Additional commands are found within the five
menus: File, Edit, Sketch, Tools and Help. The menus are context sensitive, which means
only those items relevant to the work currently being carried out are available.


Dept. of E&CE Page 22 MIT Mysore

Security System for farmland based on CCTV
The sketch involves following options:


This step checks the sketch for errors compiling it. It will report memory usage for code and
variables in the console area.

[2] Upload

Compiles and loads the binary file onto the configured board through the configured Port.

[3] Libraries

We can add library to the sketch by inserting #include statements at the start of the code.
Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import Library
menu. This will insert one or more #include statements at the top of the sketch and compile
the library with your sketch. Because libraries are uploaded to the board with your sketch,
they increase the amount of space it takes up. If a sketch no longer needs a library, simply
delete its #include statements from the top of the code. There is a list of libraries in the
reference. Some libraries are included with the Arduino software. Others can be downloaded
from a variety of sources or through the Library Manager.

3.2.3 HELP

Here you find easy access to a number of documents that come with the Arduino Software
(IDE). You have access to Getting Started, Reference, this guide to the IDE and other
documents locally, without an internet connection. The documents are a local copy of the
online ones and may link back to our online website.

Before uploading sketch, we need to select the correct items from the Tools like Board and
Port. The boards are described as COM1 or COM2 for a serial board and COM4, COM5 and
COM or higher for a USB board. To find out this, we have to look for USB serial device in
the ports section of the Windows Device Manager. Once selected the correct serial port and

Dept. of E&CE Page 23 MIT Mysore

Security System for farmland based on CCTV
board, press the upload button in the toolbar or select the Upload item from the Sketch menu.
Current Arduino boards will reset automatically and begin the upload. On most boards,
contains the RX and TX LEDs blink as the sketch is uploaded. The Arduino Software (IDE)
will display a message when the upload is complete, or show an error. When you upload a
sketch, you're using the Arduino boot loader, a small program that has been loaded on to the
microcontroller on your board. It allows you to upload code without using any additional
hardware. The boot loader is active for a few seconds when the board resets; then it starts
whichever sketch was most recently uploaded to the microcontroller. The boot loader will
blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

3.3 Embedded C

Looking around, we find ourselves to be surrounded by various types of embedded systems.

Be it a digital camera or a mobile phone or a washing machine, all of them as some kind of
processor functioning inside it. Associated with each processor is the embedded software. It
is the embedded software which primarily governs the functioning of embedded systems. As
time progressed, use of microprocessors-specific assembly only as the programming
language reduced and embedded systems moved onto C. As the embedded programming
language of choice. C is the most widely used programming language for embedded
processors/controllers. Assembly is also used but mainly to implement those portions of the
code were very high timing accuracy, code size efficiency, etc. are prime requirements.
As it was intended for operating system development, it can manipulate memory addresses.
Also, it allowed programmers to write very compact code. This has given it to the reputation
as the language of choice for hackers too.
As assembly language programs are specific to processors, assembly language didn’t offer
portability across a system. To overcome this disadvantage, several high level languages,
including C, came up. C got wide acceptance for not only embedded systems but also for
desktop applications. C is having a strong- hold in embedded programming. Due to the wide
acceptance of C in embedded systems, various kinds of support tools like compilers and
cross compilers, ICE, etc. Came up and all this facilitated development of system using C.

Dept. of E&CE Page 24 MIT Mysore

Security System for farmland based on CCTV
Embedded system programming:
Embedded system programming is different from developing applications on desktop
Key characteristics of an embedded system, when compared to PC’s are as follows:
 Embedded devices have resources constants (limited ROM, limited RAM and limited
stack space, less processing power)
 Components used in embedded systems and PCs are different; embedded systems
typically uses smaller, less power consumption components, embedded systems are
more tied to the hardware.

Dept. of E&CE Page 25 MIT Mysore

Security System for farmland based on CCTV

[1] “Smart farmland using raspberry PI crop vandalization prevention and intrusion detection
system” by Pooja G, Mohmad Umair Bagali, Department of Electronics and Communication
Engineering, School of Engineering and Technology, Jain University, Bangalore., IJARIIE-
ISSN(O)-2395-4396, Vol-1 Issue-5 2016

[2] “Passive Infrared (PIR) based security system” by Pema Chodon, Devi Maya
Adhikari, Gopal Chandra Nepal, Rajen Biswa, Sangay Gyeltshen and Chencho, Department
of ECE, College of Science and Technology, Royal University of Bhutan, Phuentsholing,
Bhutan., IJEECS- Vol:14 Issue:2, June 2013

[3] “GSM Based Security System Using Microcontroller” by Nale Divakar, Dipak Pawar
Sadashiv Nivrutti, Gajare Ganesh shivaji and Prof. Shivpuje D.B, Department of E&TC,
Karamayogi Engineering College Shelave, Pandharpur., Journal of Electronic and
Communication Engineering Volume 1 Issue 2.

[4]“Design and Implementation Of Farm Monitoring And Security System” by Ibam

Emmanuel Onwuka, Mark O. Afolabi and Idowu O. John, Idowu A. Olalekan., International
Journal of Computer Applications(0975-8887) Volume 181- No.9, August 2018.

[5] “Smart Surveillance System Using PIR Sensor Network and GSM” by M Sathishkumar,
S Rajini., IJARCET Volume 4 Issue 1, January 2015.

Dept. of E&CE Page 26 MIT Mysore