Professional Documents
Culture Documents
INTRODUCTION
Long distance computer communication has become a challenge of the
present day technology. Recently these computer communication networks are also
termed as information networks. Presently there are many information services for
But there could be a situation where the terminal from which we want to
down load or upload few lines or files or say information, may be “OFF” from the
mains. Thus all the technologies are failed. And this is, where our project “Telephone
placed anywhere in the world ), we have to put the mains “ON” and then communicates
require some circuitry which would receive commands on telephone line and can switch
The two major parts of the system are, the hardware configuration and
software design. In the subsequent section we will deal with each block as well as the
can switch the remote terminal ON/OFF without anybody being present at the remote
S.S.G.M.C.E., Shegaon. 1
Telephone Controlled Switch
controlling up to eight main powered loads with the aid of commands received via
telephone. Any tone-dialing (DTMF) telephone set or hand-held tone dialer may be
used to send commands to the switching unit and remotely control a wide range of
mains appliances in and around home, factories, industries etc. This system is designed
S.S.G.M.C.E., Shegaon. 2
Telephone Controlled Switch
S.S.G.M.C.E., Shegaon. 3
Telephone Controlled Switch
OPERATION:
The circuit is connected to the telephone network just like any normal
telephone set. On being called, the circuit waits for predetermined number of ring
signals and then answers the call (electrically it lifts the receiver). Next it waits for
preprogrammed system access code, which the caller must transmit with the DTMF
virtue of relays, high voltage and currents may be switched, so that loads may include
mains powered ones. Reception of correct system access code is acknowledged with a
UNITS OF TCS :
opto-coupler, Voltage and some other components. The main function of this unit is to
detect a ringing signal and rectifies it. This rectified signal interrupts controller.
Switching Unit: -
The switching unit consists of a double pole double throw relay the .
This unit switches the in coming Telephone line to the DTMF decoder after call is
detected.
S.S.G.M.C.E., Shegaon. 4
Telephone Controlled Switch
from the tone pair and generates a 4-bit code recording to the received input. These 4-
This unit is the heart of all the circuitry. The unit controls all the
Driver Unit :-
This unit consists of driver transistor and current limiting resistor. These
transistors switches ON & OFF & controls the corresponding relays ON & OFF. This
Relay Unit: -
This unit consists of 7 relays ( single pole double through ) (12 v/2
Sov/5A). These relays are driver ON or OFF by driver unit & thus it switches the mains
line ON or OFF & thus the load. The relay having different rating can be used
based on fixed voltage regulators. The 12 V & 5V supply Voltages used for the relay
S.S.G.M.C.E., Shegaon. 5
Telephone Controlled Switch
section & digital sections respectively are derived from a single mains transformer with
WORKING :
The incoming call is detected by the ring detector unit, during this period
the relay in switching unit is OFF. When the call is detected, the ring detector unit gives
the U controller unit a logic low pulse. As per the time delay specified in the U
controller programming, micro controller waits for about 15-20 seconds. During this
period if anyone pick-up the hand set of telephone set, U controller stops working and
telephone set can be used in usual way. If no one pick up hand set then U controller
unit gives the logic high pulse to the switching unit, thus the relay in the switching unit
is made ON & thus the incoming telephone line is connected to the DTMF decoder.
The DTME recorder receives the signals from the line and converts it into equivalent 4
bit code. These codes are given to the U controller unit. The U controller unit uses
these code to perform required operation using the software from the memory unit.
When a line on the port 2 goes low the driver transistor is switched OFF and thus the
corresponding relay and the load. If the line on Port 2 is made logic high, the
corresponding driver transistor is switched ON and thus the relay and the load.
Thus the TCS can be used to switch the mains ON and OFF from a
remote location.
S.S.G.M.C.E., Shegaon. 6
Telephone Controlled Switch
S.S.G.M.C.E., Shegaon. 7
Telephone Controlled Switch
micro controller. The section sits between a telephone interface circuits and power
switching interface. An integrated DTMF decoder type M-8870 decodes the tone
One is detect ring signal that unables the unit to answer the call at the
right moment and another to receive and transmit via the telephone line.
to ringing section through relay contact RL5. Due to this, ringing signal of 120V a.c. is
rectified by diode full wave bridge rectifier circuit & d.c. is available across C4.
D4 connected to the telephone lines turns the ringing signal into pulsating direct voltage,
which is smoothed by C4 and limited to 15 V with the aid of Zener diode D. The direct
voltage across diode D supplies the LED in optocoupler IC. During the ringing signal,
controller IC interrogates the state of optocoupler O/P signal via. Port line p 3.3 and
micro controller counts time delay stored in software ( about 15 to 25 sec.). In that time
delay, if any one picks up the handset micro controller stops its working and telephone
set can be used as usual way. Otherwise, after the completion of time delay micro
S.S.G.M.C.E., Shegaon. 8
Telephone Controlled Switch
8870 and musical tone is generated by IC lim66. This musical tone heard by remote
location person indicates that micro controller is ready for ON/OFF the mains power of
any load.
DTMF 8870 IC can response only tone frequency not pulse frequency.
All command reach the unit via telephone line in the Form of DTMF codes generated
on telephone set with a tone dialing keypad. This received DTMF signals are
capacitively coupled to the decoder IC. The external components that enable the
M8870 DTMF decoder to operate reliably are limited to Four resistors, a capacitor and
a quartz crystal. The four decoder outputs Q1 – Q4 supply a bit pattern that corresponds
to the received DTMF number. This 4 bit DTMF code is applied to the micro controller
via port lines P1.0 to P1.3 and stored in register. After receiving the access code of the
device, micro controller compares this code with look up table feed in internal EE
PROM OF Micro controller IC. Accordingly, high or low signal is sent to the relay
POWER SUPPLY
+ DC
Transformer Rectifier Filter Regulator
~ _ O/P
S.S.G.M.C.E., Shegaon. 9
Telephone Controlled Switch
Since a power supply is vital part of all electronic system. It’s discussion
is necessary. Most digital IC’s including µcontroller and DTME ICS operate on +5V
supply and relays operate on 12V supply. So we are presenting the power supply design
down transformer is used to get 12 V supply. These o/p of secondary are given to
bridge rectifiers which converts sine i/p into full wave rectified o/p. The filler
capacitors at the o/p of bridge rectifiers are charged to the peak value of rectified o/p
voltage whenever the diodes are forward biased during entire cycle of i/p waveform, the
7805.
S.S.G.M.C.E., Shegaon. 10
Telephone Controlled Switch
excess of 1A.
Thus we are getting two power supply of +5V & +12 V from given
circuit design.
LIST OF COMPONENTS :
IC’s
IC1 → 89C51
IC2 → 8870
IC3 → MCT2E
IC4 → UM66
Crystal Oscillators
X1 → 12 MHz
X2 → 3.768 MHz
Transistors
Q6 → BC 547
Q5 → SL 100
S.S.G.M.C.E., Shegaon. 11
Telephone Controlled Switch
Resistors :
R7 → 7.9 KΩ
R6 → 7.9 KΩ
R12 → 39 KΩ
R13 → 62 KΩ
R18 → 100 KΩ
R19 → 300 KΩ
R1 → 10 KΩ
R11 → 680 KΩ
Capacitors :
C1 → 10 µF
C2, C3 → 22 pF
C5, C6 → 0.01 µF
C7, C8 → 0.1 µF
S.S.G.M.C.E., Shegaon. 12
Telephone Controlled Switch
2) Four 8 bit i/p o/p ports. Out of which we use one port to read output of DTMF
decoder and other ports is used to connect relay for operating devices through it.
regulator IC.
4) Internal 128 byte RAM to store temporary storage of data. In which we can feed
5) Two 16 bits timer / counter are present for timing and counting purpose.
controller with 4Kbytes of Flash programmable and erasable read only memory
(PEROM). This device is compatible with the industry standard 8051 instruction set and
pinout.
S.S.G.M.C.E., Shegaon. 13
Telephone Controlled Switch
In addition, the 8951 is designed with static logic for operation down to
zero frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt
system to continue functioning. The power Down Mode saves the RAM contents but
freezes the oscillator disabling all other chip functions until the next hardware reset.
S.S.G.M.C.E., Shegaon. 14
Telephone Controlled Switch
PIN DESCRIPTION
Vcc
Supply Voltage
Gnd
Ground
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port
each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
address/data bus during accesses to external program and data memory. In this mode P0
Port 0 also receives the code bytes during Flash programming, and
outputs the code bytes during program verification. External pull-ups are required
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The port 1
outputs buffers can sink/source four TTL inputs. When 1s are written to port 1 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins
that are externally being pulled low will source current (IIL) because of the internal
pullups.
S.S.G.M.C.E., Shegaon. 15
Telephone Controlled Switch
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The port 2
output buffers can sink / source four TTL inputs. When 1s are written to port 2 pins they
are pulled high by the internal pullups and can be used as inputs. As inputs, Port 2 pins
that are externally being pulled low will source current (IIL) because of the internal
pullups.
Port 2 emits the high-order address byte during fetches from external
program memory and during accesses to external data memory that use 16-bit addresses
(MOVX @ DPTR). In this application it uses strong internal pullups when emitting 1s.
During accesses to external data memory that use 8-bit addresses (MOVX @ RI). Port 2
Port 2 also receives the high order address bits and some control signals
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pullups. The port 3
output buffers can sink/source four TTL inputs. When 1s are written to port 3 pins they
are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins
that are externally being pulled low will source current (IIL) because of the pullups.
Port 3 also receives some control signals for flash programming and
verification.
S.S.G.M.C.E., Shegaon. 16
Telephone Controlled Switch
RST
Reset input. A high on this pin for two machines cycles while the
ALE/ PROG
Address Latch Enable output pulses for latching the low byte of the
address during accesses to external memory. This pin is also the program pulse input
frequency, and may be used for external timing or clocking purposes. Note, however
that one ALE pulse is skipped during each access to external Data Memory.
location BEH. With the bit set, ALE is active only during a MOVX or MOVC
instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no
PSEN
Cycle, except that two PSEN activations are skipped during each access
S.S.G.M.C.E., Shegaon. 17
Telephone Controlled Switch
EA /Vpp
the device to fetch code from external program memory locations starting at 0000H up
to FFFFH. Note, however, that if lock bit 1 is programmed. Ea will be internally latched
on reset.
This pin also receives the 12-volt programming enable voltage (Vpp)
XTAL1
Input to the inverting oscillator amplifies and input to the internal clock
operating circuit.
XTAL2
7 6 5 4 3 2 1 0
TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
S.S.G.M.C.E., Shegaon. 18
Telephone Controlled Switch
5 TF0 Timer 0 Overflow flag. Set when timer rolls from all 1s to 0.
Cleared when processor vectors to execute interrupt service
routine located at program address 000Bh.
4 TR0 Timer 0 run control bit. Set to 1 by program to enable timer to
count; cleared to 0 by program to halt timer.
Does not reset timer.
3 IE1 External interrupt 1 Edge flag. Set to 1 when a high-to-low edge
signal is received on port 3 pin 3.3 ( INT1 ).Clear when processor
vectors to interrupt service routine located at program address
0013h. Not related to timer operations.
2 IT1 External interrupt 1 signal type control bit. Set to 1 by program to
enable external interrupt 1 to be triggered by a falling edge
signal.
Set to 0 by program to enable a low-level signal on external
interrupt 1 to generate an interrupt.
1 IE0 External interrupt 0 Edge flag. Set to 1 when a high-to-low edge
signal is received on port 3 pin 3.2 ( INT0 ). Cleared when
processor vectors to interrupt service routine located at program
address 0003h. Not related to timer operations.
0 IT0 External interrupt 0 signal type control bit. Set to 1 by program to
enable external interrupt 0 to be triggered by a falling edge
signal.
Set to 0 by program to enable a low-level signal on external
interrupt 0 to generate an interrupt.
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 1 = 01H
7 6 5 4 3 2 1 0
EA - ET2 ES ET1 EX1 ET0 EX0
S.S.G.M.C.E., Shegaon. 19
Telephone Controlled Switch
DECODER IC 8870
In a day to day life, you normally come across telephone set. Previously,
in olden days, cross-bar and strowger exchange were used. But due to advancement in
DTMF signaling. Now-a-days DTMF type telephone sets are used world wide. The
1) DTMF offers a high dialing speed over, conventional rotary telephone sets.
S.S.G.M.C.E., Shegaon. 20
Telephone Controlled Switch
audible sounds you hear when you press keys on your phone.
and readily available with off-the-shelf, single-chip, low-cost components. For these
reasons DTMF is often used in remote control applications that typically use telephones
In DTMF there are 16 distinct tones. Each tone is the sum of two
frequencies: one from a low and one from a high frequency group. There are four
there are only 4 rows (R1, R2, R3 and R4) and 3 columns (C1, C2 and C3). The rows
and columns select frequencies from the low and high frequency group respectively.
S.S.G.M.C.E., Shegaon. 21
Telephone Controlled Switch
Each key is specified by its row and column locations. For example the
"2" key is row 0 (R1) and column 1 (C2). Thus using the above table, "2" has a
frequency of 770 + 1336 = 2106 Hz The "9" is row 2 (R3) and column 2 (C3) and has a
S.S.G.M.C.E., Shegaon. 22
Telephone Controlled Switch
You can see that the DTMF generated signal is very distinct and clear.
The horizontal axis is in samples. The frequency of the tone is about 1900 Hz - close to
OPTOCOUPLER IC MCT2E
Optocoupler basics :
sensitive device. Consequently, if the two devices are mounted close together in a single
light-excluding package so that the LED light can fall on the phototransistor face, as
shown in Figure 1, and the device is then connected into the circuit of Figure 2, it will
be found that the conduction current of Q1 can be controlled via the conduction current
S.S.G.M.C.E., Shegaon. 23
Telephone Controlled Switch
of the LED, even though the two devices are physically separated. Such a package is
known as an optocoupler, since the input (the LED) and the output (the phototransistor)
Fig. 1
developed across output resistor R2. When SW1, is closed, current flows through the
LED via R1, and the resulting light falls on Q, face, causing the phototransistor to
S.S.G.M.C.E., Shegaon. 24
Telephone Controlled Switch
Fig. 2
Note that the simple optically-coupled circuit of Fig 2 can be used with
digital input/output signals only, but that in practice the circuit can easily be modified
The most important point to note about the optocoupler device of Figure
1 is that a circuit connected to its input can be electrically fully isolated from the output
circuit, and that a potential difference of hundreds or thousands of volts can safely exist
between these two circuits without adversely influencing the optocoupler action. This
isolating characteristic is the main attraction of this type of optocoupler device, which is
voltage (or vice versa) signal coupling; interfacing of a computer output signal to
low-voltage circuitry to floating high-voltage circuitry driven directly from the mains
AC power lines, etc. Optocouplers can also be used to replace low-power relays and
Transfer ratios:
(which usually operate in the infra-red range) are always closely matched spectrally.
S.S.G.M.C.E., Shegaon. 25
Telephone Controlled Switch
quote the output-to-input current transfer ratio (CTR) of the device, i.e. the ratio the
output current (Ic) measured at the collector of the phototransistor, to the input current
(If) flowing into the LED. Thus. CTR = IC/IF. In practice, CTR may be expressed as a
simple figure such as 0.5, or (by multiplying this figure by 100) as a percentage figure
such as 50%.
Fig. 3
typical CTR values in the range 20% to 100%; the actual CTR value depends (among
other things) on the input and output current values of the device and on the supply
voltage value of the optotransistor. Figure 3 shows three typical sets of output / input
Other parameters :
Isolating Voltage :
exist between the input and output circuits. Typical values vary from 500V to 4kV.
S.S.G.M.C.E., Shegaon. 26
Telephone Controlled Switch
VCE(MAX) :
IE(MAX) :
Bandwidth :
This is the typical maximum signal frequency (in kilohertz) that can be
usefully passed through the optocoupler when the device is operated in its normal mode.
Typical values vary from 20 kHz to 500 kHz, depending on the type of device
construction.
Practical optocouplers :
available in a limited number of basic forms, but are retailed under a vast number of
different type numbers. Rather than list all of these types individually, we will simply
S.S.G.M.C.E., Shegaon. 27
Telephone Controlled Switch
Fig. 4
these devices are isolating optocouplers, and the remaining two are the slotted
optocoupler and the reflective optocoupler. The simple isolating optocoupler (Figure 4)
uses a single phototransistor output stage and is usually housed in a six-pin package,
with the base terminal of the phototransistor externally available. In normal use the base
is left open circuit, and under this condition the optocoupler has a minimum CTR value
converted to a photodiode shorting the base (Pin 6) and emitter (Pin 4) terminals
together; under these condition the CTR values falls to above 0.2 % but the band width
RELAY :-
In our project we can use relay as electronic switch to turn ON & OFF
load.
S.S.G.M.C.E., Shegaon. 28
Telephone Controlled Switch
Just like the normal electrical fitting neutral is connected directly bulb
(or load) and phase connected through switch as shown in fig. b when switch is press ph
to common point connect switch Nc (normally close) point so Ph is not provided to bulb
and ckt is incomplete so bulb is off but when we set bit (i.e. base of T1) of micro
controller transistor T1 conduct and current flowing through coil of Relay and coil get
energize so it produce magnetic field across it and pick common point toward NO
(normally) open position) so Ph is connected to bulb an its turn ON. Like this we can
In our project ,two types of relays are being used. i.e. SPDT & DPDT
RELAYS A relay makes use of the electric field generated around a conductor carrying
an electric current.
powerful "electro-magnet". As current flows though the coil a metal 'arm' is attracted by
S.S.G.M.C.E., Shegaon. 29
Telephone Controlled Switch
Switch contacts are arranged on the 'arm' so that when the arm moves it
causes the switches to either open, or close. On some relays, as one switch opens
another closes. This type of relay is called a "double throw" type. A relay may have
two 'arms' that move at the same time. This type of relay is called a "double pole" type.
SPDT DPDT
Single Pole, Double Throw Double Pole Double Throw
Back emf
S.S.G.M.C.E., Shegaon. 30
Telephone Controlled Switch
When current to the coil is switched off the magnetic field around the
coil collapses very quickly. This can cause a phenomenon called "Back emf" where a
very high voltage 'spike' is produced of opposite polarity to the current originally
driving the coil. This 'reverse voltage' spike can damage other components used in the
interface.
To avoid this problem a 'signal' diode is connected across the coil of the
relay so that any Back emf is safely 'shorted' out and never reaches the rest of the
components.
START
Detect arrival
of ringing
signal at
printing if yes
S.S.G.M.C.E., Shegaon. then 31
Telephone Controlled Switch
No
Is 20 sec.
Complete ?
Yes
Detect if IN to
pin high i.e. data
is available at
O/P of DTMP
decoder
S.S.G.M.C.E., Shegaon. 32
Telephone Controlled Switch
Is store no is No
compare with
device 1 no
Yes
Complement position
Is store no is No
of device 1
compare with
device 2 no
D Yes
END
Complement
position of
device 3
Is store no No
compare with A
device 4 no.
Yes
Complement
position of
device 4
S.S.G.M.C.E., Shegaon. 33
Telephone Controlled Switch
S.S.G.M.C.E., Shegaon. 34
Telephone Controlled Switch
S.S.G.M.C.E., Shegaon. 35
Telephone Controlled Switch
S.S.G.M.C.E., Shegaon. 36
Telephone Controlled Switch
Applications
accessed, using modem and Telephone line. There could be a situation where the
terminal from which we want to down load or upload information may be off from the
mains. In such situations dater transfer cannot be possible. This situation can be
avoided by replacing local switch by TCS. When terminal is off from mains, this mains
can be switched ON using TCS and thus data can be transmitted to modems. A modem
translates information produced by computer into impulses that can be send over regular
telephone line. At the other end of line, another modem receives these impulses and
S.S.G.M.C.E., Shegaon. 37
Telephone Controlled Switch
translates them back into signal that can be understood by computer. Thus TCS can be
2) IN INDUSTRIES OR PLANTS :
3) IN SATELLITE COMMUNICATION :
When the satellite is set up initially the TCS can be used to switch its
various functions. On such as amplifiers, Transponders etc and get acknowledge even
in difficulty.
4) The most practical example of this system is “Horoscope on telephone”. In this the
telephone number.
5) In Fax machine, the Fax machine is required to keep On constant to receive messages
at any time TCS system can be used to switch the Fax machine whenever required and
6) Similarly in Multi Access Rural Radio System (used in rural area for telephone
communication). Where the no. of calls are quite low and power requirement is high
LIMITATIONS :
1) The main limitation of the circuit is that there is no local control over switching.
S.S.G.M.C.E., Shegaon. 38
Telephone Controlled Switch
2) The reliability of the circuit is limited by the link via the exchange i.e. the
BIBLIOGRAPHY
BOOKS
3) Opto Electronics Circuit Manual by R.M. Marstan, page no. 109 to 115.
WEB SITES
www.Atmel.com
www.Teltone.com.
S.S.G.M.C.E., Shegaon. 39