You are on page 1of 42

MINI PROJECT REPORT

on

CORDLESS POWER CONTROLLER


Submitted in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS ENGINEERING
of the
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
PRIYA T
RATHEESH CHANDRAN V R
SURAJITH K
SAJI K AHMED
Under the guidance of
Mr. C V ANIL KUMAR
Lecturer in electronics, college of engg. ,
Chengannur

DEPARTMENT OF ELECTRONICS ENGINEERING,


COLLEGE OF ENGINEERING,
CHENGANNUR-689121.

August 2000

Acknowledgements.

Sincere thanks to all those people who have helped us in


carrying out this project successfully.
Mr. Jyothiraj V P, head of department, Electronics
Engineering, for the help extended by providing all necessary
facilities.
Our guide Mr. C V Anil Kumar for his valuable guidance
and words of encouragement given through the course of the project.
Mr. Ayoob Khan T E, lecturer in Electronics for having
coordinated our miniproject.
Special thanks to Mr. Hari V S and Mr. Nishanth Rajan
lecturers in Electronics, spending their precious time for us and
giving us their valuable ideas and suggestions whenever we needed
help.
Special thanks to Miss. Priyarenjini and Miss. Lagghima
for the help given to us.
Last but not least sincere gratitude to the almighty having
seen us through this project.

Sd/-

Abstract

This project Cordless Power Controller (CPC) is essentially a


remote control implemented with the help of a cordless telephone. It
has been developed as a standalone device as per the conventional DOT
standards. Connecting CPC to the telephone line makes it possible to
control lights, fans and other appliances of our home using our cordless
phone.

The interesting feature of CPC is its ability to control two


types of devices; they are ON/OFF control and ON/OFF with
speed/intensity control.

CPC is developed as a microcontroller 8051 based device.


Which controls the devices depending on the codes entered through
telephone keypad. Intensity or speed variation is obtained by altering
the phase of the gate pulses given to the triac for triggering it

Contents

1. INTRODUCTION
1.1. Cordless Power Controller

2. REVIEW
a. Telephone signaling systems
b. DTMF description
c. Interface to the telephone line
d. The TRIAC

3. EXPERIMENTAL PROCEDURE
a. Hardware details
b. Software details

4. CONCLUSION

5. APPENDIX

Introduction

1. CORDLESS POWER CONTROLLER

We live in a world of automation and full of facilities only because of


technology. In this world we have become so much addicted to technology so
that we would rarely try to turn on a television ourselves rather than searching
for the missing remote control for turning on the television.
Controlling electronic devices and domestic appliances using a remote
control is an attractive facility provided in the present consumer electronics
products. This product CPC (cordless power controller) is essentially a remote
control implemented with the help of a cordless phone. This makes it possible to
control lights, fans and other appliances of our home using our cordless phone.
This in fact eliminates the need of another remote controller in our home.
The CPC is connected between the receiver and the telephone lines so
that the signals at the input port of CPC will be same as from ordinary telephone
that will be in accordance with the conventional DOT standards.
The working of the CPC can be summarized as below
1. On reset, CPC would be in the telephone mode. Power control mode
(PCM) only after dialing a particular code. (For eg.33#). After the code
has been entered, CPC switches to the power control mode. The
indicator and the tone generator tell us that the device has been
selected. And the relay disconnects telephone from the lines.
2. In the PCM, we can select different devices by dialing appropriate
codes for each (For eg.1 for bulb,2 for fan ) etc.
3. After selecting a device we can control the ON/OFF state of the device
by entering a different key (For eg. 3).
4. If the device selected is fan, we can con troll the speed of it by using
two dedicated switches, for increasing and decreasing the speed
respectively.
5. The mode changes automatically to telephone when the phone is
disconnected. Thus the device works in two modes namely
6

1. Power control mode


2. Telephone mode
The firing pulses for the TRIAC are generated by the -controller. The
phase of the firing pulse can be varied and hence the firing angle of the TRIAC.
By varying the firing angle we can control the brightness of the lamp, speed of
the fan etc. Isolation can be given by using the pulse transformer, at the
triggering side. The entire software for -controller is stored in an EPROM.
The product will be very useful for bedridden patients, handicapped
individuals and even lazy people!!!

Review

2. TELEPHONE SIGNALLING SYSTEMS

2.1 .1. Touch Tone


Touch-tone dialing is a method of sending signals from telephone
customer's premises to central offices and beyond. Compared to rotary dialing
its principal advantages are:-

1. All the signaling energy is in the voice frequency band, making it


possible to transmit signaling information to any point in the
telephone network to which voice can be transmitted
2. Touch-tone dialing is faster, reducing the dialing time for users and
reducing he holding time for central office for common equipment.
3. It provides a mean for transmitting more than ten distinct signals.
4. It provides a more convenient signaling method.

The development work that led to the introduction of touch-tone dialing


began at Bell Laboratories in the mid 1950's. The dialing unit had mechanical
linkages that plucked two out of six metal reeds, each of which was resonant at a
specified frequency. When a customer pushed any of thee ten buttons, two reeds
were plucked to form a signal coded to corresponding digit. The energy so
generated was transferred inductively to coils in the station set network and so
transmitted to receiver at central office. Although this mechanism was
cumbersome, the performance of the equipment and the reaction of the
customers pointed the way to an ultimately feasible system and indicated a
favorable public response to push-button signaling.

Using this new technology a compact multi-frequency oscillator


equipped with push buttons for selecting and controlling voice frequency signals

was developed in the late 1950's. The oscillator was particularly adapted to the
low and variable power available from the central office battery over the range
of the existing loops to the station set. The oscillator design the central office in
the presence of the noise from numerous sources that is always present on the
telephone circuits, but not so high as to exceed crosstalk. The concept of a fourby-four frequency code resulted in a relatively simple mechanical system at the
station set.

Concurrently with these electrical and mechanical developments, human


developments and performance ratings of button arrangements were made. The
optimum size, spacing, travel and operating force of the buttons were
determined. It was also established that feedback of signal tones through the
telephone receiver was desirable.

The purpose of technical details was to test the operational capabilities of


the system and its components. These include:

1. The dialing and supervisory capabilities of the system over typical and
limiting plant conditions. A sample of adequate size and diversity including
various gauges of loaded and non-loaded cable and wire and exposure to
various environmental conditions was needed.
2. The effectiveness of the protection provided in the system against false
signals. It was anticipated that signal like impulses would be generated by
speech, line noise, test supervisory tones that exist on telephone circuits.
3. The reliability, stability and maintenance requirements of the equipment and
its components under typical conditions.
4. Customer usage characteristics such ass dialing speed, learning rate, signal
pulse duration, error types and rates.
5. The results of the second set of trials led to the conclusion that a practical
new dialing scheme could be developed based on the technical concept of
the system and components used in the technical trials.

10

2.1.2. Touch Tone Dialing Scheme


In the previous section various advantages of touch tone dialing was
listed. Initially the only objective was to reduce the dialing time. The
development was governed by two factors. The rotary dial had been around for
several decades and was very inexpensive. The power dissipation, variation of
gain among devices, reliability and cost were all issues. One scheme that was
developed involved the generation of damped waves by interrupting the direct
current through the coil of an inductor capacitor tuned circuit. Very soon it
became clear that it was essential to be able to transmit customer's signals end to
end. Two requirements from the end to end signaling objective:

1.

The signals must not contain an out of band component such as DC step.

2.

Sustained rather than damped signals must be used to maintain adequate


signal to noise margins for the wider range of transmission losses when
two-customer loops are involved.

The first of these two requirements the need for the signals to be wholly
contained within the voice frequency band also brings with it the
problem of vulnerability to talk off. The second reintroduced the
uncharted domain of active devices.

2.1.3. Choice of Code


When only voice frequencies are employed, protection against talk off
must rely on statistical tools. This protection is required only during inter digital
intervals; speech interference with valid signals can be avoided by the
transmitter disablement when a push-button is operated. Since signals with a
simple structure are prone to frequent limitation by speech and music some form
of multi-frequency code particularly difficult of imitation is indicated. If the
signal frequencies are restricted to binary fashion, the greatest economy in space
11

of frequency results from the use of all combinations of N frequencies, yielding


n=2 exp. N different signals.

To minimize the number of circuit elements, as well as to reduce the


sharing of amplitude range P should be as small as possible, yet be larger than
unity for the sake of talk off protection. Let us thus examine codes in which
P=2. If one can be found that is not readily imitated by speech or music there is
no merit in choosing P higher than 2.

There are further advantages, as we shall see in imposing the further


restriction that, with P=2, the frequencies for each combination fall respectively
into two mutually exclusive frequency bands. If for example 15 or more
combinations are required N must be at least 8. In the 4 by 4 code, eight signal
frequencies are divided into two groups: group A, the lower group of four
frequencies and group B, the higher group of the four frequencies, resulting in
16 combinations.

2.1.4. Band Separation and Limiter Action


With a two group arrangement it is possible at the receiver to separate
the two frequencies of a valid signal by band filtering before attempting to
determine the two components of a signal renders reliable discrimination
between valid signals and speech or noise simpler for two reasons:

1. Each component can be amplitude regulated separately.


2. An instantaneous extreme limiting can be applied to each component
after band separation.

It is the characteristic of extreme instantaneous limiters that they


accentuate differences in levels between the components of an incoming multi-

12

frequency signal. This property is used with FM radios and is referred to as


limiter capture. This may be used to provide guard action to reduce the
probability of false response to speech.

Guard action of the type that has been discussed requires that only one of
the two tones making up a valid signal be admitted to each limiter. To derive the
fill benefit of limiter guard action, as much of the speech spectrum as possible
should be given access to the limiter. A band pass filter preceding the limiter to
separate two components of a valid signal, would defeat this objective, since it
would permit competition for limiter capture between a signal frequency and
only portion of the speech burst lying in the same band. However a filter
attenuating merely the other group of frequencies allows competition with the
whole speech spectrum except with the attenuated band.

2.1.5. Choice of Frequencies


Attenuation and delay distortion characteristics of typical combinations
of transmission circuits were such that it is desirable to keep the frequencies of a
telephone signaling system within the 700-1700 Hz range.

The choice of frequency spacing depends in part on the accuracy of the


signal frequencies. It was expected that signals generated at the station set could
be held within 1.5 % of their nominal frequency values and that the pass bands
of the receiver selective circuits could be maintained within 0.5 % of their
nominal ranges. On the basis of these numbers the selective circuits of the
central office receivers need to have recognition bands of at least 2 % about the
nominal frequencies.

The standardization of the amplitude at the output of the limiters permits


an accurate definition of the recognition bands in the receiver, independently of

13

levels at the receiver input. As a result frequencies may be spaced closely,


approaching the recognition bandwidth of 4 %.

Another factor can profitably be taken into account in the selection of a


frequency spacing. To reduce the probability of talk off the combination of
frequencies representing bonafide signals should be such that they are not
readily imitated by the output from the speech transmitter. In a receiver with
guard action no sound composed of a multiplicity of frequencies at comparable
levels is likely to produce talk off.

GROUP A

GROUP B

(Hz)

(Hz)

697

1209

770

1336

852

1477

941

1633

A family of frequencies that avoids a large proportions of troublesome


combinations and also meets all other requirements. The adjacent frequencies in
each group are in the fixed ratio of 21:19.

All frequencies are essentially within the 700-1700 Hz range, and the
spacing is adequate to accommodate the recognition bands. The 16 pairs of
frequencies representing valid signals avoid low order ratios.

14

2.1.6. Choice of Amplitude


Since signaling information does not bear the redundancy of spoken
words and sentences yet must be transmitted with a high degree of reliability, it
is advantageous for the signal power to be as large as permitted by the
environment. For subscriber loops the maximum slope between 697 and 1633
Hz is about 4 dB. The attenuation increases with frequency. The reduction in the
maximum level difference at the receiver in the two signal components can be
achieved by transmitted the group A frequencies at a level 3 dB higher than that
of group A frequencies. In this way the nominal amplitude difference at the
receiver input between the two components of a valid signal is never more than
5 dB. At a receiver involved in end to end signaling the minimum power was
estimated to be 32.5 dB.

2.2. DTMF DESCRIPTION


To speed up the dialing procedure and to make it more reliable, the
DTMF dialing system is used. In this system, digits are transmitted as two tones
simultaneously. This explains the name "Dual Tone Multi Frequency". It is also
known as DTMF dialing or mf dialing. The tone frequencies are selected to
avoid harmonic interference from speech signals. There are eight frequencies
defined in the DTMF system: four in a low frequency group (679-941 Hz) and
four in a high frequency group (1209-1633Hz).

A valid digit is defined as one of the low frequency group together with
one tone out of the high frequency group. In total, there are sixteen
combinations possible but we use only the digits 0-9. The maximum dialing
speed with a DTMF system is typically 7 digits per second, i.e., a tone burst of

15

70 msec. With the pulse dialing system, the speed varies between 1.1 to 0.56
digits per second. The DTMF is therefore ten times faster. The major application
for DTMF is low speed data transfer.

2.2.1 Generation of DTMF

1209 Hz

1336 Hz

1477 Hz

1633 Hz

697 Hz

770 Hz

852 Hz

941 Hz

Two tunable oscillators, one for the low frequency group and one for the
high frequency group can be used to generate DTMF tones as shown in the
figure above.

However, due to accurate frequency demand, ICs were put together with
a crystal oscillator and two synthesizers which generate the DTMF tone
digitally. Although, it cannot synthesize the exact DTMF frequency, an
inexpensive crystal has turned out to be the most popular type of DTMF
synthesizer clock that generates a frequency of 3579545Hz and can be divided
down to the DTMF frequencies with only a small error.

16

2.2.2. Tone Details


The exchange will use standard DTMF frequencies for the calling
number on the line. The duration of the digit shall be 50 msec each.

2.3. INTERFACE TO THE TELEPHONE LINE

The DTMF tones generated by the DTMF dialer must applied to the
telephone line respecting the AAC and DC requirements of the PTT. Most
bipolar DTMF dialers incorporate an on chip line interface. This approach
results in very simple and efficient circuit designs. The DTMF dialer is powered
from the speech circuit peripheral supply point. The DTMF tones are transmitted
to the telephone line via the speech circuit line interface. The mute signal
generated by the DTMF dialer, controls the speech circuit and determines when
to transmit speech and DTMF signals. The switch over from speech mode to
dialing mode can be realized without noticeable audible clicks.

If the speech circuit passes part of the signals on its DTMF input to the
earpiece output, a confidence tone will be introduced. This approach is called
the common line interface architecture because both the speech and dialing parts
of telephone are connected to the by the same interface.

If an appropriate speech circuit is not available for interfacing the CMOS


DTMF dialer to the telephone line, a separate line interface for the dialer must
be used. This requires a large number of discrete components.

2.4. THE TRIAC


The Triac is a three terminal, gated npnp device for controlling ac
current in either direction. Originally designated as a bi-directional triode
thyristor, it is more commonly referred to as Triode ac semiconductor (TRIAC).

17

Either positive or negative gate signals may be used to trigger the triac
into conduction. This characteristic helps to simplify circuit design. The load or
main current terminals are designated as MT1 and MT2. Usually, MT1 is taken
as the point of reference for voltage and current measurements made and the
gate terminal. Maximum current and offset voltage ratings are of the order of 40
A and 800 V, respectively.

2.4.1.1. Theory of Operation


The n and p semiconductor sections between MT1 and MT2 can be
considered as parallel npnp and pnpn switches. The triac is similar to connecting
two SCRs in parallel for bi-directional, or full wave, current conduction. The
primary difference between parallel SCRs and the equivalent switching sections
of the triac lies in the gate structure and trigger methods.

The triac can be switched to conduction either by gate triggering or by


two other operating conditions- exceeding the break over voltage rating, or a
sharp rise in off-state voltage. These methods of conduction are not employed in
normal triac operation but they may be considered as limiting factors in circuit
design. As a result, triacs switched to conduction by either of these mechanisms
will not be damaged, since the triac merely switches to the on-state condition. In
general, the triac requires no external over voltage protection.

2.4.1.2. Voltage Break over Turn-On

The triac can be switched into conduction in either the first or third
quadrant by excessive voltage across the MT2- MT1 terminals. Triac control
circuits are designed so that the rated the rated minimum blocking voltage
(VDRM) is never exceeded. Transients on the ac power line can cause the off-

18

state voltage to rise above voltage break over point. When this happens, leakage
current through the reverse biased junction avalanches, and the triac is latched
into conduction.

2.4.1.3. Static dV/dt Turn-On

A triac can be switched into conduction by a sharp increase of the offstate voltage. The symbol dV/dt stands for the rate of change of voltage with
respect to time. The peak off-state voltage does not have to exceed the voltage
break over point for this mode of switching to occur. Generally referred to as the
critical or static dV/dt, the rapid increase in voltage across the triac results in a
charging current through the internal capacitance of the device. When this
charging current equals or exceeds the gate trigger current (Igt), the triac is
triggered into conduction. The resulting current in a capacitor is a function of the
capacitance and the rate of change of voltage across the capacitor. This is given
by the equation:
I=C * dV/dt
Where,
I is the charging current in amperes,
C is the capacitance in farads,
dV is the change in volts,
dt is the time (in seconds) associated with the voltage change.

Typical static dV/dt ratings for triacs range from about 10 V/secs for
low power devices to about 100V/microsecs for high power devices.

A snubber network, consisting of a series resistor and capacitor connected


across the MT1 and MT2 terminals, can be used to protect a triac from sharp
increases in the off-state voltage. The charging capacitor momentarily places the
voltage across the resistor and the energy contained in the sharply rising portion
of the voltage waveform is dissipated in the resistor. Snubber circuit can also

19

protect the triac against voltage transients, which exceed the break over voltage
level. The design of snubber circuits must take into account peak line voltages,
load characteristics, and time constant of the RC network must be small when
compared to the ac load conduction time.

2.4.1.4. Triac Switching Time and Commutation Considerations

Most triacs possess a gate control turn on time (tg) of the order of 1.5 to 5
microseconds. The triac should be triggered with a fast-rising current waveform
for reliable turn on characteristics. Care should be taken to avoid exceeding the
gate power dissipation limits of the device being used. Unlike the SCR, the triac
is turned on twice each ac cycle. Thus the triac must be turned off promptly at the
end of each cycle so that it can be turned on in the opposite direction for the next
half cycle. The successive turn on and turn off is referred to as commutation.

The switching involved with a 60-Hz source may result in a commutation


time of 1ms or less. During this short interval, load current must drop below the
holding current (IH) of the triac to permit full turn off of current. Further more
the triac must be gated into conduction at the proper time during the next half
cycle. With resistive loads successive turn off and turn on is fairly easy to
accomplish. The current in a resistive network is in phase with the applied
voltage.

Inductive loads such as motors and transformers pose a difficult task for
triac commutation. The current in an inductive load is lagging the supplied
voltage. This lagging load current holds the triac in a state of conduction past the
end of the ac half cycle. When the load current drops below the holding current,
the triac switches to the off-state conditions. By this time the voltage associated
with the next half-cycle has risen to an appreciable level. This permits a sudden
increase in the voltage across the triac and this may prematurely trigger
conduction during the next half-cycle. The maximum rate of rise of an off-state

20

voltage that will not trigger the triac into conduction is known as the
commutating dV/dt rating. This is usually expressed in volts per microsecond.
More critical than static dV/dt limitations, the commutating dV/dt ratings for
triacs range from 1 to 5V/microsec. Snubber circuit can be used to eliminate this
problem.

2.4.1.5. Operating Temperature Characteristics

As with other thyristors, the operating characteristics of the triac may vary
considerably with changing temperature. All temperature related specifications
are usually referenced to case temperature. Gate trigger current and gate trigger
voltage both vary inversely with case temperature-higher temperature requires
lower amplitude gate signals. The minimum dc holding current also varies
inversely with case temperature. Dc holding current is also related to the voltage
polarity across the main terminals. i.e.; dc holding current for first quadrant may
exceed thee third quadrant dc holding current by 10 to 40 percent.

The design of triac control circuits requires that careful attention be given
to temperature characteristics concerning such operating parameters as gate
rigger signals, dc holding currents, and commutating conditions. In particular,
low temperature operating environments require higher amplitude trigger signals
for reliable operation.

2.4.1.6.Triac Specifications

Like SCRs, triacs are available in a wide range of current handling


capabilities

and

types

of

packages.

The

MAC3030-40/MAC3030-401

specification contains an interface circuit for use in digital control circuits.

21

2.4.2. TRIAC TURN_ON METHODS

Triacs may be triggered into conduction by a variety if methods. The


particular application will generally dictate the method if triggering to be
employed. The gate circuits can be designed for static, zero voltage, or phase
switching techniques. Each method offers specific advantages and disadvantages.

2.4.2.1 Static Switching

Triacs employed in static switching circuits offer many advantages over


mechanical switching using relays or manually operated switches. This electronic
switching eliminates arcing and contact boune, both of which are problems with
moving physical contacts. These factors result in more reliable operation and
virtual elimination of rfi.

A resistor is connected to the gate circuit to limit the gate current and is
about 100 ohms.

2.4.2.2. Zero-Voltage Switching


During zero voltage switching, the triac conducts for virtually 360 of
each cycle, and full power is delivered to the load. The triac is triggered at
approximately the 0 and 180 degree points in the ac cycle. During power off
periods, the triac is held in a non-conducting state. The ratio of power-on to
power-off intervals determines the average power applied to the load. The powercontrol time base may consist of intervals of 30 ac cycles (one half second).
If the triac is switched on for 15 full cycles during each one- half-second
interval, the average power being applied to the load is one-half of full power.

Triac zero crossing switching circuits are used in industrial control and
related applications. Like static switching, zero crossing power switching systems

22

are virtually free of radio frequency interference problems. Another important


advantage is the inherent differential control capability that exists when gradual
changes in average power can be applied to a load.

2.4.2.3. Phase Control Switching

Triac phase-controlled gate circuits allow conduction of load current


during a specified portion of each ac half cycle. Simple resistive gate switching
circuits can be employed to trigger the triac for firing angles up to 90 degree in
each half cycle. Resistance-capacitance phase shifting networks are used to delay
the firing angle up to nearly 180-degree.

The performance of phase controlled gate trigger circuits can be greatly


improved by the use of a trigger device. For low voltage levels, the trigger device
exhibits high impedance. Except for a small leakage current, no gate signal is
presented to the triac during this time. When the applied voltage is increased to
the break over level, the trigger device suddenly latches into conduction. This
presents a fast rising trigger signal to the triac, resulting in reliable turn on of load
current.

The diac is one of the more common trigger devices in use today. Other
trigger devices used in triac gate circuits include unijunction transistors (UJTs)
and special two-transistor configurations usually fabricated as one integrated
circuit.

23

Experimental procedure

24

3.1. HARDWARE DETAILS

This section deals with the technical aspects of this project. As


shown in the block schematic, the project consists of several ICs as mentioned
earlier and other hardware circuits. We will discuss about each of the
components and their functions.
The entire project can be divided in to three blocks
1.
2.
3.
4.

MCU card

Input card
Output card
Power supply unit

3.1.1. MCU card


MCU card contains the micro controller, EPROM address latch etc. It has

seven input lines from the input card. They are connected to port3 and are
namely,
P3.1 Hook detector
P3.2 DTMF interrupt
P3.3 ZCD interrupt
P3.4 BCD
P3.5 BCD
P3.6 BCD
P3.7 BCD
MCU card has 3 output lines (port1) and can be listed below.
P1.0 mode selector
P1.1 lamp
P1.2 firing pulses
Output p1.0 goes to a Darlington pair, which drives a relay. This relay
switches the device between two operating modes, Telephone mode and Power

25

control mode. An LED indicator is also attached with this relay. P1.1 also goes
to a Darlington pair, which controls the lamp (ON/OFF). The firing pulses for the
TRIAC are output through P1.1.These pulses directly go to the optocoupler
MOC3011 through buffer. All the output lines are connected through the buffer
IC74144 in order to prevent the loading of port1.

3.1.2. Input card


The input card consists of the following handshake signals, which
altogether produces seven inputs to the MCU. The seven inputs have already
been discussed above.

3.1.2.1. DTMF Decoder -HT 9170


The HT 9170 is a Dual Tone Multi Frequency (DTMF) receivers
integrated with digital decoder and band split filter functions. Digital counting
techniques are used in the decoder to detect and decode all the 16 DTMF tone
pairs into a4-bit code output.
While the accuracy switched capacitor filter are employed to
divide tone (DTMF) signals into high and low group signals. A built-in dial tone
rejection circuit is provided to eliminate the need for pre- filtering.

3.1.2.2. Functional Description


The HT 9170 is tone decoder. They consist of three band pass
filters and two digital decoder circuits to convert tone (DTMF) signal input
digital code output. An operational amplifier is built in to adjust the input signal
for users. The pre filter is a band rejection filter that reduces the dialing tone that
is from 350 Hz to 400 Hz. The low group filter filters low group frequency
signal output whereas the high group filter filters high group frequency signal

26

output. A zero crossing detector with hysterisis follows each filter output. When
each signal amplitude at the output exceeds the specified level it is transferred to
full swing logic signal. When input signals are recognized to be effective, DV
becomes high, and the correct code of the tone (DTMF) digit is transferred.

3.1.2.3. Hook Detection Circuit


The hook detection circuit is a special type of circuitry, which is
used to check whether a particular telephone set, is on-hook or off-hook. The
output of this circuit is fed to the 8051 MCU port, which checks the status of the
telephone.

The circuit is connected to the telephone line along with the


telephone set, in parallel .The telephone line offers a line voltage of 48V.This
line carries the DTMF tones corresponding to the calling party number as
transmitted by the exchange. As mentioned earlier, the telephone goes on-hook
and off-hook very frequently .At on-hook condition, the output from this
detection circuit is zero. Once the telephone goes off-hook, the output across
both the transistors (BC 546) goes to logic high of 5V.

3.1.2.4. ZCD-zero crossing detector


The ZCD provides the reference signal for the MCU for generating
pulses. The delay between the firing pulses and ZCD signals is varied to control
the firing angle of TRIAC. The ZCD provides narrow pulses having a width of
about 150 sec, at the start of the each +.

The input ac is clipped using two antiparallel diodes. This clipped signal
is fed to the 339 components (The 339 IC is a Quad comparator)

27

3.1.2.5. 339 comparator


The 339 Ic is a Quad comparator containing four independent voltage
comparator circuits, connected to external pins. Each comparator has inverting
and non-inverting inputs and a single output. The supply voltage applied to a
pair of pins powers all four comparators. Even if one wishes to use one
comparator only, all four will be drawing power.

The output of the comparator would be a square wave with period 20m
sec. we uses a pulse of width 100 sec at every 10m sec interval in order to
interrupt the microcontroller (int1). In order to generate these pulses, the square
wave is fed to IC 74123. It is a dual retriggerable monoshot. One of the
monoshots is made positive edge triggered, ie sensitive to the clock and the
other is made sensitive to the negative edge of the clock.
The value of resistors and capacitors of both of the monoshots are
designed to achieve the desired pulse width of 100 sec. Finally the outputs of
both monoshots are ORed to get the desired ZCD signal.

3.1.3. Output card


This board consists of two Darlington pairs, triac and driver circuits and
a buffer. One Darlington pairs are used to drive the relays that control the lamp
and the other for switching between the two modes of CPC. Triac circuit is used to
control the power varying loads like fan.

28

3.2. SOFTWARE DETAILS

The project is totally based on the control by -controller hence the


programming has been carried out in assembly language and downloaded on to
the program memory. The entire program is explained by the flowcharts as
shown

29

Start
Initialization of SP
Ports, timer, Mode,
Interrupts, hook&
fan bits

Is hook

Off? ie
P3.1=1?

No

Yes

Enables int0,
Sets hook bit

Is hook

On? ie
P3.1=0?

Yes

Disables int0, Resets


mode to telephone mode.

30

No

Key press

Disables all
interrupts, read
port3

Is
Modebit
Yes

Yes

Set?

No

DPTR loaded
From memory with
Address of LT2

Is
A=

Yes

@DPTR ?

Decrements R7
(Contains the no:
of digits in code)

No

Is
R7=0?

Memory loaded with


starting address of LT2
disables int0

Yes

Set
Mode bit

No

C
31

DPTR incremented
and stored in memory

Mode changed to
PCM

Enable all interrupts

B
Ret I

32

Is
A=light
Select?

Yes

Device bulb
is selected

No

Is
A= fan
Select?

Yes

Device fan
is selected

No

Is A=
Device
Toggle?

Yes

Is
Device

bulb?

No

Is
Device

No

Yes

Complements
bulb state

Complements
Fan bit

No

fan?

Yes

E
33

E
F

Is
A=(

Yes

-)

Is
Delay
step>0?

Yes

Decrement
Delay step

No
No

Is
A=(

+)

Yes

Is
Delay
step<7?

No

No

Enable all
interrupts

Ret I

34

Yes

Increment
Delay step

ZCD

Disable all int


Except int0

Gets the actual delay


Count from memory
And loads counter.

Enables counter
Counting and
Counter0 interrupt

Ret I

35

Counter0

Counting reset,
counter int disabled
count loaded in R3

Complements port
for fan

Call delay for


width of the pulses

Dec r3,
Is r3=0?

Yes

Ret I

36

No

Delay

Load count for


5m sec in R2

Dec r2,
Is r2=0?

Return

37

Conclusion

38

The CORDLESS POWER CONTROLLER (CPC) by us as


explained throughout is a standalone device that can be interfaced to
a cordless telephone. The main function of this device as mentioned
is to control home appliances like lamp, fan etc using a cordless
phone. Our design is restricted to the control of loads rated at 110V
AC. The power handling capacity can be improved by using the
optocoupler MOC 3062 instead of MOC 3011. The number of
devices controlled here is two. This can be increased by using the
unused port bits. The functions like caller identification and number
directory and dialing systems can be easily integrated with this. The
tele-remote facility can also be added to this project by making slight
changes in the hardware and software.

39

Appendix

40

Bibliography

41

References:
1. The 8051 Microcontroller Architecture,
Programming & applications

Kenneth J. Ayala

2. Thyristor Theory and Application

Clay Laster

Sites visited:
1. http://www.acebus.com
2. http://www.motorola.com
3. http://atmel.com
4. http://icmaster.com

42

You might also like