swechha project
TRANSCRIPT
-
7/29/2019 Swechha Project
1/16
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 information exchange like Teletex,
Electronics mail, Video teleconferencing, Facsimile transmission (FAX), which are quit efficient but
expensive too. 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 \u201cOFF\u201d from the mains.Thus all the
technologies are failed.And this is, where our project \u201cTelephone Controlled Switch\u201d
comes into picture. To establish an interactive link with such a terminal ( which may be placed
anywhere in the world ), we have to put the mains \u201cON\u201d and then communicates with it
using Modems on a telephone network.To materialize such a system we would require some
circuitry which would receive commands on telephone line and can switch mains load
\u201cON\u201d or \u201cOFF\u201d ( i.e. the \u201cTelephone Controlled Switch\u201d). 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 required software in detail. Our
project is to eliminate the problem by using such a circuitry, which can switch the remote terminal
ON/OFF without anybody being present at the remote location.This aim is achieved by using TCS
(Telephone Controlled Switch).
he TCS (Telephone Controlled Switch) designed here is capable ofcontrolling up to eight
main powered loads with the aid of commands received viatelephone.Any tone-dialing
(DTMF) telephone set or hand-held tone dialer may beused to send commands to the
switching unit and remotely control a wide range ofmains appliances in and around home,
factories, industries etc.This system is designedto have a personal access code and with
system feedback facility.
-
7/29/2019 Swechha Project
2/16
SYSTEM BLOCK DIAGRAM AND OPERATION
-
7/29/2019 Swechha Project
3/16
OPERATION
The circuit is connected to the telephone network just like any
normaltelephone set.On being called, the circuit waits for predetermined number of
ringsignals and then answers the call (electrically it lifts the receiver).Next it waits
forpreprogrammed system access code, which the caller must transmit with the
DTMFkeypad on his telephone.
The unit is capable of switching up to light loads ON and OFF. Byvirtue of
relays, high voltage and currents may be switched, so that loads may includemains powered
ones.Reception of correct system access code is acknowledged with ashort tone, which the
caller can here.
UNITSOF TCS :
Ring detector Unit:
The ring detector Unit consists of a diode bridge, voltage controllers,
anopto-coupler, Voltage and some other components.The main function of this unit is
todetect 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 isdetected
DTMF DECODER UNIT
This unit consists of a DTMF decoder IC 8870.Which receives signals
from the tone pair and generates a 4-bit code recording to the received input.These 4-
bit code are given to the controller unit.
Micro controller Unit: -
This unit is the heart of all the circuitry.The unit controls all the
operation performed by the ICS.This unit is composed of 89CSI controller.
Assurance tone generator Unit :-
For the feedback purpose to confirm about device status to person at
remote location, musical IC UM 66 is used as assurance tone generator.
-
7/29/2019 Swechha Project
4/16
Driver Unit :-
This unit consists of driver transistor and current limiting resistor.These
transistors switches ON & OFF & controls the corresponding relays ON & OFF. This
unit receives control signals from the part 2 of controller.
Relay Unit: -
This unit consists of 7 relays ( single pole double through ) (12
v/2Sov/5A).These relays are driver ON or OFF by driver unit & thus it switches the mainsline
ON or OFF & thus the load.The relay having different rating can be usedrecording to the
desired application.
Power supply Unit :-The power supply of the telephone controlled switch is conventional &
based on fixed voltage regulators.The 12 V & 5V supply Voltages used for the relay section
& digital sections respectively are derived from a single mains transformer with
a secondary voltage of ISV
WORKING :
The incoming call is detected by the ring detector unit, during this periodthe
relay in switching unit is OFF. When the call is detected, the ring detector unit givesthe U
controller unit a logic low pulse.As per the time delay specified in the Ucontroller
programming, micro controller waits for about 15-20 seconds.During thisperiod if anyone
pick-up the hand set of telephone set, U controller stops working andtelephone set can be
used in usual way.If no one pick up hand set then U controllerunit gives the logic high pulse
to the switching unit, thus the relay in the switching unitis 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 4bit code.These codes are given to the U
controller unit.The U controller unit usesthese 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
-
7/29/2019 Swechha Project
5/16
switched OFF and thus thecorresponding relay and the load.If the line on Port 2 is made
logic high, thecorresponding 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 aremote location.
-
7/29/2019 Swechha Project
6/16
-
7/29/2019 Swechha Project
7/16
CIRCUIT DIAGRAM EXPLANATION
The heart of the circuit diagram, given in fig 1 is formed by an 89C51micro
controller.The section sits between a telephone interface circuits and powerswitching
interface.An integrated DTMF decoder type M-8870 decodes the tonedialing code receives
via telephone line.
The telephone line interface consists of two parts :-
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.
Initially, relay RL5 is in turn off condition, so telephone line is connectedto
ringing section through relay contact RL5.Due to this, ringing signal of 120V a.c. isrectified
by diode full wave bridge rectifier circuit & d.c. is available across C4.
The ringing signal detector is relatively simple.A bridge rectifier, D1
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
directvoltage across diode D supplies the LED in optocoupler IC.During the ringing signal,the
collector of phototransistor in optocoupler (pin 5) is at ground potential.The microcontroller
IC interrogates the state of optocoupler O/P signal via.Port line p 3.3 andmicro controller
counts time delay stored in software ( about 15 to 25 sec.).In that timedelay, if any one picks
up the handset micro controller stops its working and telephoneset can be used as usual
way.Otherwise, after the completion of time delay microcontroller turns ON relay RL5 by
setting bit P3.7
As soon as the relay is turn ON telephone line is connected to decoder
IC8870 andmusical tone is generated by IC lim66.This musical tone heard by remotelocation
person indicates that micro controller is ready for ON/OFF the mains power ofany load.
-
7/29/2019 Swechha Project
8/16
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 generatedon
telephone set with a tone dialing keypad.This received DTMF signals arecapacitively
coupled to the decoder IC.The external components that enable theM8870 DTMF decoder to
operate reliably are limited to Four resistors, a capacitor anda quartz crystal.The four
decoder outputs Q1 Q4 supply a bit pattern that correspondsto the received DTMF
number.This 4 bit DTMF code is applied to the micro controllervia port lines P1.0 to P1.3 and
stored in register.After receiving the access code of thedevice, micro controller compares
this code with look up table feed in internal EEPROM OF Micro controller IC.Accordingly,
high or low signal is sent to the relaydriver circuit to make corresponding device ON or OFF.
After this, assurance tone is generated which is feedback to user, to
indicate confirmation of operation.
POWER SUPPLY
-
7/29/2019 Swechha Project
9/16
DESIGN OF POWER SUPPLY
Since a power supply is vital part of all electronic system.Its discussionis
necessary. Most digital ICs includingcontroller and DTME ICS operate on +5Vsupply and
relays operate on 12V supply.So we are presenting the power supply designof required
specifications.The basic block diagram is as above.
The schematic dia. of circuit is as shown.According to it, 15-0-15 stepdown
transformer is used to get 12 V supply.These o/p of secondary are given tobridge rectifiers
which converts sine i/p into full wave rectified o/p.The fillercapacitors at the o/p of bridge
rectifiers are charged to the peak value of rectified o/pvoltage whenever the diodes are
forward biased during entire cycle of i/p waveform, thevoltage across filter capacitor is
pulsating de that is combination of dc and ripplevoltage from pulsating dc Voltage, a
regulated de Voltage is extracted by regulator IC 7805.
Assuming drop across each diode as bridge rectifier is 0.7 V.Hence
voltage at o/p of bridge rectifier is nearly equal to 12V.
This 12 V supply is used to power the relays used.
As shown in fig. IC 7805 is a +5 V regulator and delivers o/p current in
-
7/29/2019 Swechha Project
10/16
ss of 1A.
The i/p voltage required for this IC is 12 V.
The 12 V o/p from bridge rectifier is fed to i/p pin of 7805.
This regulator gives a regulated power supply of 5V.
The capacitor at the o/p of 7805 IC helps to improve transient response.
Thus we are getting two power supply of +5V & +12 V from given
circuit design.
LIST OF COMPONENTS :
ICs
IC1 89C51
IC2 8870
IC3 MCT2E
IC4 UM66
Crystal OscillatorsX1 12 MHz
X2 3.768 MHz
Transistors
Q1, Q2, Q3, Q4 BEL 187
Q6 BC 547
Q5 SL 100
Resistors:
R2, R3, R4, R5 9,7 K
R7 7.9 K
R6 7.9 K
R12 39 K
R13 62 K
-
7/29/2019 Swechha Project
11/16
R18 100 K
R19 300 K
R1 10 K
R11 680 K
Capacitors:
C1 10F
C2, C3 22 pF
C5, C6 0.01F
C7, C8 0.1F
MICRO CONTROLLER UNIT:
Micro controller IC 89C51 is heart of our project. We select this micro
controller IC for our project for following numbers of advantages :
1)Internal 64 K bytes of electrically erasable programmable read only memory for
feeding program, so that there is no need of external EPROM.
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.
3)Operating voltage of 3.5 V to 6 V d.c. which is easily available by using voltage
regulator IC.
4)Internal 128 byte RAMto store temporary storage of data. In which we can feed
program to turn on/off relays.
5)Two 16 bits timer / counter are present for timing and counting purpose.
6)4 external and 2 internal interrupts are available.
ATMEL AT89C51 PINOUT AND DESCRIPTION
The AT89C51 is a low power, high performance CMOS 8-bit microcontroller
with 4Kbytes of Flash programmable and erasable read only memory(PEROM). This device
is compatible with the industry standard 8051 instruction set and pinout.
-
7/29/2019 Swechha Project
12/16
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.
-
7/29/2019 Swechha Project
13/16
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 used as
high-impedance inputs. Port 0 may also be configured to be the multiplexed lowered
address/data bus during accesses to external program and data memory. In this
mode P0 has internal pullups. Port 0 also receives the code bytes during Flash
programming, and outputs the code bytes during program verification. External pull-
ups are required during program verification. 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.
Port 1 also receives the low-order address bytes during Flash programming
and verification
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The port 2 output bufferscan 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 emits the contents of the P2 Special Function
Register.
Port 2 also receives the high order address bits and some control signals during
Flash programming and verification.
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.
RST
-
7/29/2019 Swechha Project
14/16
Reset input. A high on this pin for two machines cycles while the
oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulses for latching the low byte of theaddress
during accesses to external memory. This pin is also the program pulse input(PROG) during
Flash programming.
In normal operation ALE is emitted at a constant rate of 1/6 the
oscillatorfrequency, and may be used for external timing or clocking purposes. Note,
howeverthat one ALE pulse is skipped during each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of SFRlocation
BEH. With the bit set, ALE is active only during a MOVX or MOVCinstruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has noeffect if the micro controller is in
external execution mode.
PSENProgram Store Enable is the read strobe to external program memory.
When the AT89C51 is executing code from external program memory,
PSEN is activated twice each machine.
Cycle, except that two PSEN activations are skipped during each access
to external data memory.
EA/Vpp
External Access Enable EA must be strapped to GND in order to enablethe
device to fetch code from external program memory locations starting at0000H uptoFFFFH.
Note, however, that if lock bit 1 is programmed. Ea will be internally latchedon reset.
EA should be strapped to Vcc for internal program executions.
This pin also receives the 12-volt programming enable voltage (Vpp)
during Flash programming, for parts that require 12-volt Vpp.
XTAL1
Input to the inverting oscillator amplifies and input to the internal clock
operating circuit.
-
7/29/2019 Swechha Project
15/16
XTAL2
Output from the inverting oscillator amplifier.
In micro controller programming , we are using two special function
reg. i.e. TCON& IE reg.
THE TIMER CONTROL (TCON) SPECIAL FUNCTION REGISTER
7
6
5
4
3
2
1
0
TF1
TR1
TF0
TR0
IE1
IT1
IE0
IT0Bit
Symbol
Function
7
TF1
Timer 1 Overflow flag. Set when timer rolls from all 1s to 0.Cleared when processor vectors
to execute interrupt serviceroutine located at program address 001Bh.
6
TR1
Timer 1 run control bit. Set to 1 by program to enable timer to
control; cleared when processor vector to execute interrupt
service routine located at program address 000Bh.
-
7/29/2019 Swechha Project
16/16