You are on page 1of 51



Page 1

Title Page

1. Abstract 1-2
2. Introduction 3-4
3. Steps of project making 4-5
4. Block diagram 6-7
5. Circuit diagram 8-9
6. PCB Layout 10-11
7. Working 12-13
8. Hardware section 13
a. PCB manufacturing process and PCB layout 14-19
b. Components list 20-21
c. DTMF Theory 21-24
d. Components details 24-42
9. Software section
a. Installing coding
b. Software coding
10. Precautions 47
11. Applications & Future Scope 48
12. Bibliography 49
13. References 50

Page 2

In the present world of wireless technology everything is going to be digital and wireless,
and the cell phone is the key player in wireless technology today.

And today technology made the possessing of a mobile, considered as a basic commodity.

And the trends in wireless technology changing day-by-day and today the working is
going on how to develop remote devices without the presence of man and to reduce to the
time factor and labor, and our project belongs to that race and by using it we can control
any electronic devices through a touch cell phone, with one Call.

Project is like how to control electronic devices by using cell phone. The main
Components used are two Mobiles, DTMF Decoder and a Microcontroller. The
Electronics devices that are demonstrated in the project are bulbs. However by making
small changes any electronic devices can be controlled.

A new mode of communication which is used to control all those equipments through a
single call from anywhere. GSM is the most popular mobile phone system in the world
which could be used for this controlling operation from anywhere else.

We can control all loads at a time from one place (control room) without connecting any
physical wire between loads and control room.

It is considered as highly efficient communication through the mobile which will be useful
in industrial controls, automobiles, and appliances which would be controlled from
anywhere else. It is also highly economic and less expensive; hence GSM is preferred
most for this mode of controlling.

Page 3

Being able to achieve reliable long distance communication is an important open area of research.
Today, everyone wants a comfortable lifestyle with everything controlled by just a press of some
buttons. This project intends to make a device which can be used to control home Appliances by
just pressing some buttons of a cell phone. It will use the existing infrastructure of cell phone
networks for communication and device control. This will eliminate the need of a new
infrastructure and detailed technical research.
Currently, the primary mode for wireless communication uses RF (radio frequency). RF is an
obvious choice for communication since it allows more information to be transferred at high
speed and over long distance. However, creating RF network of long range for many simple
applications is an impractical solution. Thus, by using existing RF Network of Cell Phones it
minimizes the cost development and maintenance. It will help in conserving energy as with help
of this device any appliance can be controlled from any distance. It also has application in
Robotics and various other fields which require long distance communication. Here we designed a
system which can be used to control Appliances (maximum of 8) from anywhere in the world just
by pressing some buttons on a cell phone i.e. it is totally DTMF based.
The remote control technologies have been used in the fields like factory automation, space
exploration, in places where human access is difficult. As this has been achieved in the domestic
systems partially, many corporations and laboratories are researching the methods which enable
human to control and monitor efficiently and easily in the house or outdoor. Controlling the
domestic system regardless of time and space is an important challenge. As the mobile phone
enables us to connect with the outside devices via mobile communication network regardless of
time and space, the mobile phone is a suitable device to control domestic systems.
The mobile phone user controls the system by sending the DTMF tone to the access point. Mobile
communication network coverage is larger than that of LANs, thus user can take advantage of
mobile phones to control the system.

Page 4

the Dual Tone Multi Frequency (DTMF) tones that are generated when someone presses the
buttons of his/her cell phone keypad. Each button has multi-frequency.


The fundamental requirements for the cell phone based device control system remained fixed
throughout the design process. The goal was to design a system which would allow the user
automated and convenient access to their appliances through a cell-phone (GSM) network. The
fundamental objectives of the system include:
Correctly decode DTMF signals from the user2.
Allow the user to automatically switch ON/OFF the devices.

Save Electricity, this statement motivated us in designing this system. It has been noticed
several times that people are not use to in switching off the lights and fans when they are leaving
their respective places. And later, they realize that they have forgotten to switch off the lights and
In order to deal with this problem we have designed a system from which one can operate the
lights and fans of his home from a little cell-phone only i.e. a DTMF based device is been
introduced which will help in controlling the electric appliances of ones place. In this way, this
system saves energy as well as brings comfort in life.

Page 5

The following steps have been followed in carrying out the project

1). Understanding the working of the circuit.

2). Prepare the circuit diagram.

3). Prepare the list of components along with their specification estimate the cost.

4). and produce them after carrying out market survey.

5). Plan & prepare PCB for mounting all the components.

6). Fix the components and solder them.

7). Test the circuit for the desired performance.

8). Trace and rectify faults if any.

9). Give good finish to the unit.

10). Prepare the project report.

Page 6







Page 7

Power Supply

DTMF Trans Regulator
DECODER former (7805)+

Rectifier Filter



Fig: 2.1 Receiver Section


Fig 2.2 Transmitter Section

Page 8
Page 9



Page 10

Back Side of Microcontroller PCB Layout

Page 11
Back side of microcontroller PCB layout

Page 12
In this project the system, is controlled by a mobile phone that makes call to the mobile phone
attached to the system in the course of the call, if any button is pressed control corresponding to
the button pressed is heard at the other end of the call. This tone is called dual tone multi
frequency tone (DTMF) microcontroller receives this DTMF tone with the help of phone stacked
in the decoder.
The received tone is processed by the microcontroller with the help of DTMF decoder CM8870
the decoder decodes the DTMF tone in to its equivalent binary digit and this binary number is
send to the microcontroller, the microcontroller is programmed to take a decision for any give
input and outputs its decision to relay drivers in order to energize or de-energize the relay for
switching purpose.
The mobile that makes a call to the mobile phone stacked on the system acts as a remote. So this
simple project does not require the construction of receiver and transmitter units. DTMF signaling
is used for telephone signaling over the line in the voice frequency band to the call switching
centre. The version of DTMF used for telephone dialing is known as touch tone. DTMF assigns a
specific frequency (consisting of two separate tones) to each keys that it can easily be identified
by the electronic circuit. The signal generated by the DTMF encoder is the direct algebraic
submission, in real time of the amplitudes of two sine (cosine) waves of different frequencies, i.e.,
pressing 5 will send a tone made by adding 1336 Hz and 770 Hz to the other end of the mobile.
The important components of this system are DTMF decoder, Microcontroller and relay driver
& relay.
A CM8870 series DTMF decoder is used here. All types of the MT8870 series use digital
counting techniques to detect and decode all the sixteen DTMF tone pairs in to a four bit code
output. The built -in dial tone rejection circuit eliminated the need for pre- filtering. When the
input signal given at pin (IN-) single ended input configuration is recognized to be effective, the
correct four bit decode signal of the DTMF tone is transferred to outputs. The microcontroller
used here is a common 8 bit Atmel microcontroller ATMEGA8L.It is a low power, high-
performance CMOS 8-bit microcontroller with 8K bytes of In-System Programmable (ISP) Flash
program memory and 256 bytes of RAM,. It has 32 programmable input output lines .The

Page 13
Architecture is more code efficient. Outputs from port pins of the microcontroller are fed to inputs
IN1 through IN4 to relay. Switch S1 is used for manual reset. In order to operate the system you
have to make a call to the cell phone attached to the main circuitry of the project from any other
phone. The phone is picked at the receiving end through auto answer mode (which is in the phone,
just enable it). Each number on the cell phone keypad has a distinct sound (called DTMF tones).
This sound is used to identify the key pressed, using a CM8870 DTMF decoder. Here the sound is
firstly preamplified by the microphone unit. This sound is now fed into the M8870 IC which
decodes them in form of numbers. These decoded numbers are fed into the microcontroller .It
checks the code and energize/de-energize that particular relay for which that signal is send ,in
response of which the switching takes place in the appliance which is connected to it. Like:

Page 14


Layout of the desired circuit is the most important in any circuit board manufacturing process.
The following points are to be observed while performing the layout of the PCB. Sufficient space
should be maintained between two components. High heat dissipation components like high
voltage resistors should be mounted at a sufficient distance from the semiconductors and
electrolytic capacitors. Components layout should make proper combination with copper side
circuit layout. Circuit copper line thickness should be decided taking into account the current
drain in the circuit.

Nylon bolting cloth (Silk screen cloth) is stretched and attached to a wooden frame.
Photosensitive chemical (silcot-6) and ammonium bicarbonate is spread on cloth and dried in total
darkness. The screen is exposed to UV light and is developed in water.

The screen is placed on suitable copper laminated sheet on copper side and circuit black printing
ink (acid resistant paint) is spread on it. After printing the PCB should be allowed to dry for at
least 10 hrs. in a dust proof chamber.

The removal of excess copper on the copper laminated PCB apart from the printed circuit is
known as etching. Generally PCB is placed in Fe C13 solution and kept for one hour.

Under this operation drilling should be done as per circuit lay with the suitable drill and high
speed machine. Drilling should always be done from copper side to avoid possibility of coming
out of copper circuit and chipping out of Bakelite.


Page 15
It is done with special epoxy paint and special thinner is required for cleaning the screen. It
provides as better and also prevents frequency overlapping between the tacks at high frequency

It is an electroplating process (tin plating) done to increases the conductivity of the conducting
medium and to avoid oxidizing effect.

All components are mounted at their respective position as per the components layout. Proper
precautions should be taken during mounting process.

Etching process requires the use of chemicals acid resistant dishes and running water supply
Ferric chloride is maximum used solution but other enchants such as ammonium per sulfate 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 use a very sharp knife to cut round the
pattern carefully a remove the paper corresponding to the required copper pattern areas. Then
apply the resist solutions, which can be kind of ink proportion fort the purpose maintaining
smoothing clean outlines as far as possible. While the board is drying test all the components.
Before going to next stage, check the whole gotten and cross cheek against the circuit diagram
check for any freeing matte on the copper. The etching bath should be in a galls or enamels disc.
If using crystal of ferric-chloride these should be thoroughly dissolved in water to the proportional
suggested. There should be 0.5 Lt. of water for 125 Gm. of crystal. Water liquid should be
thoroughly deflated and druid in water land; never pour down the drain. To prevent particles of
copper hindering further etching, agitate the solutions carefully be gently twisting or rocking the
The board should not be left in the bath a moment longer than is needed to remove just the
right amount of copper. In spite of there being a resist coating there is no protection against

Page 16
etching away through exposed copper edges; this leads to over etching. Have running water ready
so that etched board can be removed properly and rinsed; this will hall etching immediately.

Drilling is one of those operations that call for great care because most of the holes will be made a
very small drill. For most purposes a 1 mm drill is used Drill all holes with this size first those that
need to be larger can be easily drilled again with the appropriate lager size.


From the greatest variety of electronic components available today, which runs into tent of
thousands of different types it is often a perplexing task to know which the right task for a given
job is. There should be damage such as hair line crack intuit opera on PCB that could age a
serious ice on the operational ability to the completed assemble. If there are than they can and
should be repaired fiesta bye soldering a short link of bare copper wire over the affected part.

The most popular method of holding all the items is to been the wires future apart after they even
been indebted in the appropriate holes. This will hold the component in position ready for

Some components will be considerably larger than other occupying and possible partially
obscuring neighboring components. Because of this best to start by mounting the smallest first
and progressing through to the largest. Before starting make certain that no further drilling I likely
to be necessary because access may be impossible later.

Next will probably be the resistor small signal diodes of other similar size components some
capacitor are very small but it would be best to fit these after words when fitting each group of
components marks of each one on the components its as it is fitted and if we have to leave the job
we know where to recommence. Although transistor & integrated circuit are small items there are
good reasons for leaving the soldering of these until the last step the main pint is that these

Page 17
components are sensitive to heart and is subjected to prolonged application to the soldering iron
they could be internally damaged. All the components before mounting are rubbed with sandpaper
so that oxide layer is removed from their tips. Now they are mounted according to the components

A soldered connection ensures metal continuity. The soldering process involves: Melting of the
flux which in turn removes the oxide films on the metal to be soldered. Melting the solder
removes the impurities. The solder partially dissolve of the metal in the connection. The solder
cools and fuses with the metal.

The soldering techniques involve knowledge of:

Soldering iron
Soldering wire
Soldering procedure
Replacing components
Prosecutions of when using C-MOS, devices
Knowledge of good and bad soldering joints.
Disordering techniques

Soldering Iron-
Soldering iron is an essential tool for soldering. A. Soldering iron should give sufficient heat a
melt solder by heat transfer when the iron tip is applied to a connection to be soldered. The
selection of the soldering iron can be made as regard to its tips size shape and wattage. Soldering
iron temperature is selected and controlled according to the work to be performed. Generally two
types of soldering irons are available: Soldering Pencil and Soldering Gun.

Soldering Pencils-
These are light weight soldering iron which can generate around 12 watts to 50 watts of heat
Modular soldering.

Page 18

Soldering Materials-
The soldering material is used to join together two or more metals at temperatures below their
melting point. The solder alloy consists of Lead (37%) and Tin (63%). The continuous connection
between two metals joint is made by solder materials.
Most commonly used solder wire consists of 60% of Tin 40% Lead. This is in the form of a
hollow wire whose center is filled with an organic paste like material called rosin. Its melting
temperature is 190 degree centigrade.

Flux is a material used to aid soldering process. Flux is needed to scratch away the small film of
oxide on the surface of metals to be soldered. This flux forms a protective film that prevents re
oxidation while the connection is heated to the point at which the solder melts. Flux is very
helpful on old dusty, eroded joint.

Soldering Procedure-
The soldering procedure involves selection of soldering iron cleaning of components to be
soldered and cleaning of the PCB to be soldered. The soldering iron should be selected according
to the job and should be powerful enough to provide heat. The tip of the soldering iron should be
selected as per the space available for soldering. The component that has to be soldered should be
properly bent and its leads should be properly inserted in the PCB. Before, if one has already
identified the fault component, then one should not try to remove or desolder the component. The
components should simply be cut and taken out.


CMOS Devices are sensitive to static charges. So care has to be taken while handling this device.
Static charge is generated by rubbing cloth with human body or by any other friction of human
body. Before string or handling CMOS Devices touching the ground or metallic chassis of the
equipment. One can wear a metallic band in hand which is connected to ground. The working

Page 19
table should be either of wood or should have rubber sheet. The soldering iron tip should be static
charge free.


-By using a disordering wick

-By using a disordering pump

Disordering wick is made of fine copper wire mesh. When this is applied to the heated
components, the molten solder gets attached to the wire mesh by capillary action. Disordering
pump has a suction pump. The nozzle of the disordering pump is kept to the heated component.
The molten solder is sucked by a spring action. Insertion in the PCB, the lead should be properly
cleaned. After component has been inserted it can be soldered. The oxide on the PCB can be
removed by using flux, sandpaper.

The tip of the soldering iron should be clean and should have proper shape. The shape of the tip
normally gets bad over a period of time. The shape can be made proper by filling. During
soldering excessive heat is generated at the soldering iron tip. If the soldering iron tip is in contact
with component for a longer time then there is possibility of damaged or may loose its
characteristics. Place iron tip at 45 degree to the PCB and component joint. Place the solder near
the iron and let it flow. Smoothen the area of joint by the soldering iron tip. By doing this, the
molten solder alloy flows into the PCB hole. Soldering should be done when the equipment is off.

In case of single sided PCB, the component to be removed can be disordered with the help of iron
and flux. The only precaution that has to be taken is that track should not break while removing.
In case of Through Hole PCB, care has the to be taken so that component while removing does
not damaged the Through Hole. In this case the component is soldered on one side and the lead
flows through the hole to the other sides, so disordering and removing becomes very difficult and
required practice.

Page 20


1 Speaker connecter jack

Microcontroller(ATMEL- ATmega8L)
Crystal Oscillators
ULN 2003 IC
5 V/12V Power Supply
DTMF Decoder IC(8870)
Relay Board
It consists of 4 relay circuit that bypasses the supply from power grid to loads.
Reset button
1 Diode(1N4007)
Resistors and Capacitors


PCB Artist for PCB Design

Keil uv3 IDE:
The programming of microcontroller will be done in C on Keil uv3 IDE (which will act
as a source code editor). C51 compiler and BL51 linker will be used to generate the hex
Flash Magic:
This is a flasher tool which will be used to program the hex file in the microcontroller.

Page 21

Before DTMF was created, telephone networks used a dialing system called Decadic (also known
as Pulse Dial). The Decadic system was used extensively in modern telephone networks to dial
numbers, which were entered by the telephone companys users. The Decadic (Pulse Dialling)
system used a series of clicks (which could be heard through the speaker of the phone) to dial the
numbers which were dialled via a keypad or rotary dial. The clicking sounds were actually the
connection of the phone line being connected, disconnected, and reconnected again in a certain
pattern. The Decadic (Pulse Dialling) system was very useful, but was limited to the local
exchange connections, requiring an operator to connect long distance calls.
In the late years of 1950, DTMF was being developed at Bell Labs for the purpose of allowing
tone signals to dial long distance numbers, which could be potentially be dialled not only via
standard wire networks, but also via radio links and or satellites.
DTMF was being developed for the future of electronic telecommunications switching
systems, as opposed to the mechanical crossbar systems, which were currently in use at the time.
After DTMF was created, Decadic dialling was made pointless to continue, it made no sense to
continue using that particular dialling system in the equipment circuits which the telephone
exchanges were using at the time. Plans were then made to begin the manufacture of DTMF
controlled switching systems in the communications exchanges and later standard customer
owned telephones were upgraded to using DTMF circuits rather than Decadic (Pulse Dial). After
various tests were performed on the DTMF system throughout the 1960s (when DTMF became
known as Touch-Tone), DTMF was made official, and was then used as the main
telecommunications dialling and switching system, and remains that way to this day.

Page 22

DTMF is a generic communication term for touch tone (a Registered Trademark of AT&T). The
tones produced when dialling on the keypad on the phone could be used to represent the digits,
and a separate tone is used for each digit. However, there is always a chance that a random sound
will be on the same frequency which will trip up the system. It was suggested that if two tones
were used to represent a digit, the likelihood of a false signal occurring is ruled out. This is the
basis of using dual tone in DTMF communication.
DTMF dialling uses a keypad with 12/16 buttons. Each key pressed on the phone
generates two tones of specific frequencies, so a voice or a random signal cannot imitate the
tones. One tone is generated from a high frequency group of tones and the other from low
frequency group. The DTMF (Dual Tone Multiple Frequency) application is associated with
digital telephony, and provides two selected output frequencies (one high band, one low band) for
a duration of 100 ms. The matrix for selecting the high and low band frequencies associated with
each key is shown in Figure 1 .

Figure2.1 DTMF keyboard matrix

Page 23
Each key is uniquely referenced by selecting one of the four low band frequencies associated with
the matrix rows, coupled with selecting one of the four high band frequencies associated with the
matrix columns. The low band frequencies are 697,770, 852, and 941 Hz, while the high band
frequencies are 1209, 1336, 1477, and 1633 Hz. The frequencies generated on pressing different
phone keys are shown in the Table 1.

Button Low Frequency(Hz) High Frequency(Hz)

1 697 1209
2 697 1336
3 697 1477
4 770 1209
5 770 1336
6 770 1477
7 852 1209
8 852 1336
9 852 1477
0 941 1209
* 941 1336
# 941 1477

Table 2.2 Frequencies generated on Key presses

Each row and column of the keypad corresponds to a certain tone and creates a specific
frequency. Each button lies at the intersection of the two tones as shown in Table2.

1 2 3 697
4 5 6 770
7 8 9 852
* 0 # 941
1209 1336 1477 Frequency (Hz)

Table 2.3 Row and Column Frequency Correspondence

Page 24
When a button is pressed, both the row and column tones are generated by the telephone
instrument. These two tones will be unique and different from tones of other keys. So, whenever
we say that there is a low and high frequency associated with a button, it is actually the sum of
two waves is transmitted. When you press a button in the telephone set keypad, a connection is
made that generates a resultant signal of two tones at the same time. These two tones are taken
from a row frequency and a column frequency. The resultant frequency signal is called "Dual
Tone Multiple Frequency". These tones are identical and unique.
A DTMF signal is the algebraic sum of two different audio frequencies, and can be expressed as
f(t) = A0sin(2**fa*t) + B0sin(2**fb*t) + ........... ------->(1)

Where fa and fb are two different audio frequencies with A and B as their peak amplitudes and f
as the resultant DTMF signal. fa belongs to the low frequency group and fb belongs to the high
frequency group.
Each of the low and high frequency groups comprise four frequencies from the various keys
present on the telephone keypad; two different frequencies, one from the high frequency group
and another from the low frequency group are used to produce a DTMF signal to represent the
pressed key.
The amplitudes of the two sine waves should be such that

(0.7 < (A/B) < 0.9)V -------->(2)

The frequencies are chosen such that they are not the harmonics of each other. When you send
these DTMF signals to the telephone exchange through cables, the servers in the telephone
exchange identifies these signals and makes the connection to the person you are calling.

Page 25

1) Power Supply-
The microcontroller and other devices get power supply from AC to DC adapter through 7805, 5
volts regulated output. Also the output voltage will be 12V DC regulated due to 7812 IC. The
7805/7812 voltage regulators are used to convert 12 V to 5V/12V DC.

AC/DC Regulator Filter 5v DC

AC Power Adapter (7805) DC

AC/DC Regulator 12v

Filter 12v DC
AC Power Adapter (7812) DC

Fig: Block Diagram of Power Supply

1) Microcontroller (ATmega8L)
The Atmel AVR core combines a rich instruction set with 32 general purpose working registers
.All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers .The ATmega8 provides the following features: 8
Kbytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes of
EEPROM, 1 Kbyte of SRAM, 23 general purpose I/O lines, general purpose working registers,
three flexible Timer/Counters with compare modes, internal and external interrupts, a serial
programmable USART, a byte oriented Two wire Serial Interface, a 6-channel ADC (eight
channels in TQFP and QFN/MLF packages) with

Page 26
10-bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port,and
five software selectable power saving modes. The Idle mode stops the CPU while allowing the
SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The
Powerdownmode saves the register contents but freezes the Oscillator, disabling all other chip
functions until the next Interrupt or Hardware Reset. In Power-save mode, the asynchronous timer
continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC, to minimize switching noise during ADC conversions. In Standby
mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This
allows very fast start-up combined with low-power consumption .The device is manufactured
using Atmels high density non-volatile memory technology. The Flash Program memory can be
reprogrammed In-System through an SPI serial interface, by conventional non-volatile memory
programmer, or by an On-chip boot program running on the AVR core. The boot program can use
any interface to download the application program in the Application Flash memory. Software in
the Boot Flash Section will continue to run while the Application Flash Section is updated,
providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System
Self-Programmable Flash on a monolithic chip, the AtmelATmega8 is a powerful microcontroller
that provides a highly-flexible and cost-effective solution to many embedded control applications.
The ATmega8 is supported with a full suite of program and system development tools, including
C compilers, macro assemblers, program simulators, and evaluation kits.

Page 27
DTMF Decoder IC 8870


The M-8870 is a full DTMF Receiver that integrates both band split filter and decoder
functions into a single 18-pin DIP or SOIC package. Manufactured using CMOS process
technology, the M-8870 offers low power consumption (35 mW max) and precise data
handling. Its filter section uses switched capacitor technology for both the high and low
group filters and for dial tone rejection. Its decoder uses digital counting techniques to detect
and decode all 16 DTMF tone pairs into a 4-bit code. External component count is minimized
by provision of an on-chip differential input amplifier, clock generator, and latched tri-state
interface bus. Minimal external components required include a low-cost 3.579545MHz color
burst crystal, a timing resistor, and a timing capacitor. The M-8870-02 provides a power-
down option which, when enabled, drops consumption to less than 0.5mW.


Low Power Consumption

Adjustable Acquisition and Release Times
Central Office Quality and Performance
Power-down and Inhibit Modes (-02 only)
Inexpensive 3.58 MHz Time Base
Single 5 Volt Power Supply
Dial Tone Suppression

Page 28
Pin diagram of 8870 IC

Each key press at transmitter end reflects as a BCD value Q1Q2Q3Q4 at the outputs of 8870
DTMF decoder. The corresponding values are given in Table 3.3

Page 29
Figure 3.3 Logic tables of 8870

The resistance are heat dissipating elements and in the electronic circuits they are mostly used for
either controlling the currents in the circuit or developing a voltage drop across it which could be
utilized for many application there are various types of resistance's which can be classified
according to a number of factors depending upon:-

-Material used for fabrication of resistance.

-Wattage an physical size.
-Intended application.
-Ambient temperature rating.

Cost basically the resistor can be splinted in to the following four parts with the construction view
point (1) Base (2) Resistance element (3) Terminals (4) Protective means. The following
characteristics are inherent in all resistance's or may be controlled by design considerations and
choice of material I.e. Temperature co-efficient Voltage co-efficient of resistance high frequency

Page 30
characteristics power rating and reseating tolerance voltage rating of Resistors Resistance's may
be classified as:

(1) Fixed (2) Semi variable and (3) Variable resistance we have used carbon resistance.
Resistors and resistive networks are extensively used in electronic circuits and measurement
work. The foremost properties of material used in the construction of resistors meant for precision
work are stability or performance with time temperature co efficient, low thermoelectric emf.
With copper high resistively resistance to oxidation corrosion and moisture case of manufacture
and low cost.

Material Used for Resistors:-

The most widely used material for precision resistors are:


It is an alloy of copper manganese and nickel and is universally used as resistance material for
precision resistors and for resistance measuring apparatus. It has a normal composition of 84%
copper 12% manganese and 4% nickel. The foremost property of managing is that it has almost a
zero temperature coefficient of resistance near about room temperature.

These are series of alloy of nickel & copper containing 40 to 60 percent nickels, with a small
amount of manganese to improve their mechanical properties. Constantine has a resistively at
ordinary temperature of about 2 times that of copper is corrosion resistant inexpensive & easy to
work. It also finds application is resistors of 1000 & above as in voltmeter multipliers.

Nickel Chromium Alloys

These alloy have a somewhat higher temperature coefficient of resistance than that of managing
and Constantine these alloys cannot be uses in precision resistance Nichimo has a very high
resistively and resists corrosion even at very high temperature.

Page 31
Gold Chromium
It is an alloy of recent introduction which appears to be very promising for some application it is
made with slightly over 2 percent of chromium. For many applications the extremely small
temperature coefficient of gold chromium alloys make their use desirable especially for heat
resistant standard.
Resistance Wires
The resistance wire is generally double silk of silk and cotton covered. The wire is enameled
before these coating are applied. High quality resistors are wound with only layer of wire
although this requires use of smaller wire than for multi layer coils. Resistance with a wide range
of values is extensively used in electrical and electronic circuits. A colour code is used to indicate
the resistance value and its percentage reliability. The resistor has a set of concentric rings to tit
with their significance. The first two bands from the end indicate the first two significant figures
of resistance is ohms the third band indicates the decimals multiplies and the last band stands for
the tolerance in about the indicated value.

Capacitors store electric charge. They are used with resistors in timing circuit because it takes
time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as
a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC
(changing) signals but they block DC (constant) signals.

This is a measure of a capacitor's ability to store charge. A large capacitance means that more
charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very large, so
prefixes are used to show the smaller values.
Three prefixes (multipliers) are used, (micro), n (nano) and p (Pico):
means 10-6 (millionth), so 1000000F = 1F

Page 32
n means 10-9 (thousand-millionth), so 1000nF = 1F
p means 10-12 (million-millionth), so 1000pF = 1nF
Capacitor values can be very difficult to find because there are many types of capacitor with
different labeling systems!

Fig : Capacitor Circuit symbol


It is s two terminal devices consisting of a P-N junction formed either in GE or SI crystal. The P
and N type regions are referred to as anode and cathode respectively. Commercially available
diodes usually have some means to indicate which lead is P and which lead is N. Standard
notations consists the number proceeded by IN such as In 240 & 250. Here 240 and 250
correspond to color band. Diodes are polarized, which means that they must be inserted into the
PCB the correct way round. This is because an electric current will only flow through them in one
direction (like air will only flow one way through a tyre valve).Diodes have two connections, an
anode and a cathode. The cathode is always identified by a dot, ring or some other mark

Page 33
Fig : Diode Polarity Symbol

The pcb is often marked with a + sign for the cathode end. Diodes come in all shapes and sizes.
They are often marked with a type number. Detailed characteristics of a diode can be found by
looking up the type number in a data book. If you know how to measure resistance with a meter
then test some diodes. A good one has low resistance in one direction and high in the other. There
are specialized types of diode available such as the zener and light emitting diode (LED).

Fig : Some Diode Circuit Symbols


The light emitting diode (LED) is commonly used as an indicator.

It can show when the power is on, act as a warning indicator, or be part of trendy jewelry etc. It
needs to be fed from a DC supply, with the anode positive and the cathode negative, as shown in
the diagram. To calculate the value of the series resistor we need to know the diode forward
voltage and current and its connections. The necessary data can be obtained from a catalogue or
data book. In our example it is 2 volts and 20mA (0.02amps). The cathode lead is the one nearest
a "flat" on the body. Since the voltage across the diode is 2 volts and the battery voltage is 12
volts, then the voltage across the resistor is 12-2 = 10 volts .The diode is in series with the
resistor, so the current through then both is the same, 0.02 amps. We now know the voltage
across, and the current through the resistor. From Ohm's Law we can now calculate the value of

Page 34
the resistor. Resistance = Volts divided by Amps = V/I = 10/0.02 =500 ohms. Since this is not a
standard value we can use a 470 or 560 ohm resistor as this application is not critical of values.

Fig Circuit Diagram Of LED


The relay consists of three basic elements. An actuating or exciting coil Mechanical linkage to
transfer the exciting /de-excitation of the coil output.

Contact switching.
It consists of a coil wound over a magnetic core or rod. One face of the core is attached to a base
plate that is extenuated to the other face of the coil. A movable plate extending to the open face of
the core is attached to the base plate such that a small gap remains between the movable plate and
the core. The movable contacts are attached to this plate. The fixed contacts constructed opposite
to the moving contacts. Suitable gap is maintained between the two contacts. The contact
arrangement is such that when the movable plate is in contact with the core face the contact gets
closed. The coil when energized products magnetic field in the core.
The open face becomes a pole of the electromagnet and attracts the movable plate. The movable
place comes in contact of the pole face and is held firmly there as the magnetic circuit remains

Page 35
close through the base plate. The contact attached to the movable plate is now firmly held to the
fixed contacts. Thus actuation of the coil causes the normally open contacts to close.
The normally closes contacts are placed in such a way that they remain closed when the coil is
not energized and get open upon actuation of the coil. A spring is fitted to the movable plate that
brings the movable plate and the contacts back to their original position when the coil is


There are a variety of devices which are classed as output devices and are therefore commonly
called Actuators. Actuators convert an electrical signal into a corresponding physical quantity
such as movement, force, sound etc. Actuators can also be considered as either Binary or
Continuous devices based upon the number of stable states their output has. For example, A relay
is a Binary Actuator as it has two stable states, latched and unlatched while a motor is a
Continuous Actuator. The most common types of actuators or output devices are Relays, Lights,
Motors and Loudspeakers and in this tutorial we will look at a Electromechanical Relays and
Solid State Relays.

Electro-mechanical Relay-
The term Relay generally refers to a device that provides an electrical connection between two or
more points in response to the application of a control signal. The most common and widely used
type of relay is the Electromechanical Relay or EMR. Relays are basically electrically operated
switches that come in many shapes, sizes and power ratings suitable for all types of applications
but in this section we are just concerned with the fundamental operating principles of "light duty"
electromechanical relays. Such relays are used in general electrical and electronic control or
switching circuits either mounted directly onto PCB boards or connected free standing and in
which the load currents are normally fractions of an Ampere up to 20+ Amperes.
As their name implies, Electromechanical Relays are Electro-Magnetic devices that convert a
magnetic flux generated by the application of an electrical control signal either AC or DC current,
into a pulling mechanical force which operates the electrical contacts within the relay. The most
common form of electromechanical relay consist of an energizing coil called the "Primary
Circuit" wound around a permeable iron core. It has both a fixed portion called the Yoke, and a

Page 36
moveable spring loaded part called the Armature, that completes the magnetic field circuit by
closing the air gap between the fixed electrical coil and the moveable armature. This armature is
hinged or pivoted and is free to move within the generated magnetic field closing the electrical
contacts that are attached to it. Connected between the yoke and armature is normally a spring (or
springs) for the return stroke to "Reset" the contacts back to their initial rest position when the
relay coil is in the "de-energized" condition, ie. turned "OFF".
Example of a simple low power electromechanical relay

Fig Electromechanical Relay

In our simple relay above, we have two sets of electrically conductive contacts. One pair which
are classed as Normally Open, (NO) or make contacts and another set which are classed as Normally
Closed, (NC) or break contacts. These terms "Normally Open, Normally Closed" or "Make and Break
Contacts" refer to the state of the electrical contacts when the relay coil is "de-energized", i.e., no
supply voltage connected to the coil. An example of this arrangement is given below.

Page 37
Fig Relay Contact Tips
For example- If the contacts are passing a load current of say 10A, then the voltage drop across
the contacts using Ohms law is 0.2 x 10 = 2 volts. As the contact tips begin to wear, and if they
are not properly protected from high inductive or capacitive loads, they will start to show signs of
arcing damage as the circuit current still wants to flow as the contacts open. This arcing or
sparking will cause the contact resistance of the tips to increase as the contact tips become
damaged. If allowed to continue the contact tips may become so burnt and damaged to the point
were they are physically closed but do not pass any or very little current. If this arcing damage
becomes to severe the contacts will eventually "weld" together producing a short circuit condition
and possible damage to the circuit they are controlling. If now the contact resistance has increased
due to arcing to say 1's the volt drop across the contacts for the same load current increases to 1
x 10 = 10 volts dc. This high voltage drop across the contacts may be unacceptable for the load
circuit especially if operating at 12 or even 24 volts, then the faulty relay will have to be replaced.
To reduce the effects of contact arcing and high "On-resistances", modern contact tips are made
off, or coated with, a variety of Silver based alloys to extend their life as given in the following
Relay manufacturers data sheets give maximum contact ratings for resistive d.c. loads only and
this rating is greatly reduced for either AC loads or highly inductive or capacitive loads. In order
to achieve long life and high reliability when switching AC currents with inductive or capacitive
loads some form of arc suppression or filtering is required across the relay contacts. This is
achieved by connecting a RC Snubber network in parallel with the contacts. The voltage peak,
which occurs at the instant the contacts open, will be safely short circuited by the RC network,
thus suppressing any arc generated at the contact tips. For example.
Table- Characteristics Contact Material


Electrical and thermal conductivity are the highest of all metals,

exhibits low contact resistance, is inexpensive and widely used.
(fine silver)
Contacts tarnish through sulphur influence.

AgCu "Hard silver", better wear resistance and less tendency to weld,
(silver copper) but slightly higher contact resistance.

Page 38
AgCdO Very little tendency to weld, good wear resistance and arc
(silver cadmium oxide) extinguishing properties.

Hardness and melting point are high, arc resistance is excellent.

Not a precious metal .High contact pressure is required. Contact
(silver tungsten)
resistance is relatively high, and resistance to corrosion is poor.

AgNi Equals the electrical conductivity of silver, excellent arc

(silver nickel) resistance.

Low contact wear, greater hardness. Expensive.
(silver palladium)

Platinum, gold and Excellent corrosion resistance, used mainly for low-current
silver alloys circuits.

Fig Relay Snubber Circuit


As well as the standard descriptions of Normally Open, (NO) and Normally Closed, (NC) used to
describe how the relays contacts are connected, relay contact arrangements can also be classed by
their actions. Electromechanical relays are made up of one or more individual switches with each
"switch" being referred to as a Pole. Each one of these switches or poles can be connected or
"thrown" together by energizing the relays coil and this gives rise to the description of the contact
types as:

Page 39
SPST - Single Pole Single Throw
SPDT - Single Pole Double Throw
DPST - Double Pole Single Throw
DPDT - Double Pole Double Throw
With the action of the contacts being described as "Make" (M) or "Break" (B). Then a simple
relay with one set of contacts as shown above can have a contact description of:
"Single Pole Double Throw - (Break before Make)", or SPDT - (B-M).Examples of just some of
the more common contact types for relays in circuit or schematic diagrams is given below but
there are many more possible configurations.


Fig 7.11 Relay Contact Configuration

One final point to remember, it is not advisable to connect relay contacts in parallel to handle
higher load currents. For example, never attempt to supply a 10A load with two relays in parallel
that have 5A contact ratings each as the relay contacts never close or open at exactly the same
instant of time, so one relay contact is always overloaded. While relays can be used to allow low
power or computer type circuits to switch a relatively high currents or voltages both "ON" or
"OFF". Never mix different load voltages through adjacent contacts within the same relay such as
for example, High Voltage AC (240v) and low voltage DC (12v), always use separate relays.

Page 40
One of the more important parts of any relay is the coil. This converts electrical current into an
electromagnetic flux which is used to operate the relays contacts. The main problem with relay
coils is that they are "highly inductive loads" as they are made from coils of wire. Any coil of wire
has an impedance value made up of Resistance R and Inductance L in series (AC Circuit Theory).
As the current flows through the coil a self induced magnetic field is generated around it. When
the current in the coil is turned "OFF", a large back EMF (Electromotive Force) voltage is
produced as the magnetic flux collapses within the coil (Transformer Theory). This induced
reverse voltage value may be very high in comparison to the switching voltage, and may damage
any semiconductor device such as a transistor, FET or microcontroller connected to the coil and
used to control the relay.

Fig- Relay Coil Connection

One way of preventing damage to the transistor is to connect a reverse biased diode across the
relay coil. When the current flowing through the coil is switched "OFF", an induced back EMF is
generated as the magnetic flux collapses in the coil. This reverse voltage forward biases the diode
which conducts and dissipates the stored energy preventing any damage to the semiconductor

When used in this type of application the diode is generally known as a "Flywheel Diode". Other
types of inductive loads which require a flywheel diode for protection are solenoids and mot

Page 41
As well as using Flywheel Diodes for protection of semiconductor components, other devices
used for protection include RC Snubber Networks, Metal Oxide Varistors or MOV and Zener


A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a regularly
ordered, repeating pattern extending in all three spatial dimensions.
Almost any object made of an elastic material could be used like a crystal, with appropriate
transducers, since all objects have natural resonant frequencies of vibration. For example, steel is
very elastic and has a high speed of sound. It was often used in mechanical filters before quartz.
The resonant frequency depends on size, shape, elasticity, and the speed of sound in the material.
High-frequency crystals are typically cut in the shape of a simple, rectangular plate. Low-
frequency crystals, such as those used in digital watches, are typically cut in the shape of a tuning
fork. For applications not needing very precise timing, a low-cost ceramic resonator is often used
in place of a quartz crystal. When a crystal of quartz is properly cut and mounted, it can be made
to distort in an electric field by applying a voltage to an electrode near or on the crystal. This
property is known as piezoelectricity. When the field is removed, the quartz will generate an
electric field as it returns to its previous shape, and this can generate a voltage.
Quartz has the further advantage that its elastic constants and its size change in such a way that
the frequency dependence on temperature can be very low. The specific characteristics will
depend on the mode of vibration and the angle at which the quartz is cut. Therefore, the resonant
frequency of the plate, which depends on its size, will not change much, either.


PCB Artist for PCB Design

Keil uv3 IDE- The programming of microcontroller will be done in C on Keil uv3 IDE (which
will act as a source code editor). C51 compiler and BL51 linker will be used to generate the
hex file.

Page 42
Flash Magic This is a flasher tool which will be used to program the hex file in the

Installing coding into microcontroller:

1. Write the program in C language.

2. Save the file as *.c. and compile it.

3. After successful compilation of the coding close the KEIL IDE.

4. Fix the Controller IC into Flash kit.

5. Then click on Micro controller Micro Systems Flash Software Icon on the desktop.

6. It displays on dialog box. Then select open and select the program which we
already saved as *.c.

7. Then it asks the Confirmation that The IC is empty, select ok.

8. Then it asks Fuses Settings, select YES

9. Then it displays Fuses Settings Dialog Box.

10. In that put WDT -- > Disabled, WRT-- > Enabled, Oscillator-- > XT then click on OK.

11. Then it displays the Program successfully installed into uC.

Then Remove the IC from the uC Flash and it is ready for used into the project or
circuit operation.

This program was created by the
Code Wizard AVR V3.03 Evaluation
Automatic Program Generator

Project: DTMF Controlled home appliance system

Version: v 2.1.101
Date : 20/05/2016

Page 43
Company: Techno projects

Chip type : ATmega8L

Program type : Application
AVR Core Clock frequency: 1.000000 MHz
Memory model : Small
External RAM size :0
Data Stack size : 256

#include <mega8.h>

// Declare your global variables here

void main(void)
// Declare your local variables here

// Input/Output Ports initialization

// Port B initialization
// Function: Bit7=In Bit6=In Bit5=In Bit4=Out Bit3=Out Bit2=Out Bit1=Out Bit0=In
DDRB=(0<<DDB7) | (0<<DDB6) | (0<<DDB5) | (1<<DDB4) | (1<<DDB3) | (1<<DDB2) | (1<<DDB1)
| (0<<DDB0);
// State: Bit7=T Bit6=T Bit5=T Bit4=0 Bit3=0 Bit2=0 Bit1=0 Bit0=T
PORTB=(0<<PORTB7) | (0<<PORTB6) | (0<<PORTB5) | (0<<PORTB4) | (0<<PORTB3) |
(0<<PORTB2) | (0<<PORTB1) | (0<<PORTB0);

// Port C initialization
// Function: Bit6=In Bit5=In Bit4=In Bit3=In Bit2=In Bit1=In Bit0=In
DDRC=(0<<DDC6) | (0<<DDC5) | (0<<DDC4) | (0<<DDC3) | (0<<DDC2) | (0<<DDC1) |
// State: Bit6=T Bit5=T Bit4=T Bit3=T Bit2=T Bit1=T Bit0=T
PORTC=(0<<PORTC6) | (0<<PORTC5) | (0<<PORTC4) | (0<<PORTC3) | (0<<PORTC2) |
(0<<PORTC1) | (0<<PORTC0);

// Port D initialization
// Function: Bit7=In Bit6=In Bit5=In Bit4=In Bit3=In Bit2=In Bit1=In Bit0=In
DDRD=(0<<DDD7) | (0<<DDD6) | (0<<DDD5) | (0<<DDD4) | (0<<DDD3) | (0<<DDD2) |
(0<<DDD1) | (0<<DDD0);
// State: Bit7=T Bit6=T Bit5=T Bit4=T Bit3=T Bit2=T Bit1=T Bit0=T
PORTD=(0<<PORTD7) | (0<<PORTD6) | (0<<PORTD5) | (0<<PORTD4) | (0<<PORTD3) |
(0<<PORTD2) | (0<<PORTD1) | (0<<PORTD0);

// Timer/Counter 0 initialization

Page 44
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=(0<<CS02) | (0<<CS01) | (0<<CS00);

// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer1 Stopped
// Mode: Normal top=0xFFFF
// OC1A output: Disconnected
// OC1B output: Disconnected
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=(0<<COM1A1) | (0<<COM1A0) | (0<<COM1B1) | (0<<COM1B0) | (0<<WGM11) |
TCCR1B=(0<<ICNC1) | (0<<ICES1) | (0<<WGM13) | (0<<WGM12) | (0<<CS12) | (0<<CS11) |

// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
TCCR2=(0<<PWM2) | (0<<COM21) | (0<<COM20) | (0<<CTC2) | (0<<CS22) | (0<<CS21) |

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=(0<<OCIE2) | (0<<TOIE2) | (0<<TICIE1) | (0<<OCIE1A) | (0<<OCIE1B) | (0<<TOIE1) |

Page 45
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
MCUCR=(0<<ISC11) | (0<<ISC10) | (0<<ISC01) | (0<<ISC00);

// USART initialization
// USART disabled
UCSRB=(0<<RXCIE) | (0<<TXCIE) | (0<<UDRIE) | (0<<RXEN) | (0<<TXEN) | (0<<UCSZ2) |
(0<<RXB8) | (0<<TXB8);

// Analog Comparator initialization

// Analog Comparator: Off
// The Analog Comparator's positive input is
// connected to the AIN0 pin
// The Analog Comparator's negative input is
// connected to the AIN1 pin
ACSR=(1<<ACD) | (0<<ACBG) | (0<<ACO) | (0<<ACI) | (0<<ACIE) | (0<<ACIC) | (0<<ACIS1) |

// ADC initialization
// ADC disabled
ADCSRA=(0<<ADEN) | (0<<ADSC) | (0<<ADFR) | (0<<ADIF) | (0<<ADIE) | (0<<ADPS2) |
(0<<ADPS1) | (0<<ADPS0);

// SPI initialization
// SPI disabled
SPCR=(0<<SPIE) | (0<<SPE) | (0<<DORD) | (0<<MSTR) | (0<<CPOL) | (0<<CPHA) | (0<<SPR1) |

// TWI initialization
// TWI disabled
TWCR=(0<<TWEA) | (0<<TWSTA) | (0<<TWSTO) | (0<<TWEN) | (0<<TWIE);

while (1)
if(PIND.5==0 && PIND.6==0 && PIND.7==0 && PINB.0==1)

if(PIND.5==0 && PIND.6==1 && PIND.7==0 && PINB.0==0)


if(PIND.5==0 && PIND.6==0 && PIND.7==1 && PINB.0==0)


Page 46
if(PIND.5==0 && PIND.6==1 && PIND.7==0 && PINB.0==1)

if(PIND.5==0 && PIND.6==0 && PIND.7==1 && PINB.0==1)


if(PIND.5==0 && PIND.6==1 && PIND.7==1 && PINB.0==0)


if(PIND.5==0 && PIND.6==1 && PIND.7==1 && PINB.0==1)


if(PIND.5==1 && PIND.6==0 && PIND.7==0 && PINB.0==0)


if(PIND.5==1 && PIND.6==0 && PIND.7==0 && PINB.0==1)

PORTB.1=1, PORTB.2=1, PORTB.3=1, PORTB.4=1;

if(PIND.5==1 && PIND.6==0 && PIND.7==1 && PINB.0==0)

PORTB.1=0, PORTB.2=0, PORTB.3=0, PORTB.4=0;

Page 47

1). First Check all the components as per the circuit.

2). Check transistor.

3). Pay proper attention to the polarity of the capacitor & diodes while assembling.

4). While mounting transistor be sure that you have connected collector, emitter & base properly.

5). Clean PCB after soldering so those components do not short.

6). Remember the anode & cathode of diode before fitting.

7). Remember to check dry soldering & short circuit.

8). IC should be mounted on IC base.

9). Tack care in wiring the circuit to avoid loose connection.

10). Check for print short after soldering.

11). Please use resistance of the exact value as given in the circuit.

12). Check primary & secondary winding of the transformer before connecting.

13). The insulation of the wire inside the modes should be of good quality.

Page 48

Home Automation

Office Automation

Weather Monitoring

Temperature Updates

Device Synchronization

Industrial Sensor Processing


Since, it is very easy to upgrade as per the requirement, finds a wide range of applications in the
areas of industrial automation, Office Automation, Industrial automation, to control water pump
sets in agricultural fields. The security system can be employed in household or any organization,
monitoring and controlling of devices using GSM.

Page 49


1) Electronic devices and circuit theory

2) Electronic projects.

3) Microelectronic circuits.

4) Electronic for you.



2) www.nationalsemiconductor .com





Page 50

1. Introduction to the embedded system Raj kamal,TMS,2002

2. The 8051 microcontroller and embedded systems-Mazidi and Mazidi,PHI,2000
3. Microcontroller (theory & application)- A.V. Deshmukh,WTMH,2005

Page 51