You are on page 1of 68

CHAPTER 1

EMBEDDED SYSTEM
1.1

INTRODUCTION
An embedded system is a micro-processor based device which has an

inbuilt operating system. This OS is designed to perform specific functions,


that too under a time constraint.
Following are a few of the more common descriptions of an embedded
system:
Embedded systems are more limited in hardware and/or software
functionality than a personal computer (PC).
This holds true for a significant subset of the embedded systems family of
computer systems. In terms of hardware limitations, this can mean
limitations in processing performance, power consumption, memory,
hardware functionality, and so forth. In software, this typically means
limitations relative to a PCfewer applications, scaled-down applications, no
operating system (OS) or a limited OS, or less abstraction-level code.
However, this definition is only partially true today as boards and software
typically found in PCs of past and present have been repackaged into more
complex embedded system designs.
An embedded system is designed to perform a dedicated function. Most
embedded devices are primarily designed for one specific function.
However, we

now see devices

such

as

personal data assistant

(PDA)/cell phone hybrids, which are embedded systems designed to be


able to do a variety of primary functions. Also, the latest digital TVs
include interactive applications that perform a wide variety of general
functions unrelated to the TV function but just as important, such as email, web browsing, and games.
An embedded system is a computer system with higher quality and
1

reliability requirements than other types of computer systems.


Some families of embedded devices have a very high threshold of
quality and reliability requirements. For example, if a cars engine controller
crashes while driving on a busy freeway or a critical medical device
malfunctions during surgery, very serious problems result. However, there are
also embedded devices, such as TVs, games, and cell phones, in which a
malfunction is an inconvenience but not usually a life-threatening situation.
Some devices that are called embedded systems, such as PDAs or web
pads, are not really embedded systems.
There is some discussion as to whether or not computer systems that
meet some, but not all of the traditional embedded system definitions are
actually embedded systems or something else. Some feel that the designation
of these more complex designs, such as PDAs, as embedded systems is driven
by nontechnical marketing and sales professionals, rather than engineers.
Table 1.1. Examples of embedded systems and their markets
Market

Embedded devices

Automotive

Ignition system
Engine control
Brake system(e.g. Antilock brake system)

Consumer electronics

Digital and analog televisions,Set-top boxes


Personal data assistants(PDAs)
Kitchen applications,Automobiles ,Toys and
games,Telephones, cell phones, pagers,Cameras

Figure 1.1 Components of embedded system hardware


1.2 CLASSIFICATION
The classify embedded systems into three types as follows.
1. Small Scale Embedded Systems:
These systems are designed with a single 8- or 16-bit microcontroller;
they have little hardware and software complexities and involve board-level
design. They may even be battery operated. When developing embedded
software for these, an editor, assembler and cross assembler, specific to the
microcontroller or processor used, are the main programming tools. Usually,
3

C is used for developing these systems. C program compilation is done


into the assembly, and executable codes are then appropriately located in the
system memory. The software has to fit within the memory available and
keep in view the need to limit power dissipation when system is running
continuously.
2. Medium Scale Embedded Systems:
These systems are usually designed with a single or few 16- or 32-bit
microcontrollers or DSPs or Reduced Instruction Set Computers (RISCs).
These have both hardware and software complexities. For complex software
design, there are the following programming tools: RTOS, Source code
engineering tool, Simulator, Debugger and Integrated Development
Environment (IDE). Software tools also provide the solutions to the hardware
complexities. An assembler is of little use as a programming tool. These
systems may also employ the readily available ASSPs and IPs (explained
later) for the various functionsfor example, for the bus interfacing,
encrypting,

deciphering,

discrete cosine

transformation

and

inverse

transformation, TCP/IP protocol stacking and network connecting functions.


[ASSPs and IPs may also have to be appropriately configured by the system
software before being integrated into the system-bus.]
3. Sophisticated Embedded Systems:
Sophisticated embedded systems have enormous hardware and
software complexities and may need scalable processors or configurable
processors and programmable logic arrays. They are used for cutting edge
applications that needhardware and software co-design and integration in the
final system; however, they are constrained by the processingspeeds available
in theirhardware units. Certain software functions such as encryption and
deciphering

algorithms,

discrete

cosine

transformation

and

inverse

transformation algorithms, TCP/IP protocol stacking and network driver


functions are implemented in the hardware to obtain additional speeds by
4

saving time. Some of the functions of the hardware resources in the system
are also implemented by the software. Development tools for these systems
may not be readily available at a reasonable cost or may not be available at
all. In some cases, a compiler or retarget able compiler might have to be
developed for these. [A retarget able compiler is one that configures
according to the given target configuration in a system.

1.3. PROCESSOR IN THE SYSTEM


A processor is the heart of the embedded system. A processor has
two essential units: Program Flow Control Unit (CU) and Execution Unit
(EU). The CU includes a fetch unit for fetching instructions from the
memory. The EU has circuits that implement the instructions pertaining
to data transfer operations and data conversion from one form to another.
The EU includes the Arithmetic and Logical Unit (ALU) and also the
circuits that execute instructions for a program control task, say, halt,
interrupt, or jump to another set of instructions. It can also execute
instructions for a call or branch to another program and for a call to a
function.
A processor runs the cycles of fetch and execute. The instructions,
defined in the processor instruction set, are executed in the sequence that they
are fetched from the memory. A processor is mostly in the form of an IC chip;
alternatively, it could be in core form in an ASIC or at a SoC. Core means a
part of the functional circuit on the VLSI chip.
An embedded system processor chip or core can be one of the
following.
1. General Purpose Processor (GPP).
a. Microprocessor.
b. Microcontroller
c. Embedded Processor.
5

d. Digital Signal Processor (DSP).


e. Media Processor.
2. Application Specific System Processor (ASSP) as additional processor
3. Multiprocessor system using General Purpose processors (GPPs) and
Application Specific Instruction Processors (ASIPs)
4. GPP core (s) or ASIP core (s) integrated into either an Application
Specific Integrated Circuit (ASIC), or a Very Large Scale Integrated
Circuit (VLSI) circuit or an FPGA core integrated with a VLSI (ASIC)
chip.

For a system designer, the following are important considerations when


selecting a processor:
1. Instruction set.
2. Maximum bits in an operand (8 or 16 or 32) in a single arithmetic or logical
operation.
3. Clock frequency in MHz and processing speed in Million Instructions per
Second (MIPS).
4. Processor ability to solve the complex algorithms used in meeting the
deadlines for their processing.
1.4.MICROPROCESSOR
The CPU is a unit that centrally fetches and processes a set of generalpurpose instructions. The CPU instruction set includes instructions for data
transfer operations, ALU operations, stack operations, input and output (I/O)
operations and program control, sequencing and supervising operations.
The general purpose instruction set is always specific to a specific
CPU. Any CPU must possess the following basic functional units.
1. A control unit to fetch and control the sequential processing of a given
command or instruction and for communicating with the rest of the system.
2. An ALU for the arithmetic and logical operations on the bytes or words. It
may be capable of processing 8, 16, 32 or 64 bit words at an instant.
A microprocessor is a single VLSI chip that has a CPU and may also
have some other units (for examples, caches, floating point processing
arithmetic unit, pipeliningand super-scaling units) that are additionally present
and that result in faster processing of instructions.

The earlier generation microprocessors fetch-and-execute cycle was


guided by clock frequency of the order of ~1 MHz Processors now operate at
clockfrequency of 2 GHz. [Intel released a 2 GHz processor on August 25,
2001. This also marked the twentieth anniversary of the introduction of
theIBM PC. Intel released 3 GHz Pentium 4 on April 14, 2003.] Since early
2002, a few highly sophisticated embedded systems (for examples, Gbps
transceiver and encryption engine) have incorporated the GHZ processor.
[Gbps means Giga bit per second. Transceiver means a transmitting cum
receiving circuit with appropriate processing and controls, for example, for
bus-collisions.
Table 1.2 Important microprocessors used in the embedded systems
Streem

Microprocessor family

Source

CISC or RISC or
Both features

Stream 1

68HCxx

Motorola

CISC

Stream 2

(a) 80x86

Intel

CISC

(b) i860

Intel

CISC with RISC

Stream 3

SPARC

Sun

RISC

Stream 4

(a) PowerPCs 601,604

IBM

RISC

(b) MPC 629

Motorola

1.5.

MICROCONTROLLER

Just as a microprocessor is the most essential part of a computing


system, a microcontroller is the most essential component of a control or
communication circuit.
A

microcontroller

is

single-chipVLSI

unit

(also

called

microcomputer) which, though having limited computational capabilities


possesses enhanced input-output capabilities and a number of on-chip
functional units.
8

Microcontrollers are particularly suited for use in embedded systems


for real-time control applications with on-chip program memory and devices.
Figure 1.2 shows the functional circuits present (in solid boundary boxes) in a
microcontroller. It also shows the application-specific units (in dashed
boundary boxes) in a specific version of a given microcontroller family. A
few of the latest microcontrollers also have high computational and
superscalar processing capabilities.
Important microcontroller chips for embedded systems are usually
among the following five streams of families given in Table 1.3.
Table 1.3 Important microcontrollers used in embedded systems
Stream

Microprocessor family

Source

CISC or RISC or
Both features

Stream 1

68HC11xx,HC12xx,HC16xx

Motorola

CISC

Stream 2

8051,80251

Intel

CISC

Stream 3

80x86

Intel

CISC

Stream 4

PIC 16F,16Cx,and PIC18Fxx

Microchip

CISC

Stream 5

ARM7,ARM9

ARM, Texas

CISC with RISC

Figure 1.2 Various functions and circuits of microcontrollers

1.6. EMBEDDED PROCESSOR FOR COMPLEX SYSTEM


For fast, precise and intensive calculations and for complex real time
applications, the microcontrollers and microprocessors mentioned above do
not suffice. An electronic warfare system, for example, an Advanced Warning
and Control System (AWACS), which also associates tracking radar, is an
example

of

complex

real-time

system.

Special

microprocessors

and microcontrollers, often called embedded processors, are required.


When a microcontroller or microprocessor is specially designed such that
it has the
Following capabilities, then the term embedded processor is preferred
instead of microcontroller or microprocessor.
1. Fast context switching and thus lower latencies of the tasks in complex real
10

time applications.
2. Atomic ALU operations and thus no shared data problem. The latter occurs
due to an incomplete ALU (non-atomic) operation when an operand of a
larger number of bits is placed in two or four registers.
3. RISC core for fast, more precise and intensive calculations by the
embedded software.
Calculations for real time image processing and for aerodynamics are
two examples where there is a need for fast, precise and intensive calculations
and fast context-switching. Important embedded processor chips for
embedded systems belong to the following two streams of families.
Stream 1: ARM family ARM 7* and ARM 9*
Stream 2: Intel family i960.
Stream 3: AMD family 29050.
Intel family i960 microcontrollers are also called embedded processors,
as these possess the required features including CISC and RISC. In one
of the versions, these also have a 4- channel DMA controller. An 80960
includes an 8-channel, 248-vector programmable interrupt controller.
Just as a microprocessor is the most essential unit of a computing
system, a digital signal processor (DSP) is an essential unit of an embedded
system for a large number of applications needing processing of signals. A
DSP provides fast, discrete-time, signal-processing instructions. It has Very
Large Instruction Word (VLIW) processing capabilities; it processes Single
Instruction Multiple Data (SIMD) instructions fast; it processes Discrete
Cosine Transformations (DCT) and inverse DCT (IDCT) functions fast. The

11

latter are a must for fast execution of thealgorithms for signal analyzing,
coding, filtering, noise cancellation, echo-elimination, compressing and
decompressing, etc.

Figure 1.3 commonly used microcontrollers in small medium large


embedded systems
1.7. APPLICATIONS
An embedded system plays a major role in
Intelligent traffic light control
Automotive technologies
RFID technologies
Medical technologies
Anti-hacker technologies
Military
Industrial.
12

CHAPTER 2
LITERATURE SURVEY
A literature review is an evaluative report of information found in the literature
related to your selected area of study. The review should describe summaries,
evaluate and clarify this literature. It should give a theoretical base for the research
and help to determine the nature of research. Works which are irrelevant should be
discarded and those which are peripheral should be looked at critically. A literature
review is more than the search for information, and goes beyond being a
descriptive annotated bibliography. All works included in the review must be read,
evaluated and analyzed, but relationships between the literatures must also be
identified and articulated, in relation to research field.
2.1. Nikhil Agrawal, Siemens, Smita Singhal, SMART DRIP IRRIGATION
SYSTEM

USING

RASPBERRY

PI

AND

ARDUINO,

International

Conference on Computing, Communication and Automation (ICCCA2015)


ISBN:978-1-4799-8890-7/15/$31.00 2015 IEEE.
The requirement of building an automation system for an office or home is
increasing day-by-day. Industrialist and researchers are working to build efficient
and economic automatic systems to control different machines like lights, fans, air
conditioners based on the requirement. Automation makes an efficient use of the
electricity and water and reduces much of the wastage. Drip irrigation system
makes the efficient use of water and fertilizer. Water is slowly dripped to the roots
of the plants through narrow tubes and valves. Water is fed directly to the base of
the plants which is a perfect way to water plants. There should be proper drainage
in the fields or pot plants to avoid any water logging which in case may affect the
productivity.

13

There already exist automatic drip irrigation systems which water plants based on
soil humidity, pH value of soil, emperature and light. These parameters are
required in big agricultural fields where productivity of the crop matters. In small
areas like office premises, buildings, house gardens etc. where watering plants at
regular interval matters, our proposed irrigation system will be very efficient. This
paper presents an smart drip irrigation system to water plants with the use of
devices like raspberry pi, Arduino microcontrollers. Xbee is used to control the
system wirelessly while Python programming language is used for automation
purpose. This paper contributes an efficient and fairly cheap automation irrigation
system. System once installed has no maintenance cost and is easy to use.
ADVANTAGES
Drip irrigation system makes the efficient use of water and fertilizer..
This system is evaluated on the Raspberry pi, Arduino, Xbee,
Zigbee, automatic drip irrigation system.
This system contributes an efficient and fairly cheap automation
Irrigation system. System once installed has no maintenance cost and is
easy to use.
DISADVANTAGES
The limitation of this design is that the failure of any particular
Part or device is not informed and has to be tested manually.
In this system used for only in home gardens automatic drip irrigation
system to water 50 pots.
2.2. Chandan kumar sahu, Pramitee Behera, A LOW COST SMART
IRRIGATION CONTROL SYSTEM, ieee sponsored 2nd international

14

conference on electronics and communication system (icecs 2015) 978-1-47887225-8/15/$31.00 2015 ieee.
In this system present a prototype for fully automation accessing of irrigation
motor where Prototype includes number of sensor node placed in different
directions of farm field. Each Sensors are integrated with a wireless networking
device and the data received by the ATMEGA-328 microcontroller which is on a
ARDUINO-UNO development board. The RASPBERRY-Pi is use for send
messages through internet correspondence to the microcontroller process. For
experimentation we have abstracted number of soil moisture sensor used in
different direction of the farm fields. The soil moisture in each direction of field is
sensed by sensor node and the sensed data is sent to microcontroller node through
wireless networking device. On receiving sensor value the controller node checks
it with required soil moisture value. When soil moisture in a particular field is not
up to required level then controller node switch on the motor to irrigate associated
field and the RASPBERRY-Pi process all data and notification SMS is send to
registered mobile phone which is registered in RASPBERRY-Pi. The
RASPBERRY-Pi is monitoring with a screen to see the current status of the
irrigation and use for change the setting of user required.
ADVANTAGES
By using the automatic irrigation system it optimizes the usage of water
by reducing wastage and reduce the human intervention for farmers.
It saves energy also as it automatic controlling the system. So there are the
system is OFF when the field is wet and automatically start when the field
id dry.

It is implemented in all type of irrigation system (channel, sprinkler,


drip). And we present also less number of sensor nodes to use in a large
area of field so the cost of the system also decrease.

15

Power consumption of the wireless network devices are also less and the
system perform a long time function.

DISADVANTAGES
In this methods using less number of sensor so cost is decrease but large
area is not covered in big agriculture farm.
2.3. H.N.Kamalaskar, Dr. P.H.Zope, SURVEY OF SMART IRRIGATION
SYSTEM, International Journal of Engineering Sciences & Research
TechnologyISSN: 2277-9655,Scientific Journal Impact Factor: 3.449 (ISRA),
Impact Factor: 1.852.
Basically, this system is aimed to design automatic irrigation system for elderly,
disable people with android platform. Theme of the project is activation or
deactivation of appliances wirelessly through android applications, these
commands are given by authenticated person, who will activate or deactivate the
electric appliance (irrigation motor) and also provide current status of appliances
Any irrigation system consists of a number of electronic and electrical appliances
and gadgets which can be controlled remotely. A digital code for a given key on the
special control is electronically modulated and transmitted. At the receiver side the
same is demodulated to extract the required control signal which is then fed to the
microcontroller, depending upon the microcontroller programming particular to
that received code an action is initiated. For a large irrigation it becomes difficult
to attain the line of sight and in turn its range. Also as each appliance/equipment
will have their own different control units, it becomes difficult to manage the
number of controls and also is not user friendly.
ADVANTAGES
16

In this systems Android is an operating system with a set of core


applications including an email client, SMS program, calendar, maps,
browser, contacts and others all applications are written using java
programming language.
Android has very wide range of applications now a days android is used
for controlling multiple applications.
DISADVANTAGES
Main drawback of the system is these aspects of the idea make it very
adaptable in farms as well as household purpose only not used for big
agriculture form.
2.4. S. R. Kumbhar, Arjun P. Ghatule , MICROCONTROLLER BASED
CONTROLLED IRRIGATION SYSTEM FOR PLANTATION , Proceedings
of the International Multi Conference of Engineers and Computer Scientists
2013 Vol II, IMECS 2013, March 13 - 15, 2013, ISBN: 978-988-19252-6-8
ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)
In the present work supervisory PIC microcontroller based irrigation system is
developed for agricultural plantation. A piece of land is divided into four sectors.
Humidity sensors are inserted just below the upper layer of the soil near each tree.
The output of sensors varies according to the variation of percentage of humidity
of soil. Minimum humidity output is set and the corresponding sensor output is
compared through the comparator. Humidity sensor output goes below the setpoint value then comparator is set to high, all the comparators outputs are
connected to logic circuit. If any one of the input goes high, then OR gate provides
high logic to 4-20 mA current loop. This output is coupled to the instrumentation
amplifier which provides enough driving current to the one of the ADC channel.
17

A software program is developed in assembly language for reading the data


through the channels. If the data is high then the controller set the motor to ON
state by providing the signal to relay. The motor with outlet pipe is connected to
each sector with separate valve. At the same time data is provided to the stepper
motor to open the valve. This process continues as long as channel data is high. If
channel data is low, it scans the next channel and the process repeats. This system
helps to provide water for the plants whenever humidity goes below the set-point
value.
ADVANTAGES
In the design single microcontroller can control the whole process.
It saves human energy, time, cost, etc.
Not only the irrigation, the other factors like temperature, rainfall, wind,
etc.
DISADVANTAGES
This system design only for based on the microcontroller and store the all
the states from memory module ,so no data will be sending the mobile or
email.
2.5. Sangamesh Malge, Kalyani Bhole, NOVEL, LOW COST REMOTELY
OPERATED

SMART

IRRIGATION

SYSTEM,

2015

International

Conference on Industrial Instrumentation and Control (ICIC) College of


Engineering Pune, India. May 28-30, 2015 978-1-4799-7165-7/15/$31.00 2015
IEEE

18

This system design develops a small embedded system device (ESD) which takes
care of a whole irrigation process and makes farmers life easier. The PIC18F4550
microcontroller interfaced with GSM module works as a brain and several sensors
like temperature, level and rain works as eyes of this ESD. The power detecting
circuit and battery backup unit take this ESD to next level by informing presence
of three phase power supply in the field. The farmer just needs to send predefined
commands through SMS from her/his mobile phone to this ESD to carry out
irrigation process effectively. If and only if eyes of the ESD sees all parameters are
within a safe range, the PIC18F4550 starts irrigation process by starting the
irrigation pump. The farmer gets time to time feedback from ESD through SMS
about the action that has taken place by PIC18F4550. The GSM module allows
farmers to operate and monitor a remotely placed irrigation pump from anywhere
far from their field. The free SMS facilities provided to farmers makes it more cost
effective. In this way, this new engineering technology makes farmers life
easier by providing remotely operated, more efficient and cost effective irrigation
system.
ADVANTAGES
Prevention of wastage water and electricity are the main advantages of this
system.
Authentication facility to avoid unauthorized operation, uniform
distribution of water.
Inbuilt ADC of the microcontroller also reduces need for a external
hardware circuitry.
DISADVANTAGES

19

This project system is very cost effective and enhances agriculture


productivity.
2.6. Pandurang H. Tarange, Rajan G. Mevekari, Prashant A. Shinde, WEB
BASED
SENSOR

AUTOMATIC
NETWORK

IRRIGATION
AND

SYSTEM

EMBEDDED

USING

LINUX

WIRELESS
BOARD,2015

International Conference on Circuit, Power and Computing Technologies


[ICCPCT] 978-1-4799-7075-9/15/$31.00 2015 IEEE
In this proposed system WSN is consists of two nodes, coordinator node and
Router/End device node. Each node mainly consists of memory, processor and an
RF transceiver. The coordinator node is based on Raspberry Pi (Rpi) embedded
Linux board and End device is based on Arduino UNO Atmega328 platform. The
function of the coordinator node in the system is to initiate the communication
with distributed End device nodes via the ZigBee wireless communication protocol
and continuously collects the soil moisture and soil temperature data and store
collected data in the database. The database is created on the raspberry Pi board
which is a MySQL database. Coordinate node analyzes the received data and
decides the water required for the soil. If the analyzed data shows that water is
required, the coordinator node sends commands to water pump controller make
Irrigation on. Rpi has an Ethernet interface and it runs a simple data web server.
Hence coordinator node allows data collection over ZigBee, and data monitoring
and system control from web browser remotely.
ADVANTAGES
By providing the web interface and automation user can easily monitor the
system and it will minimize the human intervention.
DISADVANTAGES
20

In this system maintenance cost very high and also maintenance is difficult.

2.7. Stefan Koprda, Zoltan Balogh, Duan Hrub, Milan Turni PROPOSAL
OF THE IRRIGATION SYSTEM USING LOW-COST ARDUINO SYSTEM
AS PART OF A SMART HOME, SISY 2015 IEEE 13th International
Symposium on Intelligent Systems and Informatics September 1719, 2015,
Subotica, Serbia 978-1-4673-9388-1/15/$31.002015 IEEE.
The project describes a creation design of automated control and remote
management of irrigation system by the use of low-cost device Arduino and
operating system Android. The irrigation system consists of several modules which
can be divided into three parts: control part, regulatory part and server part. The
design brings comfort, automation and mostly energy savings for intelligent
systems.
Most of end-users cannot simply choose an affordable smart house system which
they can rely on as a comprehensive system. This is because although recent works
are done in designing the general overview of the possible remote access
approaches for controlling devices or in cases simulating the smart home itself, and
designing the main server, the design and implementation of an affordable smart
home remote control application has been limited to simply the computer
applications and just in cases mobile and web application development. Irrigation
is an effort to fulfill water needs of plants so that they can grow optimally with the
provision of additional water.The monitoring activity is closely related to data
transmission and the most crucial thing in data transmission is how to transmit data
from one place to another where the data received should be same to data sent.
21

Data monitoring of irrigation is important because it will be used in the decisionmaking process. This is one possible way of automatic irrigation, such as how to
control setting of irrigation network, how to open or close the floodgates, and how
much flow of water to be used so that it can conserve water usage.

ADVANTAGES
The advantage of the irrigation system is its autonomous control of solenoid valves
which enable water into the irrigation. User can fully control the whole irrigation
system by the use of his mobile device.
Another advantage of the system is:
Possibility of operation in the case of Internet connection failure.
Report of the system through web interface.
Possibility to refill the system by other sensing unit.

DISADVANTAGES
the created application runs only under operating system Android 4 and
above.
necessity to calibrate the used humidity sensor to reach the highest
effectiveness of the irrigation system.
2.8. Mr.Muzammil Hussain, Mr.S.P.Gawate, Dr.P.S.Prasad,
Ms.P .A.Kamble ,SMART IRRIGATION SYSTEM WITH THREE LEVEL
ACCESS MECHANISMS 2015 international conference on computation of
power, energy,informationand communication 978-1-4673-6524-6/15/$ 31.00
2015IEEE
22

This system proposing a complete agricultural solution for the farmer based on
Wireless Sensor Networks and GPRS technology. The main technology used here
Wireless Sensor Networks (WSNs) have attracted much attention in recent years.
They are used for collecting, storing and sharing sensed data this system also
improves the traditional irrigation system enabling the irrigation system to have
high efficiency and low water usage. The existing irrigation system is tedious, time
consuming and very wasteful in water usage. This irrigation system gives the best
feature than the traditional one.
ADVANTAGES
This project system consist of less hardware as compared to the previous
model hence it is compact as compared to the previous system.
This design stem is more cost efficient than the previous system this claim
is made on the fact that the proposed system does not need the heavy and
expensive hardware for implementation.
It requires very less maintenance
2.9. P. Alagupandi, R. Ramesh, S.Gayathri, SMART IRRIGATION SYSTEM
FOR OUTDOOR ENVIRONMENT USING TINY OS, 2014 international
conference on computation of power, energy, information and communication
(iccpeic) 978-1-4799-3826-1i14/$3l.00moI4 IEEE
In this system design simple and cost effective smart irrigation system. Our
system deploys wireless sensor motes from a wireless sensor network. The system
is modelled in outdoor environment using TINY OS based IRIS motes to measure
the moisture level of the paddy field and to set the threshold value. MDAlOOCB
sensor motes can measure up to -40c to 80c and operate at a range between 1.6 to
23

2.7 volts. The project scheme uses data visualization and monitoring tool
MOTEVIEW 2.0f developed by crossbow technology. project model is easy to
implement and requires less number of IRIS sensor motes as compared to other
manual operating people. The new WSN is named as motes which are designed for
specific application and run by RTOS named as TinyOS. Applications are written
in MOTEWORKS for reading and sending message to the sensor. system mote has
got better visualization and monitoring GUI.TinyOS Supports external interfaces
with its own board process.
Overview Of Paragraph
The overall paper explain above and more advantages and disadvantages.
Currently in the world change very marten so the proposed system explain new
technology for smart irrigation system using ir thermal camera to detect thermal
images from land and in the system fully automated. Draw backs of above systems
is modified and operating easily.

24

CHAPTER 3

EXISTING SYSTEM
3.1.

INTRODUCTION

There are different types of method for irrigating farm field for different
types crop field. Basically Indian farmer use these three methods channel
system, sprinkler system, drip system. Channel system is a traditional method of
irrigation. But a smart irrigation system is a new technology to irrigating farm
field automatically.
3.2.METHODS OF IRRIGATION
The water available in wells, lakes and canals is lifted up by different
methods in different regions, for taking it to the fields. Cattle and human labour
is used in these methods. So these methods are cheaper, but less efficient. The
various traditional ways are
3.2.1.Moat (Pulley system)
A moat or pulley system of irrigation is one that involves pulling water up
from a well or other water source in order to water plants and other crops. It is
not often in use as it can be time consuming and may not always be as efficient
as other methods of irrigation. On the other hand, it does not cost a lot of money
to install a moat or pulley irrigation system as it does not require vast
technology or machinery invested in it

25

Figure 3.1. Moat (Pulley system) irrigation system


3.2.2.Chain pump method

Figure 3.2. Chain pump irrigation system


These ancient Chinese irrigation systems use round metal discs and a
long loop of metal chain to water soil and plants. Each metal disc runs through a
pool of liquid, and each disc collects some water during this process. When the
chain is pulled, the metal disc rises up to the top, and the water held inside pours
out, hydrating the earth and flora. This low-cost method of traditional irrigation
has been practiced for centuries.

26

3.2.3.Rahat (Persian wheel) method


What exactly is a Persian wheel? Also known as Rahat (in Urdu), it's a
simple water lifting device, where a number of small pots are attached to a long
chain. Two gear wheels make up the system and as the first one is revolved, the
pots each dip and swallow water from the well and soon after pours itself out to
a metallic shaft which in turns empties into an intricate network of troughs that
distributes water adequately through the cropped area. It is believed that the
technology originated in Egypt and as world shrunk through extensive trading,
it spread to India and China.

Figure 3.3. Rahat (Persian wheel) irrigation system


3.2.4.Channel System
This system is widely used in farming irrigation system. As this system is
a very low cost system for irrigating a large area farming field. In this system
pipes are connected with a water pump and while pump started water flow
through pipe a from lake, river, bore well to farming field. And the farmer fully
engaged for irrigating the crop field with number of workers. Huge amount of
water waste and large number of workers are engaged during watering.

27

Figure 3.4.Channel System Irrigation


3.2.5. Sprinkler System
This system is more useful whether the water is available in smaller
quantity. When pump started then water flow through main pipe and also flow
through the perpendicular pipes. A nozzle on the top of perpendicular pipe is
joined and rotating automatically at regular intervals. This system is very useful
on the sandy soil. Less number of worker required water waste is less.

Figure 3.5. Sprinkler System Irrigation

28

3.2.6. Drip System


In this system waterfall drop by drop at the position of the roots. It is the
best technology for watering fruit plants, gardens and trees. Water flow through
a main pipe and divided into sub pipes. Special prepared nozzles are attached to
these sub pipes. In this system waste of water is very less and No worker need
for irrigating. When the farmer knows the status of the farm field then start the
motor and chose the direction from nozzles. Then automatically watering the
plants and after some time the farmer check the status of the field and while the
whole crop are irrigating then OFF the motor.

Figure 3.6. Drip System Irrigation


3.2.7. Smart Irrigation System
Above three systems are generally operate by a user but a smart irrigation
tells that the total system is controlled by autonomous mean automatically
control the total irrigation system whether the farmer is not present his farm
field and send messages to the farmer about the information of farm field and
change in operation of the farm field. Which require no worker for operating,
and also less waste of water with compared to previous three methods.
29

Figure 3.7. Smart Irrigation System

CHAPTER 4

30

PROPOSED SYSTEM
4.1 INTRODUCTION
The proposed system is more advanced to the smart irrigation system
The proposed system overcomes the drawbacks of the present system by
employing the IR thermal camera. The proposed system capture the thermal
image of the agri land with the help of IR thermal camera and it split ups the
image to equal sizes.
4.2 BLOCK DIAGRAM
The proposed system function is fully detailed about block diagram
representation of smart irrigation of advanced method

Figure 4.1. Block Diagram

31

4.2.1 Raspberry Pi:


Model B of Raspberry is used in this project. As soon as the email
is received, one of the GPIO is turned high. A program written in Python
programming language has been used to receive email and turning a
GPIO pin high for the requested duration. The same program also sends
the status updates to user's email address. Software libraries used in
Python programming are:
1) SMTP library to send status email
2) IMAP library for email polling
3) BCM for GPIO control in raspberry pi.

Figure 4.2. Raspberry Pi Board


4.2.2. Send Email:
To start the smart irrigation system an email is sent to a defined account
having subject line: run irrigation system for X minutes to run irrigation
system for two minutes, an email with the subject line is sent run irrigation
system for two minutes

32

4.2.3. Email Account:


Raspberry pi will poll for emails in this email account. Google email
account is used in this Project.

4.2.4. IR Thermal camera:


System capture the thermal image of the agri land with the help of IR
thermal camera and it split ups the image to equal sizes. Pi controls the system
depends on the thermal image taken by the IR thermal camera.

Figure 4.3. IR Thermal Camera Image Capture

4.2.5. Relay Board:


One-channel relay board which operates on 5-6V is used here. The circuit
is used to control one 240V power appliance directly from microcontrollers or
low voltage circuits. The connections to one-channel relay board. There are
three pins on the relay board namely normally open (NO), normally closed (NC)
and common (C). The common pin is connected to NC pin when the relay is off
and to the NO pin when the relay is on. The input pin INP receives logic high
from raspberry pi and in turn switches on the relay, thus common is connected
33

to NO which turns the device on till the relay is on. The VCC and GND
pins of the relay are connected to 5V supply and ground respectively.
4.2.6. Power Supply:
The device to be switched, here, is an electrical water pump which runs
on 240V supply. Its one end is connected to the 240 V AC supply and the other
end is connected to NO pin of the relay board.
4.2.7. Water Storage Tank and water pump:
Two 30 litres water storage tanks are used for testing purpose. Each tank
has submersible water pumps with the rating of 220V/50Hz. It draws the current
of 0.23A and power of 18W. The main water pipe is fed back to the water tank
to avoid any water wastage. Water tank has ultrasound distance sensor which
keeps a track of water depth in the tank. As soon as the water level falls below a
threshold level, a signal is sent to microcontroller to open solenoid valve which
is attached to the water tap and thus the water can be refilled into the water tank.
4.2.8. Ultrasound Distance Sensor:
This sensor is used to measure the water level in the tank. The on/off
signal is continuously sent to the solenoid valve and thus the water Level in tank
does not drop below or above a threshold to avoids any damage in the water
pump and also to avoid overflow of water from the water tank.
4.2.9. Solenoid Valve:
A two-port, normally close, 0.5-10bar, 230V-50Hz, rotex solenoid valve
is used in this design. Here, the valve receives the signal from microcontroller
and thus act according.
34

CHAPTER 5
SYSTEM OVERVIEW
5.1. INTRODUCTION
The system overview is one of the main document of hole system it
explain hardware and software details and how working the hardware section
and installing software.
5.2. HARDWARE DESCRIPTION
5.2.1. RASPBERRY PI
The Raspberry Pi is a series of credit cardsized single-board computers
developed in the United Kingdom by the Raspberry Pi Foundation with the
intention of promoting the teaching of basic computer science in schools and
developing countries.
The original Raspberry Pi is based on the Broadcom BCM2835 system
on a chip (SoC), which includes an ARM1176JZF-S 700 MHz processor, Video
Core IV GPU, and was originally shipped with 256 megabytes of RAM, later
upgraded (models B and B+) to 512 MB. The system has Secure Digital (SD)
(models A and B) or MicroSD (models A+ and B+) sockets for boot media and
persistent storage.
In 2014, the Raspberry Pi Foundation launched the Compute Module,
which packages a BCM2835 with 512 MB RAM and an eMMC flash chip into
a module for use as a part of embedded systems.

35

The Foundation provides Debian and Arch Linux ARM distributions for
download.[13] Tools are available for Python as the main programming language,
with support for BBC BASIC (via the RISC OS image or the Brandy Basic
clone for Linux), C, C++, Java, Perl, Ruby, and Squeak Smalltalk.
As of 8 June 2015, about five to six million Raspberry Pis have been
sold. While already the fastest selling British personal computer, it has also
shipped the second largest number of units behind the Amstrad PCW, the
"Personal Computer Word-processor", which sold eight million.
In early February 2015, the next-generation Raspberry Pi, Raspberry Pi 2,
was released. The new computer board is initially available only in one
configuration (model B) and features a Broadcom BCM2836 SoC, with a quadcore ARM Cortex-A7 CPU and a VideoCore IV dual-core GPU; 1 GB of RAM
with remaining specifications being similar to those of the previous generation
model B+.

Raspberry pi is a pocket personal computer with Linux operating system


installed on it. This is super cheap to encourage young people for learning,
programming, experimenting and innovation. Resembling like motherboard,
raspberry pi has all the components to connect inputs, outputs and storage. Its
various components include

Figure 5.1. Block Diagram Of Raspberry Pi


36

ARM CPU/GPU:
This is a Broadcom BCM2836 System on a Chip (SoC) that's made up of
an Quad-core ARM Cortex-A7 900 MHz central processing unit (CPU) Dual
Core Video Core 4 graphics processing unit (GPU) Multimedia Co-Processor
Provides Open GL ES 2.0, hardware-accelerated Open VG, and 1080p30 H.264
high-profile decode Capable of 1Gpixel/s, 1.5Gtexel/s or 24GFLOPs with
texture filtering and DMA infrastructure.
GPIO Connector:
These are general purpose input/output connection points. 40-pin 2.54
mm (100 mil) expansion header: 2x20 strip Providing 27 GPIO pins as well as
+3.3 V, +5 V and GND supply lines.
RCA:
This allows connection with analog TV or other similar points.
Audio Out:
This point provides connection with audio out devices like speakers or
headphones. 3.5mm jack, HDMI.
LED: This is used for indicator lights.
USB:
4 x USB 2.0 Connector , Common connection port

for peripheral

devices like mouse, keyboard etc.


HDMI:
This allows connection with compatible devices
with the use of HDMI cable.
37

like HD television

Power:
Micro USB socket 5V, 2A.
Memory card slot:
Micro SDIO Full-sized SD card slot to hold the LINUX operating
system SD card and is required for booting.
Ethernet:
This is used for wired network. 10/100 Base T Ethernet socket.

Figure 5.2. Raspberry Pi Kit

5.2.1.1. APPLICATION IN EDUCATION

As of January 2012, enquiries about the board in the United Kingdom


have been received from schools in both the state and private sectors, with
around five times as much interest from the latter. It is hoped that businesses
will sponsor purchases for less advantaged schools. The CEO of Premier Farnell
said that the government of a country in the Middle East has expressed interest
38

in providing a board to every schoolgirl, in order to enhance her employment


prospects.
In 2014, the Raspberry Pi Foundation hired a number of its community
members including ex-teachers and software developers to launch a set of free
learning resources for its website. The resources are freely licensed under
Creative Commons, and contributions and collaborations are encouraged on
social coding platform GitHub.
The Foundation also started a teacher training course called Picademy
with the aim of helping teachers prepare for teaching the new computing
curriculum using the Raspberry Pi in the classroom. The continued professional
development course is provided free for teachers and is run by the Foundation's
education team.
5.2.1.2.RASPBERRY PI BASIC HARDWARE SETUP
Extra Hardware Needed
The Raspberry Pi board contains a processor and graphics chip, program
memory (RAM) and various interfaces and connectors for external devices.
Some of these devices are essential, others are optional. RPi operates in the
same way as a standard PC, requiring a keyboard for command entry, a display
unit and a power supply. It also requires mass-storage, but a hard disk drive of
the type found in a typical PC is not really in keeping with the miniature size of
RPi. Instead we will use an SD Flash memory card normally used in digital
cameras, configured in such a way to look like a hard drive to RPis processor.
RPi will boot (load the Operating System into RAM) from this card in the
same way as a PC boots up into Windows from its hard disk.
The following are essential to get started:

39

SD card containing Linux Operating system


USB keyboard TV or monitor (with HDMI, DVI, Composite or
SCART input)
Power supply (see Section 1.6 below)
Video cable to suit the TV or monitor used
Recommended optional extras include:
USB mouse
Internet connection, Model A or B: USB WiFi adaptor
Internet connection, Model B only: LAN (Ethernet) cable
Powered USB hub
Case
Connecting Everything Together
1. Plug the preloaded SD Card into the RPi.
2. Plug the USB keyboard and mouse into the RPi, perhaps via a USB hub.
Connect the Hub to power, if necessary.
3. Plug a video cable into the screen (TV or monitor) and into the RPi.
4. Plug your extras into the RPi (USB WiFi, Ethernet cable, external hard drive
etc.). This is where you may really need a USB hub.
5. Ensure that your USB hub (if any) and screen are working.
6. Plug the power supply into the mains socket.
7. With your screen on, plug the power supply into the RPi microUSB socket.

40

8. The RPi should boot up and display messages on the screen.

Operating System Sd Card


As the RPi has no internal mass storage or built-in operating system it
requires an SD card preloaded with a version of the Linux Operating System.
You can create your own preloaded card using any suitable SD card
(4GBytes or above) you have to hand. We suggest you use a new blank card to
avoid arguments over lost pictures.
Preloaded SD cards will be available from the RPi Shop.
Keyboard And Mouse
Most standard USB keyboards and mice will work with the RPi. Wireless
keyboard/mice should also function, and only require a single USB port for an
RF dongle. In order to use a Bluetooth keyboard or mouse you will need a
Bluetooth USB dongle, which again uses a single port. Remember that the
Model A has a single USB port and the Model B has two (typically a keyboard
and mouse will use a USB port each).
Display
There are two main connection options for the RPi display, HDMI (High
Definition) and Composite (Standard Definition).
HD TVs and many LCD monitors can be connected using a full-size
'male' HDMI cable, and with an inexpensive adaptor if DVI is used. HDMI

41

versions 1.3 and 1.4 are supported and a version 1.4 cable is recommended. The
RPi outputs audio and video via HMDI, but does not support HDMI input.
Older TVs can be connected using Composite video (a yellow-toyellow RCA cable) or via SCART (using a Composite video to SCART
adaptor). Both PAL and NTSC format TVs are supported.

Power Supply
The unit is powered via the microUSB connector (only the power pins are
connected, so it will not transfer data over this connection). A standard modern
phone charger with a microUSB connector will do, providing it can supply at
least 700mA at +5Vdc. Check your power supply's ratings carefully. Suitable
mains adaptors will be available from the RPi Shop and are recommended if
you are unsure what to use.
5.2.1.3.ADDITIONAL PERIPHERALS
Internet Connectivity
This may be via an Ethernet/LAN cable (standard RJ45 connector) or a
USB WiFi adaptor. The RPi Model B Ethernet port is auto-sensing which means
that it may be connected to a router or directly to another computer (without the
need for a crossover cable).
USB hub
In order to connect additional devices to the RPi, you may want to obtain
a USB hub, which will allow multiple devices to be used. It is recommended
that a powered hub is used - this will provide any additional power to the
devices without affecting the RPi itself. A USB 2.0 model is recommended.

42

USB 1.1 is fine for keyboards and mice, but may not be fast enough for other
accessories.
Case
Since the RPi is supplied without a case, it will be important to ensure
that you do not use it in places where it will come into contact with conductive
metal or liquids, unless suitably protected.

Expansion & Low-Level Peripherals


If you plan on making use of the low-level interfaces available on the
RPi, then ensure you have a suitable plug for the GPIO header pins.

43

5.2.2. IR THERMAL SENSOR MLX90620


The proposed system of advanced method in smart irrigation system is
using ir thermal camera to captured thermal image from the agri land and
44

mainly used this process ir thermal sensor MLX90620.In the sensor is easily to
detecting or capturing hot and cool difference from the land and also update
states through via email system and automatically open the particular area for
wetness of land water flowing through it.
The thermal image is captured by using the MLX90620 image sensor. By
using this thermometer we can measure the accuracy of 0.5 temperature
difference. So we can identify the temperature difference in the land at different
areas. The captured image is divided into 4 parts. The image can be divided
more than 4 parts. Here we have divided into 4 the image processing algorithm
is applied on the divided parts to identify the temperature difference. Depending
upon the temperature difference we can identify the wetness level of the land.
The Raspberry Pi computers identify the dry areas of the land and if opens the
corresponding valve to irrigate the particular dry area. This method is fast and
very accuracy compared to previous systems.

Figure 5.3. MLX90620 Sensor


The MLX90620 FIRray sensing device, from Melexis, utilizes the
companys innovative non-contact temperature measurement technology to
create a highly cost-effective thermography solution. Covering a -20C to
45

300C temperature range, this 16 x 4 element far infrared (FIR) thermopile


sensor array produces a map of heat values for the target area in real time,
avoiding the need to scan the area with a single point sensor or to use of an
expensive micro bolometer device.

Figure 5.4. MLX90620 using thermal detections


The MLX90620 can greatly simplify the thermal imaging system it is integrated
into by immediately capturing 64 pixel images in 2D, thus keeping the price
point in the range needed for high volume, low cost applications. By integrating
an amplifier and ADC in every pixel, the array offers an adjustable frame rate
from 0.5 Hz to 64 Hz. Accuracy levels of 1.5C are maintained when operating
in the 0C to 50C range. Two field of view (FoV) options are available 60 x
15 and 40 x 10. A high speed I2C compatible digital interface and a triggered
mode for synchronization with a control unit mean that the MLX90620 can be
used individually or combined in multiple devices to form an array with a larger
imaging resolution. FIR imaging is becoming very important within the
automotive arena, allowing safety levels to be improved. The MLX90620
FIRray can be utilized in applications such as pedestrian detection, close range
blind spot detection and occupancy classification. Thermal measurement and
occupancy functions in smart building control systems can also benefit from the
accurate multi-point thermal images provided by this array. In the domestic
46

environment it can enable smarter microwave and conventional ovens.


Concerns about energy efficiency are driving demand for thermal imaging to
detect heat losses in homes and graphically illustrate where improvements are
required. The MLX90620 is highly suited to the consumer and contractor
accessible low resolution thermal imaging cameras needed for such tasks. In
industrial environments the device opens new opportunities for smart process
controls and thermal testing. Finally, as a smart fire detection sensor it will help
fire fighters and other emergency service personnel to detect hot spots, escape
routes and hidden fires.
5.2.2.1.FEATURES AND BENEFITS OF MLX90620
Small size, low cost 16x4 pixels IR array
Easy to integrate
Industry standard four lead TO-39 package
Factory calibrated infrared temperature measurement. Calibration
parameters stored in EEPROM.
NETD (Noise Equivalent Temperature Difference) <0.25K RMS@4Hz
refresh rate
I2C compatible digital interface
Programmable frame rate 0.5Hz64Hz
2.6V supply voltage Current consumption less than 9mA
Measurement start trigger for synchronization with external control unit
2 FOV options
Ta -40 to 85C
To -50 to 300C
Complies with RoHS regulations
5.2.2.2 APPLICATIONS EXAMPLES
47

High precision non-contact temperature measurements;


Temperature sensing element for residential, commercial and industrial
building air conditioning;
Microwave ovens
Home appliances with temperature control;
Thermal Comfort sensor in automotive Air Conditioning control system;
Passenger classification
Automotive blind spot detection;
Industrial temperature control of moving parts;
Identifying thermal leaks in homes
Thermal scanners
Security / safety gates
Intrusion / Movement detection and Imaging
5.3. SOFTWARE DESCRIPTION
OPERATING SYSTEM FOR RASPBERRY PI
The officially available OS for raspberry in PI STORE are
NOOBS (New Out Of Box System)
Raspbian
Raspbian is the Foundations official supported Operating System.
Download it here, or use NOOBS, our easy installer for Raspbian and more.
5.3.1. NOOBS
Beginners should start with NOOBS. You can purchase a pre-installed
NOOBS SD card in the swag store, or download NOOBS from PI store and
follow the NOOBS setup guide in raspberry site help pages.
48

NOOBS is an easy operating system installer which contains Raspbian. It


also provides a selection of alternative operating systems which are then
downloaded from the internet and installed.
NOOBS Lite contains the same operating system installer without
Raspbian pre-loaded. It provides the same operating system selection menu
allowing Raspbian and other images to be downloaded and installed.
Raspbian is the Foundations official supported operating system. You
can install it with NOOBS or download the image below and follow
our installation guide.
Note that the large size of the Raspbian Jessie image means its .zip file
uses a different format internally, and the built-in unzipping tools in some
versions of Windows and MacOS cannot handle it. The file can be successfully
unzipped with7-Zip on Windows and The Unarchiver on Mac (both are free).
Raspbian comes pre-installed with plenty of software for education,
programming and general use. It has Python, Scratch, Sonic Pi, Java,
Mathematica and more.
5.3.2. RASPBAIN OS
Raspbian is a free operating system based on Debian optimized for the
Raspberry Pi hardware. An operating system is the set of basic programs and
utilities that make your Raspberry Pi run. However, Raspbian provides more
than a pure OS: it comes with over 35,000 packages, pre-compiled software
bundled in a nice format for easy installation on your Raspberry Pi.
The initial build of over 35,000 Raspbian packages, optimized for best
performance on the Raspberry Pi, was completed in June of 2012. However,

49

Raspbian is still under active development with an emphasis on improving the


stability and performance of as many Debian packages as possible.
Note: Raspbian is not affiliated with the Raspberry Pi Foundation. Raspbian
was created by a small, dedicated team of developers that are fans of the
Raspberry Pi hardware, the educational goals of the Raspberry Pi Foundation
and, of course, the Debian Project.
Raspbian is a community funded and supported free software effort.
Although Raspbian is free software, the development costs associated with it are
not free.
Raspbian has been the standard Raspberry Pi operating system, more
commonly referred to as a distro, since the Pi arrived in 2012 and we have
seen it grow over time into the capable distro that we use today. Raspbian is a
fork of the massively popular Debian distribution and it is jointly maintained by
the Raspberry Pi Foundation and the community.
Being based on Debian, Raspbian comes with the APT (Advanced
Packaging Tool) as its package manager, which is used to install software from
the vast Raspbian repositories, but Raspbian also comes with raspi-config, a
menu based tool that simplifies the act of managing Raspberry Pi configurations
such as setting up an SSH, overclocking and enabling the official Raspberry Pi
camera.
Since December 2014 the Raspbian desktop has received a notable
improvement to its user interface thanks to the hard work of Simon Long.
Moving away from the cluttered LXDE menu system we now have a simplified
and refined interface that groups applications and configuration tools into
clearer categories. As Raspbian is the default distro for Raspberry Pi it is also
50

the distro that sees the most improvement and innovations examples of this are
the RPi.GPIO library that enables Python to talk to the GPIO (General Purpose
Input Output) pins, Minecraft the popular survival / sandbox game that has seen
a massive investment of time from the community to enable a Python API for
programming the game world. Lastly we have Sonic Pi the Ruby powered
music creation application that has risen in popularity thanks to the efforts of
Sam Aaron.
With the release of the Raspberry Pi 2 we have seen Raspbian receive the
speed boost that it always needed, by no means was it a slouch on the original
Raspberry Pi, but the addition of more RAM and better CPU has enabled it to
become a usable desktop distro that can easily be used as a main machine.
Raspbian has improved since it was first released in 2012 and with each
new release we see more refinements added to it, no wonder the majority of
projects around the world are based upon this distro. It is a rock solid
development base that runs well on the original Raspberry Pi but screams ahead
on the new Raspberry Pi 2 specification.
If you are taking your first steps with the Raspberry Pi or need a solid and
dependable basis for a project, Raspbian has to be your first choice. No other
Raspberry Pi distro can compete with its stability, range of projects nor its
supportive community. Hence why Raspbian is the official distro for the
Raspberry Pi and is supported by a series of projects available via the Raspberry
Pi Foundations learning resources.
5.3.3. INSTALLING RASPBIAN
Installing Operating System Images

51

How to install a Raspberry Pi Operating System image on an SD card.


You will need another computer with an SD card reader to install the image.
We recommend most users download NOOBS which is designed to be
very easy to use. However more advanced users looking to install a particular
image should use this guide.
Download The Image
Official images for recommended Operating Systems are available to
download from the Raspberry Pi website: raspberrypi.org/downloads
Alternative distributions are available from third party vendors.
After downloading the .zip file, unzip it to get the image file (.img) for
writing to your SD card.
Writing An Image To Sd Card
With the image file of the distribution of your choice, you need to use an
image writing tool to install it on your SD card.
Installing Operating System Image Using Windows
Insert the SD card into your SD card reader and check which drive letter
was assigned. You can easily see the drive letter (for example G:) by
looking in the left column of Windows Explorer. You can use the SD
Card slot (if you have one) or a cheap SD adaptor in a USB port.
Download the Win32DiskImager utility from the Source forge Project
page (it is also a zip file); you can run this from a USB drive.
Extract
the
executable
from
the
zip
file
and

run

the Win32DiskImager utility; you may need to run the utility as


administrator. Right-click on the file, and select Run as administrator.
Select the image file you extracted above.

52

Select the drive letter of the SD card in the device box. Be careful to
select the correct drive; if you get the wrong one you can destroy your
data on the computer's hard disk! If you are using an SD card slot in your
computer and can't see the drive in the Win32DiskImager window, try
using a cheap SD adaptor in a USB port.
Click Write and wait for the write to complete.
Exit the imager and eject the SD card.
Installing Software In Raspbian
APT
The easiest way to manage installing, upgrading, and removing software
is using APT (Advanced Packaging Tool) which comes from Debian. If a piece
of software is packaged in Debian and works on the Raspberry Pi's ARM
architecture, it should also be available in Raspbian.
To install or remove packages you need root user permissions, so your
user needs to be in sudoers or you must be logged in as root. Read more
about usersand root.
To install new packages, or update existing ones, you will need an
internet connection.
Note that installing software uses up disk space on your SD card, so you
should keep an eye on disk usage and use an appropriately sized SD card.
Also note that a lock is performed while software is installing, so you
cannot install multiple packages at the same time.
Software Sources

53

APT keeps a list of software sources on your Pi in a file


at /etc/apt/sources.list. Before installing software, you should update your
package list with apt-get update:
sudo apt-get update
Installing A Package With Apt
sudo apt-get install tree
Typing this command should inform the user how much disk space the
package will take up and asks for confirmation of the package installation.
Entering Y (or just hitting Enter, as yes is the default action) will allow the
installation to occur. This can be bypassed by adding the -y flag to the
command:
sudo apt-get install tree -y
Installing this package makes tree available for the user.
Using An Installed Package
tree is a command line tool which provides a visualisation of the
directory structure of the current directory, and all it contains.
Typing tree runs the tree command. For example:
tree
..
hello.py
games
asteroids.py
pacman.py
54

README.txt
tetris.py
Typing man tree gives the manual entry for the package tree
Typing whereis tree shows where tree lives:
tree: /usr/bin/tree
Uninstalling A Package With Apt
Remove
You can uninstall a package with apt-get remove:
sudo apt-get remove tree
The user is prompted to confirm the removal. Again, the -y flag will autoconfirm.
Purge
You can also choose to completely remove the package and its associated
configuration files with apt-get purge:
sudo apt-get purge tree
Upgrading Existing Software
If software updates are available, you can get the updates with sudo aptget update and install the updates with sudo apt-get upgrade, which will upgrade
all of your packages. To upgrade a specific package, without upgrading all the
other out-of-date packages at the same time, you can use sudo apt-get install
somepackage (which may be useful if you're low on disk space or you have
limited download bandwidth).
Searching For Software
55

You can search the archives for a package with a given keyword with aptcache search:
apt-cache search locomotive
sl - Correct you if you type `sl' by mistake
Updating And Upgrading Raspbian
First, update your system's package list by entering the following
command in LXTerminal or from the command line:
sudo apt-get update
Next, upgrade all your installed packages to their latest versions with the
command:
sudo apt-get upgrade
Generally speaking, doing this regularly will keep your installation up to
date, in that it will be equivalent to the latest released image available
fromraspberrypi.org/downloads.
However, there are occasional changes made in the Foundation's
Raspbian image that require manual intervention, for example a newly
introduced package. These are not installed with an upgrade, as this command
only updates the packages you already have installed.
Updating The Kernel And Firmware
The kernel and firmware are installed as a Debian package, and so will
also get updates when using the procedure above. These packages are updated
infrequently and after extensive testing.
Running Out Of Space

56

When running sudo apt-get upgrade, it will show how much data will be
downloaded and how much space it will take up on the SD card. It's worth
checking

with df

-h that

you

have

enough

disk

space

free,

as

unfortunately apt will not do this for you. Also be aware that downloaded
package files (.deb files) are kept in /var/cache/apt/archives. You can remove
these in order to free up space with sudo apt-get clean.
5.3.4.PHYTHON OPENCV
INTRODUCTION TO OPENCV-PYTHON TUTORIALS
OPENCV
OpenCV was started at Intel in 1999 by Gary Bradsky and the first
release came out in 2000. Vadim Pisarevsky joined Gary Bradsky to manage
Intels Russian software OpenCV team. In 2005, OpenCV was used on Stanley,
the vehicle who won 2005 DARPA Grand Challenge. Later its active
development continued under the support of Willow Garage, with Gary Brad
sky and Vadim Pisarevsky leading the project. Right now, OpenCV supports a
lot of algorithms related to Computer Vision and Machine Learning and it is
expanding day-by-day.
Currently OpenCV supports a wide variety of programming languages
like C++, Python, Java etc and is available on different platforms including
Windows, Linux, OS X, Android, iOS etc. Also, interfaces based on CUDA and
OpenCL are also under active development for high-speed GPU operations.
OpenCV-Python is the Python API of OpenCV. It combines the best
qualities of OpenCV C++ API and Python language.
OPENCV-PYTHON

57

Python is a general purpose programming language started by Guido van


Rossum, which became very popular in short time mainly because of its
simplicity and code readability. It enables the programmer to express his ideas
in fewer lines of code without reducing any readability.
Compared to other languages like C/C++, Python is slower. But another
important feature of Python is that it can be easily extended with C/C++. This
feature helps us to write computationally intensive codes in C/C++ and create a
Python wrapper for it so that we can use these wrappers as Python modules.
This gives us two advantages: first, our code is as fast as original C/C++ code
(since it is the actual C++ code working in background) and second, it is very
easy to code in Python. This is how OpenCV-Python works, it is a Python
wrapper around original C++ implementation.
The support of Numpy makes the task easier. Numpy is a highly
optimized library for numerical operations. It gives MATLAB-style syntax. All
the OpenCV array structures are converted to-and-from Numpy arrays. So
whatever operations you can do in Numpy, you can combine it with OpenCV,
which increases number of weapons in your arsenal. Besides that, several other
libraries like SciPy, Matplotlib which supports Numpy can be used with this.
So OpenCV-Python is an appropriate tool for fast prototyping of
computer vision problems.
INSTALL OPENCV-PYTHON IN WINDOWS
installing opencv from prebuilt binaries:
1. Below Python packages are to be downloaded and installed to their
default locations.
1.1. Python-2.7.x.

58

1.2. Numpy
1.3 Matpotlib (Matplotlib is optional, but recommended since we
use it a lot in

our tutorials).

2. Install all packages into their default locations. Python will be installed
to C:/Python27/.
3. After installation, open Python IDLE. Enter import numpy and make
sure Numpy is working fine.
4. Download latest OpenCV release from sourceforge site and doubleclick to extract it.
5. Goto opencv/build/python/2.7 folder.
6. Copy cv2.pyd to C:/Python27/lib/site-packeges.
7. Open Python IDLE and type following codes in Python terminal
building opencv from source:
1. Download and install Visual Studio and CMake.
1.1. Visual Studio 2012
1.2. CMake
2. Download and install necessary Python packages to their default
locations
2.1. Python-2.7.x.
2.2. Numpy
2.3 Matpotlib (Matplotlib is optional, but recommended since we
use it a lot in our tutorials).

59

3. Make sure Python and Numpy are working fine.


4. Download OpenCV source. It can be from Sourceforge (for official
release version) or from Githhub (for latest source).
5. Extract it to a folder, opencv and create a new folder build in it.
6. Open CMake-gui (Start > All Programs > CMake-gui)
7. Fill the fields as follows (see the image below):
7.1. Click on Browse Source... and locate the opencv folder.
7.2. Click on Browse Build... and locate the build folder we
created.
7.3. Click on Configure.
8. You will see all the fields are marked in red. Click on the WITH field
to expand it. It decides what extra features you need. So mark appropriate
fields.
9. Now click on BUILD field to expand it. First few fields configure the
build method.
10. Remaining fields specify what modules are to be built. Since GPU
modules are not yet supported by OpenCV Python, you can completely
avoid it to save time
11. Now click on ENABLE field to expand it.
12. Also make sure that in the PYTHON field, everything is filled.
13. Finally click the Generate button.
14. Now go to our opencv/build folder. There you will find OpenCV.sln
file. Open it with Visual Studio.
60

15. Check build mode as Release instead of Debug.


16. In the solution explorer, right-click on the Solution (or ALL_BUILD)
and build it. It will take some time to finish.
17. Again, right-click on INSTALL and build it. Now OpenCV-Python
will be installed.

CHAPTER 6
IMPLEMENTATION
6.1.THERMAL IMAGE CAPTURING:
The thermal image is captured by using the MLX90620 image sensor. By
using this thermometer we can measure the accuracy of 0.5 temperature
difference. So we can identify the temperature difference in the land at different
areas.
6.2.THERMAL IMAGE PROCESSING:
The captured image is divided into 4 parts. The image can be divided
more than 4 parts. Here we have divided into 4 the image processing algorithm
is applied on the divided parts to identify the temperature difference. Depending
upon the temperature difference we can identify the wetness level of the land.
The Raspberry Pi computers identify the dry areas of the land and if opens the

61

corresponding valve to irrigate the particular dry area. This method is fast and
very accuracy compared to previous systems.

Figure 6.1. Thermal Image Is Captured By Using The MLX90620 Image


Sensor
The implementation of smart irrigation system is done with the small
pocket sized Linux computer raspberry pi. Raspberry pi is the heart of the
system, raspberry pi reads the thermal image from the mlx90620 thermal image
sensor. The captured thermal image will be splitted into 4 parts. Then the
histogram of all parts drawn with the help of open cv software. From that
histogram we can identify the presence of red and yellow colours. Where the
red and yellow colours denotes the dryness of the land. The red and yellow
colours present in the splitted image parts, then the pi computer triggers the
relay to switch on the motor and the water will flow to the land through pipes.
The following picture shows the thermal image of the land.

62

Figure 6.1. T1 part

Figure 6.1. T2 part

63

Figure 6.1. T3 part

Figure 6.1. T4 part

The implementation part for captured thermal image will be splitted into 4
parts in T1,T2,T3and T4.
6.3. HISTOGRAM PROCESSING OF 4 PART
Histogram processing is perfect method thermal image difference in the
land. Histogram is represent the gray level value of thermal image and the gray
level image change hot and cool place.

64

Figure 6.2. Histogram of T1

Figure 6.2. Histogram of T2

Figure 6.2. Histogram of T3

Figure 6.2. Histogram of T4

Figure 6.2. Histogram and Grey level Partitioning

CHAPTER 7
CONCLUSION
In this proposed system have presented the new innovative irrigation system
based on the land temperature. This system comprises the water tank monitoring
system and the land temperature monitoring system, this two systems make the
irrigation fully automatic. The entire system is monitored and controlled by the

65

power full credit card sized microcomputer called Raspberry Pi. Pi board is
powered by Linux operating system.

FUTURE WORK
1.The system can be expanded to monitor the status of agriculture field
through e-mail. So that the user can know the exact status of the agriculture
field even if they are not in the field.
2. The automatic overhead water tank controller can also be implemented.
So that the water in the tank will be re-filled when it is getting empty, this can
be done with help of ultrasonic sensor and the raspberry pi micro-computer.
3.Ureya level monitoring sensor also using for states of ureya level of the
land.

66

REFERENCES

[1] Nikhil Agrawal, Siemens, Smita Singhal, smart drip irrigation system
using raspberry pi and arduino, INTERNATIONAL CONFERENCE ON
COMPUTING, COMMUNICATION AND AUTOMATION (ICCCA2015)
ISBN:978-1-4799-8890-7/15/$31.00 2015 IEEE.
[2] Chandan kumar sahu, Pramitee Behera, a low cost smart irrigation control
system, IEEE SPONSORED 2ND INTERNATIONAL CONFERENCE ON
ELECTRONICS AND COMMUNICATION SYSTEM (ICECS 2015) 978-14788-7225-8/15/$31.00 2015 IEEE.
[3] H.N.Kamalaskar, Dr. P.H.Zope, survey of smart irrigation system,
INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH
TECHNOLOGYISSN: 2277-9655,SCIENTIFIC JOURNAL IMPACT FACTOR:
3.449 (ISRA), IMPACT FACTOR: 1.852.
[4] S.R. Kumbhar, Arjun P. Ghatule , microcontroller based controlled
irrigation

system

INTERNATIONAL

for
MULTI

plantation

PROCEEDINGS

CONFERENCE

OF

OF

THE

ENGINEERS

AND

COMPUTER SCIENTISTS 2013 VOL II, IMECS 2013, MARCH 13 - 15,


2013, ISBN: 978-988-19252-6-8 ISSN: 2078-0958 (PRINT); ISSN: 2078-0966
(ONLINE)

67

[5] Sangamesh Malge, Kalyani Bhole, novel, low cost remotely operated
smart irrigation system, 2015 INTERNATIONAL CONFERENCE ON
INDUSTRIAL INSTRUMENTATION AND CONTROL (ICIC) COLLEGE OF
ENGINEERING PUNE, INDIA. MAY 28-30, 2015 978-1-4799-71657/15/$31.00 2015 IEEE
[6] Pandurang H. Tarange, Rajan G. Mevekari, Prashant A. Shinde, web based
automatic irrigation system using wireless sensor network and embedded
linux board,2015 INTERNATIONAL CONFERENCE ON CIRCUIT, POWER
AND

COMPUTING

TECHNOLOGIES

[ICCPCT]

978-1-4799-7075-

9/15/$31.00 2015 IEEE


[7] Stefan Koprda, Zoltan Balogh, Duan Hrub, Milan Turni, proposal of
the irrigation system using low-cost arduino system as part of a smart
home, SISY 2015 ,IEEE 13TH INTERNATIONAL SYMPOSIUM ON
INTELLIGENT SYSTEMS AND INFORMATICS, SEPTEMBER 1719,
2015, SUBOTICA, SERBIA 978-1-4673-9388-1/15/$31.002015 IEEE.
[8]

Mr.Muzammil

Hussain,

Mr.S.P.Gawate,

Dr.P.S.Prasad,

Ms.P

.A.Kamble ,smart irrigation system with three level access mechanisms,


2015 INTERNATIONAL CONFERENCE ON COMPUTATION OF POWER,
ENERGY,INFORMATIONAND COMMUNICATION 978-1-4673-6524-6/15/$
31.00 2015IEEE
[9] P.Alagupandi, R. Ramesh, S.Gayathri, smart irrigation system for outdoor
environment using tiny os, 2014 INTERNATIONAL CONFERENCE ON
COMPUTATION

OF

POWER,

ENERGY,

INFORMATION

AND

COMMUNICATION (ICCPEIC) 978-1-4799-3826-1I14/$3L.00MOI4 IEEE

68

You might also like