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

INTRODUCTION

For continuously increasing demand of food necessities, its important to rapid improvement
in production of food technology. Agriculture in only the source to provide this. This is the
important factor in human societies to growing and dynamic demand in food production.
Agriculture plays an important role in economy and development. Agriculture plays the
important role in the economy and development, like India.
Indias major source of income is from agriculture sector and 70% of farmers and general
people depend on the agriculture. In India most of the irrigation systems are operated
manually. These outmoded techniques are replaced with semi-automated and automated
techniques.
The available traditional techniques are like ditch irrigation, terraced irrigation, drip
irrigation, sprinkler system. The global irrigation scenario is categorized by increased demand
for higher agricultural productivity, poor performance and decreased availability of water for
agriculture. These problems can be appropriately rectified if we use automated system for
irrigation.
This system is an attempt towards the smart irrigation system concept. An electronic device is
responsible for sensing the temperature and Moisture conditions. The sensor nodes are then
deployed in the irrigation field for sensing moisture value of soil and this sensed data is sent
to controller node. On receiving sensor value the controller node checks it with required soil
moisture value. When this moisture value is not upto the required level in irrigation field
then the motor is switched on to irrigate.
BLOCK DIAGRAM

Power
supply

Micro
controller

plants motor Relay Soil


moisture
sensor

Fig 1.1: Block diagram of Sensor based automated smart irrigation system
DESCRIPTION:
The Sensor based automated smart irrigation system consists of the following blocks:

1. POWER SUPPLY:
Power supply is a reference to a source of electrical power. A device or system
that supplies electrical or other types of energy to an output load or group of loads is called a
power supply unit or PSU. The term is most commonly applied to electrical energy supplies,
less often to mechanical ones, and rarely to others.

2. MICRO CONTROLLER:
Different devices embedded on a single chip are called a Micro Controller.
The ATMEGA 328 is used as a micro controller which consists of an 32 kb of In-System
Programmable Flash Memory.

3. SOIL MOISTURE SENSOR:


Soil moisture sensors typically refer to sensors that estimate volumetric
water content. Another class of sensors measure another property of moisture in soils
called water potential; these sensors are usually referred to as soil water potential sensors and
include tensiometers and gypsum blocks.

4. RELAY:
Relay is an electrical device, typically incorporating an electromagnet,
which is activated by a current or signal in one circuit can switch on and off a current in a
second circuit.

5. DC MOTOR:

DC motor is designed to run on DC electric power. Two examples of


pure DC designs are Michael Faraday's homo polar motor (which is uncommon), and the ball
bearing motor, which is (so far) a novelty. By far the most common DC motor types are the
brushed and brushless types, which use internal and external commutation respectively to
create an oscillating AC current from the DC source, so they are not purely DC machines in a
strict sense.
HARDWARE TOOLS:
1. Atmega 328
2. Soil moisture sensor
3. Relay
4. Motor
SOFTWARE TOOLS:
1. Arduino software
2. Embedded c
ARDUINO UNO BOARD:

Fig: Arduino UNO board used in sensor based automated smart irrigation system

DESCRIPTION:
Arduino/Genuino Uno is a microcontroller board based on the ATmega328P . It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a
USB cable or power it with a AC-to-DC adapter or battery to get started. You can tinker with
your UNO without worrying too much about doing something wrong, worst case scenario
you can replace the chip for a few dollars and start over again.
"Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE)
1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of
Arduino, now evolved to newer releases. The Uno board is the first in a series of USB
Arduino boards, and the reference model for the Arduino platform.
2. MICROCONTROLLER
2.1 INTRODUCTION:
Microcontrollers are "embedded" inside some other device (often a consumer
product) so that they can control the features or actions of the product. Another name for a
microcontroller, therefore, is "embedded controller".
Microcontrollers are dedicated to one task and run one specific program. The program
is stored in ROM (read-only memory) and generally does not change. Microcontrollers are
often low-power devices and has a dedicated input device and often (but not always) has a
small LED or LCD display for output. A microcontroller also takes input from the device it is
controlling and controls the device by sending signals to different components in the device.
For example, the microcontroller inside a TV takes input from the remote control
and displays output on the TV screen. The controller controls the channel selector, the
speaker system and certain adjustments on the picture tube electronics such as tint and
brightness. The engine controller in a car takes input from sensors such as the oxygen and
knock sensors and controls things like fuel mix and spark plug timing. A microwave oven
controller takes input from a keypad, displays output on an LCD display and controls a relay
that turns the microwave generator on and off. A microcontroller is often small and low cost.
The components are chosen to minimize size and to be as inexpensive as possible.

ATMEGA 328:
FEATURES:
High Performance, Low Power AtmelAVR 8-Bit Microcontroller Family
Advanced RISC Architecture
131 Powerful Instructions
Most Single Clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 20 MIPS Throughput at 20MHz
On-chip 2-cycle Multiplier
High Endurance Non-volatile Memory Segments
4/8/16/32Kbytes of In-System Self-Programmable Flash program memory
256/512/512/1KBytes EEPROM
512/1K/1K/2KBytes Internal SRAM
Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
Data retention: 20 years at 85C/100 years at 25C
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
Programming Lock for Software Security
Atmel QTouch library support
Capacitive touch buttons, sliders and wheels
QTouch and QMatrix acquisition
Up to 64 sense channels
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and
Capture Mode
Real Time Counter with Separate Oscillator
Six PWM Channels
8-channel 10-bit ADC in TQFP and QFN/MLF package
Temperature Measurement
6-channel 10-bit ADC in PDIP Package

Temperature Measurement
Programmable Serial USART
Master/Slave SPI Serial Interface
Byte-oriented 2-wire Serial Interface (Philips I2 C compatible)
Programmable Watchdog Timer with Separate On-chip Oscillator
On-chip Analog Comparator
Interrupt and Wake-up on Pin Change
Special Microcontroller Features
Power-on Reset and Programmable Brown-out Detection
Internal Calibrated Oscillator External and Internal Interrupt Sources
Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,
Standby, and Extended Standby
I/O and Packages
23 Programmable I/O Lines
28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
Operating Voltage:
1.8 - 5.5V
Temperature Range:

-40C to 85C

Speed Grade:
0 - 4MHz@1.8 - 5.5V, 0 - 10MHz@2.7 - 5.5.V, 0 - 20MHz @ 4.5 - 5.5V
Power Consumption at 1MHz, 1.8V, 25C
Active Mode: 0.2mA
Power-down Mode: 0.1A
Power-save Mode: 0.75A (Including 32kHz RTC)
PIN DIAGRAM:

PC5 1
(RESET)PC6 28
(RXD) 2 PC4
PD0
(TXD) 3 PC3 (ADC3)
PD1 26
(INT0) 4
PC2
PD2 25
(INT1) 5 PC1
PD3 24 (ADC1)
(XCK/T0) 6 PC0
PD4 23 (ADC0)
VCC 7 GND
GND 22
8 AREF
21
(XTAL1/TOSC1) 9 AVCC
PB6 20
10 PB5 (SCK)
(XTAL2/TOSC2)
19 PB7
(T1)11 PB4 MISO)
PD5 18
(AIN0) 12 PB3 (MOSI/OC2)
PD6 17
(AIN1) 13 PB2 (SS/OC1B)
PD7
(ICP1) PB1 (OC1A)
14

Fig:Pin diagram of AVR Atmega 328


ARCHITECTURE:

Fig 2.2: Internal Architecture of AVR ATMEGA 328


2.2.2 PIN DESCRIPTIONS:
VCC:
Digital supply voltage.
GND:
Ground.

Port B (PB7 to PB0) XTAL1/XTAL2/TOSC1/TOSC2:


Port B is an 8-bit bi-directional I/O
port with internal pull-up resistors (selected for each bit). The Port B output buffers have
symmetrical drive characteristics with both high sink and source capability. As inputs, Port B
pins that are externally pulled low will source current if the pull-up resistors are activated.
The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not
running. Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit. A Depending
on the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator
amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB[7:6] is
used as TOSC[2:1] input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.

Port C (PC5 to PC0):


Port C is a 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The PC[5:0] output buffers have symmetrical drive characteristics
with both high sink and source capability. As inputs, Port C pins that are externally pulled
low will source current if the pull-up resistors are activated. The Port C pins are tri-stated
when a reset condition becomes active, even if the clock is not running.

PC6/ RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that
the electrical characteristics of PC6 differ from those of the other pins of Port C. If the
RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for
longer than the minimum pulse length will generate a Reset, even if the clock is not running.
Shorter pulses are not guaranteed to generate a Reset. The various special features of Port C
are elaborated in the Alternate Functions of Port C section.

Port D (PD7 to PD0):


Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins that are
externally pulled low will source current if the pull-up resistors are activated. The Port D pins
are tri-stated when a reset condition becomes active, even if the clock is not running.
Port A (PA7 to PA0):
Port A is an 8-bit analog pins used to transfer analog data in the circuit.

AVCC:
AVCC is the supply voltage pin for the A/D Converter, PC [3:0], and PE [3:2]. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it
should be connected to VCC through a low-pass filter. Note that PC [6:4] use digital supply
voltage, VCC.

AREF:
AREF is the analog reference pin for the A/D Converter. 5.2.9. ADC [7:6] (TQFP and
VFQFN Package Only) In the TQFP and VFQFNpackage, ADC [7:6] serve as analog inputs
to the A/D converter. These pins are powered from the analog supply and serve as 10-bit
ADC channels.

AVR ATMEGA 328 MEMORIES:


In-System Reprogrammable Flash Program Memory:
The ATmega328/P contains 32Kbytes On-chip In-System Reprogrammable Flash
memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is
organized as 16K x 16. For software security, the Flash Program memory space is divided
into two sections - Boot Loader Section and Application Program Section in the device . The
Flash memory has an endurance of at least 10,000 write/erase cycles. The ATmega328/P
Program Counter (PC) is 14 bits wide, thus addressing the 16K program memory locations.
The operation of Boot Program section and associated Boot Lock bits for software protection
are described in detail in Boot Loader Support Read-While-Write Self-Programming. Refer
to Memory Programming for the description on Flash data serial downloading using the SPI
pins. Constant tables can be allocated within the entire program memory address space, using
the Load Program Memory (LPM) instruction. Timing diagrams for instruction fetch and
execution are presented in Instruction Exectution Timing.
Figure: program memory map ATmega328/p
Program memory
0x0000

Application
Flash Section

Boot Flash 0x3FF


Section F
Fig 2.3: ISP memory
map

SRAM DATA MEMORY:


The lower 1120 Data memory locations address the Register File, the I/O
Memory, and the internal data SRAM. The first 96 locations address the Register File
and I/O Memory, and the next 1024 locations address the internal data SRAM. The
five different addressing modes for the Data memory cover: Direct, Indirect with
Displacement, Indirect, Indirect with Pre-decrement, and Indirect with Post-
increment. In the Register File, registers R26 to R31 feature the indirect addressing
pointer registers. The direct addressing reaches the entire data space. The Indirect
with Displacement mode reaches 63 address locations from the base address given by
the Y-register or Z-register. When using register indirect addressing modes with
automatic pre-decrement and post-increment, the address registers X, Y and Z are
decremented or incremented. The 32 general purpose working registers, 64 I/O
Registers, and the 1024 bytes of internal data SRAM in the ATmega8 are all
accessible through all these addressing modes.
Fig 2.4: SRAM data memory

DATA MEMORY ACCESS TIMES:


This section describes the general access timing concepts for internal memory access.

Fig 2.5: Timing diagram of data memory access


EEPROM DATA MEMORY:
The ATmega328/P contains 1K bytes of data EEPROM memory. It is organized as a separate
data space, in which single bytes can be read and written. The EEPROM has an endurance of
at least 100,000 write/erase cycles. The access between the EEPROM and the CPU is
described in the following, specifying the EEPROM Address Registers, the EEPROM Data
Register, and the EEPROM Control Register. See the related links for a detailed description
on EEPROM Programming in SPI or Parallel Programming mode.

EEPROM Read/Write Access:


The EEPROM Access Registers are accessible in the I/O space. A self-timing function,
however, lets the user software detect when the next byte can be written. If the user code
contains instructions that write the EEPROM, some precautions must be taken. In heavily
filtered power supplies, VCC is likely to rise or fall slowly on power-up/down. This causes
the device for some period of time to run at a voltage lower than specified as minimum for
the clock frequency used. In order to prevent unintentional EEPROM writes, a specific write
procedure must be followed. When the EEPROM is read, the CPU is halted for four clock
cycles before the next instruction is executed. When the EEPROM is written, the CPU is
halted for two clock cycles before the next instruction is executed.

EEPROM Address Register High:


When addressing I/O Registers as data space using LD and ST instructions, the provided
offset must be used. When using the I/O specific commands IN and OUT, the offset is
reduced by 0x20, resulting in an I/O address offset within 0x00 - 0x3F.
Name: EEARH
Offset: 0x42
Reset: 0x0X
Property: When addressing as I/O Register: address offset is 0x22
bit 7 6 5 4 3 2 1 0
EEAR9 EEAR8
Access R/W R/W
Reset X X
Bit 1 EEAR9:EEPROM Address 9
Bit 0 EEAR8:EEPROM Address 8

EEPROM Address Register Low:


When addressing I/O Registers as data space using LD and ST instructions, the provided
offset must be used. When using the I/O specific commands IN and OUT, the offset is
reduced by 0x20, resulting in an I/O address offset within 0x00 - 0x3F.

Name: EEARL
Offset: 0x41
Reset: 0xXX
Property: When addressing as I/O Register: address offset is 0x21

EEAR7 EEAR6 EEAR5 EEAR4 EEAR3 EEAR2 EEAR1 EEAR0


bit 7 6 5 4 3 2 1 0
Access R/W R/W R/W R/W R/W R/W R/W R/W

Reset X X X X X X X X
Bits 7:0 EEARn:EEPROM Address:
The EEPROM Address Registers EEARH and EEARL specify the EEPROM address in
the 1K Bytes EEPROM space. The EEPROM data bytes are addressed linearly between 0 and
255/511/511. The initial value of EEAR is undefined. A proper value must be written before
the EEPROM may be accessed.

EEPROM Data Register:


When addressing I/O Registers as data space using LD and ST instructions, the provided
offset must be used. When using the I/O specific commands IN and OUT, the offset is
reduced by 0x20, resulting in an I/O address offset within 0x00 - 0x3F.
Name: EEDR
Offset: 0x40
Reset: 0x00
Property: When addressing as I/O Register: address offset is 0x20

Bit 7 6 5 4 3 2 1 0
EEDR[7,0]
Access R/W R/W R/W R/W R/W R/W R/W R/W
Reset 0 0 0 0 0 0 0 0
Bits 7:0 EEDR[7:0]:EEPROM Data
For the EEPROM write operation, the EEDR Register contains the data to be written to the
EEPROM in the address given by the EEAR Register. For the EEPROM read operation, the
EEDR contains the data read out from the EEPROM at the address given by EEAR.

EEPROM Control Register


When addressing I/O Registers as data space using LD and ST instructions, the provided
offset must be used. When using the I/O specific commands IN and OUT, the offset is
reduced by 0x20, resulting in an I/O address offset within 0x00 - 0x3F.
Name: EECR
Offset: 0x3F
Reset: 0x00
Property: When addressing as I/O Register: address offset is 0x1F
7 6 5 4 3 2 1 0
bit
EEPM1 EEPM0 EERIE EEMPE EEPE EERE

Access R/W R/W R/W R/W


R/W R/W
Reset X X 0 0
Bits 5:4 EEPMn:EEPROM Programming Mode Bits [n = 1:0]
The EEPROM Programming mode bit setting defines which programming action that will be
triggered when writing EEPE. It is possible to program data in one atomic operation (erase
the old value and program the new value) or to split the Erase and Write operations in two
different operations. The Programming times for the different modes are shown in the table
below. While EEPE is set, any write to EEPMn will be ignored. During reset, the EEPMn bits
will be reset to 0b00 unless the EEPROM is busy programming.

EEPROM Mode Bits:


EEPM[1:0] Programming time Operation
00 3.4ms Erase and write in one operation
01 1.8ms Erase only
10 1.8ms Write only
11 - Reserved for future use
Bit 3 EERIE:EEPROM Ready Interrupt Enable:
Writing EERIE to one enables the EEPROM Ready Interrupt if the I bit in SREG is set.
Writing EERIE to zero disables the interrupt. The EEPROM Ready interrupt generates a
constant interrupt when EEPE is cleared. The interrupt will not be generated during
EEPROM write or SPM.
Bit 2 EEMPE:EEPROM Master Write Enable:
The EEMPE bit determines whether writing EEPE to '1' causes the EEPROM to be written.
When EEMPE is '1', setting EEPE within four clock cycles will write data to the EEPROM at
the selected address.
If EEMPE is zero, setting EEPE will have no effect. When EEMPE has been written to '1' by
software, hardware clears the bit to zero after four clock cycles. See the description of the
EEPE bit for an EEPROM write procedure.

Bit 1 EEPE:EEPROM Write Enable:


The EEPROM Write Enable Signal EEPE is the write strobe to the EEPROM. When address
and data are correctly set up, the EEPE bit must be written to '1' to write the value into the
EEPROM. The EEMPE bit must be written to '1' before EEPE is written to '1', otherwise no
EEPROM write takes place. The following procedure should be followed when writing the
EEPROM (the order of steps 3 and 4 is not essential):
1. Wait until EEPE becomes zero.
2. Wait until SPMEN in SPMCSR becomes zero.
3. Write new EEPROM address to EEAR (optional).
4. Write new EEPROM data to EEDR (optional).
5. Write a '1' to the EEMPE bit while writing a zero to EEPE in EECR.
6. Within four clock cycles after setting EEMPE, write a '1' to EEPE.
The EEPROM cannot be programmed during a CPU write to the Flash memory. The software
must check that the Flash programming is completed before initiating a new EEPROM write.
Step 2 is only relevant if the software contains a Boot Loader allowing the CPU to program
the Flash. If the Flash is never being updated by the CPU, step 2 can be omitted.

Bit 0 EERE:EEPROM Read Enable:


The EEPROM Read Enable Signal EERE is the read strobe to the EEPROM. When the
correct address is set up in the EEAR Register, the EERE bit must be written to a '1' to trigger
the EEPROM read. The EEPROM read access takes one instruction, and the requested data is
available immediately. When the EEPROM is read, the CPU is halted for four cycles before
the next instruction is executed. The user should poll the EEPE bit before starting the read
operation. If a write operation is in progress, it is neither possible to read the EEPROM, nor
to change the EEAR Register. The calibrated Oscillator is used to time the EEPROM
accesses. See the following table for typical programming times for EEPROM access from
the CPU.

EEPROM Programming Time:


Symbol Number of calibrated RC oscillator Typ. programming time
cycles
EEPROM write 26,368 3.3ms

2.2.4 CRYSTAL OSCILLATOR:


XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier
which can be configured for use as an On-chip Oscillator. Either a quartz crystal or a ceramic
resonator may be used. The CKOPT Fuse selects between two different Oscillator amplifier
modes. When CKOPT is programmed, the Oscillator output will oscillate a full rail-
torailswing on the output. This mode is suitable when operating in a very noisy environment
or when the output from XTAL2 drives a second clock buffer. This mode has a wide
frequency range. When CKOPT is unprogrammed, the Oscillator has a smaller output swing.
This reduces power consumption considerably. This mode has a limited frequency range and
it cannot be used to drive other clock buffers.
For resonators, the maximum frequency is 8MHz with CKOPT unprogrammed and
16MHz with CKOPT programmed. C1 and C2 should always be equal for both crystals and
resonators. The optimal value of the capacitors depends on the crystal or resonator in use, the
amount of stray capacitance, and the electromagnetic noise of the environment. Some initial
guidelines for choosing capacitors for use with crystals are given in Table 4. For ceramic
resonators, the capacitor values given by the manufacturer should be used.

Fig 2.6: Crystal Oscillator

TIMER/COUNTER OSCILLATOR:
For AVR microcontrollers with Timer/Counter Oscillator pins (TOSC1 and TOSC2),
the crystal are connected directly between the pins. By programming the CKOPT Fuse, the
user can enable internal capacitors on XTAL1 and XTAL2, thereby removing the need for
external capacitors. The Oscillator is optimized for use with a 32.768kHz watch crystal.
Applying an external clock source to TOSC1 is not recommended.
SYSTEM CONTROL AND RESET:
Resetting the AVR:
During Reset, all I/O Registers are set to their initial values, and the program starts
execution from the Reset Vector. If the program never enables an interrupt source, the
Interrupt Vectors are not used, and regular program code can be placed at these locations.
This is also the case if the Reset Vector is in the Application section while the Interrupt
Vectors are in the boot section or vice versa.
The I/O ports of the AVR are immediately reset to their initial state when a reset
source goes active. This does not require any clock source to be running. After all reset
sources have gone inactive, a delay counter is invoked, stretching the internal reset. This
allows the power to reach a stable level before normal operation starts. The time-out period of
the delay counter is defined by the user through the CKSEL Fuses.

Reset Sources:
The device has the following sources of reset:
Power-on Reset. The MCU is reset when the supply voltage is less than the Power-
on Reset threshold (VPOT).
External Reset. The MCU is reset when a low level is present on the RESET pin for
longer than the minimum pulse length.
Watchdog System Reset. The MCU is reset when the Watchdog Timer period
expires and the Watchdog System Reset mode is enabled.
Brown-out Reset. The MCU is reset when the supply voltage VCC is less than the
Brown-out Reset threshold (VBOT) and the Brown-out Detector is enabled.

2.2.5 WATCHDOG TIMER:


If the watchdog timer is not needed in the application, the module should be turned
off. If the watchdog timer is enabled, it will be enabled in all sleep modes and hence always
consume power. In the deeper sleep modes, this will contribute significantly to the total
current consumption.

Features:
Clocked from separate On-chip Oscillator
Three operating modes: Interrupt System Reset Interrupt and System Reset
Selectable Time-out period from 16ms to 8s
Possible Hardware Fuse Watchdog always on (WDTON) for fail-safe mode
Overview:
The device has an Enhanced Watchdog Timer (WDT). The WDT is a timer counting
cycles of a separate on-chip 128kHz oscillator. The WDT gives an interrupt or a system reset
when the counter reaches a given time-out value. In normal operation mode, it is required that
the system uses the Watchdog Timer Reset (WDR) instruction to restart the counter before
the time-out value is reached. If the system doesn't restart the counter, an interrupt or system
reset will be issued.

Fig 2.7: Watch dog timer circuit


SOIL MOISTURE SENSOR:
INTRODUCTION:

Soil moisture sensors measure the volumetric water content in soil. Since the
direct gravimetric measurement of free soil moisture requires removing, drying, and
weighting of a sample, soil moisture sensors measure the volumetric water content indirectly
by using some other property of the soil, such as electrical resistance, dielectric constant, or
interaction with neutrons, as a proxy for the moisture content. The relation between the
measured property and soil moisture must be calibrated and may vary depending on
environmental factors such as soil type, temperature, or electric conductivity.
Reflected microwave radiation is affected by the soil moisture and is used for remote
sensing in hydrology and agriculture. Portable probe instruments can be used by farmers or
gardeners.

Soil moisture sensors typically refer to sensors that estimate volumetric


water content. Another class of sensors measure another property of moisture in soils
called water potential; these sensors are usually referred to as soil water potential sensors and
include tensiometers and gypsum blocks.

HISTORY:
Water held in soil plays an important role in the climate system. The dataset released by ESA
is the first remote-sensing soil moisture data record spanning the period 1978 to 2010 a
predecessor of the data now being provided by ESAs SMOS mission. The datasets are now
available to the science community for feedback analyses and climate model validation. The
amount of water held in global soils makes up only about 0.001% of the total water found on
Earth.

It is critical for plant growth, but is also linked to our weather and climate.
This is because soil moisture is a key variable controlling the exchange of water and energy
between the land and the atmosphere: dry soil emits little or no moisture to the atmosphere. A
recently detected decline in the global evaporation trend could, for example, directly be
explained by limited moisture supply.

The relationship between soil moisture and the climate system is not yet
fully understood, and global long-term soil moisture observations have so far not been
available. That means the evaluation of climate models with regard to the drying and wetting
trends and associated feedbacks with temperature is still difficult in many regions worldwide.
DESCRIPTION:

Fig: Soil moisture sensor

A soil moisture sensor using sensor electrodes each designed with a


larger capacitance for reduced sensitivity to soil resistance and increased sensitivity to soil
moisture surrounding the electrode. The soil moisture sensor is provided as a pair of
cylindrical rods each coated with a thin layer of dielectric material, which are buried in the
soil or other medium and are connected to a conversion circuit in which the electrodes act as
a variable capacitance. The capacitance developed by each of the sensor electrodes is related
to the moisture contained in the soil particles surrounding the electrodes. An effective
conducting area is developed by the soil particles in contact with the electrodes and this
determines the value of the variable capacitance presented to the conversion circuit. The
conversion circuit is a multivibrator in which the variable capacitance determines the output
frequency, and this provides a measurement of soil moisture. Alternatively, the conversion
circuit provides the measurement as a voltage output. The use of a relatively thin dielectric
coating on each of the electrodes increases the capacitance and reduces the soil resistance as a
factor in the soil moisture measurement. Based on the cylindrical shape of the sensor
electrodes and dielectric coating, a linear relationship is developed between capacitance and
the electrode length in contact with soil particles containing moisture, which increases the
accuracy of soil moisture measurement at soil depths of interest. The inventive soil moisture
sensor can be used to control valves in automatically-controlled irrigation systems.
FEATURES OF MOISTURE SENSOR ARE:

Extreme low cost with volume pricing.

Not conductivity based.

Insensitive to salinity.

Probe does not corrode over time.

Rugged design for long term use.

Small size.

Consumes less than 7mA for very low power operation.

Precise measurement.

Measures volumetric water content (VWC) or gravimetric water content (GWC).

Output Voltage is proportional to moisture level.

Wide supply voltage range.

Can be buried and is water proof.

Probe is long and slender for wider use, including smaller potted plants.

APPLICATIONS:

Agriculture:

Measuring soil moisture is important for agricultural applications to help farmers manage
their irrigation systems more efficiently.
Knowing the exact soil moisture conditions on their fields, not only are farmers able to
generally use less water to grow a crop, they are also able to increase yields and the quality of
the crop by improved management of soil moisture during critical plant growth stages.

Landscape irrigation:

In urban and suburban areas, landscapes and residential lawns are using soil moisture sensors
to interface with an irrigation controller. Connecting a soil moisture sensor to a simple
irrigation clock will convert it into a "smart" irrigation controller that prevents irrigation
cycles when the soil is already wet, e.g. following a recent rainfall event.

Golf courses are using soil moisture sensors to increase the efficiency of their irrigation
systems to prevent over-watering and leaching of fertilizers and other chemicals into the
ground.

Research:

Soil moisture sensors are used in numerous research applications, e.g. in agricultural
science and horticulture including irrigation planning, climate research, or environmental
science including solute transport studies and as auxiliary sensors for soil
respiration measurements.

Simple sensors for gardeners:

Relatively cheap and simple devices that do not require a power source are available for
checking whether plants have sufficient moisture to thrive. After inserting a probe into the
soil for approximately 60 seconds, a meter indicates if the soil is too dry, moist or wet for
plants.

SPECIFICATIONS:

Parameter Value
Operating voltage +5v dc regulated
Soil moisture Digital voltage is indicated by out pin

WATER LEVELS REQUIRED FOR DIFFERENT CROPS:


Crop Water requirement(mm)

Rice 900-2500

Wheat 450-650

Maize 500-800

Sugarcane 1500-2500

Cotton 700-1300

Groundnut 500-700

Tobacco 400-600

Tomato 600-800

Potato 500-700

Onion 350-550

Sun flower 350-500

Banana 1200-2200

INTERFACE BETWEEN ARDUINO UNO BOARD WITH SOIL


MOISTURE SENSORE:
The connections are shown below:

Soil Moisture Sensor Arduino


Terminals Terminals
Vcc Connects to 5V terminal

GND Connects to GND terminal

AO Connects to an analog terminal (A0-A5)

DO Unconnected

RELAY:
Relay is an electrical device, typically incorporating an electromagnet, which is activated by
a current or signal in one circuit can switch on and off a current in a second circuit.
Fig: Relay

WORKING:
The main operation of relay comes in places where only a low power signal can be used to
control a circuit. They were used to switch the signal coming from one source to another
destination.
The relay switch can be divided into two parts input and output. The input section has coil
which generates magnetic field, when a small voltage from an electric circuit is applied to it.
This voltage is called operating voltage. The output consists of contactors which connects 0v
and disconnects mechanically.
In a basic relay, there are three contactors:
1.Normally open(NO)
2.Normally close(NC)
3.Common

At no input state the common is connected to NC. When the operating voltage is
applied, the relay coil gets energized and the common changes contact to NO.
NO contact is also called a make contact. It closes the circuit when the relay is
activated.
NC contact is also known as break contact. This is opposite to NO contact.

TYPES OF RELAY:
1.Mercury relay
2.Time delay relay
3.Polarized relay

4.Machine tool relay etc.

APPLICATIONS:
The first application of relays was in long telegraph lines, where the weak signal
received at an intermediate station could control a contact, regenerating the signal
for further transmission.
Early electro-mechanical computers such as the ARRA, Harvard Mark II, Zuse Z2,
and Zuse Z3 used relays for logic and working registers. However, electronic
devices proved faster and easier to use.
Relays are much more resistant than semiconductors to nuclear radiation, they are
widely used in safety-critical logic, such as the control panels of radioactive waste-
handling machinery. Electromechanical protective relays are used to detect overload
and other faults on electrical lines by opening and closing circuit breakers.
Relays can perform the basic operations of Boolean combinatorial logic. For
example, the boolean AND function is realised by connecting normally open relay
contacts in series, the OR function by connecting normally open contacts in parallel.

DC MOTOR:

INTRODUCTION:

DC motor is designed to run on DC electric power. Two examples of pure DC designs


are Michael Faraday's homo polar motor (which is uncommon), and the ball bearing motor,
which is (so far) a novelty. By far the most common DC motor types are the brushed and
brushless types, which use internal and external commutation respectively to create an
oscillating AC current from the DC source -- so they are not purely DC machines in a strict
sense.

Fig:DC Motor
TYPES OF DC MOTORS:

There are three types of dc motors:

1. Brushed DC Motors

2. Brushless DC motors

3. Coreless DC motors

BRUSHED DC MOTORS:

The classic DC motor design generates an oscillating current in a wound rotor with a
split ring commentator, and either a wound or permanent magnet stator. A rotor consists of a
coil wound around a rotor which is then powered by any type of battery.

Many of the limitations of the classic commentator DC motor are due to the need for brushes
to press against the commentator. This creates friction. At higher speeds, brushes have
increasing difficulty in maintaining contact. Brushes may bounce off the irregularities in the
commentator surface, creating sparks. This limits the maximum speed of the machine. The
current density per unit area of the brushes limits the output of the motor. The imperfect
electric contact also causes electrical noise. Brushes eventually wear out and require
replacement, and the commentator itself is subject to wear and maintenance. The commutator
assembly on a large machine is a costly element, requiring precision assembly of many parts.
there are three types of dc motor 1. dc series motor 2. dc shunt motor 3. dc compound motor -
these are also two type a. cumulative compound b. differential compound

BRUSHLESS DC MOTORS:

Some of the problems of the brushed DC motor are eliminated in the brushless design. In this
motor, the mechanical "rotating switch" or commentator/brush gear assembly is replaced by
an external electronic switch synchronized to the rotor's position. Brushless motors are
typically 85-90% efficient, whereas DC motors with brush gear are typically 75-80%
efficient.

Midway between ordinary DC motors and stepper motors lies the realm of the brushless DC
motor. Built in a fashion very similar to stepper motors, these often use a permanent magnet
external rotor, three phases of driving coils, one or more Hall effect sensors to sense the
position of the rotor, and the associated drive electronics. The coils are activated, one phase
after the other, by the drive electronics as cued by the signals from the Hall effect sensors. In
effect, they act as three-phase synchronous motors containing their own variable-frequency
drive electronics. A specialized class of brushless DC motor controllers utilize EMF feedback
through the main phase connections instead of Hall effect sensors to determine position and
velocity. These motors are used extensively in electric radio-controlled vehicles. When
configured with the magnets on the outside, these are referred to by mode lists as out runner
motors.

Brushless DC motors are commonly used where precise speed control is necessary, as in
computer disk drives or in video cassette recorders, the spindles within CD, CD-ROM (etc.)
drives, and mechanisms within office products such as fans, laser printers and photocopiers.
They have several advantages over conventional motors:

Compared to AC fans using shaded-pole motors, they are very efficient, running
much cooler than the equivalent AC motors. This cool operation leads to much-
improved life of the fan's bearings.
Without a commentator to wear out, the life of a DC brushless motor can be
significantly longer compared to a DC motor using brushes and a commentator.
Commutation also tends to cause a great deal of electrical and RF noise; without a
commentator or brushes, a brushless motor may be used in electrically sensitive
devices like audio equipment or computers.
The same Hall Effect sensors that provide the commutation can also provide a
convenient tachometer signal for closed-loop control (servo-controlled)
applications. In fans, the tachometer signal can be used to derive a "fan OK"
signal.

The motor can be easily synchronized to an internal or external clock, leading to


precise speed control.

Brushless motors have no chance of sparking, unlike brushed motors, making them
better suited to environments with volatile chemicals and fuels. Also, sparking
generates ozone which can accumulate in poorly ventilated buildings risking harm to
occupants' health.
Brushless motors are usually used in small equipment such as computers and are
generally used to get rid of unwanted heat.

They are also very quiet motors which is an advantage if being used in equipment that
is affected by vibrations.

Modern DC brushless motors range in power from a fraction of a watt to many kilowatts.
Larger brushless motors up to about 100 kW rating are used in electric vehicles. They also
find significant use in high-performance electric model aircraft.

CORELESS DC MOTORS:

Nothing in the design of any of the motors described above requires that the iron
(steel) portions of the rotor actually rotate; torque is exerted only on the windings of the
electromagnets. Taking advantage of this fact is the coreless DC motor, a specialized form of
a brush or brushless DC motor. Optimized for rapid acceleration, these motors have a rotor
that is constructed without any iron core. The rotor can take the form of a winding-filled
cylinder inside the stator magnets, a basket surrounding the stator magnets, or a flat pancake
(possibly formed on a printed wiring board) running between upper and lower stator magnets.
The windings are typically stabilized by being impregnated with Electrical epoxy potting
systems. Filled epoxies that have moderate mixed viscosity and a long gel time. These
systems are highlighted by low shrinkage and low exothermic. Typically UL 1446 recognized
as a potting compound for use up to 180C (Class H) Because the rotor is much lighter in
weight (mass) than a conventional rotor formed from copper windings on steel laminations,
the rotor can accelerate much more rapidly, often achieving a mechanical time constant under
1ms. This is especially true if the windings use aluminum rather than the heavier copper. But
because there is no metal mass in the rotor to act as a heat sink, even small coreless motors
must often be cooled by forced air.

These motors were commonly used to drive the capstan(s) of magnetic


tape drives and are still widely used in high-performance servo-controlled
systems, like radio-controlled vehicles/aircraft, humanoid robotic systems,
industrial automation, medical devices, etc.

8.POWER SUPPLY

8.1 INTRODUCTION:

Power supply is a reference to a source of electrical power. A device or system that supplies
electrical or other types of energy to an output load or group of loads is called a power supply
unit or PSU. The term is most commonly applied to electrical energy supplies, less often to
mechanical ones, and rarely to others

This power supply section is required to convert AC signal to DC signal and also to
reduce the amplitude of the signal. The available voltage signal from the mains is 230V/50Hz
which is an AC voltage, but the required is DC voltage(no frequency) with the amplitude of
+5V and +12V for various applications.

In this section we have Transformer, Bridge rectifier, are connected serially and
voltage regulators for +5V and +12V (7805 and 7812) via a capacitor (1000F) in parallel are
connected parallel as shown in the circuit diagram below. Each voltage regulator output is
again is connected to the capacitors of values (100F, 10F, 1 F, 0.1 F) are connected
parallel through which the corresponding output(+5V or +12V) are taken into consideration.
Fig: BASIC DIAGRAM POWER SUPPLY

CIRCUIT:

Fig : Circuit diagram for 12&5v POWER SUPPLY

Transformer:
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled electrical conductors. A changing current in the first circuit (the
primary) creates a changing magnetic field; in turn, this magnetic field induces a changing
voltage in the second circuit (the secondary). By adding a load to the secondary circuit, one
can make current flow in the transformer, thus transferring energy from one circuit to the
other.

The secondary induced voltage VS, of an ideal transformer, is scaled from the primary
VP by a factor equal to the ratio of the number of turns of wire in their respective windings:

Basic Principle:
The transformer is based on two principles: firstly, that an electric current can produce a
magnetic field (electromagnetism) and secondly that a changing magnetic field within a coil
of wire induces a voltage across the ends of the coil (electromagnetic induction). By changing
the current in the primary coil, it changes the strength of its magnetic field; since the
changing magnetic field extends into the secondary coil, a voltage is induced across the
secondary.
A simplified transformer design is shown below. A current passing through the
primary coil creates a magnetic field. The primary and secondary coils are wrapped
around a core of very high magnetic permeability, such as iron; this ensures that most
of the magnetic field lines produced by the primary current are within the iron and
pass through the secondary coil as well as the primary coil.
Fig : An ideal step-down transformer showing magnetic flux in the core

Detailed Operation: The simplified description above neglects


several practical factors, in particular the primary current
required to establish a magnetic field in the core, and the
contribution to the field due to current in the secondary circuit.

Models of an ideal transformer typically assume a core of negligible


reluctance with two windings of zero resistance. When a voltage is applied to the
primary winding, a small current flows, driving flux around the magnetic circuit of
the core. The current required to create the flux is termed the magnetizing current;
since the ideal core has been assumed to have near-zero reluctance, the magnetizing
current is negligible, although still required to create the magnetic field.

The changing magnetic field induces an electromotive force (EMF) across


each winding. Since the ideal windings have no impedance, they have no associated
voltage drop, and so the voltages VP and VS measured at the terminals of the
transformer, are equal to the corresponding EMFs. The primary EMF, acting as it does
in opposition to the primary voltage, is sometimes termed the "back EMF". This is
due to Lenz's law which states that the induction of EMF would always be such that it
will oppose development of any such change in magnetic field.
Bridge Rectifier:

A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge


configuration that provides the same polarity of output voltage for any polarity of input
voltage. When used in its most common application, for conversion of alternating current
(AC) input into direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier
provides full-wave rectification from a two-wire AC input, resulting in lower cost and weight
as compared to a center-tapped transformer design, but has two diode drops rather than one,
thus exhibiting reduced efficiency over a center-tapped design for the same output
voltage.

Basic Operation: When the input connected at the left corner of the diamond is
positive with respect to the one connected at the right hand corner, current flows to
the right along the upper colored path to the output, and returns to the input supply via
the lower one.

Fig 8.3: Basic Operation

When the right hand corner is positive relative to the left hand corner, current
flows along the upper colored path and returns to the supply via the lower colored
path. Batteries are installed backwards or DC input-power supply wiring "has its
wires crossed" (and protects the circuitry it powers against damage that might occur
without this circuit in place).

Prior to availability of integrated electronics, such a bridge rectifier was


always constructed from discrete components. Since about 1950, a single four-
terminal component containing the four diodes connected in the bridge configuration
became a standard commercial component and is now available with various voltage
and current ratings.

Fig : Output Wave Forms

FILTER:

Filtering is performed by a large value electrolytic capacitor


connected across the DC supply to act as a reservoir, supplying current to
the output when the varying DC voltage from the rectifier is falling. The
diagram shows the unfiltered varying DC (dotted line) and the filtered DC
(solid line). The capacitor charges quickly near the peak of the varying DC,
and then discharges as it supplies current to the output.

Fig : Output Wave Form of filter circuit


Voltage regulator :

Fig : Voltage regulator pin diagram


A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level .The 78xx (also sometimes known as LM78xx) series of devices is a family of
self-contained fixed linear voltage regulator integrated circuits. The 78xx family is a very
popular choice for many electronic circuits which require a regulated power supply, due to
their ease of use and relative cheapness. When specifying individual ICs within this family,
the xx is replaced with a two-digit number, which indicates the output voltage the particular
device is designed to provide (for example, the 7805 has a 5 volt output, while the 7812
produces 12 volts). The 78xx line is positive voltage regulators, meaning that they are
designed to produce a voltage that is positive relative to a common ground. There is a related
line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx
ICs can be used in combination to provide both positive and negative supply voltages in the
same circuit, if necessary.

78xx ICs have three terminals and are most commonly found in the TO220 form
factor, although smaller surface-mount and larger TrO3 packages are also available from
some manufacturers.
BASICS OF ARDUINO:

The first thing we will need to do in order to get things moving is to install
the Arduino IDE. This software is where you will write all of the code that will
control the micro controller and the attached circuit components. You can
download the IDE at the official Arduino download page. Once downloaded you
will need to unzip the folder into a convenient location. Then run the Arduino.EXE
file. Once you have done that, you should see the above window.

We will want to open the example sketch that can get us started.to do so
click file->Examples->baxics->bareminimum. This will open a new window with a
small amount of code. This code acts as framework for our program. The setup
method will be be run a single time right as the micro controller is turned on. You
should place code in here that you want to run once to configure the Arduino and
get it ready to run your program.
Let us consider a example, to blink an led

// the setup function runs once when you press reset or power the
board

void setup() {

// initialize digital pin 13 as an output.

pinMode(13, OUTPUT);

// the loop function runs over and over again forever

void loop() {

digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage


level)

delay(1000); // wait for a second

digitalWrite(13, LOW); // turn the LED off by making the voltage


LOW

delay(1000); // wait for a second

Firstly, we will notice that the words void and setup as well as void and
loop. void means empty, loop and setup are the keywords.

Void setup():

Void setup () is a function. The setup() function is called when a sketch


starts.use it to initialize variables,pin modes, start using libraries, etc.the setup
function will only run once, after each powerup or reset of the Arduino board.

Syntax: void setup ()

Just like we need a mouth to speak, the code to setup our program will
allow our Arduino to speak.

PinMode():

PinMode() configures the specified pin to behave either as an input or an


output.

Syntax: pinMode (pin, mode);

Void loop():
Our second command is the loop (). After creating a setup() function,
which initializes and sets the initial values, the loop() function does precisely
what its name suggests, and loops consecutively, allowing your program to
change and respond.

Syntax: void loop()

Write a high or low value to a digital pin. If the pin has been configured as
an output with pinmode (), its voltage will be set to the corresponding value 5v
for high,0v for low.

Digital write():

If the pin is configured as an input, digital write () will enable or disable the
internal pullup on the input pin. It is recommended to set the pin mode () to
input_ pullup to enable the internal pull-up resistor.

Syntax: digitalwrite(pin, value)

Delay():

Delay() pauses the program for the amount of time (in milliseconds)
specified as parameter.

Syntax:delay(ms);

Serial.begin:

The Arduino board can communicate at various baud (baud rates). A baud is a measure of
how many times the hardware can send 0s and 1s in a second. The baud rate must be set
properly for the board to convert incoming and outgoing information to useful data. If your
receiver is expecting to communicate at a baud rate of 2400, but your transmitter is
transmitting at a different rate (for example 9600), the data you get will not make sense. 9600
is a good baud rate to start with.

To set the baud rate, use the following code:

Syntax:

void setup() {

Serial.begin(9600);

}
If / else

if/else allows greater control over the flow of code than the basic if statement, by allowing
multiple tests to be grouped together. For example, an analog input could be tested and one
action taken if the input was less than 500, and another action taken if the input was 500 or
greater. The code would look like this:

if (pinFiveInput < 500)

// action A

else

// action B

else can proceed another if test, so that multiple, mutually exclusive tests can be run at the
same time.

EXISTING SYSTEM:

Watering of plants manually is a daily process for farmers.


Farmers have to water the plants regularly due to which they cannot move to
other places even when they have important works.
It is difficult to them to check the atmospheric conditions and provide water
because water level than the required water damages the crops.
Generally in winters, soil is capable of retaining moisture whereas in summer
it is not possible, so irrigating plants at wrong times is not profitable.
Famers use electric fencing to protect the field from animals, but during night
times human beings cannot see that electrical fencing and that may cause loss
of life.
To prevent these complications we go to advance techniques.

LIMITATIONS:

Usage of man power IS more.


Time-to-Time watering of plants is not possible
Measuring of moisture level in the soil manually is difficult.
PROPOSED SYSTEM:

SENSOR BASED AUTOMATED SMART IRRIGATION SYSTEM:

WORKING:

The main motivation and overall structure of this proposed system is to solve the problem of
irrigation and every sector of agriculture field by using latest technology and to show correct
values of sensor.
The sensors capture and provide values to the microcontroller. If the moisture level is found
to be below the desired level, it sends the signal to the microcontroller which triggers the
Water Pump to turn ON and supply the water to respective plants. When the desired moisture
level is reached, the system halts on its own and the Water Pump is turned OFF.
ADVANTAGES:

Man power required is very less.


We can save water because the motor stops automatically.
Accurate measurement of moisture level is possible.
LIMITATIONS:

It is used for 2-phase but not for 3-phase motors.


If animals enter the field they destroy the sensors and arduino board.
ALGORITHM:
It states the steps that the proposed system undergoes.

Step 1: Start the process.

Step 2: Initialize power is supplied to microcontroller.

Step 3: Check the moisture level (less than or more than).

Step 4: If the level will be more than a fixed criteria, no need to irrigation.

Step 5: If Moisture level is less than a fixed criteria, start irrigation.

Step 6: Initialization of pump and sprinkler.

Step 7: After the process completed, It moves to original state.

Step 8: Stop the process.


RESULTS:
The hardware for the project has been implemented and the result has been verified.
This project helps the farmers in many ways and so in future it can be used in all
agricultural fields.

It reduces the man power and wastage of water.


CONCLUSION:
We conclude that above described system gives the best solution for manual watering
of fields by checking the soil moisture values.
Coming to the project implemented here ,this system does not need any manpower.
FUTURE SCOPE:
In future, the arrangements can be made in fields and we can also add gsm for sending the
messages to the farmers whether the motor is on (or) off.
REFERENCES:
Sensor based Automated Irrigation System with IOT: A Technical Review

Karan Kansara1, Vishal Zaveri1, Shreyans Shah1, Sandip Delwadkar2, Kaushal


Jani3

REVIEW PAPER BASED ON AUTOMATIC IRRIGATION SYSTEM BASED ON


RF MODULE
Ms. Deweshvree Rane PG Scholar - VLSI, Sevagram, Wardha, India Prof. P. R.
Indurkar Professor, BDCE, Sevagram, Sevagram, Wardha, India Prof. D. M.
Khatri Assistant Professor, BDCE, Sevagram, Sevagram, Wardha, India

Вам также может понравиться