Professional Documents
Culture Documents
ABSTRACT
Monitoring and control of greenhouse environment play an important role in
greenhouse production and management. To monitor the greenhouse environment
parameters effectively, it is necessary to design a measurement and control system.
The aim of this project is to monitor the conditions in green house by using sensor
nodes which collect the signals from the humidity sensor, soil moisture sensor and
control the actuators, and transmit the data through the wireless RF transceiver; the
master node receives the data through the RF transceiver.
All the parameters can be measured by using ATMEL 89s52 microcontroller
transmitted to far distance by using wireless communication system called Zigbee. .
Result shows that the system is practical and reliable, and has wide application in the
future
Page
1
DEPATMENT OF EIE
INTRODUCTION
We live in a world where everything can be controlled and operated
automatically, but there are still a few important sectors in our country where
automation has not been adopted or not been put to a full-fledged use, perhaps
because of several reasons one such reason is cost. One such field is that of
agriculture. Agriculture has been one of the primary occupations of man since early
civilizations and even today manual interventions in farming are inevitable.
Greenhouses form an important part of the agriculture and horticulture sectors in our
country as they can be used to grow plants under controlled climatic conditions for
optimum produce. Automating a greenhouse envisages monitoring and controlling
of the climatic parameters which directly or indirectly govern the plant growth and
hence their produce. Automation is process control of industrial machinery and
processes, thereby replacing human operators.
CURRENT SCENARIO:
Greenhouses in India are being deployed in the high-altitude regions where the
sub- zero temperature up to -40 C makes any kind of plantation almost impossible
and in arid regions where conditions for plant growth are hostile. The existing set-ups
primarily are:
MANUAL SET-UP:
Page
2
DEPATMENT OF EIE
This set-up involves visual inspection of the plant growth, manual irrigation of
plants, turning ON and OFF the temperature controllers, manual spraying of the
fertilizers and pesticides. It is time consuming, vulnerable to human error and
hence less accurate and unreliable.
Page
3
DEPATMENT OF EIE
Page
4
DEPATMENT OF EIE
FIG 4.1
Dual Supplies:
Page
6
DEPATMENT OF EIE
Some electronic circuits require a power supply with positive and negative outputs as
well as zero volts (0V). This is called a 'dual supply' because it is like two ordinary
supplies connected together as shown in the diagram.
Dual supplies have three outputs, for example a 9V supply has +9V, 0V and -9V
outputs.
Transformer only:
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is
not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor.
Transformer + Rectifier:
Page
7
DEPATMENT OF EIE
The varying DC output is suitable for lamps, heaters and standard motors. It is not
suitable for electronic circuits unless they include a smoothing capacitor.
Transformer + Rectifier + Smoothing:
The smooth DC output has a small ripple. It is suitable for most electronic circuits.
Page
8
DEPATMENT OF EIE
The
regulated DC output is very smooth with no ripple. It is suitable for all electronic
circuits.
Transformer:
Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC.
Step-up transformers increase voltage, step-down transformers reduce voltage. Most
power supplies use a step-down transformer to reduce the dangerously high mains
voltage (230V in UK) to a safer low voltage.
Page
9
DEPATMENT OF EIE
The input coil is called the primary and the output coil is called the secondary. There is
no electrical connection between the two coils, instead they are linked by an alternating
magnetic field created in the soft-iron core of the transformer. The two lines in the
Rectifier:
There are several ways of connecting diodes to make a rectifier to convert AC to DC.
The bridge rectifier is the most important and it produces full-wave
varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap
transformer is used, but this method is rarely used now that diodes are cheaper. A
single diode can be used as a rectifier but it only uses the positive (+) parts of the AC
wave to produce half-wave varying DC.
Bridge rectifier:
Page
10
DEPATMENT OF EIE
A bridge rectifier can be made using four individual diodes, but it is also available in
special packages containing the four diodes required. It is called a full-wave rectifier
because it uses the entire AC wave (both positive and negative sections). 1.4V is used up
in the bridge rectifier because each diode uses 0.7V when conducting and there are
always two diodes conducting, as shown in the diagram below. Bridge rectifiers are
rated by the maximum current they can pass and the maximum reverse voltage they can
withstand (this must be at least three times the supply RMS voltage so the rectifier can
withstand the peak voltages). Please see the Diodes page for more details, including
pictures of bridge rectifiers.
Page
11
DEPATMENT OF EIE
Bridge rectifier
over
the connections so the alternating
directions of
AC isconverted to one direction of DC.
Smoothing:
Page
12
DEPATMENT OF EIE
Note that smoothing significantly increases the average DC voltage to almost the peak
value (1.4 RMS value). For example 6V RMS AC is rectified to full wave DC of about
4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases to almost
the peak value giving 1.4 4.6 = 6.4V smooth DC.
Smoothing is not perfect due to the capacitor voltage falling a little as it discharges,
giving a small ripple voltage. For many circuits a ripple which is 10% of the supply
voltage is satisfactory and the equation below gives the required value for the smoothing
capacitor. A larger capacitor will give fewer ripples. The capacitor value must be
doubled when smoothing half-wave DC.
There is more information
about smoothing on the
Electronics in Meccano
5 Io
Vs f
website.
Page
13
DEPATMENT OF EIE
Page
14
DEPATMENT OF EIE
Voltage Regulator:
Page
15
DEPATMENT OF EIE
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable
output voltages. They are also rated by the maximum current they can pass. Negative
voltage regulators are available, mainly for use in dual supplies. Most regulators include
some automatic protection from excessive current ('overload protection') and
overheating ('thermal protection').
Many of the fixed voltage regulators ICs have 3 leads and look like power transistors,
such as the 7805 +5V 1A regulator shown on the right. They include a hole for attaching
a heatsink if necessary.
Please see the Electronics in Meccano website for more information about voltage
regulator ICs.
Page
16
DEPATMENT OF EIE
zener diode
a = anode, k = cathode
6.MICRO CONTROLLER
A microcontroller (or MCU) is a computer-on-a-chip used to control electronic
devices. It is a type of microprocessor emphasizing self-sufficiency and costeffectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). A
typical microcontroller contains all the memory and interfaces needed for a simple
application, whereas a general purpose microprocessor requires additional chips to
provide these functions. A microcontroller is a single integrated circuit with the
following key features:
central processing unit - ranging from small and simple 8-bit processors to
sophisticated 32- or 64-bit processors
input/output interfaces such as serial ports
peripherals such as timers and watchdog circuits
RAM for data storage
ROM, EEPROM or Flash memory for program storage
clock generator - often an oscillator for a quartz timing crystal, resonator or RC
circuit
This integration drastically reduces the number of chips and the amount of wiring and
PCB space that would be needed to produce equivalent systems using separate chips.
Microcontrollers are inside many kinds of electronic equipment (see embedded system).
They are the vast majority of all processor chips sold. Over 50% are "simple"
controllers, and another 20% are more specialized digital signal processors (DSPs)
(ref?). A typical home in a developed country is likely to have only one or two generalpurpose microprocessors but somewhere between one and two dozen microcontrollers.
Page
18
DEPATMENT OF EIE
A typical mid range vehicle has as many as 50 or more microcontrollers. They can also
be found in almost any electrical device: washing machines, microwave ovens,
telephones etc
Table 6.1 Some of the commonly used microcontrollers.
4-bit
Microcontrollers
National COP420
Hitachi HMCS40
Toshiba TLCS47
8-bit
Intel 8048
Microcontrollers
Intel 8051
Microchip PIC16C56
National COP820
Motorola 68HC11
Texas Instruments TMS7500
Zilog Z8
16-bit
Motorola MC68332
Microntrollers
DEPATMENT OF EIE
Microcontrollers
LR 33000
AMD Am29050
NS 32000
Page
21
DEPATMENT OF EIE
code and operand(s). The contents of the instruction register are decoded by the control
unit. The status register or condition code register consists of status or flag bits and
control bits. The flag bits are: carry/borrow (C), overflow (V), negative (N), zero (Z),
and half-carry (H). The logic states of the flag bits are used by the CPUs branch
instructions to make decisions. The program counter sends its contents (address) to the
address register. The address register then sends this address to the address bus. A stack
is a specially reserved area in memory where information is stored or removed in a lastin-first-out (LIFO) fashion. The stack pointer points to the next free location on the
stack. That is, it holds the address of the top of the stack. Each time data is stored in the
stack, the stack pointer is automatically decremented and each time data is retrieved
from the stack, the stack pointer is automatically incremented.
The control unit comprises the microcontroller instruction decoding, timing, and
control circuitry. The control unit generates internal control signals to activate the ALU
and to open and close the data paths between registers. The control unit also generates
external control signals that are sent either as a response to an interrupt or to activate
transfer of data between memory and input/output (I/O)
Memory
The instructions to be executed by the microcontroller CPU and the data to be
operated on by these instructions are stored in memory. When the CPU accesses the
Page
24
DEPATMENT OF EIE
information stored in memory, it is performing a read operation. When the CPU sends
information to be stored in the memory, it is performing a write operation. Memory is
classified as internal and external memory. Internal memory is on-chip memory and is a
semiconductor type with low capacity and high speeds. External memory is outside the
chip and includes the semiconductor type and serial memory such as magnetic disks,
magnetic tapes, and bubble memory. Semiconductor memory may be volatile or
nonvolatile. Volatile memory loses its contents after the power is removed from the
memory chip. Nonvolatile memory does not lose its contents when power is removed.
The nonvolatile memory can store information permanently or at least semi-permanently
(ten years or more). Volatile memory includes RAM while nonvolatile memory includes
PROM, EPROM, EEPROM, and battery-backed RAM.
RAM (random access memory) comprises DRAM (Dynamic RAM) and SRAM
(Static RAM). Each storage cell of DRAM consists of a capacitor and a MOSFET
(Metal Oxide Semi conductor Field Effect Transistor). If the capacitor is charged, a logic
1 is stored in the cell. If the capacitor has no charge, a logic 0 is stored in the cell. The
charge stored in the capacitors dissipates fast because of leakage. Therefore, a DRAM
has to be periodically refreshed otherwise its contents will fade away after some time
even in the presence of the power to memory chip.
Page
25
DEPATMENT OF EIE
Page
26
DEPATMENT OF EIE
7.MICROCONTROLLER AT89S52
Page
27
DEPATMENT OF EIE
FEATURES:
Page
28
DEPATMENT OF EIE
PIN DIAGRAM
Page
29
DEPATMENT OF EIE
with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer which
provides a highly flexible and cost effective solution to many embedded control
applications.
The AT89S52 provides the following standard features: 4 Kbytes of Flash, 256
bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition,
the AT89S52 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes. The Idle Mode stops the CPU
while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The Power down Mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.
Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can
sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode P0
has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and
outputs the code bytes during program verification. External pull-ups are required during
program verification
Page
31
DEPATMENT OF EIE
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 1 also receives the low-order address bytes during Flash programming and program
verification.
Alternate functions of port 1
Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that
are externally being pulled low will source current (IIL) because of the internal
pullups.Port 2 emits the high-order address byte during fetches from external program
memory and during accesses to external data memory that use 16-bit addresses (MOVX
Page
32
DEPATMENT OF EIE
A,@DPTR). In this application it uses strong internal pull-ups when emitting 1s. During
accesses to external data memory that uses 8-bit addresses (MOVX A,@RI), Port 2
emits the contents of the P2 Special Function Register. Port 2 also receives the highorder address bits and some control signals during Flash programming and verification.
Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are
pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that
are externally being pulled low will source current (IIL) because of the pullups. Port 3
also serves the functions of various special features of the AT89C52 as listed below:
Alternate functions of port 3
Page
33
DEPATMENT OF EIE
RST:
RST means RESET; 89C52 uses an active high reset pin. It must go high for two
machine cycles. The simple RC circuit used here will supply voltage (Vcc) to reset pin
until capacitance begins to charge. At a threshold of about 2.5V, reset input reaches a
low level and system begin to run.
ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the
oscillator frequency, and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external Data Memory. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the
bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is
Page
34
DEPATMENT OF EIE
weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.
PSEN:
Program Store Enable is the read strobe to external program memory. When the
AT89C52 is executing code from external program memory, PSEN is activated twice
each machine cycle, except that two PSEN activations are skipped during each access to
external data memory.
EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at OOOOH up to
FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched
on reset. EA should be strapped to Vcc for internal program executions. This pin also
receives the 12-volt programming enable voltage (Vpp) during Flash programming, for
parts that require 12-volt Vpp.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating circuit
XTAL2: Output from the inverting oscillator amplifier.
T2: External count input to Timer/Counter 2, Clock out.
Page
35
DEPATMENT OF EIE
Page
36
DEPATMENT OF EIE
On-Chip Oscillators
program instructions and can be specified by its 16-bit name, DPTR, or by each
individual byte name, DPH and DPL. DPTR does not have a single internal address;
DPH and DPL are each assigned an address.
A & B Registers:
The 89C52 contains 34 general-purpose, working, registers. Two of these,
registers A and B, hold results of many instructions, particularly math and logical
operations, of the 89C52 CPU. The other 32 are arranged as part of internal RAM in
four banks, B0-B3, of eight registers. The A register is also used for all data transfers
between the 89C52 and any external memory. The B register is used for with the A
register for multiplication and division operations.
Flags and the Program Status Word (PSW):
Flags may be conveniently addressed, they are grouped inside the program status
word (PSW) and the power control (PCON) registers.
The 89C52 has four math flags that respond automatically to the outcomes of
math operations and three general-purpose user flags that can be set to 1 or cleared to 0
by the programmer as desired. The math flags include Carry (C), Auxiliary Carry (AC),
Overflow (OV), and Parity (P). User flags are named F0,GF0 and GF1, they are generalpurpose flags that may be used by the programmer to record some event in the program.
Page
38
DEPATMENT OF EIE
Page
39
DEPATMENT OF EIE
TABLE 7.1
Page
41
DEPATMENT OF EIE
FIG 8.1
Page
42
DEPATMENT OF EIE
FIG 8.2
SPECIFICATION:
* Rated Voltage: 1V
Page
43
DEPATMENT OF EIE
Page
44
DEPATMENT OF EIE
The circuit designed uses a 5V supply, two copper leads as the sensor probes.
It gives a voltage output corresponding to the conductivity of the soil.
Page
45
DEPATMENT OF EIE
The two copper leads act as the sensor probes. They are immersed into the
specimen soil whose moisture content is under test. The soil is examined under three
conditions
Case#1: Dry condition: The probes are placed in the soil under dry conditions
and are inserted up to a fair depth of the soil. As there is no conduction path
between the two copper leads the sensor circuit remains open. The voltage output
of the emitter in this case ranges from 0 to 0.5V.
Case#2: Optimum condition- When water is added to the soil, it percolates
through the successive layers of it and spreads across the layers of soil due to
capillary force. This water increases the moisture content of the soil. This leads to
an increase in its conductivity which forms a conductive path between the two
sensor probes leading to a close path for the current flowing from the supply to
the transistor through the sensor probes. The voltage output of the circuit taken at
the emitter of the transistor in the optimum case ranges from 1.9 to 3.4V
approximately.
Case#3: Excess water condition- With the increase in water content beyond the
optimum level, the conductivity of the soil increases drastically and a steady
conduction path is established between the two sensor leads and the voltage
output from the sensor increases no further beyond a certain limit. The maximum
possible value for it is not more than 4.2V.
11.RELAY:
A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil
current can be on or off so relays have two switch positions and they are double throw
(changeover) switches.
Page
46
DEPATMENT OF EIE
Relays allow one circuit to switch a second circuit which can be completely separate
from the first. For example a low voltage battery circuit can use a relay to switch a 230V
AC mains circuit. There is no electrical connection inside the relay between the two
circuits, the link is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but
it can be as much as 100mA for relays designed to operate from lower voltages. Most
ICs (chips) cannot provide this current and a transistor is usually used to amplify the
small IC current to the larger value required for the relay coil. The maximum output
current for the popular 555 timer IC is 200mA so these devices can supply relay coils
directly without amplification.
Relays are usuallly SPDT or DPDT but they can have many more sets of switch
contacts, for example relays with 4 sets of changeover contacts are readily available. For
further information about switch contacts and the terms used to describe them please see
the page on switches.
Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay.
The supplier's catalogue should show you the relay's connections. The coil will be
obvious and it may be connected either way round. Relay coils produce brief high
voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the
circuit. To prevent damage you must connect a protection diode across the relay coil.
The animated picture shows a working relay with its coil and switch contacts. You can
see a lever on the left being attracted by magnetism when the coil is switched on. This
Page
47
DEPATMENT OF EIE
lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground
and another behind them, making the relay DPDT.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this, it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the
relay coil is on.
Connect to COM and NC if you want the switched circuit to be on when the
relay coil is off.
CLASSIFICAION OF PROTECTIVE RELAYS BASED ON TECHNOLOGY
Protective
relays
can
be
broadly
classified
into
the
following
categories
1.Electromagneticrelays
2.Staticrelays
3.Microprocessor-basedrelays
Electromagnetic relays:
It includes attracted armature, moving coil and induction disc and
induction cup type relays. Electromagnetic relays contain an electromagnet (or
permanent magnet) and a moving part. When the actuating quantity exceeds a certain
Page
48
DEPATMENT OF EIE
of
static
relays
requires
personnel's
trained
in
solid-state
Microprocessor-based protective relays can provide protection at low cost and compete
with conventional relays. The present downward trend in the cost of large-scale
integrated circuit will encourage wide applications of microprocessor-based applications
of microprocessor-based relays for the protection modem complex power network.
Advantages of relays:
Page
50
DEPATMENT OF EIE
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
Disadvantages of relays:
Relays are bulkier than transistors for switching small currents.
Relays cannot switch rapidly (except reed relays), transistors can switch many
times per second.
Relays use more power due to the current flowing through their coil.
Relays require more current than many ICs can provide, so a low power
transistor may be needed to switch the current for the relay's coil.
12.ADC 0804
Features
Compatible with 8080 Microprocessors
Easy interface to all microprocessors, or operates 'stand alone'
Page
51
DEPATMENT OF EIE
Pin Description
Pin Layout
Pin Number
Description
CLK IN - Clock IN
10
11
12
13
14
15
16
17
18
19
20
TABLE 12.1
Page
52
DEPATMENT OF EIE
FIG 12.1
The transmitters take input from controllers serial transmission pin and send the output
to RS232s receiver. The receivers, on the other hand, take input from transmission pin of
RS232 serial port and give serial output to microcontrollers receiver pin. MAX232 needs
four external capacitors whose value ranges from 1F to 22F.
Microcontroller
MAX232
RS232
Tx
T1/2 In
T1/2 Out
Rx
Rx
R1/2 Out
R1/2 In
Tx
Pin Diagram:
FIG 13.1
Pin Description:
Pin
Function
Name
Page
54
DEPATMENT OF EIE
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
TABLE 13.1
Page
55
DEPATMENT OF EIE
Capacitor
Capacitor
Capacitor
Capacitor
Capacitor
Capacitor
T2 Out
R2 In
R2 Out
T2 In
T1 In
R1 Out
R1 In
T1 Out
Ground
Vcc
1
3
1
2
2
4
+
+
+
-
FIG 13.2
This is the first interfacing example for the parallel port. We will star with something
simple. This example does not use the Bi-directional feature found on newer ports, thus it should work
with most, if no all Parallel Ports. It however does not show the use of the status port as an input. So
what are we interfacing? A 16 Character X 2 Line LCD Module to the parallel port. These LCD
Modules are very common these days, and are quite simple to work with, as all the logic required
running them is on board.
Features:
Interface with either 4-bit or 8-bit microprocessor.
Page
56
DEPATMENT OF EIE
FIG 14.1
Page
57
DEPATMENT OF EIE
Pin diagram:(FIG-14.2)
Page
58
DEPATMENT OF EIE
TABLE 14.1
In the above table Vcc and Vss are supply pins and VEE (Pin no.3) is used for controlling LCD
contrast. Pin No.4 is Rs pin for selecting the register, there are two very important registers are there
in side the LCD. The RS pin is used for their selection as follows. If RS=0, the instruction command
code register is selected, allowing the user to send data to be displayed on the LCD. R/W is a read or
writes Pin, which allows the user to write information to the LCD or read information from it. R/W=1
when reading R/W=0 when writing. The LCD to latch information presented to its data pins uses the
enable (E) pin. The 8-bit data pins, D0-D7, are used to send information to the LCD or read the
contents of the LCDs internal registers. To display letters and numbers, we must send ASCII codes for
the letters A-Z, and number 0 -9 to these pins while making RS=1.
Page
59
DEPATMENT OF EIE
Quality control:
Some LCD panels have defective transistors, causing permanently lit or unlit pixels
which are commonly referred to as stuck pixels or dead pixels respectively. Unlike integrated circuits
(ICs), LCD panels with a few defective pixels are usually still usable. It is also economically prohibitive
to discard a panel with just a few defective pixels because LCD panels are much larger than ICs.
Color displays:
In color LCDs each individual pixel is divided into three cells, or sub pixels, which are
colored red, green, and blue, respectively, by additional filters (pigment filters, dye filters and metal
oxide filters). Each sub pixel can be controlled independently to yield thousands or millions of possible
colors for each pixel. CRT monitors employ a similar 'sub pixel' structures via phosphors, although the
analog electron beam employed in CRTs do not hit exact 'sub pixels'.
Color components may be arrayed in various pixel geometries, depending on the
monitor's usage. If software knows which type of geometry is being used in a given LCD, this can be
used to increase the apparent resolution of the monitor through sub pixel rendering. This technique is
especially useful for text anti-aliasing.
To reduce smudging in a moving picture when pixels do not respond quickly enough to
color changes, so-called pixel overdrive may be used.
Page
60
DEPATMENT OF EIE
(NPN)
(PNP)
1.
2.
DEPATMENT OF EIE
3.
The middle section is a very thin layer, which is the most important factor in the
functioning of a transistor.
4.
weak signal is applied between emitter base junction and output is taken across the load
Rc connected in the collector circuit (in common emitter configuration). In order to
achieve faithful amplification, the input circuit should always remain forward biased. To
do so, a dc voltage is applied in the input in addition to the signal. This dc Voltage is
known as biasing voltage and its magnitude and polarity should be such that it always
keeps the input circuit forward biased regardless of the polarity to the signal to be
amplified.
As the input circuit has low resistance a small change in signal voltage causes an
appreciable change in emitter current. This causes change in collector current (by a
factor called current gain of transistor) due to transistor action. The collector current
flowing through a high load resistance Rc produces a large voltage across it. Thus a
weak signal applied to the input circuit appears in the amplified form in the collector
circuit. This is how a transistor acts as an amplifier.
Transistor may be used in different configuration like CB (common base) & CC
(common collector) according to requirements of amplifier (impedance matching, buffer
amplifier etc.).
TRANSFORMER
Definition: The transformer is a static electro-magnetic device that transforms one alternating
voltage (current) into another voltage (current). However, power remains the some
Page
62
DEPATMENT OF EIE
during the transformation. Transformers play a major role in the transmission and
distribution of ac power.
Principle: Transformer works on the principle of mutual induction. A transformer consists of
laminated magnetic core forming the magnetic frame. Primary and secondary coils are
wound upon the two cores of the magnetic frame, linked by the common magnetic flux.
When an alternating voltage is applied across the primary coil, a current flows in the
primary coil producing magnetic flux in the transformer core. This flux induces voltage
in secondary coil.
Transformers are classified as: (a)
(b)
(a)
(2)
Transformation ratio:
(1)
Step up transformer
(2)
Core & shell types: Transformer is simplest electrical machine, which consists of
windings on the laminated magnetic core. There are two possibilities of putting
up the windings on the core.
(1)
(2)
DEPATMENT OF EIE
(b)
Step up and Step down: In these Voltage transformation takes place according to
whether the
Primary is high voltage coil or a low voltage coil.
(1)
(2)
Page
64
DEPATMENT OF EIE
Double-sided PCBs can be made with or without plated through holes. The production
of boards with plated through holes is fairly expensive. Therefore plated through hole
boards are only chosen where the circuit complexities and density of components does
not leave any other choice.
DESIGN SPECIFICATION
STEPS TAKEN WHILE PREPARING CIRCUIT
(A)
PCB DESIGNING
The main purpose of printed circuit is in the routing of electric currents and signal
through a thin copper layer that is bounded firmly to an insulating base material
sometimes called the substrate. This base is manufactured with an integrally bounded
layers of thin copper foil which has to be partly etched or removed to arrive at a predesigned pattern to suit the circuit connections or other applications as required.
The term printed circuit board is derived from the original method where a printed
pattern is used as the mask over wanted areas of copper. The PCB provides an ideal
baseboard upon which to assemble and hold firmly most of the small components.
From the constructors point of view, the main attraction of using PCB is its role as the
mechanical support for small components. There is less need for complicated and time
consuming metal work of chassis contraception except perhaps in providing the final
enclosure. Most straight forward circuit designs can be easily converted in to printed
wiring layer the thought required to carry out the inversion cab footed high light an
possible error that would otherwise be missed in conventional point to point wiring .The
finished project is usually neater and truly a work of art.
Actual size PCB layout for the circuit shown is drawn on the copper board. The board is
then immersed in FeCl3 solution for 12 hours. In this process only the exposed copper
portion is etched out by the solution.
Page
66
DEPATMENT OF EIE
Now the petrol washes out the paint and the copper layout on PCB is rubbed with a
smooth sand paper slowly and lightly such that only the oxide layers over the Cu are
removed. Now the holes are drilled at the respective places according to component
layout as shown in figure.
(B) LAYOUT DESIGN:
When designing the layout one should observe the minimum size (component body
length and weight). Before starting to design the layout we need all the required
components in hand so that an accurate assessment of space can be made. Other space
considerations might also be included from case to case of mounted components over
the printed circuit board or to access path of present components.
It might be necessary to turn some components around to a different angular position so
that terminals are closer to the connections of the components. The scale can be checked
by positioning the components on the squared paper. If any connection crosses, then one
can reroute to avoid such condition.
All common or earth lines should ideally be connected to a common line routed around
the perimeter of the layout. This will act as the ground plane. If possible try to route the
outer supply line to the ground plane. If possible try to route the other supply lines
around the opposite edge of the layout through the center. The first set is tearing the
circuit to eliminate the crossover without altering the circuit detail in any way.
Plan the layout looking at the topside to this board. First this should be translated
inversely, later for the etching pattern large areas are recommended to maintain good
copper adhesion. It is important to bear in mind always that copper track width must be
according to the recommended minimum dimensions and allowance must be made for
Page
67
DEPATMENT OF EIE
increased width where termination holes are needed. From this aspect, it can become
little tricky to negotiate the route to connect small transistors.
There are basically two ways of copper interconnection patterns under side the
board. The first is the removal of only the amount of copper necessary to isolate the
junctions of the components to oneanother. The second is to make the interconnection
pattern looking more like conventional point wiring by routing uniform width of copper
from component to component.
(C)ETCHING PROCESS:
Etching process requires the use of chemicals. acid resistant dishes and running water
supply. Ferric chloride is mostly used solution but other etching materials such as
ammonium per sulphate can be used. Nitric acid can be used but in general it is not used
due to poisonous fumes.
The pattern prepared is glued to the copper surface of the board using a latex type
of adhesive that can be cubed after use. The pattern is laid firmly on the copper using a
very sharp knife to cut round the pattern carefully to remove the paper corresponding to
the required copper pattern areas. Then apply the resistant solution, which can be a kind
of ink solution for the purpose of maintaining smooth clean outlines as far as possible.
While the board is drying, test all the components.
(D) COMPONENT ASSEMBLY: -
Page
68
DEPATMENT OF EIE
From the greatest variety of electronic components available, which runs into thousands
of different types it is often a perplexing task to know which is right for a given job.
There could be damage such as hairline crack on PCB. If there are, then they can be
repaired by soldering a short link of bare copper wire over the affected part.
The most popular method of holding all the items is to bring the wires far apart after
they have been inserted in the appropriate holes. This will hold the component in
position ready for soldering.
Some components will be considerably larger .So it is best to start mounting the smallest
first and progressing through to the largest. Before starting, be certain that no further
drilling is likely to be necessary because access may be impossible later.
Next will probably be the resistor, small signal diodes or other similar size
components. Some capacitors are also very small but it would be best to fit these
afterwards. When fitting each group of components mark off each one on the circuit as it
is fitted so that if we have to leave the job we know where to recommence.
Although transistors and integrated circuits are small items there are good reasons for
leaving the soldering of these until the last step. The main point is that these components
are very sensitive to heat and if subjected to prolonged application of the soldering iron,
they could be internally damaged.
All the components before mounting are rubbed with sand paper so that oxide layer is
removed from the tips. Now they are mounted according to the component layout.
Page
69
DEPATMENT OF EIE
(E) SOLDERING: This is the operation of joining the components with PCB after this operation the circuit
will be ready to use to avoid any damage or fault during this operation following care
must be taken.
1. A longer duration contact between soldering iron bit & components lead can exceed
the temperature rating of device & cause partial or total damage of the device. Hence
before soldering we must carefully read the maximum soldering temperature &
soldering time for device.
2. The wattage of soldering iron should be selected as minimum as permissible for that
soldering place.
3. To protect the devices by leakage current of iron its bit should be earthed properly.
4.We should select the soldering wire with proper ratio of Pb & Tn to provide the
suitable melting temperature.
5.Proper amount of good quality flux must be applied on the soldering point to avoid dry
soldering.
Page
70
DEPATMENT OF EIE
17.Basic Concept-KEIL
Introduction
This tutorial will assist you in writing your first 8051 Assembly language program using
the popular Keil
Compiler. Keil offers an evaluation package that will allow the assembly and debugging
of files 2K or less. This
package is freely available at their web site. Keils website address is www.keil.com.
The sample program included in the tutorial toggles Ports 1 and 2 on the 8051. The
compiled program
has been tested using the 8051 board from MicroDigitalEd.com. The program also
works with other systems that
have Port 1 and 2 available.
Page
71
DEPATMENT OF EIE
Page
72
DEPATMENT OF EIE
Page
73
DEPATMENT OF EIE
Page
75
DEPATMENT OF EIE
Page
76
DEPATMENT OF EIE
3. Copy the example to the Right into the new window. This file will toggle Ports 1 and
2 with a delay.
4. Click on File menu and select Save As
ORG 0H
MOV A, #55H
AGAIN:
MOV P1, A
MOV P2, A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY:
MOV R3, #200
OUTER: MOV R2, #0255
INNER: DJNZ R2, INNER
DJNZ R3, OUTER
RET
END
Page
77
DEPATMENT OF EIE
Page
78
DEPATMENT OF EIE
Page
79
DEPATMENT OF EIE
Page
80
DEPATMENT OF EIE
11. Expand the Source Group 1 in the Tree menu to ensure that the file
was added to the project.
Page
81
DEPATMENT OF EIE
Page
82
DEPATMENT OF EIE
Page
83
DEPATMENT OF EIE
Page
84
DEPATMENT OF EIE
Page
85
DEPATMENT OF EIE
5.
Page
86
DEPATMENT OF EIE
Page
87
DEPATMENT OF EIE
3. A new window should port will pop up. This represent the Port and Pins
Page
88
DEPATMENT OF EIE
4. Step through the code by pressing F11 on the Keyboard. The Parallel Port 1 Box
should change you completely step through the code
6.
To exit out, Click on Debug Menu and Select Start/Stop Debug Session
18.ZIGBEE MODULE
Page
89
DEPATMENT OF EIE
Specifications:
Supply Voltage
Transmit Current
Idle/Receive Current
Power-down Current
Power
3.3 to 3.6V
155mA at 20dBm
70Ma
<10 A
Rating Frequency
Maximum Transmit Power Output
RF Data rate
Receiver Sensitivity
Serial Interface Data Rate
Operating Temperature
Antenna Options
Antenna Connector
General
ISM 2.4 - 2.4835GHz
166mA at 22dBm
250 kbps
-103 dBm
Upto 115200 configurable
-40 to 85 C
Chip Antenna, Wire Antenna
MMCX
Number Of channels
Addressing Options
Network
Point-to-point, point-to-multipoint &
Mesh
16 direct sequence channels
PAN ID, Channel and addresses
Dimensions
Mechanical
38mm x 26mm.
Interface Connector
TABLE 18.1
Page
90
DEPATMENT OF EIE
Fig 18.1
19.CODING
TRANSMITTER :
#include<reg51.h>
sbit rd=P3^5;
sbit wr=P3^4;
sbit intr=P3^3;
sbit rs=P3^7;
sbit e=P3^6;
sbit watersensor=P2^0;
sbit motor=P0^1;
//connect
pull up 10k
wr=1;
while(1)
{
wr=0;
wr=1;
while(intr==1);
rd=0;
a=P1;
convert(a);
rd=1;
if(watersensor == 1)
{
motor=0;
sertx('o');
sertx('f');
sertx('f ');
sertx('w');
sertx('e');
sertx(' t);
Page
93
DEPATMENT OF EIE
}
if(watersensor == 0)
{
motor=1;
sertx('o');
sertx('n');
sertx(' );
sertx('d');
sertx('r');
sertx(' y);
}
delay(100);
}
}
unsigned convert(unsigned int value)
{
unsigned char a,b,c,d;
a=value/100;
b=value%100;
c=b/10;
Page
94
DEPATMENT OF EIE
d=b%10;
a=a|0x30;
c=c|0x30;
d=d|0x30;
sertx('*');
sertx(a);
sertx(c);
sertx(d);
}
RECEIVER:
#include<reg51.h>
sbit rs=P3^7;
sbit e=P3^6;
unsigned convert(unsigned int);
void delay(unsigned int t)
{
unsigned int i,j;
for(i=0;i<t;i++)
for(j=0;j<1275;j++);
}
void lcd_cmd(unsigned char p)
{
Page
95
DEPATMENT OF EIE
P2=p;
rs=0;
e=1;
delay(5);
e=0;
}
void lcd_dat(unsigned char p)
{
P2=p;
rs=1;
e=1;
delay(5);
e=0;
}
void sertx(unsigned char tx)
{
SBUF=tx;
while(TI == 0);
TI=0;
}
unsigned char receive()
{
Page
96
DEPATMENT OF EIE
lcd_dat(':');
lcd_cmd(0x89);
lcd_dat('s');
lcd_dat('o');
lcd_dat('i');
lcd_dat('l');
lcd_dat(':');
lcd_cmd(0xc0);
lcd_dat('M');
lcd_dat('t');
lcd_dat('r');
lcd_dat(' ');
lcd_dat(':');
while(1)
{
do
{
a=receive();
}
while(a != '*');
a=receive();
Page
98
DEPATMENT OF EIE
a1=receive();
a2=receive();
a3=receive();
a4=receive();
a5=receive();
lcd_cmd(0x85);
lcd_dat(a);
lcd_dat(a1);
lcd_dat(a2);
lcd_cmd(0xc5);
lcd_dat(a3);
lcd_dat(a4);
lcd_dat(a5);
}
}
Page
99
DEPATMENT OF EIE
CONCLUSION
A
system
step-by-step
approach
in
designing
the
microcontroller
based
for measurement and control of the four essential parameters for plant
growth, i.e. temperature, humidity, soil moisture, and light intensity, has been
followed. The results obtained from the measurement have shown that the system
performance is quite reliable and accurate.
The system has successfully overcome quite a few shortcomings of the
existing systems by reducing the power consumption, maintenance and complexity, at
the same time providing a flexible and precise form of maintaining the environment.
The continuously decreasing costs of hardware and software, the wider
acceptance of electronic systems in agriculture, and an emerging agricultural control
Page
101
DEPATMENT OF EIE
systems
that
production. Further improvements will be made as less expensive and more reliable
sensors are developed for use in agricultural production.
Although the enhancements mentioned in the previous chapter may seem far in
the future, the required technology and components are available, many such systems
have been independently developed, or are at least tested at a prototype level. Also,
integration of all
these technologies is not a daunting task and can be successfully carried out.
REFERENCES
[1] Dr. R. Jayanthi, Prof. of Horticulture, UAS, GKVK, Bangalore.
IEEE Papers:
[1] Stipanicev D., Marasovic J., Networked embedded greenhouse monitoring and
control,
Proceedings of 2003 IEEE Conference on Control Applications, June 2003.
[2] Turnell, D.J. de Fatima, Q.V., Turnell, M., Deep, G.S., Freire, R.C.S.,
FarmWeb-an integrated, modular farm automation system, Proceedings of
Page
102
DEPATMENT OF EIE
Web Resources
[1]
http://freewebs.com/maheshwankede
[2]
http://www.faludi.com
[3]
http://www.electro-tech-online.com
[4]
http://www.8052.com
[5]
http://www.8051projects.net/forum
[6]
http://www.datasheetdirect.com
Page
103
DEPATMENT OF EIE
[7]
http://www.keil.com/appnotes
[8]
http://www.google.com
Page
104
DEPATMENT OF EIE