Você está na página 1de 35

Mini project Report

On
DTMF Tele switch
CONTENTS

Sl No. Contents Page No

1. Cover Page 2
2. Certificate 3
3. Acknowledgement 4
4. Contents 5
5. Abstract 6
6. Introduction 7
7. Block Diagram 8
8. Circuit Diagram
9. Components Description

10. Circuit Description

12. Results & Conclusion


13. Future Scope
14 Reference
APPENDIX
Data sheets
ABSTRACT
Traditionally electrical appliances in a home are controlled via switches that
regulate the electricity to these devices. As the world gets more and more
technologically advanced, we find new technology coming in deeper and deeper
into our personal lives even at home. Home automation is becoming more and
more popular around the world and is becoming a common practice. The process
of home automation works by making everything in the house automatically
controlled using technology to control and do the jobs that we would normally do
manually. Home automation takes care of a lot of different activities in the house.

this project we propose a unique System for Home automation utilizing


Dual Tone Multi Frequency (DTMF) that is paired with a wireless module to provide
seamless wireless control over many devices in a house. The block diagram is a
shown below. This user console has many keys , each corresponding to the
device that needs to be activated. The encoder encodes the user choice and sends
via a FM transmitter. The FM receiver receives the modulated signal and
demodulates it and the user choice is determined by the DTMF decoder. Based
upon this the required appliance is triggered.
INTRODUCTION
The aim of the proposed system is to develop a cost effective solution that will
provide controlling of home appliances remotely and enable home security against
intrusion in the absence of homeowner. The system provides availability due to
development of a low cost system. The home appliances control system with an
affordable cost was thought to be built that should be mobile providing remote
access to the appliances and allowing home security. Though devices connected as
home and office appliances consume electrical power. These devices should be
controlled as well as turn on/off if required. Most of the times it was done
manually. Now it is a necessity to control devices more effectively and efficiently
at any time from anywhere.
In this system, we are going to develop a cellular phone based home/office
appliance. This system is designed for controlling arbitrary devices, it includes a
cell phone (not included with the system kit, end user has to connect his/her cell
phone to the system) which is connect to the system via head set. To active the
cellular phone unit on the system a call is to be made and as the call is answered,
in response the user would enter a two/three digit password to access the system
to control devices. As the caller press the specific password, it results in turning
ON or OFF specific device. The device switching is achieved by Relays. Security
preserved because these dedicated passwords owned and known by selected
persons only. For instance, our system contains an alarm unit giving the user a
remote on/off mechanism, which is capable of informing up to five different
numbers over telephony network about the nature of the event.
The underlying principle mainly relies up on the ability of DTMF (Double Tune Multi
Frequency) ICs to generate DTMF corresponding to a number or code in the
number pad and to detect the same number or code from its corresponding DTMF.
In detail, a DTMF generator generates two frequencies corresponding to a number
or code in the number pad which will be transmitted through the communication
networks, constituting the transmitter section which is simply equivalent to a
mobile set. In the receiver part, the DTMF detector IC, for example IC MT 8870
detects the number or code represented by DTMF back, through the inspection of
the two
transmitted frequencies. The DTMF frequencies representing the number/ codes
are shown below.
BLOCK DIAGRAM
CIRCUIT DIAGRAM

Power Supply Circuit:

1
D 1 LM 7805

1 4 - + 2 1 3
1 2 IN U3 OUT
2 D B 106 R1

GND
9 V I/ P 330E
C 1
3

2
4 7 0 u F /2 5 V C 2 C3

100uF/16V
0 .1 u F D2
LE D

Control Circuit:
WORKING:

The working of the circuit is quite simple and easily understandable by jus
observing the circuit. The working can be mainly discussed as three parts which are the
supply part, micro-controller part and the isolation part respectively. All these parts
together describe the working of the design of Home automation system.

The supply part/section mainly deals with the supply given to the circuit. Actually
it can be done in two ways i.e., either by giving 230V AC or by using a battery (9V) as
source of supply. Now in this design we are using a 9V battery as source of supply. This
9v is regulated to 5V using a voltage regulator as only 5V is required to drive the
microcontroller. This 5V is also given to the receiver. Actual working of this system
involves an RC5 remote which is used as Transmitter and TSOP1738 as IR receiver. And
here we are designed the system for only 6 applications. So only 6 buttons are used in the
RC5 remote. Each button is given certain address depending on the number of duty
cycles it has for 1ns. When a button is pressed, say 1, the receiver receives the signal
from the RC5 remote and the next operation is done by the micro-controller part.

In micro-controller section, there are mainly 2 parts. They are AT89C2051 micro-
controller and ULN 2003 driver (Darlington transistor). The microcontroller intakes the
received signal from the IR receiver (TSOP 1738). The main use of this controller is that
it recognizes and counts the number of duty cycles the received signal has and then
makes the respective output pin high according to the calculations done by it internally.
For example, let us consider that the button 1 has 1500 duty cycles in 1nS. When this
button is pressed, the transmitter in the remote sends this signal and the receiver receives
the signal. The received signal also contains same number of duty cycles but the micro
controller confirms it with the help of the external timers it has. After confirmation, the
controller makes the first output high. Here both the transmitter and receiver are of
Infrared type. This output is connected to Darlington transistor (ULN 2003) which is used
to drive the application. This gives a much higher current gain and also improves the life
of the microcontroller. All the six out puts of micro controller are given as input to the
Darlington transistor/pair IC which improves the gain of those outputs and gives the
respective six outputs. These outputs are connected to the Opto-Isolator which is
discussed in the isolation part.

The Isolation part involves the isolation of the AC and DC i.e., the output from
the controller is DC and the Input to the application required is AC and to make
difference of this nature of supply, an Opto isolator (MOC 3021) is used in between
them. The MOC 3021 IC consists of a The input to the isolator is taken from the
Darlington transistor IC. The pin1 of this Isolator IC is given to the supply or is in High
state and the second pin is grounded. The output from the ULN2003 IC is connected to
the second pin of the MOC 3021 IC which is low. The IC internally consists of a LED
and a DIAC. Whenever the led glows, the DIAC gets triggered and hence fires the gate of
the TRIAC connected to the IC. A feedback resistance is used for this operation.
Let us assume that a bulb is used as application here. One terminal of this bulb is
connected to the AC supply and the other is connected to the TRIAC. When the TRIAC
gets fired the bulb glows. This is the working of the Home Automation System using IR
signal.

COMPONENTS USED:

1. Rectifier(IN4007 Diodes)

2. Voltage Regulator

3. TSOP 1738

4. Crystal oscillator

5. Triac bt136

6. Moc 3021

7. ULN 2003.

8. 2051 Uc

9. RTC

COMPONENTS DESCRIPTION
1.Rectifier
Rectifier circuits are found in all dc power supplies that operate from an ac
voltage source. They convert the ac input voltage to a pulsating dc voltage. The most
basic type of rectifier circuit is the half-wave rectifier. Although half-wave rectifiers have
some applications, the full-wave rectifiers are the most commonly used type in dc power
supplies. These are two types of full-wave rectifiers:
(1) full-wave center-tapped rectifier
(2) full-wave bridge rectifier
Here in this particular design we are using a bridge rectifier which is discussed as
follows.
Full-wave Bridge Rectifier

The full –wave bridge rectifier uses four diodes, as shown in below figure. When
the input cycle is positive, diodes D1 and D2 are forward-biased and conduct current
through RL. During this time, diodes D3 and D4 are reverse-biased.

D1
D3
Vin

Vout
D2 D4 + 0

RL
-

During positive half-cycles of the input, D1 and D2 are forward-biased and conduct
current, D3 and D4 are reverse-biased.
When the input cycle is negative as shown in below figure, diodes D3 and D4 are
forward-biased and conduct current in the same direction through RL as during the
positive half-cycle. During the negative half-cycle, D1 and D2 are reverse-biased. A full-
wave rectifier output voltage appears across RL as a result of this action.

- - D3 D1

V in

D2 Vout
+ + D4 + 0

RL
-
During negative half-cycles of the input, D3 and D4 are forward-biased and conduct
current, D1 and D2 are reverse-biased.
The above two figures explain the full-wave Bridge Rectifier.
The output graph of a full-wave rectifier is as shown below:

The diodes used in this rectifier are IN4007 which is discussed below.
IN4007 Diode

These diodes are used to convert AC into DC these are used as half wave rectifier or full
wave rectifier. Three points must he kept in mind while using any type of diode.

1. Maximum forward current capacity


2. Maximum reverse voltage capacity
3. Maximum forward voltage capacity

The number and voltage capacity of some of the important diodes available in the market
are as follows:

• Diodes of number IN4001, IN4002, IN4003, IN4004, IN4005, IN4006 and


IN4007 have maximum reverse bias voltage capacity of 50V and maximum
forward current capacity of 1 Amp.
• Diode of same capacities can be used in place of one another. Besides this diode
of more capacity can be used in place of diode of low capacity but diode of low
capacity cannot be used in place of diode of high capacity. For example, in place
of IN4002; IN4001 or IN4007 can be used but IN4001 or IN4002 cannot be used
in place of IN4007.The diode BY125made by company BEL is equivalent of
diode from IN4001 to IN4003. BY 126 is equivalent to diodes IN4004 to 4006
and BY 127 is equivalent to diode IN4007.

2.Voltage Regulator

A voltage regulator is an electrical regulator designed to automatically maintain a


constant voltage level. It may use an electromechanical mechanism, or passive or active
electronic components. Depending on the design, it may be used to regulate one or more
AC or DC voltages.

With the exception of passive shunt regulators, all modern electronic voltage regulators
operate by comparing the actual output voltage to some internal fixed reference voltage.
Any difference is amplified and used to control the regulation element in such a way as to
reduce the voltage error. This forms a negative feedback servo control loop; increasing
the open-loop gain tends to increase regulation accuracy but reduce stability (avoidance
of oscillation, or ringing during step changes). There will also be a trade-off between
stability and the speed of the response to changes. If the output voltage is too low
(perhaps due to input voltage reducing or load current increasing), the regulation element
is commanded, up to a point, to produce a higher output voltage - by dropping less of the
input voltage (for linear series regulators and buck switching regulators), or to draw input
current for longer periods (boost-type switching regulators); if the output voltage is too
high, the regulation element will normally be commanded to produce a lower voltage.
However, many regulators have over-current protection, so entirely stop sourcing current
(or limit the current in some way) if the output current is too high, and some regulators
may also shut down if the input voltage is outside a given range (see also: crowbar
circuits).
The voltage Regulator used in this design is LM 7812.
LM78xx Regulator
The LM78XX series of three terminal regulators is available with several fixed
output voltages making them useful in a wide range of applications. One of these is local
on card regulation, eliminating the distribution problems associated with single point
regulation. The voltages available allow these regulators to be used in logic systems,
instrumentation, Hi-Fi, and other solid state electronic equipment.
Although designed primarily as fixed voltage regulators these devices can be used with
external components to obtain adjustable voltages and currents. The LM78XX series is
available in an aluminum TO-3 package which will allow over 1.0A load current if
adequate heat sinking is provided. Current limiting is included to limit the peak output
current to a safe value. Safe area protection for the output transistor is provided to limit
internal power dissipation.
If internal power dissipation becomes too high for the heat sinking provided, the thermal
shutdown circuit takes over preventing the IC from overheating. Considerable effort was
expanded to make the LM78XX series of regulators easy to use and minimize the number
of external components. It is not necessary to bypass the output, although this does
improve transient response. Input bypassing is needed only if the regulator is located far
from the filter capacitor of the power supply.
For output voltage other than 5V, 12V and 15V the LM117 series provides an output
voltage range from 1.2V to 57V.
Features
- Output current in excess of 1A
- Internal thermal overload protection
- No external components required
- Output transistor safe area protection
- Internal short circuit current limit
- Available in the aluminum TO-3 package
Voltage Range

LM7805C 5V
LM7812C 12V
LM7815C 15V

3. TSOP1738 - Infrared Receiver

Introduction

TSOP1738 is an Infrared (IR) receiver which is widely used in large number of electronic
products for receiving and demodulating infrared signals. The received demodulated
signals can be easily decoded by a microcontroller. It supports RC5, RC6 code, Sony
format (SIRCS), NEC code, Sharp code, etc.

Specifications

• Continuous data transmission possible (up to 2400 bps)


• High immunity against ambient light
• Photo detector and preamplifier in one package
• Improved shielding against electrical field disturbance
• TTL and CMOS compatibility
• Active low output
• Low power consumption
• Internal filter for PCM freq
The datasheet for TSOP1738 is as shown below;

**DATASHEET**

Crystal Oscillators

One of the most important features of an oscillator is its Frequency Stability, or in other
words its ability to provide a constant frequency output under varying conditions. Some
of the factors that affect the frequency stability of an oscillator include: temperature,
variations in the load and changes in the power supply. Frequency stability of the output
signal can be improved by the proper selection of the components used for the resonant
feedback circuit including the amplifier but there is a limit to the stability that can be
obtained from normal LC and RC tank circuits. For very high stability a quartz crystal is
generally used as the frequency determining device to produce other types of oscillator
circuit known generally as Crystal Oscillators.

When a voltage source is applied to a small thin piece of crystal quartz, it begins to
change shape producing a characteristic known as the Piezo-electric Effect. This piezo-
electric effect is the property of a crystal by which an electrical charge produces a
mechanical force by changing the shape of the crystal and vice versa, a mechanical force
applied to the crystal produces an electrical charge. Then, piezo-electric devices can be
classed as transducers as they convert energy of one kind into energy of another. This
piezo-electric effect produces mechanical vibrations or oscillations which are used to
replace the LC tank circuit and can be seen in many different types of crystal substances
with the most important of these for electronic circuits being the quartz minerals because
of their greater mechanical strength.

The quartz crystal used in Crystal Oscillators is a very small, thin piece or wafer of cut
quartz with the two parallel surfaces metalized to make the electrical connections. The
physical size and thickness of a piece of quartz crystal is tightly controlled since it affects
the final frequency of oscillations and is called the crystals "characteristic frequency".
Then once cut and shaped the crystal can not be used at any other frequency. The crystals
characteristic or resonant frequency is inversely proportional to its physical thickness
between the two metalized surfaces. A mechanically vibrating crystal can be represented
by an equivalent electrical circuit consisting of low Resistance, large Inductance and
small Capacitance as shown below.

Quartz Crystal

A quartz crystal has a resonant frequency similar to that of a electrically tuned tank
circuit but with a much higher Q factor due to its low resistance, with typical frequencies
ranging from 4kHz to 10MHz. The cut of the crystal also determines how it will behave
as some crystals will vibrate at more than one frequency. Also, if the crystal is not of a
parallel or uniform thickness it have two or more resonant frequencies having both a
fundamental frequency and harmonics such as second or third harmonics. However,
usually the fundamental frequency is more stronger or pronounced than the others and
this is the one used. The equivalent circuit above has three reactive components and there
are two resonant frequencies, the lowest is a series type frequency and the highest a
parallel type resonant frequency.

We have seen in the previous tutorials, that an amplifier circuit will oscillate if it has a
loop gain greater or equal to 1 and it has positive feedback. In a Crystal Oscillator
circuit the oscillator will oscillate at the crystals fundamental series resonant frequency as
the crystal always wants to oscillate when a voltage source is applied to it. However, it is
also possible to "tune" a crystal oscillator to any even harmonic of the fundamental
frequency, (2nd, 4th, 8th etc.) and these are known generally as Harmonic Oscillators
while Overtone Oscillators vibrate at odd multiples of the fundamental frequency, 3rd,
5th, 11th etc). Generally, crystal oscillators that operate at overtone frequencies do so
using their series resonant frequency.

**DATASHEET**

4. TRIAC

INTRODUCTION
Approvals in their outer aspect, SCR and TRIAC are resembled like many water drops.
To distinguish them, therefore, is impossible, if it is not rerun to the exact
acknowledgment of the acronym and to the ritrovamento of this on a common prontuario.
But the acronyms, today attributed to these semiconductors, are many, too many for
being collections all in a handbook modernized to the capacity of the amateurs. Which,
often, during their activity, are found in embarrassment, because, ignoring the
characteristic electrical workers, they cannot lead those tests that serve to identify the
components and to know their state of efficiency. Here because the idea is risen us to
conceive a simple circuit, of immediate realization, absolutely economic, to entrust our
hobbyist readers, with which they can distinguish, with a sure rapidity, a SCR from a
TRIAC, estimating some, at the same time, the behavior electrical worker, is worth to say
the validity works them. But since the principle of operation of the device is based on the
use, from part of the SCR, of average cycle of the alternated voltage, while the TRIAC
works with the entire cycle of the same voltage, alla presentation of the apparatus must
make to precede those theoretical slight knowledge that regulates the way to behave itself
of these particular diode , that by now all know and whose employment is often from we
prescribed for the construction of the many plans that, month for month, come publishes
to you on this periodical.

SCR: STRUCTURES and SYMBOLS

Known also under the name of controlled diode, the SCR inner is composed from three
P-N splices, that they form a semiconductor of P-N-P-N type, similar to two normal
diode connects to you in series. They finishes relative to the anode makes head more
external the P semiconductor, while the cathode remains connected with the N
semiconductor situated in the opposite part. A1 according to field of P material is
connected the representative electrode of the gate ones, said also "door". The symbol
electrical worker, that it characterizes diode SCR, is that one represented in figure 1,
while the outer aspect more common than this semiconductor it can be identified with
one of the graphical expressions brought back in figure 2.

DIODE

Fig. 1 - Symbol electrical worker of diode SCR, famous also with the denomination of
controlled diode. With the G letter it comes indicated the electrode of gate, or door,
through which it comes applied to the component the voltage impulse that of it provokes
the conduction (primes). With the letter To the electrode of anode is marked and with the
K that one of cathode.
Fig. 2 - These are the two types of diode SCR (silicon-controlled-rectifier) more
commonly findable in commerce and mainly it uses you from the amateurs.

Operation of the SCR


Applying to the anode of the SCR a negative voltage regarding the cathode, some
conduction is not obtained electrical worker, therefore as it happens in a common
semiconductor diode . The SCR can therefore be assimilated to an open switch. Inverting
the polarity of the voltage, the SCR contrarily remains still blocked to how much happens
in a normal diode , in which conduction would be had electrical worker; but the block
remains until does not arrive on gate a positive impulse regarding the cathode, of such
amplitude to put the diode controlled in complete conduction. And this commutation
happens in a extremely short time, of the order of 0,5 us. As it can immediately be
deduced, this time is the much short one than that one demanded from the analogous
electromechanical systems. Once primed, the SCR remains conductor without need of
some voltage of commando on the gate. conserving this condition also when on the gate
ones they come applies new impulses to you of commando. For turning off the SCR, that
is in order to bring back it to the state of interdiction, two exist arrange: the voltage
between anode can be reduced to zero and cathode, or the anode regarding the cathode
can be made to become negative. In this case the alternated voltage is revealed much
useful, because it passes for the zero when it inverts the own polarity to every semi
period. In figure 5 light bulb to filament in alternating current is introduced the example
of a according to electronic interrupting SCR in a circuit of feeding of one. We see of it
hour the behavior theoretical.

Fig. 5 - Theoretical circuit of application of a according to interrupting diode SCR,


closed or open, of ignition of lamp LP.
In absence of it marks them on the gate ones, the SCR is behaved like a opened switch,
that is it does not lead current and lamp LP remains extinguished. But when an impulse
of voltage to every half-cycle of the alternated voltage is applied, the switch closes itself
and lamp LP is ignited. Not however in the full load of its brightness, because the SCR is
behaved like a normal diode in series to the circuit, that it straightens the alternated
voltage. In practical, the ignition of the lamp is reduced to 50%. In figure 6 the new
condition is illustrated electrical worker of the circuit of figure 5, in which I SCR
transforms in a diode rectifier of the alternated voltage.

Fig. 6 - The diode SCR, connected in series with a conductor covered from
alternating current, is behaved like a rectifying element, leaving via free the passage
of the sun positive semi-waves.
OPERATION OF THE TRIAC
In figure 7 the theoretical application of a TRIAC, analogous is brought back to that one
of the SCR of figure 5.

Fig. 7 - Example of employment of a TRIAC, as electronic switch, in a circuit of


ignition of one lamp fed in alternating current (C.A).
In absence of tension impulse that in this case, with the exception of how much it
happens in the SCR can be is positive that negative, the TRIAC does not lead, that is is
behaved as an open switch and lamp LP remains extinguished. Applying instead one
small tension, positive or negative, on the gate ones, the TRIAC becomes conductor and
is equivalent to a closed switch. But this time the semiconductor let’s to cross from both
the semi waves of the alternated tension, as it indicates the design of figure 8.

Fig. 8 - Since in the TRIAC two diode are contained connect to you in ant parallel,
all the semi waves, those positive ones and those negatives of the alternating current
cross the semiconductor.
And that because the inner structure of the TRIAC is correspondent to that one of two
diode SCR connects to you in parallel, with the polarity opposite. in ant parallel. but with
the electrode of I prime in common.
We have said that the TRIAC can be primed applying a tension impulse on its gate ones.
But this auto innesca component when the value of the tension alternated applied on the
two anodes exceeds a sure limit, called tension of breakdown. Making then to diminish
the current and to increase the cargo resistance of the TRIAC, a point is caught up in
which the current it is not more in a position to maintaining in conduction the
semiconductor.
The minimal value of the current that can maintain primed the TRIAC comes commonly
indicated like current of Hold, that is maintenance current.

**DATASHEET**

Opto-isolator

An opto-isolator integrated circuit. The "MB 111", manufactured by RFT ("Rundfunk-


und Fernmelde-Technik"), contains an infrared LED and silicon photodiode with an
integrated amplifier stage.
This article is about the electronic component. For the optical component, see optical
isolator.

In electronics, an opto-isolator (or optical isolator, optical coupling device, opt


coupler, photo coupler, or photoMOS) is a device that uses a short optical transmission
path to transfer an electronic signal between elements of a circuit, typically a transmitter
and a receiver, while keeping them electrically isolated—since the electrical signal is
converted to a light beam, transferred, then converted back to an electrical signal, there is
no need for electrical connection between the source and destination circuits. Isolation
between input and output is rated at 7500 Volt peak for 1 second for a typical component
costing less than 1 US$ in small quantities.

The opto-isolator is simply a package that contains both an infrared light-emitting diode
(LED) and a photo detector such as a photosensitive silicon diode, transistor Darlington
pair, or silicon controlled rectifier (SCR). The wave-length responses of the two devices
are tailored to be as identical as possible to permit the highest measure of coupling
possible. Other circuitry—for example an output amplifier—may be integrated into the
package. An opto-isolator is usually thought of as a single integrated package, but opto-
isolation can also be achieved by using separate devices.

Digital opto-isolators change the state of their output when the input state changes;
analog isolators produce an analog signal which reproduces the input.


Configurations

Schematic diagram of a very simple opto-isolator with an LED and phototransistor. The
dashed line represents the isolation barrier, over which there is no electrical contact.

A common implementation is a LED and a phototransistor in a light-tight housing to


exclude ambient light and without common electrical connection, positioned so that light
from the LED will impinge on the photo detector. When an electrical signal is applied to
the input of the opto-isolator, its LED lights and illuminates the photo detector, producing
a corresponding electrical signal in the output circuit. Unlike a transformer the opto-
isolator allows DC coupling and can provide any desired degree of electrical isolation
and protection from serious overvoltage conditions in one circuit affecting the other. A
higher transmission ratio can be obtained by using a Darlington instead of a simple
phototransistor, at the cost of reduced noise immunity and higher delay.

With a photodiode as the detector, the output current is proportional to the intensity of
incident light supplied by the emitter. The diode can be used in a photovoltaic mode or a
photoconductive mode. In photovoltaic mode, the diode acts as a current source in
parallel with a forward-biased diode. The output current and voltage are dependent on the
load impedance and light intensity. In photoconductive mode, the diode is connected to a
supply voltage, and the magnitude of the current conducted is directly proportional to the
intensity of light. This optocoupler type is significantly faster than photo transistor type,
but the transmission ratio is very low; it is common to integrate an output amplifier
circuit into the same package.

The optical path may be air or a dielectric waveguide. When high noise immunity is
required an optical conductive shield can be integrated into the optical path. The
transmitting and receiving elements of an optical isolator may be contained within a
single compact module, for mounting, for example, on a circuit board; in this case, the
module is often called an optoisolator or opto-isolator. The photo sensor may be a
photocell, phototransistor, or an optically triggered SCR or TRIAC. This device may in
turn operate a power relay or contactor.

Analog opt isolators often have two independent, closely matched output
phototransistors, one of which is used to linearize the response using negative feedback.
Application

A simple circuit with an opto-isolator. When switch S1 is closed, LED D1 lights, which
trigger phototransistor Q1, which pulls the output pin low. This circuit, thus, acts as a
NOT gate.

Among other applications, opto-isolators can help cut down on ground loops, block
voltage spikes, and provide electrical isolation.

• Switched-mode power supplies use optocouplers for mains isolation. As they


work in an environment with much electrical noise and with signals which are not
small, optocouplers with low transmission ratio are preferred.
• Where electrical safety is paramount, optocouplers can totally isolate circuitry
which may be touched by humans from mains electricity.
o Medical equipment often uses optocouplers.
o One of the requirements of the MIDI (Musical Instrument Digital
Interface) standard is that input connections be opto-isolated.
o Oscilloscope and digital millimeters with computer interface.
• Optocouplers are used to isolate low-current control or signal circuitry from
transients generated or transmitted by power supply and high-current control
circuits. The latter are used within motor and machine control function blocks.

5. ULN 2003
In electronics, the Darlington transistor (often called a Darlington pair) is a
compound structure consisting of two bipolar transistors (either integrated or separated
devices) connected in such a way that the current amplified by the first transistor is
amplified further by the second one. This configuration gives a much higher current gain
(written β, hfe, or hFE) than each transistor taken separately and, in the case of integrated
devices, can take less space than two individual transistors because they can use a shared
collector. Integrated Darlington pairs come packaged in transistor-like packages.
A Darlington pair can be sensitive enough to respond to the current passed by skin
contact even at safe voltages. Thus it can form the input stage of a touch-sensitive switch.
The datasheet of this transistor is as shown below.
**DATASHEET**

6. 2051 Microcontroller:

The 2051 is a 20 pin version of the 8051. It is a low-voltage, high-performance CMOS 8-


bit microcomputer with 2K bytes of Flash programmable and erasable read only memory.
Atmel manufactures the chip using high-density nonvolatile memory technology. The
2051 and is compatible with the industry-standard MCS-51 instruction set. By combining
a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel 2051 is a powerful
microcontroller. It provides a very flexible, cost-effective solution to many embedded
control applications.

Operational features of the 2051


The 2051 features Compatibility with MCS-51 ™ Products, 2K Bytes of
Reprogrammable Flash Memory with 1,000 Write/Erase Cycles. The operating range of
the 2051 is 2.7V to 6V. Among these features, the 2051 also contains the following
features:
Fully Static Operation: 0 Hz to 24 MHz
Two-level Program Memory Lock
128 x 8-bit Internal RAM
15 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial UART Channel
Direct LED Drive Outputs
On-chip Analog Comparator
Low-power Idle and Power-down Modes
2051 Pin-out and Description
Pin Description

Pin Name: Purpose:


VCC Supplies voltage and power.

GND Ground.

Port 1
Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 toP1.7 provide internal pull-ups.
P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the positive input
(AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog
comparator. The Port 1 output buffers can sink 20mA and can drive LED displays
directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2
to P1.7 are used as inputs and are externally pulled low, they will source current (IIL)
because of the internal pull-ups. Port 1 also receives code data during Flash programming
and verification.
Port 3
Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-ups.
P3.6 is hard-wired as an input to the output of the on-chip comparator and is not
accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20mA. When
1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used
as inputs. As inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89C2051 as listed
below:

Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin
high for two machine cycles while the oscillator is running resets the device.
Restrictions on Instructions
The AT89C2051 and is the economical and cost-effective member of Atmel’s family of
microcontrollers. Therefore, it contains only 2K bytes of flash program memory. It is
fully compatible with the MCS-51 architecture, and can be programmed using the MCS-
51 instruction set. However, there are a few considerations one must keep in mind when
utilizing certain instructions to program this device. All the instructions related to
jumping or branching should be restricted such that the destination address falls within
the physical program memory space of the device, which is 2K for the AT89C2051. This
should be the responsibility of the software programmer. For example, LJMP 7E0H
would be a valid instruction for the AT89C2051 (with 2K of memory), whereas LJMP
900H would not.
1. Branching instructions:
LCALL, LJMP, ACALL, AJMP, SJMP, JMP @A+DPTR
These unconditional branching instructions will execute correctly as long as the
programmer keeps in mind that the destination branching address must fall within the
physical boundaries of the program memory size (locations 00H to 7FFH for the
89C2051). Violating the physical space limits may cause unknown program behavior.
CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ
With these conditional branching instructions the same rule above applies. Again,
violating the memory boundaries may cause erratic execution.
For applications involving interrupts the normal interrupt service routine address
locations of the 80C51 family architecture have been preserved.
2. MOVX-related instructions, Data Memory:
The 2051 contains 128 bytes of internal data memory. Thus, in the 2051 the stack depth
is limited to 128 bytes, the amount of available RAM. External DATA
memory access is not supported in this device, nor is external PROGRAM memory
execution. Therefore, no MOVX [...] instructions should be included in the program. A
typical 80C51 assembler will still assemble instructions,
even if they are written in violation of the restrictions mentioned above. It is the
responsibility of the controller user to know the physical features and limitations of the
device being used and adjust the instructions used correspondingly.
BLOCK DIAGRAM OF 2051
Power-down Mode
In the power down mode the oscillator is stopped, and the instruction that invokes power
down is the last instruction executed. The on-chip RAM and Special Function Registers
retain their values until the power down mode is terminated. The only exit from power
down is a hardware reset. Reset redefines the SFRs but does not change the on-chip
RAM. The reset should not be activated before VCC is restored to its normal operating
level and must be held active long enough to allow the oscillator to restart and stabilize.
P1.0 and P1.1 should be set to “0” if no external pull-ups are used, or set to “1” if
external pull-ups are used.
The 2051 is a low voltage (2.7V - 6V), high performance CMOS 8-bit microcontroller
with 2 Kbytes of Flash programmable and erasable read only memory (PEROM). This
device is compatible with the industry standard 8051 instruction set and pin-out. The
2051 is a powerful microcomputer which provides a highly flexible and cost effective
solution to many embedded control applications.

In addition, the 2051 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.
Uses of the 2051 Microcontroller:
The 2051 is used in many applications.
 Controlling 7-segment displays
- Clocks
 Sensor projects
- Temperature
Used to Control LCD ( 8051 )
**DATASHEET**
CIRCUIT DESCRIPTION
Now let's have a detailed look into the whole circuit section wisely. Before
getting in to the description, for the sake of easiness, let's confirm our aim or let's
predict our expectation regarding its working.
We are supposed to send a code word from the mobile phone, which is the
transmitter and is sending the corresponding DTMF frequencies along. At the receiver
end, i.e. at the land line end we need to detect the code back using our circuitry and
it is to be used for driving the devices, represented by the LEDs.

RING DETECTION_SECTION

Refer the circuit diagram of this section…regarding the need of this section,
we want to use this circuitry in the device mode i.e. to control the device's turn off
and turn on while maintaining the normal functionality and usage of the land line to
make and accept calls. So we must allow sometime for the land line to get into the
off hook mode, also it is necessary to get the landline from on hook mode to off hook
mode to enable the DTMF reception. If the land line is already in the off hook mode,
then it won't be able to receive any signal as in the normal speech communication
through networks. So using this section we are aiming to automatically activate our
circuitry after a number of rings are heard from the landline, while the coupling for
automation is done using a relay. Here we have designed such that the DTMF signals
will automatically be coupled to the Decoding section just after the 6th ring.
Now getting into the detailed analysis, the initial high ring voltage is coupled
to a zener diode circuitry to reduce the voltage level for protection, at the same time
maintaining the enough magnitude for detection using the opto-coupler. See the
details in the circuit diagram. Whenever a ring occurs a sufficient amount of ring
voltage is established across the inputs of the opto-coupler which causes the internal
transistor to conduct and effectively the output 5th and 4th pin to get short. This
results in an effective coupling of input ring voltage to pass through. Now we will
exploit this signal to use it as a clock signal for the decade counter IC 4017, which
will produce a high logic level at its Q5 pin upon reception of the 6th ring, which was
changed into a quality clock signal. The diode-resistor- capacitor network along with
the NAND gates of the IC 4093 is used to shape up the irregular voltage signal
obtained at the output of the opto- coupler into a quality clock pulse for the IC 4017.
Because of this, as mentioned earlier, just after the 6th ring the counter 4017 will
produce a high level at the Q5 pin till the next clock occurs. This logic 1 level of Q5
pin is then used to drive the monostable multivibrator using 555 timer IC through BC
547 transistor coupling. The monostable multivibrator is designed for a period of
about 60 seconds which is the allotted time for the operator to control the device
using the palm device he has. Thus the monostable multivibrator will produce logic 1
level for a period of about 60 seconds at its output which is used to drive a relay as
shown through transistor coupling, which will couple a low resistance in between the
RING and the TIP terminals of the landline, resulting in the manifestation of a DC
loop driving the landline from ON HOOK to OFF HOOK preparing the decoding section
for the reliable reception of the signal transmitted from the mobile phone.
Now, we have to contend with a problem arising from the past counting of the
IC 4017. Suppose a fellow called to our landline and cut the phone at the 4th or 5th
ring. After this if somebody calls again then right at the first ring the landline will get
into the OFF HOOK mode contrary to our expectation at the 6th ring. How can we
avoid this error? To solve this, what we have with us is only the RESET pin of IC
4017. So the solution is that we must reset the IC 4017 every time just after once
the 6th ring has occurred or the decoding section is coupled for decoding.
So for this we use the retrigerrable monostable multivibrator using IC
74LS123 commonly called as the ISS-PULSE-DETECTOR. For this we supply the
same clock pulse of 4017 to the IC74123, which has been designed for a period of
more than twice as long as the duration of a single ring signal, which is about 5
seconds.
The out put from the 4th pin of IC 74123, which is the TOGGLED Q output, is
then supplied to the active high RESET pin of IC 4017. Thus this arrangement will
avoid the past counting nature of IC 4017 by resetting it just after the completion of
the 6th ring and the consequent coupling of the decoding section. Now that we have
effectively coupled the signals from the palm device to the decoding section, let's see
how the decoding section performs the decoding function.

DECODING_ SECTION

Refer the circuit diagram of this section….when the 1k resistor is


brought across the RING and TIP terminals the landline also brought to OFF
HOOK mode so that the decoding section is now connected to the transmitted signal
and can receive it.
The input capacitor-zener-resistor network is meant for both the
protection of the DTMF decoder IC 8870 from comparatively higher ring
voltage and the coupling of the signal to the same IC. Based on the
reference DTMF frequencies the DTMF decoder IC 8870 decodes the binary
equivalent of the keys or numbers in the number pad of the transmitting
mobile phones. The decoding scenario of the IC 8870 can be consolidated
as given below.

KEYS Q4 Q3 Q2 Q1

1 Off Off Off On

2 Off Off On Off

3 Off Off On On

4 Off On Off Off

5 O ff On Off On

6 Off On On Off

7 Off On On On

8 On Off Off O ff

9 On Off Off On

0 On Off On Off

* On Off On On

# On On Off On
A On On Off On
B On On On Off
C On On On On
D Off Off Off Off

The output of the DTMF decoder IC 8870 is binary code, which is then fed to
the binary to decimal decoder IC 74HC154 retrieving the original transmitted key or
number. But the IC 74HC154 has active low output pins. So these active low outputs
are converted to active high ones by passing them through NOT gates. Note that
here we are using only five outputs of IC 74HC154 to control four devices
represented by LEDs as an instance. Specifically the pins we are using are the 13th
pin which produces an active low corresponding to the code *, the 2nd pin which
produces an active low
corresponding to the code 1, the 3rd one for the code 2, the 4th one for the code 3
and finally the 5th one for the code 4. Thus in the decoding section we retrieve back
the same number or code transmitted from the mobile phone.

OUT PUT_ SECTION


Refer the circuit diagram of this section….using the converted active high
outputs of the decoding section we are now supposed to control the TURN OFF and
TURN ON of four LEDs. The output corresponding to the code * from the decoding
section is used to trigger a monostable circuitry in the output section, which is
designed to produce a high pulse at it's output for a period of about 5 seconds. This
high pulse
with the duration of 5 seconds is used to activate the four tri-state buffers i.e. the
ICs 74LS126 enabling the coupling of the respective inputs of the buffers to their
respective outputs. Now with in this 5 second duration we can have our control
signals to pass through the buffers and can be used to control the D flip flops i.e. the
ICs 74LS74, which has been set in the latching mode to get its output toggled upon
receiving consequent clock pulses, thus triggering the turn ON and turn OFF of the
devices once the same code is transmitted for a second time. In a nutshell, the
latching mode peration of D flip flops causes a device to get turn on from off state or
vice versa on reception of the code word. The IC 74LS74 is a positive edge triggered
IC. One of the practical limitation we face here is to create a positive edge at the
clock input of the D flip flop IC, using the isolated pulse coming through the buffer to
its output. If we directly apply the pulse to the D flip flop to work in the latching
mode it won't work due to the lack of
establishment of the positive edge to its clock input, resulting from the occurrence of
logic 1 level at the clock input of D flip flop right at the time of biasing or when
connected to the power supply. For this purpose to create a positive edge going from
logic 0 level to logic 1 level we pass the pulse coming out of the buffer through
another NOT gate as shown.
Finally, we need to find out a code which we have to transmit from the mobile
phone so that we can establish a well shaped pulse as clock pulse at the clock input
pin of the D flip flop for it to work in latching mode i.e. to get the LEDs turned on if
they were in the off state and vice versa.

First of all we must activate the buffer in the output section for the
predetermined time by triggering the monostable circuitry there in. So the first
symbol in the code word should be *. Now, we need to transmit a high level through
the activated buffer using another symbol specific to each of the device represented.
From the circuit diagram we can see it can be 1 for the 1st device, 2 for the second
one and so on.
Thus by sending *(ordinal number of the device) we can create a low to high
transition at the out of the buffer. But it's not yet been a well defined pulse with both
trailing and falling edge. So to get a falling edge we should now send a symbol other
than ordinal number of the device. Let it also be * to have a convenient code. Now,
as we know we use * for triggering the monostable circuitry in the output section we
must not end our code word with *. Other wise, it will cause the triggering input of
the monostable multivibrator to continue in the logic 1 level even after the specified
5
seconds which in turn forces it not to get triggered for a second time on pressing *
as there lacks the transition from low to high level at it's triggering input. Hence we
must end our code word with a symbol other than both * and ordinal number of the
device. Let it be 0. Thus, we got the code word that is to be send for our expected
control as * ordinal number of the device*0. For example, to change the state of first
device we have to send a code-*1*0, for the 2nd one *2*0 etc.
By following the similar logic, it is possible to find some other formats of code
words. For example, the code word * ordinal number of the device 0 is also seeming
to be worthy of.
Thus the whole control procedure can be consolidated as first of all we need
to make a call to the land line, just after the 6th ring it will automatically get on to
the OFF HOOK mode for about 1minutes, during this time we can control the
required devices with code words of specified format with in the installments of 5
seconds.

Source Code:
;///////// DTMF HAS\\\\\\\\\\\
;---------=========------------
; Ashwin LABS......
;---------==========-----------

ORG 0000H
MOV P0,#00H
MOV P2,#00H
SWITCH4 EQU P3.0
SWITCH3 EQU P3.1
SWITCH2 EQU P3.2
SWITCH1 EQU P3.3

LED1 EQU P1.0 ; FF MODE ,RIGHT MODE


LED2 EQU P1.1 ; BACK MODE
LED3 EQU P1.6 ; BACK MODE
LED4 EQU P1.7 ; FF MODE ,LIFT MODE
LED5 EQU P0.1 ; LAMP , CAM NO/OFF
STOPLED EQU P2.5 ; STOP LAMP
MOV P0,#0ffH
MOV P2,#00H
ACALL DELAY
SJMP MAIN

;;;;;;;;;;;;;;;; MAIN PROG....;;;;;;;;;;;;


MAIN:

JB SWITCH1,NEXT1
JNB SWITCH3,LAMP134
JNB SWITCH2,LAMPOFF
SETB LED2 ; BACK MODE
SETB LED3 ; BACK MODE
CLR STOPLED ; STOPLED
OFF
CLR LED1
CLR LED4
ACALL DELAY
SJMP MAIN
NEXT1:
JB SWITCH3,NEXT2
JNB SWITCH2,RIGHT
SETB LED1 ; FF MODE
SETB LED4 ; FF MODE
CLR STOPLED ; STOP LED
OFF
CLR LED2
CLR LED3
ACALL DELAY
SJMP MAIN
NEXT2:
JB SWITCH2,NEXT3
JNB SWITCH4,STOP
SETB LED4 ; LIFT MODE
CLR STOPLED ; STOP LED OFF
CLR LED1
CLR LED2
CLR LED3
ACALL DELAY
acJMP MAIN
NEXT3:
ACALL DELAY
SJMP MAIN
RIGHT:

SETB LED1 ; RIGHT MODE


CLR STOPLED ; STOP LED OFF
CLR LED4
CLR LED2
CLR LED3
ACALL DELAY
SJMP MAIN
STOP:
SETB STOPLED ; STOP LED ON
CLR LED1
CLR LED2
CLR LED3
CLR LED4
ACALL DELAY
LJMP MAIN
LAMP134:
JNB SWITCH4,LAMPON
ACALL DELAY
LJMP MAIN

LAMPON:
SETB LED5
ACALL DELAY ; LAMP , CAM NO
LJMP MAIN
LAMPOFF:
CLR LED5 ; LAMP , CAM OFF
ACALL DELAY
LJMP MAIN
JB SWITCH1,NEXT1
JNB SWITCH3,LAMP134
JNB SWITCHDD,LAMPOFF
SETB LED2 ; BACK MODE
SETB LED3 ; BACK MODE
CLR STOPLED ; STOPLED
OFF
CLR LED1
CLR LED4
ACALL DELAY
SJMP MAIN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DELAYA:
MOV 71H,#0FFH
MOV 72H03H
LOOP:
DJNZ 70H,LOOP
DJNZ 71H,LOOP
RET
END
DJNZ 70H,LOOP
DJNZ 71H,LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CONCLUSION

This project presents a dtmf based home appliances controlling. The controller based
on closed loop algorithm is designed and implemented with Atmel MCU in embedded
system the domain.

Experimental work has been carried out carefully.

Hence we are controlling 6 home appliances controlling through DTMF technology


effectively. Because now a days GSM technology became very popular,here its very easy
to use for any applications with the help of 8051 controller.In all low end applications
now a days we are using 8051 controllers like industrial automation and data acquisition.

The Remote Automation using Networks [RAN] on test performed exceptionally well to
its capability and accuracy. All the inherent parts of the circuit performed consistently. It
helped us to come out with good judgment. With the features what it inherits, it seems to
be advantageous to the present era.
Future Scope

The controller we used having the following featurtes like 8 bit 8051 architecture in a tiny
20pin DIP package,128B RAM and 4kB on-chip Flash Program Memory. For low end
applications this controller is very easy to use and at the same time GSM also widely
accepted protocol for mobile communication.
In future for small scale systems 8051 controllers can be widely used along with the help
of GSM technology.

Refrences
Text Books:

8051 and Embedded systems BY Mazidi

Website:

www.howstuffworks.com

www.answers.com

www.radiotronix.com

Magazines:

Electronics for you


Electrikindia

Let us Go Wireless

Você também pode gostar