04/24/2012
FINAL REPORT
TERM PROJECT TELECOMMUNICATION
NETWORK BASED DESIGN
PRESENTED BY:
MUHAMMAD NOUMAN
(040069)
MUHAMMAD IRFAN
(040066)
TAIMUR ZAIDI
(040095)
USMAN KHALID
(040104)
PRESENTED TO:
SIR SHAID ABBASI
DATE OF SUBMISSION:
28TH APRIL 2008
AIR UNIVERSITY ISLAMABAD
TABLE OF CONTENTS
S.NO CAPTION PAGE NO
01.
INTRODUCTION (PRELUDE)
03
02.
BLOCK DIAGRAM
05
03.
CIRCUIT DIAGRAM
06
04.
SOFTWARE DEMONSTRATION
7
05.
USES & FINAL WORD
7
INTRODUCTION
This project describes the development of a system to interface the telephone line with a micro controller. Using this interface any device can be controlled using a telephone or cell phone. The system involves the use of DTMF tones commonly used in telephone networks.
DTMF Tones
Dual-Tone Multi-Frequency (DTMF) signaling is used for telephone signaling over the line in the voice-Frequency band to the call switching center. These are the tones you hear when you dial a touch-tone phone.
The standard DTMF keypad is laid out in a 4×4 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key will send a sinusoidal tone of the two frequencies at the same time, the lower frequency for the row of the pressed key and the higher tone for the column. These tones are then decoded at the receiving end to determine which key was pressed. The use of two tones for a single key ensures that no two keys will generate the same signal. There are 16 possible tone sets but only 12 are used on common telephones.
DTMF Keypad Frequencies
1209Hz 1336Hz 1477Hz 1633Hz
697Hz 1 2 3 A
770Hz 4 5 6 B
852Hz 7 8 9 C
941Hz * 0 #
Components used
The Design is created in such a way that it acts as a most general part of Phone to Controller interface and is also pretty simple to use. So that’s why the circuit is kept quite simple and hence it is cost effective. Few components, which are used in the circuit, are explained below with their functionality and role in the circuit.
MD 8870D Integrated DTMF Receiver
MD 8870D is a DTMF decoder. It is attached at the Phone Line and it is Designed in such a way that it can sense the dial tone from the keypad and convert it to 4 bit binary data which can be used to create 16 logical instructions. So this IC is of great importance and can be used frequently in controlling the device from great distance even you can control device from any part of the world where you have communication device like mobile and telephone. The main beauty of this IC is that it can interrupt and programmable controller by using its pin called “STD” pin. When any valid tune is detected the std pin becomes active and 5V is appeared at it and this can be programmed for interrupting micro controller to get data and perform some logical operations. I.e.
Turning on Device number 1 according to its logic. Logical table of DTMF is given below.
Functional Decode Table of CMD8870
Digit (DTMF Tone) Q1 Q2 Q3 Q4
Any Z Z Z Z
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
0 1 0 1 0
* 1 0 1 1
# 1 1 0 0
A 1 1 0 1
B 1 1 1 0
C 1 1 1 1
D 0 0 0 0
The functioning circuit of DTMF is given below.
vcc
IC7805:
The IC 7805 is a linear voltage regulator. It provides a constant +5 voltage in spite of the variations in the incoming voltage.
BC108:
BC108 NPN transistor is used as a switch to amplify the current from the CMD8870 and operate the latching relay.
89C51 MICROCONTROLLER:
This is a 8051 family microcontoller. It is used to control devices according to programmed logic.
In this project it is used to manipulate the data coming from DTMF decoder and according to that information it controls the devices. Almost any device can be controlled by this method.
BLOCK DIAGRAM
As it is quite clear from the block diagram that the input coming from the telephone line has some sort of Dc components in it to limit them we use a series RC circuit. After this DTMF decoder is used which gets the input data and sense it and produced 4 bit data, which is amplified and given to micro controller which performs some logical operations and controls the devices according to input data. This is how this circuits works.
The output of DTMF decoder is very low because the chip CMD 8870D has very low power consumption so it is obvious that the output power level, which is produced by it, is also low. Low output power means that the current of output of CND 8870D is very low and this current cannot be sensed by microcontroller and so no logical decision an be made by microcontroller. So for that purpose we use transistors to amplify the current so that microcontroller can sense the input and perform appropriate decisions. The circuit diagram, which is used in this project, is given below.
CIRCUIT DIAGRAM
Circuit diagram is given below
In the circuit above the power supply is also shown which consists on a 5V regulator.
SOFTWARE DEMONSTRATION
Any compiler can be used for 89c51. We used Keil compiler and the code is in assembly language and a very simple code is used for this. We are controlling just four devices this code is also used for controlling 16 devices. The code is given below.
CODE
Org 000h ;Mocrocontroller will go to this memory location at reset or power on
Mov p1, ;making port1 and port3 as input ports
Mov p3,
Ljmp main ;by passing interrupt vector table
Org 0013h ;external interrupt 1 location
Mov p2,
Jb p0.0,Pro1
Jb p0.1,Pro2
Jb p0.2,Pro3
Jb p0.3,Pro4
Pro1:
Setb p2.0
Sjmp nd
Pro2:
Setb p2.1
Sjmp nd
Pro3:
Setb p2.2
Sjmp nd
Pro4:
Setb p2.3
Sjmp nd
nd:
Reti ;returning from interrupt
Org 30h
Main:
Mov IE, ;enabling interrupts
Here:
Sjmp here
end
USES & FINAL WORD
As from the above discussion one may becomes familiar that how much worthy this circuit is by using this circuit you can control any possible device of the world.
THANKS