Professional Documents
Culture Documents
6218 PDF
6218 PDF
BELGAUM
CHIGURU
UTOMATED MICRO IRRIGATION SYSTE M
ubmitted in Partial fulfillment for the award of Degree in Bachelor of Engineering
. In
Electronics & Communication Engineering
For the academic Year 2009-2010
Submitted By
CERTIFICATE
for the partial fulfillment for the award of the degree of "Bachelor of Engineering" in
Electronics and Communication Engineering, Visvesvaraya Technological University,
Belgaum during academic year 2009-2010. It is certified that all the
corrections/suggestions indicated for internal assessment has been incorporated in
the report deposited in the department library. The project report have been
approved as it satisfies the academic requirements with respect to project work as
prescribed for the Degree.
~ ~,
\
,., 0 \ \\)b \ t,.J
Dr. P. ...,.. I-f ",I i.' ,; r ...::_h"
(Mr.Nagaraj.S) (Dr. P.Shi)tananda,)
Lecturer, Dept of ECE, Asst. Prof, Dept of ECE, sarno;P , iqqil?~~I ' ; ~': ' . :.J~\
SarT, Bangalore. SalT, BaorOOl~Gpanmenl S ~~angalore. ·. ~ in ' (
Head & commn t.n~w " h: \ .\J :.',
I)epIrtmeot of E\ectron\cs oto'
Sambnram ,nstltute of lechn gy
D .... nn~'Ofe.5SO 097.
Names of the Examiners U81'V- Signature with
Date
1.
2.
DIIDICATED TO
OUR BELOVED PARENTS, THE
FARMERS, &. THE SOCIETY
ACKNOWLEDGEMENT
eH/GURU: An automated micro-irrigation system, this concept needed a lot of help and
mentoring from our lecturers, friends and seniors to turn into a reality. Firstly, we would
like to credit our parents for their unending support and confidence in us for whatever we
have achieved till date.
We would like to thank our internal guide, and Project Coordinator Mr. Nagaraj S
Department of Electronics and communication Engineering, SalT, for the constant help
and support extended towards us during the course of the project, and all the faculties and
non teaching staff of Department of Electronics and communication Engineering, SalT
for helping us directly or indirectly in completing the project.
We would also like to thank faculties form our Electronics department Sr. Lecturers, Mr.
Gopalkrishna Murthy C R & Mr. Rangaswamy for their insightful suggestions during
the course of our proje~t and helping us directly or indirectly in completing our project.
We are also grateful to our HOD Mr. C. V Ravishankar, Department of Electronics and
Communication Engineering, SalT, for his support and encouragement that went a long
way in successful completion of this project work.
We would also like to convey our heartfelt thanks to our seniors Mr. Saheblal Bhagwan,
Mr. Prabhat Kumar, and Mr. Sandeep Patil for their never-ending support.
VARUNRAOB
VENKATESH HEGDE
PRAVEENB.K
SHANKAR R LAMAN]
ABSTRACT
Agriculture is the lifeline of our country and irrigation is the lifeline of agriculture. Our country
has an ever growing population (one third of worlds hungry people are in India) to cater to and
the land and water available for agriculture is fast depleting. This mismatch in available land
resources and ever increasing demand has lead to a spate of innovative techniques to make
efficient use of available water and to increase yields. It is in this context that we would like to
put forth our idea of CHI GURU that in the years to come might revolutionize agriculture.
CONTENTS
TITLES PAGE NO
I. INTRODUCTION
1.1 THE INSPIRATION 2
1.2 THE VISION 2
1.3 THE APPLICATION 2
1.4 TOOLS USED 3
5. HEX KEYPAD
5.1 INTRODUCTION 28
5.2 READING THE VALUES FROM KEYPAD 29
5.3 MEMBRANE KEYPAD 31
5.3.1 WORKING 32
6. SENSOR
6.1 INTRODUCTION 34
6.2 WATER LEVEL SENSOR 35
6.2.1 NEED OF WATER LEVEL SENSOR 35
6.3 RAIN SENSOR 36
6.3.1 NEED OF RAIN SENSOR 36
6.4 MOISTURE SENSOR 37
6.4.1 SOIL MOISTURE CONCEPTS AND TERMS 37
6.4.2 CONSTRUCTION OF MOISTURE SENSOR USING 39
GYPSUM BLOCK
6.4.3 STEPS THAT SHOULD BE FOLLOWED WHILE 40
a
CONSTRUCTING A MOISTURE SENSOR
6.4.4 METHODS OF MEASURING SOIL MOISTURE 41
6.4.5 INSTALLATION 43
6.4.6 RULES FOR INSTALLATION 43
6.4.7 NEED OF MOISTURE SENSOR 44
6.5 TEMPERATURE SENSOR 44
6.5.1 WORKING OF TEMPERATURE SENSOR 44
6.5.2 NEED OF TEMPERATURE SENSOR 45
7. PUMP
7.1 INTRODUCTION 47
7.2 WORKING PRINCIPLE 47
7 .3 FEATURES 47
7.4 TECHNICAL SPECIFICATION 48
8. RELAY
8.1 INTRODUCTION 50
8.2 BASIC DESIGN & OPERATION 50
8.3 ELECTROMAGNETIC RELAY 52
8.4 WORKING PRINCIPLE 54
8.5 RELAY DRIVER 56
8.6 MAIN FEATURES 56
8.7 RELAY SPECIFICATION 57
8.8 APPLICATION 58
11. MOTORS
11.1 INTRODUCTION 68
11.2 DC MOTORS 68
11.3 TOY MOTORS 68
11.4 SPECIFICATION & FEATURES 69
12. RAIN WATER HARVESTING
12.1 INTRODUCTION 71
12.2 ROOF CATCHMENT SYSTEM 71
12.3 GROUND WATER RECHARGE 71
12.4 ADVANTAGES 72
12.5 NEED FOR RAIN WATER HARVEATING 72
12.6 OUR ENDEAVOUR 72
15. CONCLUSION 83
16. BIBLIOGRAPHY 84
17. APPENDIX-A
A PHOTOLOGUE OF OUR PROJECT 85
18. APPENDIX-B
DATASHEET 88
NAME OF THE Fl6URE PA6ENO
FIG.2.0: FUNCTIONAL UNIT 5
FIG.3.3 PIN OUT OF AT MEGA 128 10
FIG 3.3.2: BLOCK DIAGRAM OF ATMEGA128 11
FIG 4.1 LCD DISPLAY 19
FIG 5.1 (A): HEX KEY PAD LAYOUT 28
FIG 5.1(B): HEX KEYPAD INTERNAL WIRING 29
FIG 5.3: MEMBRANE KEYPAD 31
FIG 5.4: LAYERS OF MEMBRANE KEYPAD 32
FIG 6.4.1 : AVAILABILITY OF WATER IN SOIL 38
FIG 6.4.5: GYPSUM BLOCK 42
FIG 6.5: PIN OUTS OF LM35DZ 44
FIG 7.1: SUBMERSIBLE PUMP 48
FIG 8.1 RELAY PARTS 51
FIG 8.2 SIMPLE ELECTROMAGNETIC RELAY 51
FIG 8.3 RELAY WORKING 54
FIG 8.4 DPDT AC COIL RELAY 54
FIG 8.5: RELAY DRIVER CIRCUIT 56
CHAPTER~ 1
INTRODUCTION
t .4 TOOLS USED
• CODE VISION AVR
• ROBOKITS PROGRAMMER
• ORCAD EVALUATION VERSION
• AVR STUDIO 4
• SINAPROG
CHAPTER~2
"'"
USER INTERFACES AND OTHER END·
USER PERIPHERALS
"- ./
~<!~
r
PUMPS, MOTORS AND OTHER
CONTROL PERIPHERALS
\.. ../
UCONTROLLER
'- :\ ATMEGA128
RAIN MOISTURE
~
ADC
SENSORS SENSORS ~
-v' -V
TEMP. WATER LEVEL
"-
SENSORS INDICATORS
~t
LCD
F1S.!.O: FUNCTIONAL UNIT
Liquid Crystal Display is an output device. LCD used here is a 20X4 matrix
which displays various results of the parameters being measured. In addition it also helps the
user to set the date and time during initial setup by displaying the date and time values
entered.
Hex key pad is a 4X4 matrix, which is used for taking input and various
command from user and they are processed by microcontroller which ultimately controls the
mechanical system and also display the corresponding results on the output device - LCD
Display.
2.3.8 LOCK
The lock is a device used to secure the chamber in which the microcontroller
is housed to prevent any foul play. The lock is a solenoid based device that is energized by an
output from the J1licrocontroller. The lock unlock mechanism is controlled by various
authentication measures making it tough for any unauthorized people to gain entry into the
microcontroller chamber.
CHAPTER~8
3.2.2 RESETCIRCUITAIlY
The reset PIN on microcontroller is active low hence it is tied to Vcc using an
RC combination. Whenever there is a need to reset the microcontroller, the reset
switch is pressed discharging the capacitor and holding the PIN low for 10ms. This
time is enough for microcontroller to reset.
ATMEGA128 has 7 ports with 110 capability as well as other functions. Here
the use of 110 capability and the use of ADC function of PORTA are described. Each port
has 8 physical pins which can be individually or collectively made as input or output. A
total of 53 programmable 110 pins are available in ATMEGA 128.
Nata: The Pnd rvn appflBS to baCh TOFP .u MLF packagas. 1ha bottom pad under tho QFNlMLF
padcage should be scIdamd to ~
IT
-r-..,
HDr!l
e I~
~·PFJ MO PAl ~
Pm FeT
~
t j--------- - - -- - - - -------_. -- - -- _. -- -- --------- -- - - - r- _. _. ---- --_. --
\U
1-- ~- 1---- -,
QNJI
I
PORl'F !RV9IS PORTA~
J PORl't [);;JVL=iS
I
1 ~t! I I I II i '1I
- H!A\T~mR Q\TADR
REO pam:
llmfl:GIsmt
POOl"
DATAOIR.
REG POOr"
I ~lA AEG~TEfl
FtRTC
~iADR
J:\EG Falrt
.A &lIT flIUAlIJS
~
<.,. II'
>
.a;
oo.aoa::
........ I
CI AlIt Me!W.
OSC'UAiOff
I
NEF I
t ! ClD.WDA I
~ I M=~ ~ Hm~~
JOOW' StO
PONTER ,~
L.L
~_rou~ H~
i
-~ ~ H~Im~~
!flAM TIYI.'t'lNfJ
~
~-
I
, aa:-I
~ H
MTFIETI:ft aEHEfW. --'"
~..R TIllETt jti
oo..NTERS "
fto Pl.&'::6E.
~
.t-:- i'I"
~R8
•
Pii ~
L.OO£
I
NSrfllCTCft
DECOiER
~
"-
1
I H 1NT:r Jt:
~
•
CXJmIl.
LIIEB
W ~~
!
H E.EPIIlM
J
~ t
~
t18ARrO
"I
fill
I 0lWI'1 ~NWFESEJlIAl
INrnlF~
+4 + ,...-
A .. t Ir- ...
<... I I
...>
~
1
~t~\I-=""
!~ Utt It
a.TADR.
F£Q. PCiITE
DAlA f£.OI8lER
R:fiTB
~TADR
F£Q P(Jfl'8 ID\TA~STEA IlATADIR.
fEaFamJ
IlIt.TARro,
~T\l
"~TA DIR II
REG POOm
8 'J,,'t. '"'1'''
III I
'T""""" tll UJl.1~ 1illnJ rl II LU!
I RlRJE [Hi£f!S PORTB 00IVEfIi
I Pam> I:InERS
I PORTI) DRYERS
~~
.-------- - ---- --~------ - -- - - -- I--- ------- - -- - -- - - -- -------- - - -- - --
FI6URE 3.3.2: BLOCK DIA6RAM OF ATME6A 12a
PORT A (PA7-PAO)
Port A is an 8-bit bi-directional 110 port with internal pull-up resistors
(selected for each bit). The Port A output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port A pins that
are externally pulled low will source current if the pull-up resistors are activated. The
Port A pins are tri-stated when a reset condition becomes active, even if the clock is
not running.
Port A also serves the functions of various special features of the ATmegal28.
PORT B (PB7-PBO)
Port B is an 8-bit bi-directional 1/0 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.
Port B also serves the functions of various special features of the ATmega 128
PORT C (PC7-PCO)
Port C is an 8-bit bi-directional 1/0 port with internal pull-up resistors
(selected for each bit). The Port C 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.
Port C also serves the functions of special features of the ATmega 128. In
ATmega 103 compatibility mode, Port C is output only, and the port C pins are not tri-
stated when a reset condition becomes active.
PORT D (PD7-PDO)
Port D is an 8-bit bi-directional 110 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 0 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 D also serves the functions of various special features of the A Tmega 128
PORT E (PE7-PEO)
Port E is an 8-bit bi-directional 110 port with internal pull-up resistors
(selected for each bit). The Port E output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port E pins that
are externally pulled low will source current if the pull-up resistors are activated. The
Port E pins are tri-stated when a reset condition becomes active, even if the clock is
not running.
Port E also serves the functions of various special features of the ATmega 128
PORT F (PF7-PFO)
Poll F serves as the analog inputs to the AID Converter. Port F also serves as
an 8-bit bi-directional 1/0 port, if the AID Converter is not used. Port pins can
provide internal pull-up resistors (selected for each bit). The Port F output buffers
have symmetrical drive characteristics with both high sink and source capability. As
inputs, Port F pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port F pins are tri-stated when a reset condition becomes
active, even if the clock is not running. If the JTAG interface is enabled, the pull-up
resistors on pins PF7 (TDI), PF5 (TMS), and PF4 (TCK) will be activated even if a
Reset occurs.
DEPT. OF EeE Page 13 SAlT
CHIGURU- AN AUTOMATED MICRO IRRIGATION SYSTEM
The TOO pin is tri-stated unless TAP states that shift out data are entered.
Port F also serves the functions of the JTAO interface. In ATmegal03 compatibility
mode, Port F is an input Port only.
PORTS (P64-P60)
Port a is a 5-bit bi-directional 110 port with internal pull-up resistors
(selected for each bit). The Port G output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port a pins that
are externally pulled low will source current if the pull-up resistors are activated. The
Port a pins are tri-stated when a reset condition becomes active, even if the clock is
not running. Port G also serves the functions of various special features. The port G
pins are tri-stated when a reset condition becomes active, even if the clock is not
running.
In ATmegal03 compatibility mode, these pins only serves as strobes signals
to the external memory as well as input to the 32 kHz Oscillator, and the pins are
initialized to POO = 1, PG 1 =1, and PG2 = 0 asynchronously when a reset condition
becomes active, even if the clock is not running. PG3 and PG4 are oscillator pins.
RESET
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.
XTALt
Input to tha inverting Oscillator amplifier and input to the internal clock operating
circuit.
XTAL2
Output from the inverting - Oscillator amplifier.
AVeC
AVCC is the supply voltage pin for Port F and the AID Converter. 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.
AREF
AREF is the analog reference pin for the AID Converter.
PEN
PEN is a programming enable pin for the SPI Serial Programming mode, and
is internally pulled high. By holding this pin low during a Power-on Reset, the device
will enter the SPI Serial Programming mode. PEN has no function during normal
operation.
3.3.4F~11U~
CHAPTER~4
A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the
light modulating properties of liquid crystals (LCs). LCs do not emit light directly.
LCOs therefore need a light source and are classified as "passive" displays. Some
types can use ambient light such as sunlight or room lighting. There are many types
of LCOs that are designed for both special and general uses. They can be optimized
for static test, detailed still images, or dynamic, fast-changing, video content.
The HD44780U dot-matrix liquid crystal display controller and driver LSI displays
alphanumeric, Japanese kana characters, and symbols. It can be configured to drive a dot-
matrix liquid crystal display under the control of a 4- or 8-bit microprocessor. Since all the
functions such as display RAM, character generator, and liquid crystal driver, required for
driving a dot-matrix liquid crystal display are internally provided on one chip, a minimal
system can be interfaced with this controller/driver.
A single HD44780U can display up to one 8-character line or two 8-character lines. The
HD44780U has pin function compatibility with the HD44780S which allows the user to
easily replace an LCD-II with an HD44780U. The HD44780U character generator ROM is
extended to generate 208 5X8 dot character fonts and 32 5 XIO dot character fonts for a total
of 240 different character fonts. The low power supply (2.7V to 5.5V) of the HD44780U is
suitable for any portable battery-driven product requiring low power dissipation.
RESISTERS:
The HD44780U has two 8-bit registers, an instruction register (IR) and a data
register (DR). The IR stores instruction codes, such as display clear and cursor shift, and
address information for display data RAM (DDRAM) and character generator RAM
(CGRAM). The IR can only be written from the MPU.
The DR temporarily stores data to be written into DDRAM or CGRAM and
temporarily stores data to be read from DDRAM or CGRAM. Data written into the DR
from the MPU is automatically written into DDRAM or CGRAM by an internal operation.
The DR is also used for data storage when reading data from DDRAM or CGRAM. When
address information is written into the IR, data is read and then stored into the DR from
DDRAM or CGRAM by an internal operation. Data transfer between the MPU is then
completed when the MPU reads the DR. After the read, data in DDRAM or CGRAM at the
net address is sent to the DR for the net read from the MPU. By the register selector (RS)
signal, these two registers can be selected (Table 4.2).
BUSYFLA6 (SF):
When the busy flag is 1, the HD44780U is in the internal operation mode, and the
net instruction will not be accepted. When RS = 0 and RJW = 1 (Table 4.2), the busy flag is
output to DB7. The net instruction must be written after ensuring that the busy flag is O.
The address counter (AC) assigns addresses to both DDRAM and CGRAM.
When an address of an instruction is written into the IR, the address information is sent
from the IR to the AC. Selection of either DDRAM or CGRAM is also determined
concurrently by the instruction. After writing into (reading from) DDRAM or CGRAM, the
AC is automatically incremented by ] (decremented by I). The AC contents are then output
to OBO to DB6 when RS = 0 and RlW = ] (Table 4.2).
R S RlW Operation
CLEAR DISPLAY
Clear display writes space code 20H (character pattern for character code 20H
must be a blank pattern) into all DDRAM addresses. It then sets DDRAM address 0 into
the address counter, and returns the display to its original status if it was shifted. In other
words, the display disappears and the cursor or blinking goes to the left edge of the display
(in the first line if 2 lines are displayed). It also sets lID to 1 (increment mode) in entry
mode. S of entry mode does not change.
RETURN HOME
Return home sets DDRAM address 0 into the address counter, and returns the
display to its original status if it was shifted. The DDRAM contents do not change.
The cursor or blinking go to the left edge of the display (in the first line if 2 lines
are displayed).
FUNCTION SET
DL: Sets the interface data length. Data is sent or received in 8-bit lengths (DB7
to DBO) when DL is I, and in 4-bit lengths (DB7 to OB4) when OL is o. When 4-bit length
is selected, data must be sent or received twice.
N: Sets the number of display lines.
F: Sets the character font.
Note: Perform the function at the head of the program before executing any
instructions (except for the read busy flag and address instruction). From this point, the
function set instruction cannot be executed unless the interface data length is changed.
Clear
display
Retum
home Code IIII0 0 0 0 10 10 10 I 0 11 1 · 1 Nom:' Don' care.
Cursor or
display shift Code I 0 1 0 1 0 1 0 1 0 11 1SIC 1RAJ • 1· I~:' Don' tare.
SetCGRAM
address
... Higher
order bit
Lower
order bit •
TABLE 4.S: INSTRUCTION DESCRIPTION
and DDRAM addresses, and its value is determined by the previous instruction. The
address contents are the same as for instructions set CGRAM address and set DDRAM
address.
SIC RlL
o o Shifts the cursor position to the left. (AC is d&remented by one.)
o 1 Shifts the cursor position to the right. (AC is incremented by one.)
1 o Shifts the entire display to the left The cursor follows the display shift
1 1 Shifts the entire display to the right The cursor follows the display shift
No. of
Display Duty
N F Lines Character Font Factor Remarks
0 0 1 5 x 8 dots 1/8
0 1 1 5 x 10 dots 1/11
1 • 2 5 x Bdots 1/16 Cannot display two lines for 5 x 10 dot character font
Note: * Indicates don't care.
1t..1t. FEATURES
CHAPT£R~5
HEX KEYPAD
5. t INTRODUCTION
The hex keypad is a peripheral that connects to the microcontroller through its
ports using a 16 pin cable. It has 16 buttons in a 4 by 4 grid, labeled with the hexadecimal
digits 0 to F. An example of this can be seen in Figure I, below.
Internally, the structure of the hex keypad is very simple. Wires run in vertical
columns (we call them CO to C3) and in horizontal rows (called RO to R3). These 8 wires
are available externally, and will be connected to the lower 8 bits of the port. Each key on
the keypad is essentially a switch that connects a row wire to a column wire. When a key
is pressed, it makes an electrical connection between the row and column. The internal
structure of the hex keypad is shown in Figure 2. The specific mapping of hex keypad
wires (CO to C3 and RO to R3) to pins is given in Table I.
l J
4x4Keypad
Layout
now 1 --
Row3-----.~r---~~----~_r--_+~._----
At this point, you may be wondering exactly where the signals on the hex keypad
come from. The keys just create a short between a row and column wire when pressed,
but the row and column wires all come from the ports of the microcontroller, rather than
connecting to power or ground.
Finally, remember that each pin in the HEX keypad is connected to a pull-up
resistor, so any input coming from the hex keypad will read a 1 by default (Le. when a
key is not being pressed). These facts, coupled with our knowledge of how the row and
column wires of the hex keypad are wired up to the microcontroller board, will allow us
to detennine which key has been pressed.
Ifwe treat all the hex keypad wires as inputs, we will always read in a OxFF, since
there is nothing driving those wires - they are unconnected. Even when a key is pressed,
the effect is of connecting one input port to another, so the pull-up resistors will always
output a 1.
The basic concept is that, since all the hex keypad wires are connected to the
microcontroller ports, we need to use some of those wires to output values, and some to
read in values. If we output values onto the columns, say, then when we read from the
rows, if a key is pressed there will be a short between a row and a column and we will
read in whatever value we have set the column to output.
Rows in which no key is pressed will be unconnected, and thus read in as a 1.
Consequently, in order to be able to differentiate between unconnected inputs and inputs
for which a key has been pressed so that they are reading the value put onto a column, we
need to always output o.
Thus, we should write 0 to all of the column wires, and then read in from the row
wires. If no key is pressed, the row wires will all be unconnected, so we will read a 1
value on pins 0 to 3 of the ports. However, if a key is pressed, one of the row wires will
be shorted with a column wire, and will thus have whatever value is on that wire (Le. 0).
Thus, we can id«ntify the row of which key was pressed by reading the row values and
finding which is o.
This could also work if we treated the rows as outputs and the columns as inputs.
In that case, we would output 0 to the rows, and read in from the columns, and whichever
column wire was 0 would indicate the column in which the pressed key resides.
So, being able to identify the row or column of a pressed key helps, but still does
not tell us which key was pressed. The trick is that if you know both the row and the
column, you can determine which key was pressed from their intersection.
This means that we must take advantage of the ability to change the direction of
the individual pins of the ports within our program. First, we set one half of the lower 8
bits as input (bits 0 to 3, say) and the other as output (bits 4 to 7), and get one value (the
row, in this case), then we set them the other way around, get the other value, and then
we determine which key was pressed.
So, for example, if we read in that row wire R2 is 0 and column wire C3 is 0, we
know that the B key on the hex keypad was pressed. There are a number of different
ways you can write code that will figure out which key was pressed based on the row and
column numbers. Thus, to summarize, the following steps should be followed in order to
determine which key on the hex keypad has been pressed.
• 16 keys arranged as a 4X4 matrix.
• Must "activate" each row by placing a 1 on its Row output.
• Then the column output is read.
• If there is a 1 on one of the column bits, then the button at the column/row
intersection has been pressed.
• Otherwise, try next row.
• Repeat constantly
..
CD
G
e
E)
~
-:-"~~~"l.!
: ......
,~
4&) a 0 : c:
«» a 0-
0
5.3. t WORKINS
As can be seen from the diagram below, the membrane keyboard basically
consists of three layers; two of these are membrane layers containing conductive traces.
The center layer is a "spacer" containing holes wherever a "key" exists.
It keeps the other two layers apart. Under normal conditions, the switch (key) is
open, because current cannot cross the non-conductive gap between the traces on the
bottom layer. However, when the top layer is pressed down (with a finger), it makes
contact with the bottom layer. The conductive traces on the underside of the top layer can
then bridge the gap, allowing current to flow. The switch is now "closed", and the parent
device registers a key press.
CHAPTER~6
SENSOR
6. t INTRODUCTION
A sensor is a device that measures a physical quantity and converts it into a signal
which can be read by an observer or by an instrument. For example, a thermocouple converts
temperature to an output voltage which can be read by a voltmeter. For accuracy, all sensors
need to be calibrated against known standard.
A sensor is a device which receives and responds to a signal or stimulus. Here, the
term "stimulus" means a property or a quantity that needs to be converted into electrical
form. Hence, sensor can be defined as a device which receives a signal and converts it into
electrical form which can be further used for electronic devices. A sensor differs from a
transducer in the way that a transducer converts one form of energy into other form whereas
a sensor converts the received signal into electrical form only.
They can be mainly sorted by sensor type.
Here in our project we are going to use mainly four sensors; they are as listed below:
• Water level sensor
• Rain sensor
• Moisture sensor
• Temperature sensor
When a voltage is applied between the probe and the tank wall the water/liquid comes
in contact with the probe, a conductive path is established between the probe and the tank
wall. This current is sensed and fed to the microcontroller as an input and the microcontroller
takes an appropriate decision based on the control algorithm.
In our project we have built a water level sensor using a CD4066BC IC; it is a quad
bilateral switch intended for the transmission or multiplexing of analog or digital signals and
74LS04 is a hex inverter which is used to at the output to increase the strength of the
obtained signal. Later these signals are fed to the micro controller as input to perform the
task.
6.2.1 NEEDOFWATERLEVELSENSOR
The water level sensor is used in our project to feed the level of water in the tank and
on the field to the microcontroJler which is the logic and control station. The levels obtained
in the field are fed to the controller where it is matched with the optimum value. Based on the
output of the control algorithm, decisions are made on whether or not to switch on the pump.
Rain sensors for irrigation systems are electrical type sensors conductance type
probes to measure rainfall. They use mechanisms to temporarily suspend watering by the
irrigation controller; specifically they are connected to the irrigation controller's sensor
terminals.
In our project we are using wired rain sensor, which is used in the application of
irrigation for the conservation of water. We have built a cheap rain sensor which is made up
of PCB design board.
The PCB design board is cut into two parts, to break connectivity. The two parts are
then connected via a capacitor. The two pieces of boards are then connected to between the
ground and the port pin of the microcontroller.
As it rains, connectivity is established between the two and the signal is sent to the
microcontroller to perform the task.
Since we have to stop the pumping of water from the tank to field during raining, so
by using a rain sensor the system comes to know whether it is raining or not , then the
suitable task is perfonned by the system according to the signal sent by the sensor. By using
this we will able to conserve water to an extent.
Soil moisture sensors measure the water content in soil. Measuring soil moisture is
important in agriculture to help farmers manage their irrigation systems more efficiently. Not
only are farmers able to generally use less water to grow a crop, they are able to increase
yields and the quality of the crop by better management of soil moisture during critical plant
growth stages.
Irrigation water management requires timely application of the right amount of water.
Competition for water, high pumping costs, and concerns for the environment are making
good water management more important. Managing irrigation water needs to combine a
method of measuring soil moisture with some method of irrigation scheduling.
Measuring soil moisture detects if there is a water shortage that can reduce yields or if
there is excessive water application that can result in water logging or leaching of nitrates
below the root zone. Measuring soil moisture also can build an awareness and knowledge of
each irrigated field that is invaluable for planning and management.
Monitoring soil moisture levels is required for effective irrigation water management.
Many tried and proven methods of estimating or measuring soil moisture are available. The
method selected depends on a variety of factors such as accuracy, cost, and ease of use.
Soil moisture levels can be expressed in terms of soil water content or soil water
potential (tension). Soil water content most commonly is expressed as percent water by
weight, percent water by volume, or inches of water per foot of soil. Other units such as
inches of water per inch of soil also are used.
Water content by weight is detennined by dividing the weight of water in the soil by
the dry weight of the soil. It can be converted to percent by multiplying by 100%.
Field capacity is the point at which the gravitational or easily drained water has
drained from the soil. Traditionally, it has been considered as 1/3 bar tension. However, field
capacity for many irrigated soils is approximately 1/10 bar tension.
Inches water
loilTYJ1I per loot mY
Readily available water is that portion of the available water that is relatively easy for
a plant to use. It is common to consider about 50% of the available water as readily available
water. Even though all of the available water can be used by the plant, the closer the soil is to
the wilting point, the harder it is for the plant to use the water. Plant stress and yield loss are
possible after the readily available water has been depleted.
• Plaster of Paris<Gypsum>
• 2 Galvanized Nails
• 112 inch plastic tubing
• utility knife
• Take your utility knife and cut the tubing slightly longer than your galvanized
finishing nails. Try to make the cut as straight as possible though it doesn't have to
be completely perfect.
• Use your utility knife to cut the smaller plastic tube lengthwise, this will allow easier
removal of your soil sensor after the mold cures.
• Optional: Make the cut diagonally to prevent a potential vertical fracture line.
• If you were very careful on you vertical cuts you can avoid this step, but to
completely avoid spilling plaster onto my workbench I drilled four holes slightly
larger than your tubing. I used these holes for support but also to catch any of the
plaster in the gaps from you less than accurate vertical cuts.
• Being careful that the tubing fits together where you split the tubing vertically, insert
the tubes into the holes (or carefully on a flat surface) Mix Plaster of Paris and
carefully fill with to the top. The friction between the tubing should keep a water
tight seal where you made the cut, though if the plaster is a little thin and it appears to
be leaking through wait a couple minute for the plaster to setup some and try again, at
that time it should not have the viscosity to seep through the very small gap that may
be causing the leak.
• Take your two galvanized nails and push them through a sma)) piece of wax paper.
You may also allow the plaster to setup for a few minutes and then float the nails in
the plaster. I like the first method since gravity will help ensure they fall straight
down and parallel to each other. As for spacing, I have done some experimentation
with the gaps between the probes and my conclusion was, it doesn't make much
difference. As long as there is a gap (they are not touching) you should get reliable
results.
• After allowing the sensor to cure for about and hour remove it from the holes you
drilled in the wood.
• Gently pull back the plastic tubing and you have a nice clean soil sensor.
• Lay them out to dry for 24 hours to cure completely and their construction is
complete.
• For attaching the wires there are a couple options. The best would be to solder them
to the probes though to do this you need to heat up the nail hot enough to enable a
strong solder connection. My little 15W soldering iron just can't produce the heat for
this so I am option for the wire wrap method. I take about an inch of wire and strip
off about an inch of insulation and tightly wrap around the probe. Given copper will
rust and could be a point of failure you will want to insulate this connection and the
probes from the moisture. A few dabs of hot glue works pretty well. I am planning
on trying liquid plastic, though I am currently out and when I have some on hand I
will update with how it went.
Soil moisture can be measures or estimated in a variety of ways ranging from the
simple, low cost feel method to more accurate, expensive neutron probe units. For most
irrigation water management applications, one of the several resistance-block types or
tensiometer is recommended.
A basic gypsum block comprises two electrodes embedded in a block (in this case a
cylinder) of gypsum (Plaster of Paris, CaS04). A measurement is taken from a gypsum
block by measuring the electrical resistance between the electrodes in the block. The block
transmits water easily and rapidly comes into equilibrium with the soil water suction in the
surrounding soil.
While the soil is wet, the pores in the gypsum are filled with water which dissolves
some of the gypsum - enough to make a saturated solution of calcium sulphate, and the water
conducts electrical current in a manner independent of soil water salinity, except at extreme
levels of salinity. In wet conditions, the resistance would be quite small. As the soil around
the block dries, water is 'pulled' from the block, the largest pores emptying of solution first
then smaller and smaller pores as the soil suction increases. Electric current travelling
between the electrodes in the block must travel a longer path through smaller pores so the
resistance becomes greater.
The gypsum supplies a fixed environment for the electrodes which is independent of
the soil in which the block is installed. A gypsum block, made to consistent specifications,
has a fixed porosity distribution, i.e. the size range of the pores is the same for each sensor.
So whether the instrument is buried in clay or sand, the porosity around the electrodes
remains the same as does the relationship between soil water suction and electrical resistance.
Hence, a single calibration applies irrespective of the soil material in which the sensor is
placed.
The same 'gassing' problem exists for the gypsum block as for the simple 'nail' sensor
described above. An AC current bridge should be used or the blocks should be read rapidly
by a modem logger (in milli-seconds) provided readings are not taken too frequently.
Obviously, an unmodified gypsum block can be constructed easily with little
equipment, however, the material and spacing of the electrodes, and the consistency and
setting time of the slurry of gypsum need to be controlled to get a consistent calibration.
In summary, the gypsum block measures soil suction and can provide a measure of
plant stress provided the block is located in the plant root zone, and the plant has an adequate
root system (Le. is mature). The calibration of a gypsum block is independent of the material
in which it is installed.
.. ., ~.
The gypsum block dissolves very slowly and has a lifetime of more than 5 years in
alkaline or neutral soils but usually needs to be replaced every 2-3 years in acid soils. The
two wire flex between the gypsum block and the surface is simply pulled up and thrown
away, leaving the gypsum part of the block in the ground with no detrimental effects.
6.4.6 INSTALLATION
Installation is much less critical than with many other sensors. As long as the block is
touching the soil around it, it will work. A good installation means the block will follow the
soil suction in the surrounding soil minute by minute. A very poor installation means that the
block might be a day or so behind the surrounding soil, but it still reaches the right answer in
the end.
) . Label the end of the wire which does not have a block on it with the depth of the sensor
BEFORE you bury it, (or you might have to dig them up again to find out what depth you
put them).
2. Make sure that you don't place the sensor directly under a dripper.
3. Make sure that surface water cannot flow down the hole you dig to jnstaH the sensor or
else your sensor will be giving some rather strange readings (see use of bentonite below).
4. Typical depths might be 20cm, 50cm, 70cm and IOOcm. This covers surface moisture
levels, moisture in the root zone, and moisture in the drainage zone.
5. Resistance methods are suitable for most soils, and the readings cover most of the soil
moisture ranges of concern to irrigation management. The blocks tend to deteriorate over
time, and it may be best to use them for only one season. Problems may occur with
highly acid or highly saline soils.
Soil moisture readings are useful to determine how much water is available for the
crop, when to start irrigating, and how much water to apply. Soil moisture monitoring can
help conserve water and energy, minimize pollution of surface and ground water, and
produce optimum crop yields. Efficient scheduling of irrigation water applications gives the
highest return for the least amount of water.
The sensor which measures the temperature of the surrounding environment is called
as a temperature sensor.
The LM35 is an integrated circuit sensor that can be used to measure temperature
with an electrical output proportional to the temperature (in degree Centigrade).
• By using an LM35 we can measure temperature more accurately than a using a
thermistor.
• The sensor circuitry is sealed and not subject to oxidation, etc.
• The LM35 generates a higher output voltage than thermocouples and may not require
that the output voltage be amplified.
LMS6DZ
+Vs GND
Vout
• The LM35 does not require any external calibration or trimming and maintains an
accuracy of +1-0.4 °C at room temperature and +/- 0.8 °C over a range of 0 °C to
+)OO°C.
• Another important characteristic of the LM35DZ is that it draws only 60 micro amps
from its supply and possesses a low self-heating capability. The sensor self-heating
causes less than 0.1 °C temperature rises in still air.
The temperature sensor enables the microcontroller to have an estimation of the heat
variable in the field and provide for slight excesses in water supplied to the field. The slight
excesses are maintained to avoid crop destruction due to non-availability of water in the time
gap between checking the environment variables. In future implementations, the temperature
variable is to be used to calculate crop evapo-transpiration and enable better and advanced
scientific farming practices.
CHAPTER~7
PUMP
7.1 INTRODUCTION
A submersible pump (or electric submersible pump (ESP» is a device which has a
hermetically sealed motor close-coupled to the pump body. The whole assembly is
submerged in the fluid to be pumped. The main advantage of this type of pump is that it
prevents pump cavitations, a problem associated with a high elevation difference between
pump and the fluid surface. Submersible pumps push water to the surface as opposed to jet
pumps having to pull water. Submersibles are more efficient than jet pumps.
The pump we use is a small capacity fountain pump which has enough power to
pump water to the field created in our prototype. The pump has the capacity to lift water to
the height of two feet and works on AC mains supply. We actuate the pump using relays
mentioned in the next section based on the parameters fed to the control algorithm by our
array of sensors. The picture of the pump used by us is as shown below.
7 .3 FEATURES:
VOLTAGE 165-2S0/50Hz
POWER 5W
OUTPUT 400L/H
WEIGHT O.2KG
SIZE 39X15.3X19.4CM
CHAPTER~e
RELA~
a. t INTRODUCTION
A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to open or
close one or many sets of contacts. It was invented by Joseph Henry in ) 835. Because a relay
is able to control an output circuit of higher power than the input circuit, it can be considered
to be, in a broad sense, a form of an electrical amplifier.
The relay that we are using in this project is a 120V/ 2Amp relay and it's an electro
mechanical relay. The excitation voltage that is required is +5V DC. It is driven using the
Relay driver GS-TH-20ST/GS-TH-212T.
The device is connected to the electro mechanical relay. When the relay is excited by
applying the SV dc the relay gets activated and in the process turns ON the device and when
the excitation voltage is stopped the relay gets deactivated and in the process Turns OFF the
devices.
When an electric current is passed through the coil, the resulting magnetic field
attracts the armature and the consequent movement of the movable contact or contacts either
makes or breaks a connection with a fixed contact. If the set of contacts was closed when the
relay was reenergized, then the movement opens the contacts and breaks the connection, and
vice versa if the contacts were open. When the current to the coil is switched off, the
armature is returned by a force, approximately half as strong as the magnetic force, to its
relaxed position. Usually this force is provided by a spring, but gravity is also used
commonly in industrial motor starters. Most relays are manufactured to operate quickly. In a
low voltage application, this is to reduce noise. In a high voltage or high current application,
this is to reduce arcing.
If the coil is' energized with DC, a diode is frequently installed across the coil, to
dissipate the energy from the collapsing magnetic field at deactivation, which would
otherwise generate a voltage spike dangerous to circuit components. Some automotive relays
already include that diode inside the relay case. Alternatively a contact protection network,
consisting ofa capacitor and resistor in series, may absorb the surge. If the coil is designed to
be energized with AC, a small copper ring can be crimped to the end of the solenoid. This
"shading ring" creates a small out-of-phase current, which increases the minimum pull on the
armature during the AC cycle.
"Reset" the contacts back to their initial rest position when the relay coil is in the "de-
energized" condition, i.e. Turned "OFF".
Pole and throw specifications are important to consider when searching for
electromechanical relays. Pole choices include single pole (SP), double pole (DP), triple pole
(TP), four pole (4P), and greater than four poles. Throw choices are single throw or double
throw. Single throw (ST) relays have a pair of contacts open in one position and closed in
the other. Double throw (On relays have three contacts. The common one is in contact with
the second, but not with the third, in one position of the relay, and reverses this connection in
the other relay position.
)llri1
A <:)
sPOT
8
""O"J"
)IIF~1
A2 0 2 82
DPDT
• Circuit symbols of relays. "C" denotes the common terminal in SPDT and DPDT types.
Since relays are switches, the terminology applied to switches is also applied to
relays. A relay will switch one or more poles, each of whose contacts can be thrown by
energizing the coil in one of three ways:
• Normally-open (NO) contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called a Form A contact or
"make" contact.
• Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called a Form B contact or
"break" contact.
• Change-over (CO), or double-throw (DT), contacts control two circuits: one
normally-open contact and one normally-closed contact with a common terminal. It is
also called a Form C contact or "transfer" contact ("break before make"). If this type
of contact utilizes make before break" functionality, then it is called a Form D
contact.
• SPST - Single Pole Single Throw. These have two terminals which can be connected
or disconnected. Including two for the coil, such a relay has four terminals in total. It
is ambiguous whether the pole is normally open or nonnally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the ambiguity.
• SPDT - Single Pole Double Throw. A common terminal connects to either of two
others. Including two for the coil, such a relay has five terminals in total.
• DPST - Double Pole Single Throw. These have two pairs of terminals. Equivalent to
two SPST switches or relays actuated by a single coil. Including two for the coil, such
a relay has six tenninals in total. The poles may be Form A or Form B (or one of
each).
• DPDT - Double Pole Double Throw. These have two rows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has
eight terminals; including the coil. The "8" or "0" may be replaced with a number,
indicating multiple switches connected to a single actuator. For example 4PDT
indicates a four pole double throw relay (with 14 terminals).
~L
Sv For power
Dt
tN4DD7
'l Load
~~-----------------.. ..--~.
• N
For status
-
R
• 92/8 gold silver alloy on silver palladium contact type is suitable for low level
switching application.
• Small size and light weight can provide high density P.C. Board mounting.
• 2.S4gmm Terminal Pitch.
• Low Coil Power Consumption of OS-T Type and high Coil Power Consumption
of 08-D type are available to meet user's selection.
• Employment of suitable plastic materials to be applied to high temperature and
various chemical solutions.
• Plastic epoxy resin sealed type for washing procedure.
B. 7 RELAY SPECIFICATION
). Nominal Load (Resistive Load Cos cP = I)
a.a APPUCATIONS
CHAPT£R~9
The term is used to avoid confusion with ordinary hardware clocks which are only
signals that govern digital electronics, and do not count time in human units. RTC should not
be confused with real-time computing, which shares its three-letter acronym, but does not
directly relate to time of day.
VIEW \
t Xi Vee J
I
i,, X2 SQJV/OUT j
V.T SCL I
GNO SOA l
PDIP (300 mil.) ._J
Fl6 9. t: PIN OUTS Of DS 1307 Ie
9.2 PURPOSE
Although keeping time can be done without an RTC, using one has benefits:
9.~ TIMING
Most RTCs use a crystal oscillator, but some use the power line frequency. In many
cases the oscillator's frequency is 32.768 kHz. This is the same frequency used in quartz
clocks and watches, and for the same reasons, namely that the frequency is exactly 215
cycles per second, which is a convenient rate to use with simple binary counter circuits.
In our project we are using DSI307 serial real-time clock which is a low power, full
binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data
are transferred serially through an I2C, bidirectional bus.
The clock/calendar provides seconds, minutes, hours, day, date, month, and year
information. The end of the month date is automatically adjusted for months with fewer than
31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-
hour format with AMIPM indicator. The OS 1307 has a built-in power-sense circuit that
detects power failures and automatically switches to the backup supply. Timekeeping
operation continues while the part operates from the backup supply.
Upon selecting paddy as the crop, the date of selection is stored, and the schedule for the first
day is loaded by the algorithm. As the days progress, the schedule changes and accordingly
the algorithm sets the optimum values for on-field variables. The optimum values are decided
based on research conducted by institutes. What we do is just implement scientific
agriculture practices and prevent water wastage.
CHAPT£R~ to
SOLENOID LOCK
10.1 INTRODUCTION
A magnetic lock is disclosed to include a latch for locking, a movable holder member
supported on a spring and carrying solenoid, which has a plunger and a stop block fastened to
the plunger for controlling the retraction of the latch, and an adjustment device selectively
positioned in one of two positioning grooves of different depths in a locating block and
stopped at one end of the holder member against the spring for controlling the movable
holder member between a first position where the magnetic lock is locked when electrically
connected and a second position where the magnetic lock is unlocked when electrically
connected.
\~~~00~~~~~0~~~~\
1
Solenoid is the generic term for a spool of thread used as an electromagnet. It also
refers to a device that converts electrical energy into mechanical energy by a solenoid; it
produces a magnetic field of electricity and uses the magnetic field to create linear motion.
Common applications include a solenoid to a power switch as the starter in a car or a valve as
a spray.
Coil winding wire is wound into corkscrew shape around a piston, often iron.
Electromagnets have an advantage over permanent magnets to allow into and out of the
application or remove a power to do what is useful to be activated, such as switches and
valves, and allows them to be fully automated. Like all magnets, the magnetic field coil has a
positive and negative pole, which attracts or repels materials sensitive to magnets. In a valve,
so that the electromagnetic field of the piston to move forwards or backwards, which is how
the traffic generated by a magnetic coil.
In a direct acting valve is activated, electrical energy, which in tum attracts a piston
or pistons, which would otherwise be trapped air or fluid flow. In some way valves magnet,
the electromagnetic field is not directly open the line. In the pilot valves, solenoid moves the
piston, which creates a small opening and the pressure by opening is one that works to seal
the valve.
In both types of valves require a steady flow of electricity to stay open, because once
the power is interrupted, the electromagnetic field propagation and closed the valve to its
original position.
In a flash car, starter, solenoid acts as a link with metal contacts to close a circuit. The
starter solenoid receives a small electrical current when the ignition is turned on, usually by
turning the key. The magnetic field of the magnet then draws on the contacts, closing the
circuit between the battery and starter. The starter solenoid requires constant current to
maintain the circulation, but because the engine began to tum once the solenoid for the most
part inactive.
The magnets are incredibly versatile and extremely useful. They are in all kinds of
automated factory equipment for fireanns paintball. In a bell rings, the audio magazine
produced for the niche, when a piston ring tone metal bar.
10.3 fEATURES
CHAPTER~ 11
MOTORS
11.1 INTRODUCTION
An electric motor uses electrical energy to produce mechanical energy, very typically
through the interaction of magnetic fields and current-carrying conductors. They may be
powered by direct current (for example a battery powered portable device or motor vehicle),
or by alternating current from a central electrical distribution grid. Electric motors may be
classified by the source of electric power, by their internal construction, by their application,
or by the type of motion they give.
1 1.2 DC MOTORS
A DC motor is designed to run on DC electric power. Two examples of pure DC
designs are Michael Faraday's homopolar 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 pure1y DC machines in a strict
sense.
11.3 TOYMOTORS
Toy motors are DC motors that have very low torque and RPM. We have chosen toy
motors for our particular application as these are used for opening and closing the inlets of
the rain water harvesting tank and as such the application requires very little torque and
speed. Moreover the~ toy motors also consume very little power and can be directly driven by
the microcontroller without the need for any additional driver circuits. In addition to the
above features, the toy motors are also very small in size and can be placed easily without
major modifications to design of our prototype.
VOLTAGE 3.0
SPEED 12,000RPM
CURRENT 50MA
TORQUE 0.60. eM
DIAMETER 6MM
LENGTH 10MM
WEIGHT 1.6G(APPROX)
CHAPTER~ 12
12. t INTRODUCTION
Rainwater harvesting is the gathering, or accumulating and storing, of rainwater. Rainwater
harvesting has been used to provide drinking water, water for livestock, water
for irrigation or to refill aquifers in a process called groundwater recharge. Rainwater
collected from the roofs of houses, tents and local institutions, or from specially prepared
areas of ground, can make an important contribution to drinking water. In some cases,
rainwater may be the only available, or economical, water source. Rainwater systems are
simple to construct from inexpensive local materials, and are potentially successful in most
habitable locations. Roof rainwater can be of good quality and may not require treatment
before consumption. However some rooftop materials may produce rainwater that is harmful
to human health. Household rainfall catchment systems are appropriate in areas with an
average rainfall greater than 200mm per year, and no other accessible water sources.
In India, reservoirs called tanks were used to store water; typically they were shallow
with mud walls. Ancient tanks still exist in some places.
12.4 AD"ANTA6ES
Rainwater harvesting can be adopted in cities are to provide supplemental water for
the city's requirements, to increase soil moisture levels for urban greenery, to increase the
ground water table through artificial recharge, to mitigate urban flooding and to improve the
quality of groundwater. In urban areas of the developed world, at a household level,
harvested rainwater can be used for flushing toilets and washing laundry. Indeed in hard
water areas it is superior to mains water for this. It can also be used for showering or bathing.
It may require treatment prior to use for drinking.
With this system we intend not only to provide a reliable system to preserve water but
also intend on fulfilling our social responsibilities as engineers of the nation.
CHAPTER~18
POWER SUPPLY
t s_ t INTRODUCTION
Power supply is a supply 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.
A power supply may include a power distribution system as weB as primary or secondary
sources of energy such as: C.M.S
• Conversion of one form of electrical power to another desired form and voltage,
typically involving converting AC line voltage to a well-regulated lower-voltage DC
for electronic devices. Low voltage, low power DC power supply units are commonly
integrated with the devices they supply, such as computers and household electronics;
for other examples, see switched-mode power supply, linear regulator, rectifier and
inverter (electrical).
• Batteries
• Chemical fuel cells and other forms of energy storage systems
• Solar power
• Generators or alternators
Constraints that commonly affect power supplies are the amount of power they can supply,
how long they can supply it without needing some kind of refuel ing or recharging, how
stable their output voltage or current is under varying load conditions, and whether they
provide continuous power or pulses.
A regulated power supply or stabilized power supply is one that includes circuitry to tightly
control the output voltage and/or current to a specific value. The specific value is closely
maintained despite variations in the load presented to the power supply's output, or any
reasonable voltage variation at the power supply's input.
13. t.lPoWERSUPPL~n'PES
The linear supply is a relatively simple design that becomes increasingly bulky and heavy for
high current devices; voltage regulation in a linear supply can result in low efficiency.
A switched-mode supply of the same rating as a linear supply will be smaller, is usually more
efficient, but will be more complex.
>+7.5v I 3 +5v
7805
Ov
I. Unregulated voltage in
2. Ground
3. Regulated voltage out
This circuit can give +5V output at about 150 rnA current, but it can be increased to
IA when good cooling is added to 7805 regulator chip. The circuit has over overload and
tenninal protection.
The capacitors must have enough high voltage rating to safely handle the input
voltage feed to circuit. The circuit is very easy to build for example into a piece of overboard.
If you need more than 150 mA of output current, you can update the output current up
to I A doing the following modifications:
• Change the transfonner from where you take the power to the circuit to a model
which can give as much current as you need from output
• Put a heat sink to the 7805 regulator (so big that it does not overheat because of the
extra losses in the regulator)
If you need other voltages than +5V, you can modify the circuit by replacing the 7805
chips with another regulator with different output voltage from regulator 78xx chip family.
The last numbers in the chip code tells the output voltage. Remember that the input voltage
must be at least 3V-greater than regulator output voltage or otherwise the regulator does not
work well.
Similarly we can describe for the LM7812.
9.4 FEATURES
• Brief description of operation: Gives out well regulated +5V output, output current
capabil ity of 100 rnA.
• Circuit protection: Built-in overheating protection shuts down output when regulator Ie
gets too hot.
• Circuit complexity: Very simple and easy to build.
• Circuit performance: Very stable +5V output voltage, reliable operation.
• Availability of components: Easy to get, uses only very common basic components.
• Design testing: Based on datasheet example circuit, I have used this circuit successfully
as part of many electronics projects.
• Applications: Part of electronics devices, small laboratory power supply.
• Power supply voltage: Unregulated DC 8-18V power supply.
• Power supply current: Needed output current + 5 mAo
• Component costs: Few dollars for the electronics components + the input transformer
cost.
CHAPTER-14
PROJECT WORKING
14.2 ADVANTA6ES
• Cost Effective because it makes use of cheaper sensor solutions as compared to high end
sensors.
• Highly efficient owing to a well thought out control algorithm.
• Very user-friendly as the target group may be illiterate.
• Owing to a highly efficient algorithm, the savings in terms of water are phenomenal and
the option to save rain water is another USP of our project.
• Since our control algorithm manages water scheduling in its entirety, there is a huge
saving in terms of labor.
14.3 DlSADVANTA6ES
• Since we make use of cheaper sensors in all our applications, the accuracy of the system
is not the best. But since irrigation isn't a very accuracy critical application the
disadvantage can be overru led.
• Since the entire system is made up of a huge number of electronic components working
mostly on the basis of conductivity, the risk of short circuits looms large. This can be
overcome by good quality of workmanship on the components.
• The risk of failure of electronic components and the need for periodic checks are other
disadvantages.
t 4.~ FLOWCHART
INITIALIZE
MODULES &
nI~PI4V
LOAD OPTIMUM
VALUES &
~r~l=nllll= nATA
CHECK DATE/TIME
& WEEK INPUT
NO
NO
TURN ON REQD
EQUIPMENTS & RESTORE
nPTIMllM I ~V~I c;
14.5 APPUCATIONS
The project can be used to monitor the environment variables in fields, greenhouses, and
farms. The product can also work as mini-weather stations and can provide better insights to
the met department on the regional parameters.
• GYPSUM
• ELECTRODES
• LM35DZ
• CD4066
• IC 7404
• IC 7805
• IC7812
• IN 4007
• BC 547
• RELAY5V
• CAPACITORS (22Pf ,44J1F)
• RESISTORS(6.3KO,3300,180KO)
• TRANSFORMERS (9-0-9)
• CONNECTING WIRES
• GENERAL PCB BOARD
• TOYMOTORS
CONCLUSION
CHIGURU- An automated micro-irrigation system was tested extensively by varying the test
conditions and was found to be reliable in the tests thus far. The product provides a very
effective way for better water management in fields and also reduces the labor required for
the same. In addition to this it also provides for rain water harvesting off the field helping us
preserve one of the most priceless resources of the earth-WATER. The product as such can
be improved with better workmanship of the sensors and use of more precise techniques for
the same. At the same time the cost of the product should be kept to a minimum as the target
segment is a very cost sensitiv~ segment. In addition to the features already on board, a data-
logger can be implemented by providing an on-board mmc/sd card reader system. In addition
a GSM system can be interfaced to provide the user updates of the field conditions and
warnings in case of failures.
BIBU06RAPHY
BOOKS
1. "WATER SAVING PRACTICES IN RICE PADDY CULTIVATION" A Journal
Written by YOSHISUKE NAKANO Faculty of Agriculture in Kyushu
University,JAPAN.
WEBSITE
l. www.atmel.com
2. www.alldatasheet.com
3. www.edaboard.com
A PHOTOL06U£ OF
OUR PROJECT
DATA SHEET
November 1983
I=AI~CHILO
RevISed April 2'002
SEMICONDUCTOATM
CD4066BC
Quad Bilateral Switch
General Description • High degree finearity 0.'4)6 distortion (typ.)
The CD40G68C IS a quad btfateral switdl iIltended for the HIgh deg~e bne3rity «» fl6 = 1 kHz. VIS = 5Vp-f)-
transmisSIOn or multiplexing of analog or drgJtaI sfgnal5. It is High degree linearity VOO-VSS = 1OV, Rt. = 10 kU
P'"~for~pin OCf'I'Ip.Btlble WI1h CD4016BC, but nas a much
• Extremely low "OFF- 0.' nA (typ )
lower "ON" resistance, and -oN- reSlStanclt IS relatively
constant over 1he .,put-signal range. swiIdl leakage: 0 Voo-Vss = ,av. T A =25"'C
• Extremely high control mput impedance 10'Zo(typ.)
Features • Low crosstalk -50 dB (typ.)
• Wide supply watage range 3V to 1W between switches 0 f'5 =0.9 MHz. RL = 1 kn
• Htgh nOse Immunity 0.45 Veo (typ.) • Frequency response, switch -ON" 40 MHz (typ )
• Wide range of digital.nd ±7.5 VPEAK
analog switching Applications
• ·0..,. resIStance lor 1BY operation eoa • Analog SIgnal swKdlinglmuftiplexing
• Matched "ON- resistance ARcH =50 (typ.) • Signal gating
.. Squelch control
OWl' t 5V signal ....pl4
-Chopper
• ·0..,. resIStance flat over puk-tD-peilk signal range
• Htgh -ON-rOFF'" e5 dB (typ.) .. ModulatorlOemoduJatDl'
.. Commuta1mg swtch
output votrage ratio 0 f. = 10 kHz. " = 10.a
• Otgltar SIgna' sWItching/multiplexing
• CMOS logic mplementatJon
• AnaIog-to-digstalldlgita1-to-analog C:OnYeI'5ian
• 0tsJta1 control f:A frequency, impedance. phase. and
anaJog-signal-gain
Ordering Code:
Order Number Package Description
C0406eBCM M14A 14-Lead Small Outline Integrated c..-curt (SOIC), JEDEC M5-012. 0.150" Nafl'Q!W
CD4066BCSJ Ml4D 14-Lead Small Outline Package (SOP), EtAJ TYPE H. 5.3mm Wid1!
C04066BCN N14A 14-Lead PlastJc OuaJ..ln-Lt~ PaclI.age (POIP). JEOEC MS-001. 0.300" Wide
IfIN.liorU~1 Semiconductor
LM35/LM35A/LM35C/LM35CA/LM35D
Precision Centigrade Temperature Sensors
General Description
The LM35 leUSI are prSCISKX'l .,tegtatec:k:ircUl tetl1*. avaiab1e packaged 1n h&m'l9tiC T0-46 ttanSfStOt' patbge&.
ture senSOlS. wnO&e output voltage IS Itnearly plOf)Ofbttlal to wtlia the LM35C. LM35CA. and 1.M350 ae al&o SIIailabie 11'1
the C&GIus (Cenl9ade) tempefSiulS. The LM35 tt1Js has the plasbc TQ..92 tra1ISlStor pacMge. The LM35D JS also
an ac;.,antage over Inear temperature &eneas calltJ' Bled ., • available ... . , 8-Je.ad s1.I'tace mount smaI outiIne package
Kelvin. al the uss ia not reqt.Wed to subtract a large C~ tWld a Plastic T~.202 package.
stant voltage from Ita OtJtput to obtain oonvU'U9.nt C6r'1ti-
grade scaling The LM35 does not t&q\We any OIdemai cai- Features
bnlbOn or tnmm.,g to ~ovde typtcal 8CCU'E1S6 of f- Y,,'C • CalibratGd dir9cUy in • Co1sius (Centigrade}
at room tan per sture and ±. ¥.C over a "M - 55 to -t 150'"0
• UnG .. + 10.0 mvrc seals factof
~bn range. Low cost III assued by tnml1Wlg and
• 0 5"C aoctJ'8cy ~aranteeable (at +25"C)
c_babOn at the waf_level The LM35'a lOW outllJt mped-
anee. I..,., Q.ltput. and preC118 _meted caJIlf8bon make • Rated for ful 55- to + lS<1C range
• SUitable fa fEmC1t9 sppJiCabC>ns
inteffaang to readout or conIrd clfCUitry espeaa'y easy. It
C51 be used with M'I~e powa- suppifJa. 01 wdt1 plus and • Low ODSt due to waler~level ttlTlning
mnJ5 QC)P18L ~ It drawa (Illy 5) J.1A from its su~ly. It h85 • OpfUllles from -4 to 3) volts
very low self-heabng.lass th~ Q.1"C in alii aar. Tho L.M35t& • LB_ than 80 fiA curenl d-an
fated to operate OWl' a - 55"' to + 1SO"'C temP9«'Sue • Low &elf-heabng. o.08"C iI"I still a1t
151gB. wille the LM35C .. rated for a ~ 40" k) + 11O"'C • Nonhneanty only ±. W~ typioal
,.,gs (-10- wiIh mprcwed accuacy). The LM35 aerie, ~ • Low ~edance output. 0.1 n f« 1 mA toad
Connection Diagrams
1'()...K T().92
-.til Can Pack...• PIntle Package
vourOa+vs
IIJIIM_
~ N.C.
ke.
(iNO
2
oS
-4
1
6
5
HC.
N.t.
N.C.
'YUH/a,••,
-c.-.c...... ~ft. . . . . pin(GNQ Ord« Mumbet' Ul35CZ. TopVtew
LM35CAZ or LII35DZ
Order Numb. Ul35H, LM35AH, 8M NS Package NumberZQaA
LU35CH, Ul35CAH orUl35OH Order Number LM.3SOM
s.. NS Package Number H03H See NS Package Number MotA
To-20J
"lIettc Pacllage
..
Typical Applications
..,,.+,
..
o
La.
SSOP
r
i
I }-=~.rc
'11.IHIm,...
RClUA! 1.. Basic Cent. . .
11JHI.1e....
T~
...... (+ 2"C to + 111rC)
VQIT .... +1,6G1)mV If +tli&C
- +2I5Q mVat +.25"C
- -550 nN __ ~,.C
1L.IHIa51e-M .... AE 2. Fun·Range Centigrade
Ord« Number Ul35DP Temperature Sensor
s.. NS Package Number PoaA
'IAI-SI'.cJE-........................ 8_. . . . . .~
SN54/74LS04
HEX INVERTER
HEX INVERTER
v~
lOW POWER SCHOTIKY
;r~«t
I
14
.;
JSUFAX
CERAMIC
CASE 632-08
N SUFFIX
PlASTIC
CASE 646-06
o SUFFIX
..# sOle
CASE 751A-02
ORDERING INFORMATION
SN54lSXXJ Ceramlc
SN74lSXXN Plastic
SN74lSXXD sole
GUARANTEED OPERATING RANGES
Symbol Parameter Min Typ Max Unit
Vee SUpply VoIIage 54 4.5 5.0 5.5 V
74 4.75 5.0 525
TA 0peratJlg AtrDeQ ~ Riqe 54 -55 25 125 OC
74 0 25 70
IoH ()Jtput Ct.nent - ~ 54,74 -04 rnA
d JVallonal
JJjy 2006
(ll'Sellliconduclo,
LM340llM78XX Series
3-Terminal Positive Regulators
General Description The 5V, 12V. and 15V regulator opbs are available in the
steel T0-3 power package. The LM340M.M34M..M78XXC
The LM 140ILM340AIlM3401lM7BXXC monolillic senGS is availabJg In too TO-220 plastic power package. and
3-termJnal posItJw voltage regulators employ Internal the lM340-5.0 IS avallabfG In tf'\e SOT-223 package. as welt
cum~nt-hmlbr\Q, thermal shutdown and saf&-area compgnsa- as the LM340-5.0 and LM340-12 In the 8urface-mount TO-
tion. maklng them GSSGnbaity indestructible If ad9quat9 heat 263 package.
SlnkJng IS provided. 1h9Y can dshver OWl t OA output cur-
rent They are intooded 88 fixed voUagg regulators 111 8 wide
range of appiicabons tnclU<ing local (on-eard) regulatIOn for Features
ellnllnallon of nolSB and cistnbu1lon prOO4sms assOCIated • Complete speafications at 1A road
with Slrge-pomt ragulahon In addttion to use as fixed volt- • Output voltage tolerances of :2% at TJ 25'C and ::1:4% =
age r9gUlators. theSQ d9vJea can be used With external OWf the temperature rang& (LM340A)
components to Clbtain aqustable output voltages and cur- • line reguta~n of 0.01% or VovrN of AV IN at 1A load
rents (LM340A)
Cons«ierabIG aIfort was expanded to make Iha en1Im saries • Load fegutation of 0.3% of Vau/A (lM34OA)
of re~ators easy to use and minimIZe the number of exter- • totemal tIlQrmaJ owrtoad protecoon
nal components. It 18 not necesS8IY to bypass the output • totemal short·cucurt current limit
although thIS does improve transalt response Input by- • Output ttaf1Slstor safe 81sa protection
passmg IS n9QdGd only If th9 regulator is located far from the
• ~ Product EnhanCGm9f1t tGstQd
fitter ~aator of the powor suppty.
Typical Applications
AdJustalJle output RQguIator
Fb8d Output ......-
RI
~
- GDmIt01
I the RIII'*I1ar IS IoC*ed IW1hJm 1he power ~ IIW.
-=
aarmKII
-AIh:3t.q\ no ~ capIdOr. needBd lor 818b11y.. doeS haIp tr.IIIant VOUT - sv. (6VlR1 .. Ie) R2 SV1R1 > a 10.
~ (' f18lDICI. tme 0.1 tF. CIIIBIIIC ell&). laid raguIIIIDn (Lr) .. ({A1 .. R2)IR1) tt.r all.M3J4O.6).
hJ ~Q
501-223 TO-252.
(IJrntUI
Scale 1:1
F=AIRCHILC
SEMICONDUC"'On- May 2009
1 N4001 - 1 N4007
General Purpose Rectifiers
Features
• Low forward vot1Bge drop.
• High surge current capability. ~
00-41
COlOR BAND DENOTES CATHODE
Value
Symbol Parameter Units
4OO1J400214OO3140041400514006/4007
VAAM Peak Repebtlve Reverse Voltage 50 I 100 I 200 I 400 I soo I 800 1 1000 V
'F(AV) Average Recbhed FOlWard CUrT9nt
1.0 A
375 .. lead length @ TA = 150C
IFSM Non-RepehbVe Peak Forward SUrge CUrrent
30 A
8 3ms Stngle HaIf-SIne-WCfIe
ft Rating for Fusing (t<8.3ms) 3.7 A2sec
Tsm storage Temperature Range -5510 +175 (lC
TJ Operating junction Temperature -55 to +175 °C
• These ratings are DmiUng valUeS above WhiCh 1he serviceability of any semiconductor deVice may by impaired.
Thermal Characteristics
Symbol Parameter Value Units
PD Pawer~ 3.0 W
ReJA Thermal Resastance, JmctiOn to Ambient 50 OCIW
'"
~
Cycle
Reverse CtmmI @ Rated VR
T" =75"C
TA =25°C
30
5.0
J1A
J1A
TA= 1000C 50 JJA
c,- Totaf capacitanCe VR =4.fN, f = 1.0MHz 15 pF
FEATURES PINNING
• Low cUfl1ll1t (max. 100 rnA) PIN DESCRIPnoN
• Low voIage (max. 65 V). 1 emitter
2 base
APPlICATIONS 3 collector
• General purpoee switching and amplificatiDn.
DESCRIPlION
UMmNG VALUES
In accordance with 1he Absolute Maxinun Rating ~ (lEe 134).
SYMBOL PARAMETER CONomONS MIN. MAX. UNIT
Vceo coIledor-base voltage open emitter
BC546 - 80 V
BC547 - 50 V
Vceo coIlector..emitter wItage open base
BC546 - 65 V
BC547 - 45 V
Veao emtter-base voltage open coIJectDr
BC546 - 6 V
BCS47 - 6 V
Ie collector cu~ (DC) - 100 rnA
leu peak coIector current - 200 rnA
IBM peak base cumrt - 200 mA
p. total power diSSIpation T.,s2SoC;note 1 - SOO mW
TsIII storage temperatwe -65 +150 °C
T, junction temperatwe - 150 <Ie
T_ operating anDent~ -65 +150 oc
Note
1. Tranlilltl mounted on .. FR.. prinIed-circuI bead.
t f\U"l.
:. ~:.
~C£..
"I~
CRYSTAl
rO~
X1
SCL
X2
SONIQJ
~s.
Va:.
.. :
:~
GND
X1il
PIN CONFIGURATIONS
rO;)\t'~....
Xl
VeAl sel
SOA
xOva:.
lOUT X2
VfU,.l
GN
SQNK>Ul
SCl
SDA
SO (150 m.ts) POIP (300 mils)
CPU
OS130
SOA Va..T -
~ ... "
I "".,,~
"':
Fr
~=-
TIMING DIAGRAM
If
• saW/OUT
-
X1 ~y
lC'y
~
ITc•..
.!!
...
1Hzl4.096kH%J8.192kHzll2.768kHz
1Hz
~
... MUXI
BUFFER
-t t
--... .....
X2 --.nr ..
t
OsCIllator
anddrwder t ~
RAM
(56X!)
V= - rt'"
CONTROL
LOGIC
GND .....- POWER
CONTROL CLOCK.
V.T .....- .hi AXI..IM
CALENDAR.
~ AND CONTROL
DS1307 REGISTERS
-
-' i---
+
SCL -. SERIAL BUS
NTERFACE -- USER BUFFER
• I
DETAILED DESCRIPTION
The 051307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar provides
seconds, minutes, hours, day, date, month. and year information. The date at the end of the month is automatically
adjusted for months with fewer than 31 days, including corrections for leap year. The OS 1307 operates as a slave
device on the 12 C bus. Access is obtained by implementing a START condition and providing a device identification
mete foilONed by a register address. Subsequent registers can be accessed sequentially until a STOP condition is
executed. When Vee falls below 1.25 x VSAT• the device terminates an access in progress and resets the device
address counter. Inputs to the device wiff not be recognized ct this time to prevent erroneous data from being
\Witten to the device from an out-of-tolerance system. When Vee falls belaw V BAT• the device switches into a low-
QJrrent battery-backup mode. Upon power-up, the device switches from battery to Vee when Vee is greater than
V eAT +0.2\1 and recognizes inputs when Vee is greater than 1.25 x V FJAT • The block oaagram in Figure 1 shows the
main elements of the serial RTC.
PIN DESCRIPTION
PIN NAME FUNCTION
Connections for Standard 32.768kHz Quartz Crystal. The internal oscillator circuitry is
1 X1 designed for operation with a crystal having a specified load capacitance (C l ) of 12.5pF.
X1 is the input to the oscillator and can optionally be connected to an extemal32.768kHz
<scillator The output of the internal oscillator. ><2. Is floated If an external oscillator is
connected to X1.
2 X2 Note: For more information on crystal selection arli crystal layout considerations. refer to
ApplICation Note 58: Crystal ConSiderations with Dallas ReaJ-Time Clocks.
Backup Supply Input for Any Standard 3V Uthium Cell or Other Energy Source. Battery
voltage must be held between tne minimum and maximum limits for proper operation.
Diodes in series between the battery and the V SAT pin may prevent proper operation. If a
backup supply is not required, V BAT must be grounded. The nominal power-fail trip point
3 VIAT (VPF) voltage at which access to the RTC aod user RAM is denied is set by the internal
drcuitry as 1.25 x V SAT nominal. A lithium battery with 48mAh or greater will back up the
081307 for more than 10 years in the absence of power at +25~C.
UL recognized to ensure against reverse charging current when used with a lithium
battery. Go to: VNIW.maxirn-i~ comfgalinfolull.
4 GNO Ground
Serial Data Input/Output. SDA is the data input/output for the I4lC serial interface. The
S SDA SDA pin is open drain and requires an extemal puUup resistor. The pullup voltage can be
UP to 5.5V reQardless of the voltaoe on Vcr..
Serial Clock Input. SCL is the clock input for the IZC interface and is used to synchronize
6 SCL data movement on the serial interface. The pullup voltage can be up to S.5V regardless of
the voltage on V ce.
Square Wave/Output Driver. When enabled the sawe bit set to 1, the SQW/OUT pin
outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz, 32kHz). The SQW/OUT
7 SaW/OUT pin is open drain and requires an external pullup resistor. SQW/OUT operates with either
Vee or VeAT applied. The pullup voltage can be up to 5.&1 regardless of the voltage on
V~c.1f not used this pjn can be left floating.
Primary Power Supply. When VOltage is applied within normallimits t the device is fully
accessible and data can be written and read. VVhen a backup supply is connected to the
8 Vee device and Vee is below Vtpt read and writes are inhibited. However. the timekeeping
function continues unaffected by the lower input VOltage.