Professional Documents
Culture Documents
DECLARATION……………………………………..…………………………………..iii
ACKNOWLEDGEMENT……………………………..………………………………….iv
1. INTRODUCTION…………………………………………………………………………………………………………..2
2. PLATFORM USED…………………………………………………………………………………………………..……3
3. AIM OF THE PROJECT………………………………………………………………………………………………….4
4. BLOCK DIAGRAM…………………………………………………………………………………..…………………….5
5. WORKING OF THE PROJECT…………………………………………………………………………………………6
6. CIRCUIT DIAGRAM………………………………………………………………………………………………………8
7. CIRCUIT DESCRIPTION………………………………………………………………………………………………….9
8. PCB LAYOUT……………………………………………………………………………………..………………………..10
9. STEPS FOR MAKING PCB…………………………………………………………………………………………….17
10. MICROCONTROLLER UNIT………………………………………………………………………..………………19
11. COMPONENTS DESCRIPTION……………………………………………………………………………………34
12.CONCLUSION………………………………………………………………………………………………..…………..55
13. REFERENCE……………………………………………………………………………………………………………….56
14. BIBLOGRAPHY……………………………………………………………………………………………………………57
1
INTRODUCTION
This heart of this project is ATMEL microcontroller and the controller available in
the market has to be used so we have used 89C2051, 20 pin controller.
Since automation is the need of hour, technology is enhancing and hence we have
designed a system for home automation.
This system shows the advancement in technology as well as it also saves the
energy.
2
PLATFORM USED
SOFTWARE REQUIREMENTS
1. Orcad for Circuit Designing
2. Pads for PCB designing
HARDWARE REQUIREMENTS
1. Microcontroller 89C2051
2. Crystal Oscillator
3. Resistor
4. Capacitor
5. Connectors
6. Transformer
7. Transistor
8. Relay
9. Diodes
10. Switch
3
AIM OF THE PROJECT
The aim of the project is to design such system in which as soon as any person enters the room
ladder then the presser sensor senses the person and one bulb turns ON then after 20 seconds
bulb automatically OFF.
4
BLOCK DIAGRAM
bulb
SECTION 89C2051
PRESSER SENSOR
5
WORKING OF THE PROJECT
The first step in any embedded project is to design the proper hardware:
So firstly we have designed the +5v regulated dc supply for the microcontroller as
controller gets on +5 v supply after that necessary connections of the
microcontroller as connecting the crystal oscillator for clock and reset section for
resetting the controller every time power gets on. Then after we have 15 I/O pins
from which we can configure any pin as output or input.
We are using the presser sensor for sensing the persons. As soon as any person
presses the presser sensor then low pulse comes at the microcontroller pin and this
low pulse is sensed by the microcontroller through programming. We are using
presser sensor one for incoming way when enter any person then a bulb on. And
after some time bulb is automatically OFF.
6
CIRCUIT DIAGRAM
D1
U1
LM7805
1N4007 12V +5V
1 3
J1 D2
1 C5 C3
2 C4 2 C EL5 C CER
1N4007
3 C EL10 10M/63V 104PF
D3
1000M/35V
RLMT 03(M)
1N4007
D4
1N4007
+5V
VCC
C6 C1 C CER U2
C EL5 1 19
10M/63V RST P1.7 18 J2
4 P1.6 17
39PF
Y1 X2 P1.5 16 1 P3.4
C2 XTAL P1.4 15 2 P3.5
R1 P1.3 3
R 5 14
X1 P1.2 13 4
1K 12MHz P1.1 12
C CER 39PF P1.0 RLMT 04(M)
2 R3 R4
3 P3.0 R R
6 P3.1 1K 1K
7 P3.2
P3.4 8 P3.3
P3.5 9 P3.4
11 P3.5
P3.7
89C2051
J3
1
2
K1 RLMT 02(M)
12V
D5
1N4007 SPDT
+5V VSS
GND +5V
R2
R VCC VS
2K2 7
R5 Q1
BC547
R
1K5
Consists of:
1. RLMT Connector--It is a connector used to connect the step down
transformer to the bridge rectifier.
8
MICROCONTROLLER SECTION:
1. +5v supply: This +5v supply is required for the controller to get start
which is provided from the power supply section.
PCB LAYOUT
9
PRINTED CIRCUIT BOARDS
10
Printed circuit boards fall into the following categories:
Motherboard: The principal board that has connectors for attaching devices to
the bus. Typically, the mother board contains the CPU, memory, and basic
controllers for the system. On PCs, the motherboard is often called the system
board or mainboard.
Expansion board : Any board that plugs into one of the computer's expansion
slots. Expansion boards include controller boards, LAN cards, and video adapters.
Controller board: A special type of expansion board that contains a controller for
a peripheral device. When you attach new devices, such as a disk drive or graphics
monitor, to a computer, you often need to add a controller board.
2.7.1 Manufacturing:
Patterning (etching)
The vast majority of printed circuit boards are made by adhering a layer of copper
over the entire substrate, sometimes on both sides, (creating a "blank PCB") then
removing unwanted copper after applying a temporary mask (eg. by etching),
leaving only the desired copper traces.
11
A few PCBs are made by adding traces to the bare substrate (or a substrate with a
very thin layer of copper) usually by a complex process of multiple electroplating
steps.
There are three common "subtractive" methods (methods that remove copper)
used for the production of printed circuit boards:
1. Silk screen printing-- uses etch-resistant inks to protect the copper foil.
Subsequent etching removes the unwanted copper. Alternatively, the ink
may be conductive, printed on a blank (non-conductive) board. The latter
technique is also used in the manufacture of hybrid circuits.
2. Photoengraving uses a photomask and chemical etching to remove the
copper foil from the substrate. The photomask is usually prepared with a
photoplotter from data produced by a technician using CAM, or computer-
aided manufacturing software. Laser-printed transparencies are typically
employed for phototools; however, direct laser imaging techniques are
being employed to replace phototools for high-resolution requirements.
3. PCB milling- uses a two or three-axis mechanical milling system to mill
away the copper foil from the substrate. A PCB milling machine (referred to
as a 'PCB Prototyper') operates in a similar way to a plotter, receiving
commands from the host software that control the position of the milling
head in the x, y, and (if relevant) z axis. Data to drive the Prototyper is
extracted from files generated in PCB design software and stored in HPGL
or Gerber file format.
12
"Additive" processes also exist. The most common is the "semi-additive process.
In this version, the unpatterned board has a thin layer of copper already on it. A
reverse mask is then applied. (Unlike a subtractive process mask, this mask
exposes those parts of the substrate that will eventually become the traces.)
Additional copper is then plated onto the board in the unmasked areas; copper
may be plated to any desired weight. Tin-lead or other surface platings are then
applied. The mask is stripped away and a brief etching step removes the now-
exposed original copper laminate from the board, isolating the individual
traces.The additive process is commonly used for multi-layer boards as it
facilitates the plating-through of the holes (vias) in the circuit board.
Lamination:
Some PCBs have trace layers inside the PCB and are called multi-layer PCBs. These
are formed by bonding together separately etched thin boards.
Drilling:
Holes, or vias, through a PCB are typically drilled with tiny drill bits made of solid
tungsten carbide. The drilling is performed by automated drilling machines with
placement controlled by a drill tape or drill file. These computer-generated files
are also called numerically controlled drill (NCD) files or "Excellon files". The drill
file describes the location and size of each drilled hole. When very small vias are
required, drilling with mechanical bits is costly because of high rates of wear and
breakage. In this case, the vias may be evaporated by lasers. Laser-drilled vias
typically have an inferior surface finish inside the hole. These holes are called
micro vias.
13
It is also possible with controlled-depth drilling, laser drilling, or by pre-drilling the
individual sheets of the PCB before lamination, to produce holes that connect
only some of the copper layers, rather than passing through the entire board.
These holes are called blind vias when they connect an internal copper layer to an
outer layer, or buried vias when they connect two or more internal copper layers.
The walls of the holes, for boards with 2 or more layers, are plated with copper to
form plated-through holes that electrically connect the conducting layers of the
PCB.
For multilayer boards, those with 4 layers or more, drilling typically produces a
smear comprised of the bonding agent in the laminate system. Before the holes
can be plated through, this smear must be removed by a chemical de-smear
process, or by plasma-etch.
Exposed conductor plating and coating:The pads and lands to which components
will be mounted are typically plated, because bare copper oxidizes quickly, and
therefore is not readily solderable. Traditionally, any exposed copper was plated
with solder. This solder was a tin-lead alloy, however new solder compounds are
now used to achieve compliance with the RoHS directive in the EU, which restricts
the use of lead. Other platings used are OSP (organic surface protectant),
immersion silver, electroless nickel with immersion gold coating (ENIG), and direct
gold. Edge connectors, placed along one edge of some boards, are often gold
plated.
14
bridging between conductors and thereby creating short circuits. Solder resist
also provides some protection from the environment.
Screen printing--Line art and text may be printed onto the outer surfaces of a PCB
by screen printing. When space permits, the screen print text can indicate
component designators, switch setting requirements, test points, and other
features helpful in assembling, testing, and servicing the circuit board.Screen print
is also known as the silk screen, or, in one sided PCBs, the red print
Test:
16
off the board (or change its characteristics) with a static charge. This is especially
true on non-traditional PCBs such as MCMs and microwave PCBs.
Place the layout in the photoprinter machine with the photofilm above it.
Make sure that the bromide (dark) side of the film is in contact with the layout.
Dip the film in the solution prepared (developer) by mixing the chemicals A & B
in equal quantities in water.
Now clean the film by placing it in the tray containing water for 1 min.
After this, dip the film in the fixer solution for 1 min. now the negative of the
Circuit is ready.
Take the PCB board of the size of the layout and clean it with steel wool to
make the surface smooth.
17
Now dip the PCB in the liquid photoresist, with the help of dip coat machine.
Now clip the PCB next to the negative in the photo cure machine, drying for
approximate 10-12 minute.
Now place the negative on the top of the PCB in the UV machine, set the timer
for about 2.5 minute and switch on the UV light at the top.
Take the LPR developer in a container and rigorously move the PCB in it.
Then apply LPR dye on it with the help of a dropper so that it is completely
covered by it.
Now clamp the PCB in the etching machine that contains ferric chloride
solution for about 10 minutes.
After etching, wash the PCB with water, wipe it a dry cloth softly.
Finally rub the PCB with a steel wool, and the PCB is ready.
18
MICROCONTROLLER UNIT
Microcontroller AT89C2051
Features:
• Compatible with MCS-51™ Products
• 2K Bytes of Re programmable Flash Memory
– Endurance: 1,000 Write/Erase Cycles
• 2.7V to 6V Operating Range
• Fully Static Operation: 0 Hz to 24 MHz
• Two-level Program Memory Lock
• 128 x 8-bit Internal RAM
• 15 Programmable I/O Lines
• Two16-bit Timer/Counters
• Six Interrupt Source
• Programmable Serial UART Channel
• Direct LED Drive Outputs
• On-chip Analog Comparator
• Low-power Idle and Power-down Modes
Description:
TheAT89C2051 is low-voltage; high-performance CMOS 8-bit microcomputer
with2K bytes of Flash programmable and erasable read only memory (PEROM).
The device is manufactured using Atmel’s high-density nonvolatile memory
technology and is compatible with the industry-standard MCS-51 instruction set.
By combining versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
19
AT89C2051 is a powerful microcomputer, which provides a highly flexible and
cost-effective solution to many embedded control applications.
The AT89C2051 provides the following standard features: 2K bytes of Flash,
128bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level
interrupt architecture, a full duplex serial port, a precision analog comparator, on-
chip oscillator and clock circuitry. In addition, the AT89C2051 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.
PIN CONFIGURATION
20
PIN DESCRIPTION
VCC: Supply voltage
GND: Ground
Port 1:
Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 toP1.7 provides internal
pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the
positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip
precision analog comparator. The Port 1 output buffers can sink 20 m A and can
drive LED displays directly. When 1s are written to Port 1 pins, they can be used
as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low,
they will source current (IIL) because of the internal pull-ups. Port 1 also receives
code data during Flash programming and verification.
Port 3:
Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-
ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is
not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20
MA. When 1s are written to Port 3 pins they are pulled high by the internal pull-
ups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because of the pull-ups. Port 3 also receives
some control signals for Flash programming and verification.
21
Port 3 also serves the functions of various special features of theAT89C2051 as
listed below:
RST:
Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST
pin high for two machine cycles while the oscillator is running resets the device.
Each machine cycle takes 12 oscillator or clock cycles.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2:
Output from the inverting oscillator amplifier.
Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator, as shown in
Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the
device from an external clock source, XTAL2 should be left Un connected while
XTAL1 is driven as shown in Figure .
22
There are no requirements on the duty cycle of the external clock signal, since the
input to the internal clocking circuitry is through a divide-by-two flip-flop, but
minimum and maximum voltage high and low time specifications must be
observed.
Oscillator Connections:
AT89C2051 4
Special Function Registers
A map of the on-chip memory area called the Special Function Register SFR) pace
is shown in the table below.
Note that not all of the addresses are occupied, and unoccupied addresses ay not be
implemented on the chip. Read accesses to these addresses will in general return
random data, and write accesses will have an indeterminate effect.
23
Table 1:AT89C2051 SFR Map and Reset Values
25
Program Memory Lock Bits:
On the chip are two lock bits which can be left un programmed (U) or can be
programmed (P) to obtain the additional features listed in the table below:
26
Reset redefines the SFR s but does not change the on-chip RAM. The reset should
not be activated before VCC is restored to its normal operating level and must be
held active long enough to allow the oscillator to restart and stabilize.
P1.0 and P1.1 should be set to “0” if no external pull-ups are used, or set to “1” if
external pull-ups are used.
Programming the Flash: The AT89C2051 is shipped with the 2K bytes of on-
chip PEROM code memory array in the erased state (i.e., contents= FFH) and
ready to be programmed. The code
Memory array is programmed one byte at a time. Once the array is programmed,
to re-program any non-blank byte the entire memory array needs to be erased
electrically.
Internal Address Counter: The AT89C2051 contains an internal PEROM
address counter, which is always reset to000H on the rising edge of RST and is
advanced by applying a positive going pulse to pin XTAL1.
Programming Algorithm: To program the AT89C2051,the following sequence is
recommended.
1. Power-up sequence:
Apply power between VCC and GND pins Set RST and XTAL1 to GND
2. Set pin RST to “H”
Set pin P3.2 to “H”
3. Apply the appropriate combination of “H” or “L” logic levels to pins P3.3, P3.4,
P3.5, P3.7 to select one of the programming operations shown in the PEROM
Programming Modes table.
27
To Program and Verify the Array:
4. Apply data for Code byte at location 000H to P1.0 to P1.7.
5. Raise RST to 12V to enable programming.
6. Pulse P3.2 once to program a byte in the PEROM array or the lock bits. The
byte-write cycle is self-timed and typically takes 1.2 ms.
7. To verify the programmed data, lower RST from 12V to logic “H” level and set
pins P3.3 to P3.7 to the appropriate levels. Output data can be read at the port P1
pins.
8. To program a byte at the next address location, pulseXTAL1 pin once to
advance the internal address
9. Repeat steps 5 through 8, changing data and advancing the counter. Apply new
data to the port P1 pins. Address counter for the entire 2K bytes array or until the
end of the object file is reached.
10.Power-off sequence:
Set XTAL1 to “L”
Set RST to “L”
Turn VCC power off
Data Polling: The AT89C2051 features Data Polling to indicate the end of a write
cycle. During a write cycle, an attempted read of the last byte written will result in
the complement of the written data on P1.7. Once the write cycle has been
completed, true data is valid on all outputs, and the next cycle may begin. Data
Polling may begin any time after a write cycle has been initiated.
Ready/Busy: The Progress of byte programming can also be monitored by the
RDY/BSY output signal. Pin P3.1 is pulled low after P3.2 goes High during
programming to indicate BUSY. P3.1 is pulled High again when programming is
done to indicate READY.
28
Program Verify: If lock bits LB1 and LB2 have not been programmed code data
can be read back via the data lines for verification:
1. Reset the internal address counter to 000H by bringing RST from “L” to “H”.
2. Apply the appropriate control signals for Read Code data and read the output
data at the port P1 pins.
3. Pulse pin XTAL1 once to advance the internal address counter.
4. Read the next code data byte at the port P1 pins.
5. Repeat steps 3 and 4 until the entire array is read .The lock bits cannot be
verified directly. Verification of the lock bits is achieved by observing that their
features are enabled.
Chip Erase: The entire PEROM array (2K bytes) and the two Lock Bits are erased
electrically by using the proper combination of control signals and by holding P3.2
low for 10 ms. The code array is written with all “1”s in the Chip.
Erase operation and must be executed before any nonblank memory byte can be re-
programmed.
Reading the Signature Bytes: The signature bytes are read by the same procedure
as a normal verification of locations 000H, 001H, and 002H, except that P3.5 and
P3.7 must be pulled to logic low. The values returned are as follows.
(000H) = 1EH indicates manufactured by Atmel
(001H) = 21H indicates 89C2051
Programming Interface: Every code byte in the Flash array can be written and
using the appropriate combination of control signals can erase the entire array. The
write operation cycle is self timed and once initiated, will automatically time itself
to completion. All major programming vendors offer worldwide support for the
Atmel micro controller series. Please contact your local programming vendor for
the appropriate software revision.
29
Flash Programming Modes:
Notes: 1. The internal PEROM address counter is reset to 000H on the rising edge
of RST and is advanced by a positive pulse at XTAL 1 pin.
2. Chip Erase requires a 10 ms PROG pulse.
3. P3.1 is pulled Low during programming to indicate RDY/BS
Figure: Programming the Flash Memory
Figure: Verifying the Flash Memory
30
Flash Programming and Verification Characteristics:
Timer 2 is selected as the baud rate generator by setting TCLK and/or RCLK in
T2CON (Table 2). Note that the baud rates for transmit and receive can be
different if Timer 2 is used for the receiver or transmitter and Timer 1 is used for
the other function. Setting RCLK and/or TCLK puts Timer 2 into its baud rate
generator mode, as shown in Figure4. The baud rate generator mode is similar to
the auto-reload mode, in that a rollover in TH2 causes the Timer 2 registers to be
reloaded with the 16-bit value in registers RCAP2H and RCAP2L, which are
preset by software.The baud rates in Modes 1 and 3 are determined by Timer2’s
overflow rate according to the following equation.
31
The Timer can be configured for either timer or counter operation. In most
applications, it is configured for timer operation (CP/T2 = 0). The timer operation
is different for Timer 2 when it is used as a baud rate generator. Normally, as a
timer, it increments every machine cycle (at 1/12 the oscillator frequency). As a
baud rate generator, however, it increments every state time (at 1/2 the oscillator
frequency). The baud rate formula is given below.
32
Figure: timer 2 clock out mode
33
In the clock-out mode, Timer 2 roll-overs will not generate an interrupt. This
behavior is similar to when Timer 2 is used as a baud-rate generator. It is possible
to use Timer 2 as a baud-rate generator and a clock generator simultaneously.
Note, however, that the baud-rate and clock-out Frequencies cannot be determined
independently from one another since they both use RCAP2H and RCAP2L.
UART:
The UART in the AT89C52 operates the same way as the UART in the AT89C51.
COMPONENTS DESCRIPTION
Transformers:
A transformer is a device that transfers electrical energy from one circuit to another
by magnetic coupling without requiring relative motion between its parts. It
usually comprises two or more coupled windings, and, in most cases, a core to
concentrate magnetic flux. A transformer operates from the application of an
alternating voltage to one winding, which creates a time-varying magnetic flux in
the core. This varying flux induces a voltage in the other windings. Varying the
relative number of turns between primary and secondary windings determines the
ratio of the input and output voltages, thus transforming the voltage by stepping it
up or down between circuits.
Basic principle:
The principles of the transformer are illustrated by consideration of a hypothetical
ideal transformer consisting of two windings of zero resistance around a core of
negligible reluctance. A voltage applied to the primary winding causes a current,
which develops a magnetomotive force (MMF) in the core. The current required
to create the MMF is termed the magnetising current; in the ideal transformer it is
considered to be negligible. The MMF drives flux around the magnetic circuit of
the core.
34
Figure: The ideal transformer as a circuit element
and
Where: and are the induced EMFs across primary and secondary windings,
and are the numbers of turns in the primary and secondary windings,
and are the time derivatives of the flux linking the primary and secondary
windings.
In the ideal transformer, all flux produced by the primary winding also links the
secondary, and so , from which the well-known transformer equation
follows:
35
Equation 1: Transformer Equation
The ratio of primary to secondary voltage is therefore the same as the ratio of the
number of turns; alternatively, that the volts-per-turn is the same in both windings.
The conditions that determine Transformer working in STEP UP or STEP DOWN
mode are:
Ns > Np
Ns < Np
Rectifier:
The essential feature of this arrangement is that for both polarities of the voltage
at the bridge input, the polarity of the output is constant.
36
2.2.1 Basic Operation:
When the input connected at the left corner of the diamond is positive with
respect to the one connected at the right hand corner, current flows to the right
along the upper colored path to the output, and returns to the input supply via
the lower one.
When the right hand corner is positive relative to the left hand corner, current
flows along the upper colored path and returns to the supply via the lower
colored path.
37
Figure : AC, half-wave and full wave rectified signals
In each case, the upper right output remains positive with respect to the lower
right one. Since this is true whether the input is AC or DC, this circuit not only
produces DC power when supplied with AC power: it also can provide what is
sometimes called "reverse polarity protection". That is, it permits normal
functioning when batteries are installed backwards or DC input-power supply
wiring "has its wires crossed" (and protects the circuitry it powers against damage
that might occur without this circuit in place).
Output Smoothing:
For many applications, especially with single phase AC where the full-wave bridge
serves to convert an AC input into a DC output, the addition of a capacitor may be
important because the bridge alone supplies an output voltage of fixed polarity
but pulsating magnitude.
38
Figure : Bridge Rectifier with smoothen output
The function of this capacitor, known as a 'smoothing capacitor' (see also filter
capacitor) is to lessen the variation in (or 'smooth') the raw output voltage
waveform from the bridge. One explanation of 'smoothing' is that the capacitor
provides a low impedance path to the AC component of the output, reducing the
AC voltage across, and AC current through, the resistive load. In less technical
terms, any drop in the output voltage and current of the bridge tends to be
cancelled by loss of charge in the capacitor. This charge flows out as additional
current through the load. Thus the change of load current and voltage is reduced
relative to what would occur without the capacitor. Increases of voltage
correspondingly store excess charge in the capacitor, thus moderating the change
in output voltage / current.
The capacitor and the load resistance have a typical time constant τ = RC where C
and R are the capacitance and load resistance respectively. As long as the load
resistor is large enough so that this time constant is much longer than the time of
one ripple cycle, the above configuration will produce a well smoothed DC voltage
across the load resistance. In some designs, a series resistor at the load side of the
capacitor is added. The smoothing can then be improved by adding additional
stages of capacitor–resistor pairs, often done only for sub-supplies to critical high-
gain circuits that tend to be sensitive to supply voltage noise.
39
Voltage Regulators:
40
Figure : Internal block Diagram
41
Features:
• Output Current up to 1A
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V
• Thermal Overload Protection
• Short Circuit Protection
• Output Transistor Safe Operating Area Protection
Capacitors are widely used in electronic circuits to block the flow of direct current
while allowing alternating current to pass, to filter out interference, to smooth
the output of power supplies, and for many other purposes. They are used in
resonant circuits in radio frequency equipment to select particular frequencies .
42
Theory of operation:
43
dielectric contains an electric field. The capacitor is a reasonably general model
for electric fields within electric circuits.
Sometimes charge buildup affects the mechanics of the capacitor, causing the
capacitance to vary. In this case, capacitance is defined in terms of incremental
changes:
RESISTOR:
Resistors are used to limit the value of current in a circuit. Resistors offer
opposition to the flow of current. They are expressed in ohms for which the
symbol is ‘’. Resistors are broadly classified as
Fixed Resistor
Coding Of Resistor:
Some resistors are large enough in size to have their resistance printed on the
body. However there are some resistors that are too small in size to have
numbers printed on them. Therefore, a system of colour coding is used to indicate
their values.
moulded composition resistor four colour bands are printed on one end of the
outer casing. The colour bands are always read left to right from the end that has
the bands closest to it. The first and second band represents the first and second
significant digits, of the resistance value. The third band is for the number of zeros
that follow the second digit. In case the third band is gold or silver, it represents a
multiplying factor of 0.1to 0.01. The fourth band represents the manufacture’s
tolerance.
45
RESISTOR COLOUR CHART:
For example, if a resistor has a colour band sequence: yellow, violet, orange and
gold
46
This resistor has red (2), violet (7), yellow (4 zeros) and gold bands.
So its value is 270000 = 270 k .
The standard colour code cannot show values of less than 10 . To show these
small values two special colours are used for the third band: gold, which means
× 0.1 and silver which means × 0.01. The first and second bands represent the
digits as normal.
For example:
VARIABLE RESISTOR:
In electronic circuits, sometimes it becomes necessary to adjust the values of
currents and voltages. For n example it is often desired to change the volume of
sound, the brightness of a television picture etc. Such adjustments can be done by
using variable resistors.
47
TRANSISTORS:
A transistor is an active device. It consists of two PN junctions formed by
sandwiching either p-type or n-type semiconductor between a pair of opposite
types.
1. n-p-n transistor
2. p-n-p transistor
Transistor has two pn junctions one junction is forward biased and other is
reversed biased. The forward junction has a low resistance path whereas a
reverse biased junction has a high resistance path.
The weak signal is introduced in the low resistance circuit and output is taken
from the high resistance circuit. Therefore a transistor transfers a signal from a
low resistance to high resistance.
Transistor has three sections of doped semiconductors. The section on one side is
emitter and section on the opposite side is collector. The middle section is base.
48
Emitter : The section on one side that supplies charge carriers is called emitter.
The emitter is always forward biased w.r.t. base.
Collector : The section on the other side that collects the charge is called
collector. The collector is always reversed biased.
Base : The middle section which forms two pn-junctions between the emitter
and collector is called base.
A transistor raises the strength of a weak signal and thus acts as an amplifier. The
weak signal is applied between emitter-base junction and output is taken across
the load Rc connected in the collector circuit. The collector current flowing
through a high load resistance Rc produces a large voltage across it. Thus a weak
signal applied in the input appears in the amplified form in the collector circuit.
49
DIODE
ACTIVE COMPONENT-
Active component are those component for not any other component are used its
operation. I used in this project only function diode, these component description
are described as bellow.
SEMICONDUCTOR DIODE-
A PN junctions is known as a semiconductor or crystal diode.A crystal diode has
two terminal when it is connected in a circuit one thing is decide is weather a diode
is forward or reversed biased. There is a easy rule to ascertain it. If the external
CKT is trying to push the conventional current in the direction of error, the diode is
forward biased. One the other hand if the conventional current is trying is trying to
flow opposite the error head, the diode is reversed biased putting in simple words.
If arrowhead of diode symbol is positive W.R.T Bar of the symbol, the diode is
forward biased.
The arrowhead of diode symbol is negative W.R.T bar , the diode is the reverse
bias.
When we used crystal diode it is often necessary to know that which end is
arrowhead and which end is bar. So following method are available.
50
Some manufactures actually point the symbol on the body of the diode e. g By127
by 11 4 crystal diode manufacture by b e b.
Sometimes red and blue marks are on the body of the crystal diode. Red mark do
not arrow where’s blue mark indicates bar e .g oa80 crystal diode.
ZENER DIODE-
It has been already discussed that when the reverse bias on a crystal diode is
increased a critical voltage, called break down voltage. The break down or zener
voltage depends upon the amount of doping. If the diode is heavily doped
depletion layer will be thin and consequently the break down of he junction will
occur at a lower reverse voltage. On the other hand, a lightly doped diode has a
higher break down voltage, it is called zener diode
A properly doped crystal diode, which has a sharped break down voltage, is known
as a zenor diode.
51
RELAYS:
Relays
Photographs © Rapid Electronics
52
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.
Relays allow one circuit to switch a second circuit that 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 usually 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 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 labeled 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.
53
Choosing a relay
You need to consider several features when choosing a relay:
Physical-size-and-pin-arrangement
If you are choosing a relay for an existing PCB you will need to ensure that its
dimensions and pin arrangement are suitable. You should find this information in
the supplier's catalogue.
Coil-voltage
The relay's coil voltage rating and resistance must suit the circuit powering the
relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays
are also readily available. Some relays operate perfectly well with a supply voltage
which is a little lower than their rated value.
For example: A 12V supply relay with a coil resistance of 400 passes a current of
30mA. This is OK for a 555 timer IC (maximum output current 200mA), but it is too
much for most ICs and they will require a transistor to amplify the current.
Switch-ratings(voltage-and-current)
The relay's switch contacts must be suitable for the circuit they are to control. You
will need to check the voltage and current ratings. Note that the voltage rating is
usually higher for AC, for example: "5A at 24V DC or 125V AC".
Switch-contact-arrangement(SPDT,DPDT,etc)
Most relays are SPDT or DPDT which are often described as "single pole
changeover" (SPCO) or "double pole changeover" (DPCO).
Advantages of relays:
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 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.
54
CONCLUSION
This project is successfully completed and helped us to develop the better
understanding about the controller and made us realize the power of the
controller. We can design any thing with the help of the decision making power of
the controller.
55
REFERENCE
[1] L. Deng-feng, B. Yun-ting, W. He, and L. Hu, "Design of intelligent lighting
control system" Cyber Technology in Automation, Control, and Intelligent
Systems (CYBER), 2011 IEEE International Conference ,pp.134-137, 20-23
March.
[2] F. Kaku, et al. “Construction of Intelligent Lighting System Providing Desired
Illuminance Distributions in Actual Office Environment”, Artifical Intelligence
and Soft Computing Lecture Notes in Computer Science Volume 6114, 2010,
pp 451-46
[3] T. P. Huynh, Y. K. Tan, and K. J. Tseng, “Energy-aware wireless sensor
network with ambient intelligence for smart LED(Light Emitting Diode)
lighting system control”, IECON 2011, pp2923 – 2928, Nov. 2011.
56
BIBLIOGRAPHY
Mehta V.K., “ Principles of Electronics “
S.Chand & Co. Ltd., New Delhi
Boylstead Robert & Nasceslsky Louis “ Electronic Devices & Circuit Theory”
Prentice Hall of India Private Ltd., New Delhi
Millman Jacob & Halkias C. Christos “Integrated Electronics “
Tata Mc Graw Hill Publishing Ltd., New Delhi
WEB SITES:
www.microtutorials.com
www.datasheets.com
www.archives.com
www.nationalsemiconductors.com
www.atmel.com
www.seimens.com
www.fairchildsemiconductors.com
57
58