Professional Documents
Culture Documents
On
EMBEDDED SYSTEMS
AND DTMF BASED
WIRELESS SWITCH
1
DECLARATION
I hereby declare that the project work on “Embedded Systems” is an authentic record of my
own work carried out at APPIN TECHNOLOGY LAB, NOIDA as requirements of six weeks
project term for the award of degree of B.E. (Electronics & Communication
Engineering),______ under the guidance of Mr. MITHILESH CHANDRA , Project In
Charge___________ during ________
2
ACKNOWLEDGEMENT
First and foremost I would like to thank Mr. MITHILESH CHANDRA, at APPIN
TECHNOLOGY LAB, NOIDA who was also our supervisor, for his consistent guidance on
each and every step of our project. Without his push and direction, this project would have not
been completed. His continuous support and motivation made this project possible.
I’d also like to thank our teachers in ____________ who helped me in understanding the basics
of this course . Without their support I would not have been able to excel in my project.
Lastly, I’d like to thanks all my friends and teammates for believing me in me and my
capabilities.
_____________
_____________
_____________
3
ABOUT COMPANY
Appin Knowledge Solutions is a part of Appin Group of Companies and the premier
provider of hi- technology certification, courseware as well as online, computer based and instructor
led training across the world. Appin is primarily an IIT Alumni company. Appin has come up with the
way of innovative learning concept using Computer Based Training Software (CBTS) in a highly
interactive environment.
Appin Knowledge Solution is an affiliate of Appin group of companies based in Austin,Texas (US)
known worldwide for education and training in Hi-Technology Certification Programmes. Partners
with organization like Microsoft Corporation , MAHE (Manipal Academy of Higher Education),
Gurukul Online Learning Solutions, IP University and Everon Systems etc. We have conducted
training programs in all big corporate houses of India. At the same time Appin has a strong hold on
colleges all over India, with over 500 colleges taking programs from Appin regularly and more then
1000+ campuses having subscribed some specific service from Appin.
4
TABLE OF CONTENTS
Introduction............................................................................................04
Embedded Systems.................................................................................05
Types Of Microcontrollers.....................................................................06
Harvard Architecture.............................................................................
8051 Architecture....................................................................................
Types of Memory....................................................................................
Addressing Modes...................................................................................
Timers......................................................................................................
Interrupts................................................................................................
Project Description.................................................................................27
INTRODUCTION
A digital computer typically consists of three major components: the Central Processing
Unit(CPU), program and data memory, and an Input/Output (I/O) system. The CPU controls
the flow of information among the components of the computer. It also processes the data by
5
performing digital operations. Most of the processing is done in the Arithmetic-Logic Unit
(ALU)within the CPU. When the CPU of a computer is built on a single printed circuit board,
the computer is called a minicomputer. A microprocessor is a CPU that is compacted into a
single-chip semiconductor device. Microprocessors are general-purpose devices, suitable for
many applications. A computer built around a microprocessor is called a microcomputer. The
choice of I/O and memory devices of a microcomputer depends on the specific application. For
example, most personal computers contain a keyboard and monitor as standard input and
output devices.
A microcontroller is an entire computer manufactured on a single chip. Microcontrollers are
usually dedicated devices embedded within an application. For example, microcontrollers are
used as engine controllers in automobiles and as exposure and focus controllers in cameras. In
order to serve these applications, they have a high concentration of on-chip facilities such as
serial ports, parallel input output ports, timers, counters, interrupt control, analog-to-digital
converters, random access memory, read only memory, etc. The I/O, memory, and on-chip
peripherals of a microcontroller are selected depending on the specifics of the target
application. Since microcontrollers are powerful digital processors, the degree of control and
programmability they provide significantly enhances the effectiveness of the application.
EMBEDDED SYSTEMS
Characteristic
1. Embedded systems are not always standalone devices. Many embedded systems consist
of small, computerized parts within a larger device that serves a more general purpose.
For example, the Gibson Robot Guitar features an embedded system for tuning the
strings, but the overall purpose of the Robot Guitar is, of course, to play music.[5]
Similarly, an embedded system in an automobile provides a specific function as a
subsystem of the car itself.
2. The program instructions written for embedded systems are referred to as firmware, and
are stored in read-only memory or Flash memory chips. They run with limited computer
hardware resources: little memory, small or non-existent keyboard and/or screen.
TYPES OF MICROCONTROLLERS
The predominant family of microcontrollers are 8-bit types since this word size has proved
popular for the vast majority of tasks the devices have been required to perform. The
microcontroller family would have a common instruction subset but family members differ in
9
the amount, and type, of memory, timer facility, port options, etc. possessed, thus producing
cost-effective devices suitable for particular manufacturing requirements.
There are 4 major 8 bit micro controllers. They are Freescale's 6811, Intel's 8051, Zilog's Z8
and PIC 16x from Microchip Technology. Each of these Microcontrollers have a unique set of
instruction set and register set; therefore they are not compatible with each other.
8051 MICROCONTROLLER
The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at
the end of the 1970s. The 8051 family with its many enhanced members enjoys the largest
market share, estimated to be about 40%, among the various microcontroller architectures. The
architecture of the 8051 family of microcontrollers is referred to as the MCS-51 architecture, or
sometimes simply as MCS-51. The microcontrollers have an 8-bit data bus. They are capable
of addressing 64K of program memory and a separate 64K of data memory. The 8051 has 4K
of code memory implemented as on-chip Read Only Memory (ROM). The 8051 has 128 bytes
of internal Random Access Memory (RAM). It has two timer/counters, a serial port, 4 general
purpose parallel input/output ports, and interrupt control logic with five sources of interrupts.
Besides internal RAM, the 8051 has various Special Function Registers (SFR), which are the
control and data registers for on-chip facilities
10
RAM (bytes) 128 256 128
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Interrupt sources 6 8 6
HARVARD ARCHITECTURE
The Harvard architecture is a computer architecture with physically separate storage and signal
pathways for instructions and data. In a Harvard architecture, there is no need to make the two
memories share characteristics. In particular, the word width, timing, implementation
technology, and memory address structure can differ. In some systems, instructions can be
stored in read-only memory while data memory generally requires read-write memory. In some
systems, there is much more instruction memory than data memory so instruction addresses are
wider than data addresses. The Modified Harvard architecture is very much like the Harvard
architecture but provides a pathway between the instruction memory and the CPU that allows
11
words from the instruction memory to be treated as read-only data. This allows constant data,
particularly text strings, to be accessed without first having to be copied into data memory, thus
preserving more data memory for read/write variables. Special machine language instructions
are provided to read data from the instruction memory. This is by contrast with a Von
Neumann architecture computer, in which both instructions and data are stored in the same
memory system and (without the complexity of a cache) must be accessed in turn.
Microcontrollers (complete computers on a single chip) may use the Modified Harvard
architecture for the reasons it was first developed, which are to improve memory access speeds
with moderate complexity and to allow the instruction and data memory systems to be
implemented independently of each other.
Complex instruction set computer (CISC, pronounced like "sisk") is a computer instruction
set architecture (ISA) in which each instruction can execute several low-level operations, such
as a load from memory, an arithmetic operation, and a memory store, all in a single instruction.
The term was retroactively coined in contrast to reduced instruction set computer (RISC).
The acronym RISC (pronounced as risk), for reduced instruction set computer, represents a
CPU design strategy emphasizing the insight that simplified instructions that "do less" may still
provide for higher performance if this simplicity can be utilized to make instructions execute
very quickly.
For any given level of general performance, a RISC chip will typically have far fewer
transistors dedicated to the core logic which originally allowed designers to increase the size of
the register set and increase internal parallelism.
Other features, which are typically found in RISC architectures are:
• Uniform instruction format, using a single word with the opcode in the same bit
positions in every instruction, demanding less decoding;
• Identical general purpose registers, allowing any register to be used in any context,
simplifying compiler design (although normally there are separate floating point
registers);
• Simple addressing modes. Complex addressing performed via sequences of arithmetic
and/or load-store operations;
• Few data types in hardware, some CISCs have byte string instructions, or support
complex numbers; this is so far unlikely to be found on a RISC.
Exceptions abound, of course, within both CISC and RISC.
RISC designs are also more likely to feature a Harvard memory model, where the instruction
stream and the data stream are conceptually separated; this means that modifying the memory
where code is held might not have any effect on the instructions executed by the processor
(because the CPU has a separate instruction and data cache), at least until a special
12
synchronization instruction is issued. On the upside, this allows both caches to be accessed
simultaneously, which can often improve performance.
8051 ARCHITECTURE
The Intel 8051 is an 8-bit microcontroller which means that most available operations are
limited to 8 bits.
Some of the features that have made the 8051 popular are:
• 8-bit data bus
• 16-bit address bus
• 32 general purpose registers each of 8 bits
• 16 bit timers (usually 2, but may have more, or less).
• 3 internal and 2 external interrupts.
• Bit as well as byte addressable RAM area of 16 bytes.
• Four 8-bit ports, (short models have two 8-bit ports).
• 16-bit program counter and data pointer
Ports
There are 4 8-bit ports: P0, P1, P2 and P3.
PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used
for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional
functions associated with them based upon the context of their usage.
PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional
functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter
13
inputs, read and write pins for memory access.
PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no
external memory is present, but if external memory access is required then PORT P2 will act as
an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-
A15, as can be seen from fig
PORT P0 (pins 32 to 39) PORT P0 can be used as a general purpose 8 bit port when no
external memory is present, but if external memory access is required then PORT P0 acts as a
multiplexed address and data bus that can be used to access external memory in conjunction
with PORT P2. P0 acts as AD0-AD7, as can be seen from fig
REGISTERS
The Accumulator
The Accumulator, as its name suggests, is used as a general register to accumulate the results of
a large number of instructions. It can hold an 8-bit (1-byte) value and is the most versatile
register the 8051 has due to the shear number of instructions that make use of the accumulator.
More than half of the 8051s 255 instructions manipulate or use the accumulator in some way.
The "R" registers
14
The "R" registers are a set of eight registers that are named R0, R1, etc. up to and including
R7.These registers are used as auxillary registers in many operations.
The "B" Register
The "B" register is very similar to the Accumulator in the sense that it may hold an 8-bit (1-
byte) value.The "B" register is only used by two 8051 instructions: MUL AB and DIV AB.
Thus, if you want to quickly and easily multiply or divide A by another number, you may store
the other number in "B" and make use of these two instructions.Aside from the MUL and DIV
instructions, the "B" register is often used as yet another temporary storage register much like a
ninth "R" register.
The Data Pointer (DPTR)
The Data Pointer (DPTR) is the 8051s only user-accessable 16-bit (2-byte) register. The
Accumulator, "R" registers, and "B" register are all 1-byte values.
DPTR, as the name suggests, is used to point to data. It is used by a number of commands
which allow the 8051 to access external memory. When the 8051 accesses external memory it
will access external memory at the address indicated by DPTR.
The Program Counter (PC)
The Program Counter (PC) is a 2-byte address which tells the 8051 where the next instruction
to execute is found in memory. When the 8051 is initialized PC always starts at 0000h and is
incremented each time an instruction is executed. It is important to note that PC isnt always
incremented by one. Since some instructions require 2 or 3 bytes the PC will be incremented by
2 or 3 in these cases.The Program Counter is special in that there is no way to directly modify
its value.
The Stack Pointer (SP)
The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-byte) value.
The Stack Pointer is used to indicate where the next value to be removed from the stack should
be taken from.
A
When you push a value onto the stack, the 8051 first increments the value of SP and then stores
B memory location.When you pop a value off the stack, the 8051 returns
the value at the resulting
the value from the memory
R0 location indicated by SP, and then decrements the value of SP.
DPTR DPH DPL
This order of operation
R1 is important. When the 8051 is initialized SP will be initialized to 07h.
If you immediately push a value onto the stack, the value will be stored in Internal RAM
R2 sense taking
address 08h. This makes PC into account what was
PC mentioned two paragraphs above:
First the 8051 will increment the value of SP (from 07h to 08h) and then will store the pushed
R3
value at that memory address (08h).
R4 Some 8051 16-bit Register
R5
R6
R7
15
Some 8-bitt Registers of
the 8051
SPECIAL FUNCTION REGISTER
The Special Function Register (SFR) is the upper area of addressable memory, from address
0x80 to 0xFF. This area of memory cannot be used for data or program storage, but is instead a
series of memory-mapped ports and registers. All port input and output can therefore be
performed by memory mov operations on specified addresses in the SFR. Also, different status
registers are mapped into the SFR, for use in checking the status of the 8051, and changing
some operational parameters of the 8051.
The 4 ports, register A,B, and stack pointer SP have already been explained above. The rest of
the SFR are explained below.
16
PCON (Power Control, Addresses 87h):
The Power Control SFR is used to control the 8051's power control modes. Certain operation
modes of the 8051 allow the 8051 to go into a type of "sleep" mode which requires much less
power. These modes of operation are controlled through PCON. Additionally, one of the bits in
PCON is used to double the effective baud rate of the 8051's serial port.
TL0/TH0 (Timer 0 Low/High, Addresses 8Ah/8Ch): These two SFRs, taken together, represent
timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR;
however, these timers always count up. What is configurable is how and when they increment
in value.
TL1/TH1 (Timer 1 Low/High, Addresses 8Bh/8Dh): These two SFRs, taken together, represent
timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR;
however, these timers always count up. What is configurable is how and when they increment
in value.
SCON (Serial Control, Addresses 98h, Bit-Addressable):
The Serial Control SFR is used to configure the behavior of the 8051's on-board serial port.
This SFR controls the baud rate of the serial port, whether the serial port is activated to receive
data, and also contains flags that are set when a byte is successfully sent or received..
18
The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the
SFR are used to enable/disable the specific interrupts, where as the highest bit is used to enable
or disable ALL interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of
whether an individual interrupt is enabled by setting a lower bit.
19
TYPES OF MEMORY
The 8051 has three very general types of memory. To effectively program the 8051 it is
necessary to have a basic understanding of these memory types.
The memory types are illustrated in the following graphic. They are: On-Chip Memory,
External Code Memory, and External RAM.
On-Chip Memory refers to any memory (Code, RAM, or other) that physically exists on the
microcontroller itself. On-chip memory can be of several types, but we'll get into that shortly.
External Code Memory is code (or program) memory that resides off-chip. This is often in
the form of an external EPROM.
External RAM is RAM memory that resides off-chip. This is often in the form of standard
static RAM or flash RAM.
ADDRESSING MODES
20
An "addressing mode" refers to how you are addressing a given memory location. In summary,
the addressing modes are as follows, with an example of each:
Immediate addressing
Immediate addressing is so-named because the value to be stored in memory immediately
follows the operation code in memory. That is to say, the instruction itself dictates what value
will be stored in memory.
For example, the instruction:
MOV A,#20h
This instruction uses Immediate Addressing because the Accumulator will be loaded with the
value that immediately follows; in this case 20 (hexidecimal).Immediate addressing is very fast
since the value to be loaded is included in the instruction. However, since the value to be
loaded is fixed at compile-time it is not very flexible.
Direct Addressing
Direct addressing is so-named because the value to be stored in memory is obtained by directly
retrieving it from another memory location. For example:
MOV A,30h
This instruction will read the data out of Internal RAM address 30 (hexidecimal) and store it in
the Accumulator.
Direct addressing is generally fast since, although the value to be loaded isnt included in the
instruction, it is quickly accessable since it is stored in the 8051s Internal RAM. It is also much
more flexible than Immediate Addressing since the value to be loaded is whatever is found at
the given address--which may be variable.
Also, it is important to note that when using direct addressing any instruction which refers to an
address between 00h and 7Fh is referring to Internal Memory. Any instruction which refers to
an address between 80h and FFh is referring to the SFR control registers that control the 8051
microcontroller itself.
Register addressing
The register banks, containing registers R0 through R7, can be accessed by certain instructions
which carry a 3-bit register specification within the opcode of the instruction. Instructions that
access the registers this way are code efficient, since this mode eliminates an address byte.
When the instruction is executed, one of the eight registers in the selected bank is accessed.
One of four banks is selected at execution time by the two bank select bits in the PSW.
21
Register indirect addressing
Indirect addressing is a very powerful addressing mode which in many cases provides an
exceptional level of flexibility. Indirect addressing is also the only way to access the extra 128
bytes of Internal RAM found on an 8052.
Indirect addressing appears as follows:
MOV A,@R0
This instruction causes the 8051 to analyze the value of the R0 register. The 8051 will then
load the accumulator with the value from Internal RAM which is found at the address indicated
by R0.
Indexed addressing
Used in accessing data elements of look up table entries located in the program ROM space of
8051
eg. MOVC A@A+DPTR
TIMERS
The 8051 comes equipped with two timers, both of which may be controlled, set, read, and
configured individually. The 8051 timers have three general functions: 1) Keeping time and/or
calculating the amount of time between events, 2) Counting the events themselves, or 3)
Generating baud rates for the serial port.
As mentioned before, the 8051 has two timers which each function essentially the same way.
One timer is TIMER0 and the other is TIMER1. The two timers share two SFRs (TMOD and
TCON) which control the timers, and each timer also has two SFRs dedicated solely to itself
(TH0/TL0 and TH1/TL1).
INTERRUPTS
As the name implies, an interrupt is some event which interrupts normal program execution.
As stated earlier, program flow is always sequential, being altered only by those instructions
which expressly cause program flow to deviate in some way. However, interrupts give us a
mechanism to "put on hold" the normal program flow, execute a subroutine, and then resume
normal program flow as if we had never left it. This subroutine, called an interrupt handler, is
23
only executed when a certain event (interrupt) occurs. The event may be one of the timers
"overflowing," receiving a character via the serial port, transmitting a character via the serial
port, or one of two "external events." The 8051 may be configured so that when any of these
events occur the main program is temporarily suspended and control passed to a special section
of code which presumably would execute some function related to the event that occured. Once
complete, control would be returned to the original program. The main program never even
knows it was interrupted.
The ability to interrupt normal program execution when certain events occur makes it much
easier and much more efficient to handle certain conditions. If it were not for interrupts we
would have to manually check in our main program whether the timers had overflown, whether
we had received another character via the serial port, or if some external event had occured.
Besides making the main program ugly and hard to read, such a situation would make our
program inefficient since wed be burning precious "instruction cycles" checking for events that
usually dont happen.
We can configure the 8051 so that any of the following events will cause an interrupt:
• Timer 0 Overflow.
• Timer 1 Overflow.
• Reception/Transmission of Serial Character.
• External Event 0.
• External Event 1.
In other words, we can configure the 8051 so that when Timer 0 Overflows or when a character
is sent/received, the appropriate interrupt handler routines are called.
Polling Sequence
The 8051 automatically evaluates whether an interrupt should occur after every instruction.
When checking for interrupt conditions, it checks them in the following order:
• External 0 Interrupt
• Timer 0 Interrupt
• External 1 Interrupt
• Timer 1 Interrupt
• Serial Interrupt
This means that if a Serial Interrupt occurs at the exact same instant that an External 0 Interrupt
occurs, the External 0 Interrupt will be executed first and the Serial Interrupt will be executed
once the External 0 Interrupt has completed.
PROJECT DESCRIPTION
25
PROJECT – 1
DTMF BASED WIRELESS SWITCH
INTRODUCTION
I have attempted to make a DTMF BASED WIRELESS SWITCH. It is a basically a wireless
SWITCH which will be control with the help of signals given through a cellphone. A cellphone
will be attached to the device with its earphones plugged into the dtmf circuit. When a person
will call on that cellphone ,he can operate the device by pressing keys on his own cellphone.
Each key will execute different command like ON/OFF etc. Thus a wireless switch which
requires very little investment and is reliable can be made with the help of DTMF circuit.
PROJECT METHODOLOGY
Components:
1. Microcontroller Section: At89V51 with base
Crystal oscillator(11.0592 Mhz)
Capacitor(30 pf)
Capacitor(10 uF)
Resistor(8.2 K)
2. DTMF Section :MT8870 with base
Crystal oscillator(3.5 Mhz)
2 resistors (100K)
Capacitor(100nf)
3. Relay driver(ULN 2003)
4. Voltage regulators(LM7805)
5. Relays
6. Socket board
7. Voltage supply (DC battery of 6 v)
Softwares used:
1. Keil compiler
Equipments Used:
26
Soldering iron, flux,wire
Circuit Diagram
DTMF Section
27
Procedure of building the Wireless Robot
STEP 1:Circuit Diagram of the project is designed and finalized (given above)
STEP 2: All the components and software platform (also mentioned above) are selected.
STEP 3: All the hardware components are soldered on the general circuit board.
STEP 4: The program/code of the project is written in Assembly language and compiled using
keil compiler
STEP 5: The hex code of the program is burnt into the flash code memory of the
microcontroller
STEP 6: Testing is done at various levels to finalize the project
28
GENERAL INFORMATION :
29
DTMF Decoder
Dual-tone multi-frequency (DTMF) signaling is used for telecommunication signaling over
analog telephone lines in the voice-frequency band between telephone handsets and other
communications devices and the switching center. DTMF, also known as touch-tone, are the
audible sounds you hear when you press keys on your phone. It was designed for optimal
performance with each tone being very distinct. This makes decoding the tone very easy even
in surrounding noise. It is this performance that makes DTMF ideal for clear transmission and
reception in remote control (wireless or through phone lines) applications.
30
Snapshot of DTMF circuit
Relay driver
ULN2003 LINEAR INTEGRATED CIRCUIT
31
HIGH VOLTAGE AND HIGH CURRENT
DARLINGTON TRANSISTOR ARRAY
DESCRIPTION
The ULN2003 is a monolithic high voltage and high
current
Darlington transistor arrays. It consists of seven NPN
darlington
pairs that features high-voltage outputs with common-
cathode
clamp diode for switching inductive loads. The
collector-current
rating of a single darlington pair is 500mA. The
darlington pairs
may be parrlleled for higher current capability.
Applications include
relay drivers,hammer drivers, lampdrivers,display
drivers(LED gas
discharge),line drivers, and logic buffers.
The ULN2003 has a 2.7kW series base resistor for
each
darlington pair for operation directly with TTL or 5V
CMOS
devices.
FEATURES
* 500mA rated collector current(Single output)
* High-voltage outputs: 50V
* Inputs compatibale with various types of logic.
* Relay driver application
32
RELAYS
What is a relay?
We know that most of the high end industrial application devices have relays for their effective
working. Relays are simple switches which are operated both electrically and mechanically. Relays
consist of a n electromagnet and also a set of contacts. The switching mechanism is carried out with the
help of the electromagnet. There are also other operating principles for its working. But they differ
according to their applications. Most of the devices have the application of relays.
33
TAKE A LOOK : TYPES OF RELAYS
TAKE A LOOK : HOW TO TEST A RELAY
Relay Design
There are only four main parts in a relay. They are
• Electromagnet
• Movable Armature
• Switch point contacts
• Spring
The figures given below show the actual design of a simple relay.
Relay Construction
It is an electro-magnetic relay with a wire coil, surrounded by an iron core. A path of very low
reluctance for the magnetic flux is provided for the movable armature and also the switch point
contacts. The movable armature is connected to the yoke which is mechanically connected to the
34
switch point contacts. These parts are safely held with the help of a spring. The spring is used so as to
produce an air gap in the circuit when the relay becomes de-energized.
Relay Design
The diagram shows an inner section diagram of a relay. An iron core is surrounded by a control coil.
As shown, the power source is given to the electromagnet through a control switch and through
contacts to the load. When current starts flowing through the control coil, the electromagnet starts
energizing and thus intensifies the magnetic field. Thus the upper contact arm starts to be attracted to
the lower fixed arm and thus closes the contacts causing a short circuit for the power to the load. On the
other hand, if the relay was already de-energized when the contacts were closed, then the contact move
oppositely and make an open circuit.
As soon as the coil current is off, the movable armature will be returned by a force back to its initial
position. This force will be almost equal to half the strength of the magnetic force. This force is mainly
provided by two factors. They are the spring and also gravity.
Relays are mainly made for two basic operations. One is low voltage application and the other is high
voltage. For low voltage applications, more preference will be given to reduce the noise of the whole
circuit. For high voltage applications, they are mainly designed to reduce a phenomenon called arcing.
Relay Basics
The basics for all the relays are the same. Take a look at a 4 – pin relay shown below. There are two
colours shown. The green colour represents the control circuit and the red colour represents the load
circuit. A small control coil is connected onto the control circuit. A switch is connected to the load.
35
This switch is controlled by the coil in the control circuit. Now let us take the different steps that
occour in a relay.
relay operation
• Energized Relay (ON)
As shown in the circuit, the current flowing through the coils represented by pins 1 and 3 causes a
magnetic field to be aroused. This magnetic field causes the closing of the pins 2 and 4. Thus the
switch plays an important role in the relay working. As it is a part of the load circuit, it is used to
control an electrical circuit that is connected to it. Thus, when the relay in energized the current flow
will be through the pins 2 and 4.
36
• De – Energized Relay (OFF)
As soon as the current flow stops through pins 1 and 3, the switch opens and thus the open circuit
prevents the current flow through pins 2 and 4. Thus the relay becomes de-energized and thus in off
position.
37
• Single Pole Single Throw (SPST) – This type of relay has a total of four terminals. Out of
these two terminals can be connected or disconnected. The other two terminals are needed for
the coil.
• Single Pole Double Throw (SPDT) – This type of a relay has a total of five terminals. Out f
these two are the coil terminals. A common terminal is also included which connects to either
of two others.
• Double Pole Single Throw (DPST) – This relay has a total of six terminals. These terminals
are further divided into two pairs. Thus they can act as two SPST’s which are actuated by a
single coil. Out of the six terminals two of them are coil terminals.
• Double Pole Double Throw (DPDT) – This is the biggest of all. It has mainly eight relay
terminals. Out of these two rows are designed to be change over terminals. They are designed to
act as two SPDT relays which are actuated by a single coil.
Relay Applications
• Relays are used to realize logic functions. They play a very important role in providing safety
critical logic.
• Relays are used to provide time delay functions. They are used to time the delay open and delay
close of contacts.
• Relays are used to control high voltage circuits with the help of low voltage signals. Similarly
they are used to control high current circuits with the help of low current signals.
• They are also used as protective relays. By this function all the faults during transmission and
reception can be detected and isolated.
38
Snap shots
VOLTAGE REGULATOR
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
Description
The KA78XX/KA78XXA series of three-terminal positive
regulator are available in the TO-220/D-PAK package and
with several fixed output voltages, making them useful in a
wide range of applications. Each type employs internal
current limiting, thermal shut down and safe operating area
protection, making it essentially indestructible. If adequate
heat sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage
regulators, these devices can be used with external
components to obtain adjustable voltages and currents.
39
Sockets
Condition: Make P1.0 high if Key 1 is pressed otherwise terminate session directly.
ASSEMBLY LANGUAGE
AGAIN
jnb p2.6 , AGAIN ; Poll for ring detect signal
setb 2.7 ; Activate relay to lift receiver
setb p0.3
POLL
jnb p0.3 POLL ;Poll for high strobe
mov a,p0 ;Read P0
anl a,#0f0h ;To get code (Q1-Q4 ) for Received tone- pair in ACC.
xrl a,#01h
jnz TERMINATE ;If 0 is not received TERMINATE Session
setb p1.0 ;make P1.0 High if 1 is received
TERMINATE
clr 2.7 ;Deactivate relay
40
REFERENCES AND BIBLIOGRAPHY
41