Sunteți pe pagina 1din 50

Agriculture

Motor Control
Cum
Security system-433
(AMCS-433)

By-
A. Kalyan Chakravarthy (05M31A0419)
K. Arun Kumar
(05M31A0403)
B. Shirisha (05M31A0446)
N. Mamatha
(05M31A0422)

1
NISHITHA COLLEGE OF ENGINEERING &
TECHNOLOGY
(Approved by AICTE, Govt. of AP, & Affiliated to JNT University,
Hyderabad)

Lemoor (v), kandukur (M) R.R.District-501 359. A.P. Ph: 08414 – 234399/234599.
Website: www.nishitha.com

__________________________________________________________________________________________________

DEPARTMENT OF ELECTRONIC AND


COMMUNICATION ENGINEERING

Certificate

This is to certify that this is the bonafide record of the project

carried out by………………………………….Roll no…………………… of

final year B.Tech. (Electronics & communication Engineering)

during the academic Year 2007 - 2008 in partial fulfilment of

2
the requirements for the award of Degree of Bachelors of

Technology.

Guide Head of Dept.


Principal

A PROJECT REPORT ON
NAME OF THE PROJECT
Submitted to

Jawaharlal Nehru Technological University


Hyderabad

In partial fulfillment for the award of degree of


BACHELOR OF TECHNOLOGY

In

ELECTRONICS & COMMUNICATION ENGINEERING


By

NAME ROLL NO.

Under the guidance of

MR. SHIVSHANKAR

3
DEPARMENT OF ELECTRONICS &
COMMUNICATION ENGINEERING

NISHITHA COLLEGE OF ENGINEERING &


TECHNOLOGY
LEMOOR, KANDUKUR, R.R DIST, HYDERABAD- 50135

ACKNOWLEDGEMENT
I am indebted to my project guide Mr.Vikram.p, for his valuable suggestion and for
the motivation he provided. I owe my sincere thanks to him for sparing his valuable time and
his constant encouragement throughout the project.
I express my sincere thanks to Mr. Giriraju, head of department of electronics and
communication engineering, Nishitha College of engineering, lemoor, kandukur. For his
guidance and his encouragement and support and also I thank the cheerful staff working
under him for their support.
I express my sincere thanks to Mr. shivshanker asst. professor, accepting us and
guiding us in this project work. I also thank him for his encouragement support and imparting
technical skills. I owe my sincere thanks to him for sparing his valuable time and his constant
encouragement throughout the project.
I express my sincere thanks to Mr. Dr. Vijay Kumar, director of, Nishitha College of
engineering, lemoor, kandukur. For his guidance and his encouragement and support and also
I thank the cheerful staff working under him for their support.
I express my sincere thanks to Mr. Sheshadri shekar, Principal of, Nishitha College
of engineering, Lemoor, kandukur. For his encouragement and support and also I thank the
cheerful staff working under him for their support.
Acknowledgement are also due to the staff of the department of Electronics and
Communication Engineering, Nishitha College of Engineering and Technology, Classmates
and my friends who directly or indirectly or indirectly helped us in marking this project a
success.

4
CONTENTS

 Abstract

 Block diagram

 Components description

• Introduction to controller

• PCB Design

• Power Supplies

• Relays

• RF Transmitter & Receiver

• Decoder(HT 648)

• Encoder(HT 640)

• LM 324

 Working

 Applications

 Advantages

 Disadvantages

 Solutions for disadvantages

 Scope of the project

5
ABSTRACT
Agriculture is the back bone of our country. Not only our country, it forms an
important aspect in every part of the world because, our dependency on that is greater. Hence,
technology must groove in to agriculture and thus improve the agriculture sector. Our main
aim of the project implies the same.

It is customary that a farmer has to walk miles to his farm, to water his
crop(to switch on the motor). He is also not aware about the power presence at the field. He
does not know whether the water level is low or high. He’s not aware when any unauthorized
persons may enter the field and he never knows if any fire breaks in his field which damage
the entire crop. The “AMCS-433” provides exactly the solution for these problems.

By using this system, the farmer can directly switch “ON” the motor from his
house. He also gets the indication whether the power at field is present or not. Thus he does
not need to walk every time to his field in order to switch on the motor, at any time. He is
also indicated about the water level at the tank in his field is low or high. He is signalled
when any unauthorized person enters the field and most importantly, he is alarmed when any
fire breaks in the field so that he can switch on the motor to supply the water to put off the
fire. Hence this system provides full control of the water flow and offers high security to the
fields, remotely.

6
WATER
LEVEL
INDICATO
µ D
E
C
RF
RX
R C O
O D
FIRE
N E
INDICATO
T R
R
R
O
POWER L E
FAILURE L N
E C RF
CIRCUIT
R O TX
D
POWER E
MOTOR R
SUPPLY

µ
LED INDICATIONS E
 MOTOR C RF
ON/OFF O RX
C D
 POWER
O E
ON/OFF R
N
 WATER
T
LEVEL
R
 FIRE E
O N
INDICATOR L C RF
L O TX
MOTOR
CONTR E D
OL R E
POWER R
SWITCH
SUPPLY

7
COMPONENTS DESCRIPTION

INTRODUCTION TO MICROCONTROLLER:

PIN DIAGRAM

8
A Microcontroller consists of a powerful CPU tightly coupled with memory RAM, ROM or
EPROM), various I / O features such as Serial ports, Parallel Ports, Timer/Counters,
Interrupt Controller, Data Acquisition interfaces-Analog to Digital Converter (ADC),
Digital to Analog Converter (ADC), everything integrated onto a single Silicon Chip.

It does not mean that any micro controller should have all the above said features on
chip, Depending on the need and area of application for which it is designed, the on chip
features present in it may or may not include all the individual section said above.

Any microcomputer system requires memory to store a sequence of instructions


making up a program, parallel port or serial port for communicating with an external system,
timer / counter for control purposes like generating time delays, Baud rate for the serial port,
apart from the controlling unit called the Central Processing Unit

ADVANTAGES OF MICROCONTROLLERS:

1. If a system is developed with a microprocessor, the designer has to go for external


memory such as RAM, ROM or EPROM and peripherals and hence the size of the
PCB will be large enough to hold all the required peripherals. But, the micro
controller has got all these peripheral facilities on a single chip so development of a
similar system with a micro controller reduces PCB size and cost of the design.
One of the major differences between a micro controller and a microprocessor is that
a controller often deals with bits , not bytes as in the real world application, for
example switch contacts can only be open or close, indicators should be lit or dark
and motors can be either turned on or off and so forth.

INTRODUCTION TO ATMEL MICROCONTROLLER


SERIES: 89C51 Family, TECHNOLOGY: CMOS

The major Features of 8-bit Micro controller ATMEL 89C51:

• 8 Bit CPU optimized for control applications


• Extensive Boolean processing (Single - bit Logic) Capabilities.
• On - Chip Flash Program Memory
• On - Chip Data RAM
• Bi-directional and Individually Addressable I/O Lines
• Multiple 16-Bit Timer/Counters

9
• Full Duplex UART
• Multiple Source / Vector / Priority Interrupt Structure
• On - Chip Oscillator and Clock circuitry.
• On - Chip EEPROM
• SPI Serial Bus Interface
• Watch Dog Timer
POWER MODES OF ATMEL 89C51 ICROCONTROLLER:

To exploit the power savings available in CMOS circuitry. Atmel’s Flash micro
controllers have two software-invited reduced power modes.

IDLE MODE:

The CPU is turned off while the RAM and other on - chip peripherals continue
operating. In this mode current draw is reduced to about 15 percent of the current drawn
when the device is fully active.

POWER DOWN MODE:

All on-chip activities are suspended while the on – chip RAM continues to hold its
data. In this mode, the device typically draws less than 15 Micro Amps and can be as low as
0.6 Micro Amps

POWER ON RESET:

When power is turned on, the circuit holds the RST pin high for an amount of time
that depends on the capacitor value and the rate at which it charges.

To ensure a valid reset, the RST pin must be held high long enough to allow the
oscillator to start up plus two machine cycles. On power up, Vcc should rise within
approximately 10ms. The oscillator start-up time depends on the oscillator frequency. For a
10 MHz crystal, the start-up time is typically 1ms.With the given circuit, reducing Vcc
quickly to 0 causes the RST pin voltage to momentarily fall below 0V. However, this voltage
is internally l limited and will not harm the device.

MEMORY ORGANIZATION:

* Logical Separation of Program and Data Memory *

10
All Atmel Flash micro controllers have separate address spaces for program and data memory as sho
in Fig 1.The logical separation of program and data memory allows the data memory to be accessed by 8
addresses. Which can be more quickly stored and manipulated by an 8 bit CPU Nevertheless 16 Bit d
memory addresses can also be generated through the DPTR register?

Program memory can only be read. There can be up to 64K bytes of directly
addressable program memory. The read strobe for external program memory is the Program
Store Enable Signal (PSEN) Data memory occupies a separate address space from program
memory. Up to 64K bytes of external memory can be directly addressed in the external
data memory space. The CPU generates read and write signals, RD and WR during external
data memory accesses. External program memory and external data memory can be
combined by a applying the RD and PSEN signal to the inputs of AND gate and using the
output of the fate as the read strobe to the external program/data memory.

PROGRAM MEMORY:

Fig 1.1 shows the map of the lower part of the program memory, after reset, the CPU
begins execution from location 0000h. As shown in Fig 1.1 each interrupt is assigned a fixed
location in program memory. The interrupt causes the CPU to jump to that location, where
it executes the service routine. External Interrupt 0 for example, is assigned to location
0003h. If external Interrupt 0 is used, its service routine must begin at location 0003h. If the
interrupt in not used its service location is available as general-purpose program memory.

Fig.2: Program Memory.

0033h

Timer 2 002Bh

Serial Port 0023h

Timer 1 001Bh

External 8 Bytes

Interrupt 1 0013h

Timer 0 000Bh

11
External

Interrupt 0 0003h

The interrupt service locations are spaced at 8 byte intervals 0003h for External
interrupt 0, 000Bh for Timer 0, 0013h for External interrupt 1,001Bh for Timer1, and so on.
If an Interrupt service routine is short enough (as is often the case in control applications) it
can reside entirely within that 8-byte interval. Longer service routines can use a jump
instruction to skip over subsequent interrupt locations. If other interrupts are in use. The
lowest addresses of program memory can be either in the on-chip Flash or in an external
memory. To make this selection, strap the External Access (EA) pin to either Vcc or GND.
For example, in the AT89C51 with 4K bytes of on-chip Flash, if the EA pin is strapped to
Vcc, program fetches to addresses 0000h through 0FFFh are directed to internal Flash.
Program fetches to addresses 1000h through FFFFh are directed to external memory.

DATA MEMORY:

The Internal Data memory is dived into three blocks namely,

 The lower 128 Bytes of Internal RAM.


 The Upper 128 Bytes of Internal RAM.
 Special Function Register.
Internal Data memory Addresses are always 1 byte wide, which implies an
address space of only 256 bytes. However, the addressing modes for internal RAM can in
fact accommodate 384 bytes. Direct addresses higher than 7Fh access one memory space, and
indirect addresses higher than 7Fh access a different Memory Space.

The lowest 32 bytes are grouped into 4 banks of 8 registers. Program instructions call
out these registers as R0 through R7. Two bits in the Program Status Word (PSW) Select,
which register bank, is in use. This architecture allows more efficient use of code space, since
register instructions are shorter than instructions that use direct addressing.

The next 16-bytes above the register banks form a block of bit addressable memory space.
The micro controller instruction set includes a wide selection of single - bit instructions

12
and this instruction can directly address the 128 bytes in this area. These bit addresses are
00h through 7Fh. either direct or indirect addressing can access all of the bytes in lower
128 bytes. Indirect addressing can only access the upper 128. The upper 128 bytes of
RAM are only in the devices with 256 bytes of RAM.

The Special Function Register includes Posrt latches, timers, peripheral controls etc.,
direct addressing can only access these register. In general, all Atmel micro controllers have
the same SFRs at the same addresses in SFR space as the AT89C51 and other compatible
micro controllers. However, upgrades to the AT89C51 have additional SFRs. Sixteen
addresses in SFR space are both byte and bit Addressable. The bit Addressable SFRs are
those whose address ends in 000B. The bit addresses in this area are 80h through FFh.

FFFFh FFFFh

EXTERNAL

EXTERNAL

FFh

EA = 0 EA = 1

EXTERNAL EXTERNAL 0000h

-0000- 00h

PSEN RD WR

Fig.1.1 89C51 MEMORY STRUCTURE

13
ADDRESSING MODES

DIRECT ADDRESSING:

In direct addressing, the operand specified by an 8-bit address field in the instruction.
Only internal data RAM and SFR’s can be directly addressed.

INDIRECT ADDRESSING:

In Indirect addressing, the instruction specifies a register that contains the address of
the operand. Both internal and external RAM can indirectly address.

The address register for 8-bit addresses can be either the Stack Pointer or R0 or R1 of
the selected register Bank. The address register for 16-bit addresses can be only the 16-bit
data pointer register, DPTR.

INDEXED ADDRESSING:

Program memory can only be accessed via indexed addressing this addressing mode is
intended for reading look-up tables in program memory. A 16 bit base register (Either DPTR
or the Program Counter) points to the base of the table, and the accumulator is set up with the
table entry number. Adding the Accumulator data to the base pointer forms the address of the
table entry in program memory.

Another type of indexed addressing is used in the“ case jump ” instructions. In this
case the destination address of a jump instruction is computed as the sum of the base pointer
and the Accumulator data.

REGISTER INSTRUCTION:

The register banks, which contains registers R0 through R7, can be accessed by
instructions whose opcodes carry a 3-bit register specification. Instructions that access the
registers this way make efficient use of code, since this mode eliminates an address byte.
When the instruction is executed, one of four banks is selected at execution time by the
row bank select bits in PSW.

REGISTER - SPECIFIC INSTRUCTION:

Some Instructions are specific to a certain register. For example some instruction
always operates on the Accumulator, so no address byte is needed to point out. In these cases,

14
the opcode itself points to the correct register. Instruction that regger to Accumulator as A
assemble as Accumulator - specific Opcodes.

IMMEDIATE CONSTANTS:

The value of a constant can follow the opcode in program memory For example.
MOV A, #100 loads the Accumulator with the decimal number 100. The same number could
be specified in hex digit as 64h.

PROGRAM STATUS WORD:

Program Status Word Register in Atmel Flash Micro controller:

CY AC F0 RS1 RS0 OV --- P

PSW 7 PSW 0

PSW 6 PSW 1

PSW 5 PSW 2

PSW 4 PSW 3

PSW 0:

Parity of Accumulator Set by Hardware to 1 if it contains an Odd number of 1s,


Otherwise it is reset to 0.

PSW1:

User Definable Flag

PSW2:

Overflow Flag Set By Arithmetic Operations

15
PSW3:

Register Bank Select

PSW4:

Register Bank Select


PSW5:

General Purpose Flag.

PSW6:

Auxiliary Carry Flag Receives Carry Out from

Bit 1 of Addition Operands

PSW7:

Carry Flag Receives Carry Out From Bit 1 of ALU Operands.

The Program Status Word contains Status bits that reflect the current state of the
CPU. The PSW shown if Fig resides in SFR space. The PSW contains the Carry Bit, The
auxiliary Carry (For BCD Operations) the two - register bank select bits, the Overflow flag, a
Parity bit and two user Definable status Flags.

The Carry Bit, in addition to serving as a Carry bit in arithmetic operations also serves
the as the “Accumulator” for a number of Boolean Operations .The bits RS0 and RS1 select
one of the four register banks. A number of instructions register to these RAM locations as
R0 through R7.The status of the RS0 and RS1 bits at execution time determines which of
the four banks is selected.

The Parity bit reflect the Number of 1s in the Accumulator .P=1 if the Accumulator
contains an even number of 1s, and P=0 if the Accumulator contains an even number of 1s.
Thus, the number of 1s in the Accumulator plus P is always even. Two bits in the PSW are
uncommitted and can be used as general-purpose status flags.

INTERRUPTS

The AT89C51 provides 5 interrupt sources: Two External interrupts, two-timer


interrupts and a serial port interrupts. The External Interrupts INT0 and INT1 can each either

16
level activated or transition - activated, depending on bits IT0 and IT1 in Register TCON.
The Flags that actually generate these interrupts are the IE0 and IE1 bits in TCON. When the
service routine is vectored to hardware clears the flag that generated an external interrupt
only if the interrupt WA transition - activated. If the interrupt was level - activated, then the
external requesting source (rather than the on-chip hardware) controls the requested flag. Tf0
and Tf1 generate the Timer 0 and Timer 1 Interrupts, which are set by a rollover in their
respective Timer/Counter Register (except for Timer 0 in Mode 3). When a timer interrupt is
generated, the on-chip hardware clears the flag that generated it when the service routine is
vectored to. The logical OR of RI and TI generate the Serial Port Interrupt. Neither of these
floag is cleared by hardware when the service routine is vectored to. In fact, the service
routine normally must determine whether RI or TI generated the interrupt an the bit must be
cleared in software.

In the Serial Port Interrupt is generated by the logical OR of RI and TI. Neither of
these flag is cleared by hardware when the service routine is vectored to. In fact, the service
routine normally must determine whether RI to TI generated the interrupt and the bit must be
cleared in software.

IE: Interrupt Enable Register

EA - ET2 ES ET1 EX1 ET0 EX0

Enable bit = 1 enabled the interrupt

Enable bit = 0 disables it.

OSCILLATOR AND CLOCK CIRCUIT:

XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier
which is intended for use as a crystal oscillator in the pin configuration, in the frequency
range of 1.2 MHz to 12 Mhz. XTAL2 also the input to the internal clock generator.

To drive the chip with an internal oscillator, one would ground XTAL1 and XTAL2.
Since the input to the clock generator is divide by two flip flop there are no requirements on

17
the duty cycle of the external oscillator signal. However, minimum high and low times must
be observed.

The clock generator divides the oscillator frequency by 2 and provides a tow phase
clock signal to the chip. The phase 1 signal is active during the first half to each clock period
and the phase 2 signals are active during the second half of each clock period.

CPU TIMING:

A machine cycle consists of 6 states. Each stare is divided into a phase / half, during
which the phase 1 clock is active and phase 2 half. Arithmetic and Logical operations take
place during phase1 and internal register - to register transfer take place during phase 2.

18
PCB DESIGN

Design and Fabrication of Printed circuit boards:

INTRODUCTION:

Printed circuit boards, or PCBs, form the core of electronic equipment domestic and
industrial. Some of the areas where PCBs are intensively used are computers, process control,
telecommunications and instrumentation.

MANUFATCURING:

The manufacturing process consists of two methods; print and etch, and print, plate
and etch.

The single sided PCBs are usually made using the print and etch method. The double
sided plate through – hole (PTH) boards are made by the print plate and etch method.

The production of multi layer boards uses both the methods. The inner layers are
printed and etch while the outer layers are produced by print, plate and etch after pressing the
inner layers.

SOFTWARE:

The software used in our project to obtain the schematic layout is MICROSIM.

PANELISATION:

Here the schematic transformed in to the working positive/negative films. The circuit
is repeated conveniently to accommodate economically as many circuits as possible in a
panel, which can be operated in every sequence of subsequent steps in the PCB process. This
is called penalization. For the PTH boards, the next operation is drilling.
DRILLING:

PCB drilling is a state of the art operation. Very small holes are drilled with high
speed CNC drilling machines, giving a wall finish with less or no smear or epoxy, required
for void free through hole plating.

19
PLATING:

The heart of the PCB manufacturing process. The holes drilled in the board are treated
both mechanically and chemically before depositing the copper by the electro less copper
platting process.

ETCHING:

Once a multiplayer board is drilled and electro less copper deposited, the image
available in the form of a film is transferred on to the outside by photo printing using a dry
film printing process. The boards are then electrolyticaly plated on to the circuit pattern with
copper and tin. The tin-plated deposit serves an etch resist when copper in the unwanted area
is removed by the conveyorised spray etching machines with chemical etchants. The etching
machines are attached to an automatic dosing equipment, which analyses and controls
etchants concentrations.

SOLDERMASK:

Since a PCB design may call for very close spacing between conductors, a solder
mask has to be applied on the both sides of the circuitry to avoid the bridging of conductors.
The solder mask ink is applied by screening. The ink is dried, exposed to UV, developed in a
mild alkaline solution and finally cured by both UV and thermal energy.

HOT AIR LEVELLING:

After applying the solder mask, the circuit pads are soldered using the hot air leveling
process. The bare bodies fluxed and dipped in to a molten solder bath. While removing the
board from the solder bath, hot air is blown on both sides of the board through air knives in
the machines, leaving the board soldered and levelled. This is one of the common finishes
given to the boards. Thus the double sided plated through whole printed circuit board is
manufactured and is now ready for the components to be soldered.

20
POWER SUPPLIES

INTRODUCTION:

The present chapter introduces the operation of power supply circuits built using filters,
rectifiers, and then voltage regulators. Starting with an ac voltage, a steady dc voltage is
obtained by rectifying the ac voltage, then filtering to a dc level, and finally, regulating to
obtain a desired fixed dc voltage. The regulation is usually obtained from an IC voltage
regulator unit, which takes a dc voltage and provides a somewhat lower dc voltage, which
remains the same even if the input dc voltage varies, or the output load connected to the dc
voltage changes.
A block diagram containing the parts of a typical power supply and the voltage at various
points in the unit is shown in fig 19.1. The ac voltage, typically 120 V rms, is connected to
a transformer, which steps that ac voltage down to the level for the desired dc output. A
diode rectifier then provides a full-wave rectified voltage that is initially filtered by a
simple capacitor filter to produce a dc voltage. This resulting dc voltage usually has some
ripple or ac voltage variation. A regulator circuit can use this dc input to provide a dc
voltage that not only has much less ripple voltage but also remains the same dc value even
if the input dc voltage varies somewhat, or the load connected to the output dc voltage
changes. This voltage regulation is usually obtained using one of a number of popular
voltage regulator IC units.

Transformer Rectifier Filter IC regulator Load

21
IC VOLTAGE REGULATORS:

Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload
protection all in a single IC. Although the internal construction of the IC is somewhat
different from that described for discrete voltage regulator circuits, the external operation
is much the same. IC units provide regulation of either a fixed positive voltage, a fixed
negative voltage, or an adjustably set voltage.

A power supply can be built using a transformer connected to the ac supply line to
step the ac voltage to desired amplitude, then rectifying that ac voltage, filtering with a
capacitor and RC filter, if desired, and finally regulating the dc voltage using an IC regulator.
The regulators can be selected for operation with load currents from hundreds of milli
amperes to tens of amperes, corresponding to power ratings from milliwatts to tens of watts.

THREE-TERMINAL VOLTAGE REGULATORS:

Fig shows the basic connection of a three-terminal voltage regulator IC to a load. The
fixed voltage regulator has an unregulated dc input voltage, Vi, applied to one input terminal,
a regulated output dc voltage, Vo, from a second terminal, with the third terminal connected
to ground. For a selected regulator, IC device specifications list a voltage range over which
the input voltage can vary to maintain a regulated output voltage over a range of load current.
The specifications also list the amount of output voltage change resulting from a change in
load current (load regulation) or in input voltage (line regulation).

Fixed Positive Voltage Regulators:

IN
OUT

From 7805

Transforme
r

GND

22
The series 78 regulators provide fixed regulated voltages from 5 to 24 V. Figure 19.26
shows how one such IC, a 7812, is connected to provide voltage regulation with output from
this unit of +12V dc. An unregulated input voltage Vi is filtered by capacitor C1 and
connected to the IC’s IN terminal. The IC’s OUT terminal provides a regulated + 12V which
is filtered by capacitor C2 (mostly for any high-frequency noise). The third IC terminal is
connected to ground (GND). While the input voltage may vary over some permissible voltage
range, and the output load may vary over some acceptable range, the output voltage remains
constant within specified voltage variation limits. These limitations are spelled out in the
manufacturer’s specification sheets. A table of positive voltage regulated ICs is provided in
table 19.1.

TABLE 19.1 Positive Voltage Regulators in 7800 series

Output Voltage Minimum Vi (V)


IC Part
(V)

7805 +5 7.3

7806 +6 8.3

7 +8 10.5
808

7 +10 12.5
810

7 +12 14.6
812

7 +15 17.7
815

7 +18 21.0
818

7824 +24 27.1

RELAYS

23
A relay is a switch worked by an electromagnet. It is useful if we want a small
current in one circuit to control another circuit containing a device such as a lamp or electric
motor which requires a large current, or if we wish several different switch contacts to be
operated simultaneously.
When the controlling current flows through the coil, the soft iron core is
magnetized and attracts the L-shaped soft iron armature. This rocks on its pivot and opens,
closes or changes over, the electrical contacts in the circuit being controlled it closes the
contacts.
The current needed to operate a relay is called the pull-in current and the
dropout current in the coil when the relay just stops working. If the coil resistance R of a
relay is 185 Ω and its operating voltage V is 12V, the pull-in current I is given by:
I=V = 12 = 0.065A = 65mA
R 185

RELAY CONTROL
CIRCUIT DIAGRAM DESCRIPTION:

In this circuit transistor BC547 is used as a switch. The control signal is given to the
base terminal of the transistor. The collector is attached to the relay coil. Relays are
electromechanical devices. There are two types of relays.

1. Normally closed
2. Normally opened
We are using normally opened type relay. When the controller output from the PC is
high the transistor will be in the ON state, so relay is energized. When the controller output
from the PC is low the transistor will be in the OFF state, so relay is de-energized the valve
will open. When the relay is de-energized the valve will close. So according to the controller
output the valve will open or close and thus level is maintained.

RF TRANSMITTER & RECEIVER

24
RF TRANSMITTER

Figure2.3: RF transmitter

Circuit operation

RF transmitter circuit is given. This circuit can be operated on a 9V D.C. Supply


source. The signals are passed on from the signal unit connected in the circuit to the base of
the transistor Q1 (BF494) through the capacitor C1 (0.1). Q1 is a NPN transistor and its
collector is given positive supply through the coil L1. Its emitter is connected to the ground
through the resistance R3 (100E) while its base is given the forward supply through the
resistance R2 (68k). Other than this, the signal unit is given the positive supply through the
resistance R1 (1k8). This resistance functions as the load resistance here and generates the
audio signals together with the signal unit. These audio signals are given to the base of the
transistor Q1 (BF494) through the capacitor C1 (0.1).

The coil L1 connected at its collector can be made by giving 5 turns of 24 SWG wire
on a base of 0.5cm diameter. A capacitor C3 (12pf) has also been connected between the
collector and the emitter of the transistor Q1. This capacitor triggers the oscillations. As soon
as the audio signal is received at the base then the transistor starts to oscillate and it generates
Radio frequency, which is given to the antenna through the capacitor C4 (1kpf) and
transmitted. The range of this transmitter lies between 100 meters to 500 meter

TRANSMITTER PIN DIAGRAM

25
The TWS-434 and RWS-434 are extremely small, and are excellent for applications
requiring short-range RF remote controls. The transmitter module is only 1/3 the size of a
standard postage stamp, and can easily be placed inside a small plastic enclosure

26
TWS-434: The transmitter output is up to 8mW at 433.92MHz with a range of
approximately 400 foot (open area) outdoors. Indoors, the range is approximately 200 foot,
and will go through most walls.

The TWS-434 transmitter accepts both linear and digital inputs can operate from 1.5 to 12
Volts-DC, and makes building a miniature hand-held RF transmitter very easy. The TWS-
434 is approximately the size of a standard postage stamp.

RF RECEIVER

RWS-434: The receiver also operates at 433.92MHz, and has a sensitivity of 3uV.
The RWS-434 receiver operates from 4.5 to 5.5 volts-DC, and has both linear and digital
outputs.

RWS-434 Receiver

Note: For maximum range, the recommended antenna should be approximately 35cm
long. To convert from centimeters to inches—multiply by 0.3937. For 35cm, the length in

27
inches will be approximately 35cm x 0.3937 = 13.7795 inches long. We tested these
modules using a 14”, solid, 24 gauge hobby type wire, and reached a range of over 400 foot.
Your results may vary depending on your surroundings.

Sample Receiver Application Circuit

The example above shows the receiver section using the HT-12D decoder IC for a 4-bit RF
remote control system. The transmitter and receiver can also use the Holtek 8-bit HT-
640/HT-648L remote control encoder/decoder combination for an 8-bit RF remote control
system. Here are the schematics for an 8-bit RF remote control system:

No addressing or programming
The LS001 decoder IC can sink/source up to 25mA per output
Easy to use
Very low current consumption
Four data lines

Easy serial interface (encoder data out & decoder data in)

28
Selectable baud rates (2400 or 9600 bps)
High noise immunity
Standard 8-Pin PDIP package

There are three Wireless RF Modules, Transmitter, Receiver and a Transceiver.


These RF Modules are designed to serve as a tool for electronic design engineers, developers,
hobbyists and students to perform wireless experiments. These modules make it easy for any
NON RF Experienced developer to add Wireless RF Remote Control to their project. NO RF
Knowledge required. The RF Modules are in a PCB (Printed Circuit Board) form with a 17
Pin 0.1 Inch spacing header that fits directly into most all prototyping boards. They are easy
to use boards that include encoders, decoders, addressing, RF data processing and even the
antenna, in a simple fully range tested board that is ready to plug right into your project. Just
apply +5VDC, ground, and the communication pins you require and enjoy hassle free
wireless communications. The Transmitter, Receiver and Transceiver all have 9600 baud
serial interfaces and stand-alone, 3 function switch inputs and outputs. The modules can
communicate over distances up to 250 feet. The boards operate on +5V and easily interface
to your Basic Stamp 2 or Basic Stamp 2sx

Two Modes of Operation:


Connecting GND to the Mode pin places the module in Switch Mode.
Connecting +5V to the Mode pin places the module in Serial Mode.

Switch Mode:
The transmitter, receiver and transceiver have 4 address pins (labeled ADDR1 –
ADDR4), providing 16 address combinations. Placing 0V or 5V on the 4 address pins sets the
unit’s address (in a binary fashion). For example, placing 0V on all pins sets the address to
zero. Placing 5V on all pins sets the address to 15.The transmitter, receiver and transceiver
also have 3 switch data pins (labelled IN1 – IN3). 0V or 5V logic levels placed on the input
pins of the transmitting module are automatically sent to the output pins (labeled OUT1 –
OUT3) on the receive module. In addition, 16 different modules can be addressed with the
built-in 4-bit address pins. The receiver will receive the switch data on its 3 switch output
pins only when its 4-bit address matches the transmitter’s 4-bit address. The 4-bit address
does not apply to serial mode.

29
Serial Mode:
In serial mode (with +5V applied to the Mode pin) the modules can send and receive
serial data at 9600, N, 8, 1 with +5V and 0V logic levels. Simply connect a single wire to the
Transmit Data pin (labeled TXD) and send 9600 baud data into the module. The receive
module outputs the same data at 9600 baud. All RF data processing is done automatically by
the modules. You cannot send a continuous 9600 baud stream; spacing between 9600 baud
bytes has to be at least 15 milliseconds. A flow control pin is provided for the transmitting
side to assist with achieving maximum efficient throughput. The Parallax Basic Stamp 2 and
BASIC Stamp 2sxhave built-in commands to do serial byte pacing and flow-control
handshaking in one single instruction (see source code examples).

Single direction communication requires at least:


Option a: 1 Transmitter and 1 Receiver.
Option b: 1 Transmitter and 1 Transceiver.
Option c: 1 Transceiver and 1 Receiver.

Bi-directional communication requires at least: 2 Transceivers.

Multi Point Communications can be achieved by:


Placing one transmitter at each node that needs to send information.
Placing one receiver at each node that needs to receive information.
Placing one transceiver at each node that needs to send and receive information.

DECODER (HT 648L)

30
Features

· Operating voltage: 2.4V~12V

· Low power and high noise immunity CMOS technology

· Low standby current

· Capable of decoding 18 bits of information

· Pairs with HOLTEK’s 318 series of encoders

· 8~18 address pins

· 0~8 data pins

· Trinary address setting

· Two times of receiving check

· Built-in oscillator needs only a 5% resistor

· Valid transmission indictor

· Easily interface with an RF or an infrared transmission medium

· Minimal external components

Applications

· Burglar alarm system

· Smoke and fire alarm system

· Garage door controllers

· Car door controllers

· Car alarm system

· Security system

· Cordless telephones

· Other remote control systems

General Description

31
The 318 decoders are a series of CMOS LSIs for remote control system applications. They
are paired with the 318 series of encoders. For proper operation a pair of encoder/decoder
pair with the same number of address and data format should be selected (refer to the
encoder/decoder cross reference tables). The 318 series of decoders receives serial address
and data from that series of encoders that are transmitted by a carrier using an RF or an IR
transmission medium. It then compares the serial input data twice continuously with its local
address. If no errors or unmatched codes are encountered, the input data codes are decoded
and then transferred to the output pins. The VT pin also goes high to indicate a valid
transmission. The 318 decoders are capable of decoding 18 bits of information that consists
of N bits of address and 18–N bits of data. To meet various applications they are arranged to
provide a number of data pins whose range is from 0 to 8 and an address pin whose range is
from 8 to 18. In addition, the 318 decoders provide various combinations of address/data
number in different packages.

BLOCKDIAGRAM:

32
PIN DIAGRAM

PIN DESCRIPTION:

Absolute Maximum Ratings*

Supply Voltage ............................... –0.3V to 13V

Storage Temperature................. –50°C to 125°C

33
Input Voltage..................VSS–0.3V to VDD+0.3V

Operating Temperature............... –20°C to 75°C

*Note: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent
damage to the device. These are stress ratings only. Functional operation of this device at
these or any other conditions above those indicated in the operational sections of this
specification is not implied and exposure to absolute maximum rating conditions for extended
periods may affect device reliability.

Electrical characteristics:

Functional Description

Operation

The 318 series of decoders provides various combinations of address and data pins in
different packages. It is paired with the 318 series of encoders. The decoders receive data
transmitted by the encoders and interpret the first N bits of the code period as address and the
last 18–N bits as data (where N is the address code number). A signal on the DIN pin then

34
activates the oscillator which in turns decodes the incoming address and data. The decoders
will check the received address twice continuously. If all the received address codes match
the contents of the decoder’s local address, the 18–N bits of data are decoded to activate the
output pins, and the VT pin is set high to indicate a valid transmission. That will last until the
address code is incorrect or no signal has been received. The output of the VT pin is high
only when the transmission is valid. Otherwise it is low always.

APPLICATION CIRCUIT

ENCODER (HT 640)

35
Features:

 Operating voltage: 2.4V~12V


 Low power and high noise immunity CMOS technology
 Low standby current
 Three words transmission
 Built-in oscillator needs only 5% resistor
 Easy interface with an RF or infrared transmission media
 Minimal external components

Applications:

 Burglar alarm system


 Smoke and fire alarm system
 Garage door controllers
 Car door controllers
 Car alarm system
 Security system
 Cordless telephones
 Other remote control systems

General Description:

The encoders are a series of CMOS LSIs for remote control system applications. They
are capable of encoding 18 bits of information which consists of N address bits and 18_N
data bits. Each address/data input is externally trinary programmable if bonded out. It is
otherwise set floating internally. Various packages of the encoders offer flexible
combinations of programmable address/data to meet various application needs. The
programmable address/ data is transmitted together with the header bits via an RF or an
infrared transmission medium upon receipt of a trigger signal. The capability to select a TE
trigger type or a DATA trigger type further enhances the application

36
PIN DIAGRAM

BLOCK DIAGRAM:

Absolute Maximum Ratings

Supply Voltage..............................._0.3V to 13V

Input Voltage ...................VSS_0.3 to VDD+0.3V

Storage Temperature................._50_C to 125_C

Operating Temperature .............._20_C to 75_C

37
Note: These are stress ratings only. Stresses exceeding the range specified under _Absolute
Maximum Ratings_ may cause substantial damage to the device. Functional operation of this
device at other conditions beyond those listed in the specification is not implied and
prolonged exposure to extreme conditions may affect device reliability.

Functional Description

Operation:

The series of encoders begins a three-word transmission cycle upon receipt of a transmission
enable (TE for the HT600/HT640/HT680 or D12~D17 for the HT6187/HT6207/HT6247,
active high). This cycle will repeat itself as long as the transmission enable (TE or D12~D17)
is held high. Once the transmission enable falls low, the encoder output completes its final
cycle and then stops as shown below.

38
Information word

An information word consists of 4 periods as shown:

Address/data waveform

Each programmable address/data pin can be externally set to one of the following three logic
states:

The _Open_ state data input is interpreted as logic low by the decoders since the decoder
output only have two states.

Address/data programming (preset)

The status of each address/data pin can be individually preset to logic _high_, _low_, or
_floating_. If a transmission enable signal is applied, the encoder scans and transmits the

39
status of the 18 bits of address/data serially in the order A0 to AD17 for the
HT600/HT640/HT680 and A0 to D17 for the HT6187/HT6207/HT6247.There are some
packaging limitations. The 18-pin DIP HT680, for example, offers four external data bits and
eight external address bits. The remaining unpackaged bits or dummy codes are treated as

floating for A0~AD17 or as pull-low for D12~D17. During an information transmission these
bits are still located in their original position. But if the trigger signal is not applied, the chip
only consumes a standby current which is less than 1_A. The address pins are usually preset
to transmit data codes with particular security codes by the DIP switches or PCB wiring,
while the data is selected using push buttons or electronic switches.

Transmission enable

For the TE trigger type of encoders, transmission is enabled by applying a high signal to the
TE pin.

But for the Data trigger type of encoders, it is enabled by applying a high signal to one of the
data

pins D12~D17.

40
HT640 application circuit

41
LM324

Features
• Internally frequency compensated for unity gain
• Large DC voltage gain: 100dB
• Wide power supply range:
LM324 : 3V~32V (or 1.5 ~15V)
• Input common mode voltage range includes ground
• Large output voltage swing: 0V to VCC -1.5V
• Power drain suitable for battery operation

Description
The LM324 consist of four independent, high gain, internally frequency compensated
operational amplifiers which were designed specifically to operate from a single power
supply over a wide voltage range. Operation from split power supplies is also possible so
long as the difference between the two supplies is 3 volts to 32 volts. Application areas
include transducer amplifier, DC gain blocks and all the conventional OP amp circuits which
now can be easily implemented in single power supply systems.

INTERNAL BLOCK DIAGRAM

42
WORKING

AMCS-433 works at 433 MHz frequency. The working of this system is simple, efficient and
reliable. This system consists of two modules, one at field and the other at home. The
working of each module is described as follows.
FIELD MODULE:
This module consists of five circuits. Those are:

 Power failure circuit

 Fire sensor circuit

 Water level indicator

 Circuit breaker
All these circuits are controlled by microcontroller and the working of each circuit is as
follows
POWER FAILURE CIRCUIT:

This circuit is a power supply monitoring device that will trigger a led when the mains supply
cuts off. This device is helpful to inform the loss of power supply at a pump in the field. Once
the led is on, one will know that there is a loss of power supply and actions need to be taken
to rectify the situation by providing alternative power supply or relocating the installation.

CIRCUIT DISCRIPTION:

The circuit shown below consists of a AC relay. If the main input is 120V AC, use a 120V
AC relay. If the mains input is 240V AC, use a 240V AC relay. The relay is a Single Pole
Double Throw (SPDT) type where the COM will be connected to NC terminal if it is not
energised. Once energised, the COM terminal will be connected to the NO terminal.

When the mains power supply is available, the relay will be energised and the COM contact
will be connected to the NO terminal thus disconnecting the 9V power supply in the circuit.
When the mains supply cuts off, the COM will be connected to NC terminal and LED will
light up at home.

43
Fig: Power failure indicator.

FIRE SENSOR CIRCUIT:

i/p
FLAME SENSOR LM324
O/p O/p to controller

The working of flame circuit is very simple. It consists of a flame sensor. Its anode is
connected with 5v and cathode is connected to ground through 8.2k resister. The output is
collected at cathode. Whenever the fire is sensed by the sensor, it gives some voltage and it is
applied to IC LM324, a comparator. The reference voltage is set at the comparator and
whenever the output from sensor crosses this reference voltage, it gives 5v output to the
controller. This signal is transmitted to home and it triggers the buzzer and turns ON the
LED.

44
WATER LEVEL INDICATOR:
The water level indicator uses a simple circuit to trap the water level in the tank at the field.
Its block diagram is given below

5v o/p
Fig: Base with 2 wires, centered with hole.

Fig: Rod with crossings

It uses a base with two wires tapped on it, one is connected to 5v and the other is connected
to output. The centre of the base is perforated to the radius of a rod. The low level of the
water is marked on the rod and at there conducting crossings are inserted as shown in the
figure. The edge of the rod is fixed with a light material such that it floats on water. Now this
rod is inserted through the hole of base and material attached to it should float on water. This
entire system is mounted on the base of the tank or well. When the material, floating on
water, touches the low level, the crossings on the rod make contact with the two wires on
base such that the 5v is shorted with output. This output is applied to controller, which
transmits this signal to home to turn ON the LED.

45
CIRCUIT BREAKER:
The block diagram of the circuit breaker is shown below:

IR IR LM32
TRANSMITTE RECIEVER 4
O/p

As shown in the figure, the circuit breaker uses IR transmitter and receiver pair for its
operation. In this circuit the IR transmitter and receiver are placed opposite to each other such
that the IR signals transmitted by the IR transmitter are always received by the IR receiver.
This pair is placed at the entrance of the field. Whenever any person or obstacle comes in
between these pair, the signals are obstructed by the person and the receiver does not receive
the signals. Thus it does not produce any output. The output is collected at anode of the
receiver and it is given to LM324 comparator. Reference voltage is set at comparator and
whenever the output of receiver is low it is applied to controller through comparator and
transmitted to home which turns ON the LED and triggers the buzzer.
All these circuits are connected to controller and the controller is programmed to
transmit the desired signals to home for their indication. The transmitting signals from port
are applied to encoder (HT640) which encodes this data and the output from encoder is
applied to RF transmitter and then it is transmitted through antenna. Also the signals sent
from home are received at RF receiver through antenna and are decoded by HT648 (Decoder)
and applied to ports for their operation. Remember that all the circuit in this module work
with 5v input.

HOME MODULE:

This module works with 5v and it is operated at 433MHz frequency. The microcontroller
controls all the functions in this module. The signals transmitted from Field are received
through RF receiver and decoded and applied to port of the controller. The controller is
programmed in such a way that, upon the received signals, required leds are turned ON.
This module has the switch to power ON the motor at field. Whenever the switch is
turned on, this signal is transmitted through encoder, transmitter and received at field for its
operation.
Hence the module at field transmits the signals generated by each circuit in the field
module, as explained earlier. The module at home receives all these signals and indicated
through leds. By observing these signals, the farmer switch on the motor switch at home and
this signal is transmitted to field, received and thus the motor switch ON at field and the
water flow starts in to the field. Also, when fire breaks in the field the farmer can switch on
his motor to put off the fire. Thus this system form motor control cum security system.
Both the field and home modules are worked synchronously i.e. the transmission
is done one after the other. Hence this system is called as Half Duplex system.

46
APPLIC ATIONS

1) This system is mainly designed for the purpose of agriculture.


2) Apart from it, this system can be used in industries for various purposes such as
fire indication, water level indication etc.
3) When this system is installed at power transmission station and other places,
power on/off indication is received before it takes place and hence generators can
be switched on before the power goes off.
4) It can be used as the source of data transmission between remote places, without
any price.
5) It can be used in military for signalling, securely.

47
ADVANTAGES

This system offers many advantages to the farmers and thus to


agriculture. Those are:

 By using this system the farmers can remotely control the motor
in the field from his home at any time he requires, unlike walking
few distance to do that. This reduces his work.
 The farmer also comes to know, whether the power at the field is
ON or so that he can switch on the motor. This facility really
requires in some areas as in INDIA, where farmers face
interrupted power supply problems
 The water level in the well or a tank when becomes very low,
indicated to the farmer, so that he can take necessary steps.
 As we are using only 5v power supply to the system. Hence the
power consumption of the system is low. Also, we can install
batteries to operate the modules.
 It alarms the farmer whenever fire breaks in the field such as in
the case of thunder storms etc and he can switch ON the motor
to supply the water to put off the fire. Also it alarms the farmer
when anyone enters the field. Thus it provides high security
 Ease of use and readable to farmers.
 The speed of operation of this system is very fast, thus providing
the fast communication for operation.
 It has greater accuracy, since we are using electronic equipments
and efficiency is good.
 The cost of the system is low, hence affordable to farmers.
 By using VLSI techniques the accuracy and efficiency of the
system increases and also cost decreases at greater extent.

48
DISADVANTAGES

1) The transmission area of this system is less since we are


operating at 433MHz frequency.
2) The transmission is half duplex.

SOLUTIONS OFFERED BY US FOR THE DISADVANTAGES


MENTIONED ABOVE:
1) By using the RF modules or any other transmission modules greater
than this frequency, the transmission area increases.

2) By using transreceivers, this system can be made as full duplex.

49
SCOPE OF THE PROJECT
a) By installing the soil moisture sensors in the field, the moisture levels of the soil
can be analysed by the farmer and thus can provide required water and fertilizers
if required, remotely.
b) Modern agriculture techniques follows powerful techniques like drip irrigation for
better water flow into the fields. By using this system, we can also control and
implement those techniques, remotely.
c) We can also control the speed of the motor at the field by using this system,
remotely.
d) We can connect some machines that are used in the field for various purposes and
can be operated and controlled accordingly.
e) This module is operated at 433.92 MHz frequency. By installing the transmitter
modules of greater frequency, transmission area increases.
f) We can also operate this system by using cell phones if signal strengths are good.
g) By installing cameras at field, farmer can visualize the field.

50

S-ar putea să vă placă și