Vous êtes sur la page 1sur 20

Switch & Control using CDMA Mobile

Many of you will have an old mobile phone gathering dust.


The circuit shown in this article gives the old mobile a new lease
of life, enabling it to switch on electrical appliance on and off in
or around the home. The circuit will even reply tone (short beep &
long beep) to predefined commands.

Commercially available equipment for telephone controlled


switching usually employs special GSM modems in combination with SMS
messaging. GSM modules are fairly expensive so the idea comes to
mind of using a discard or obsolete mobile phone you may have lying
around somewhere.

The above functionality is within reach with the present


circuit. The mobile phone is linked to it via the connector normally
used for an external micro-phone and earphone.

If your old mobile phone is prepaid card then it allows


the worldwide remote control to be implemented inexpensively. After
all, you then only pay for the call on the calling phone, not the
receiving phone. Now life time prepaid cards are available in the
market, so you have to pay only for one time.

The overall complexity of the circuit is greatly reduced


by the use of a PIC microcontroller. The addition of beep sound will
return indication of operation on the calling telephone.

To reduce complexity we have divide circuit in five sections.

• Power Supply
• Relay Switcher
• Tone Decoding
• 10 KHz Osc.
• Main Controlling
About Power Supply:
Tr1 is 12V step-down transformer. Diode D1 to D4 is using
as full wave rectifier. C7 is filter capacitor of 12V dc. We are
using U6 LM 7805 (IC) for 5V dc. This is voltage regulator IC. It
has 3 pins. One is called input, second pin is common pin & third
pin is output. We can feed 8.5V to 35V unregulated dc at input pin.
Input should be greater then 8V for correct regulation. Second pin
is common & generally connected with ground (- supply). Third pin is
output pin & it gives us 5V regulated dc until input pin is greater
then 8V dc.

We are using LM7805 voltage regulator IC because we have


one micro-controller in our circuit. Its voltage range is 2V dc to
6V dc. So we are using 5V dc as international standard because all
digital circuits run on 5V DC.

C8 is 100uf/25V capacitor & connected with output pin of


Lm7805 IC. It is storing 5V dc, which will use by microcontroller,
Nand Gate ic & tone decoder ic.

Relay Switcher:
We are using 9 relay in our circuit. To operate 9 relay we
have to use minimum 9 NPN transistor 9 resistors & 9 diodes. Below
is a simple circuit for single relay.
According to below circuit if we want to turn on relay we
have to switch on sw1. This will turn on NPN transistor. Relay is
connected between collector & 12V Dc. Now Transistor will work like
NOT gate. When base logic level is 1 then collector logic level is
0. This condition will turn on relay.

When base logic level goes 0 then collector logic level


goes 1 & relay will switch off. When we want to turn on any device
then we apply logic level 1 on the base, if we want to turn off any
device then we have to apply logic level 0 on base.

Relay circuit:
Relay is basically electromagnet switch. This switch is
SPDT. (Single pole double throw). This switch has 3 points &
normally called NC (normally closed), NO (normally open) & pole.

When relay is off pole point is connected with NC. When


relay is on pole point will connect with NO. In the relay there is a
coil. Which has approximately 5000 turn of 48 swg wire wound on
round peace of metal. When we will apply 12V dc to relay coil, metal
round peace will act as magnet. One spring loaded point is connected
above relay. Magnet will operate this point & now we can on or off
any device which is connected with relay.

Here we can use one trick to control two lamps with one
relay. Look below is simple circuit.

Relay with lamp circuit:


When relay is off pole is connected with NC point. Now L2
lamp will on. When relay will on pole is connected with NO, now L1
lamp will on.

Tone Decoding:
DTMF also known as Touch Tone

DTMF, or dual tone multi frequency, uses two tones to


represent each key on the touch pad. When any key is pressed the
tone of the column and the tone of the row are generated, hence dual
tone. As an example, pressing the '5' button generates the tones
770Hz and 1336Hz.

The frequencies were chosen to avoid harmonics (no


frequency is a multiple of another, the difference between any two
frequencies does not equal any of the frequencies, and the sum of
any two frequencies does not equal any of the frequencies). The
frequencies generated must be with +/- 1.5%, the highest frequency
must be as loud as the lowest frequency and as much as 4db louder.
This level difference is referred to as 'twist'.
The A,B,C and D keys were used for the U S military's Autovon phone
system. They were used for Flash Override - A button, Flash - B
button, Immediate - C button and Priority - D button. Pressing one
of these keys gave your call priority, Flash Override being the
highest. While the Autovon system has been disbanded, yet many non
telephone applications use the keys today.

According to above table when caller will press any button


on his phone, a unique tone will send by service provider, tone
decoder IC will decode that tone & send data to unique 4 bit binary
code. That code will decode by microcontroller & will do predefined
operation.
10 KHz Osc. Circuit using Nand Gate:

This section is based on popular CD4093 NAND gate IC. This


IC has 4 NAND gates. Only one gate is using in our circuit. This
circuit needs only one NAND gate, one resistor and one capacitor.
Resistor is connected between input & output. Both inputs are
connected. One capacitor is ground with input pins. 10 KHz square
wave is available at output pin.

To enable beep tone we turn off NPN transistor (PIN 14 of


U1). To turn off beep tone we turn on that transistor. Below is
example circuit.

Main Controlling:

The heart of this circuit is PIC16F628 microcontroller. It


has two ports, PORT-A & PORT-B. Both ports are 8 bit wide. This
controller has internal oscillator, so we don’t have to use extra
oscillator.

What Mobile phone:

When selecting mobile phone for use with this project, the
following should be noted:
1: You will require a mobile phone with headset. The headset may be
faulty or incomplete – basically we only need the connector.
2: Some mobile will not detect the headset when no microphone is
connected.
3: The mobile phone has to support ‘auto answer mode’ that is, it
has to be able to answer an incoming call on the ring signal. Some
mobile phone will not show this option until a headset is actually
connected.

Working of Microcontroller:

Here caller can listen two types of beep tones. One is


short beep & other is long beep. When device will turn on, short
beep will on. When device will turn off, long beep will on.

As soon as when caller dial number, phone should be in


auto answer mode, after a pre-defined time phone will automatically
enable call.

Total 9 devices can be controlled from any where in world.

Step1:
Now when caller will press # button on his mobile then
caller will listen one short beep. This is the indicating of log in
successfully.

Step2:
To turn on device 1 caller will press button 1 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 1 caller will press button 1 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.
Step3:
To turn on device 2 caller will press button 2 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 2 caller will press button 2 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step4:
To turn on device 3 caller will press button 3 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 3 caller will press button 3 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step5:
To turn on device 4 caller will press button 4 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 4 caller will press button 4 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step6:
To turn on device 5 caller will press button 5 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 5 caller will press button 5 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step7:
To turn on device 6 caller will press button 6 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 6 caller will press button 6 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step8:
To turn on device 7 caller will press button 7 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 7 caller will press button 7 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step9:
To turn on device 8 caller will press button 8 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 8 caller will press button 8 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step10:
To turn on device 9 caller will press button 9 on his
mobile, now caller will listen one short beep. This is indicating
that device is switched on.

To turn off device 9 caller will press button 9 on his


mobile, now caller will listen one long beep. This is indicating
that device is switched off.

Step11:
To log off caller will press # button again, now caller
will listen on long beep. This is indicating log off successfully.
Bill Of Materials For cdma.DSN
Design Title : CDMA.DSN
Design Created : Tuesday, August 22, 2006
Design Last Modified : Tuesday, August 22, 2006
Total Parts In Design : 52

14 Resistors

Quantity: References Value


1 R1 47k
3 R2, R4, R5 10k
1 R3 270k
9 R6-R14 1k

6 Capacitors

Quantity: References Value


4 C1-C4 100nF
1 C5 1000uF
1 C6 100uF

6 Integrated Circuits

Quantity: References Value


1 U1 PIC16F628A
2 U2, U3 ULN2003A
1 U4 4093
1 U5 8870
1 U6 7805

13 Diodes

Quantity: References Value


4 D1-D4 DIODE
9 D5-D13 LED

13 Miscellaneous

Quantity: References Value


1 J1 TO MIC
1 J2 TO SPEAKER
9 RL1-RL9 OMI-SH-112L
1 TR1 TRAN-2P2S
1 X1 3.57MHz
NOTE:
It may be possible some times when you will press button
then it will not respond you, by returning beep. The reason when you
will press any button then that tone is not send by service provider
or tone frequency range changed. In this condition this will not
decode by tone decoder.
Simple press button again, until you will find return tone.

Dual-tone multi-frequency
A DTMF telephone keypad

Dual-tone multi-frequency (DTMF) signaling is used for telephone


signaling over the line in the voice-frequency band to the call
switching center. The version of DTMF used for telephone tone
dialing is known by the trademarked term Touch-Tone, and is
standardized by ITU-T Recommendation Q.23. A different version is
used for signaling internal to the telephone network.

DTMF is an example of a multi frequency shift keying (MFSK) system.


Today DTMF is used for most call setup to the telephone exchange, at
least in developed regions of the world, and trunk signaling is now
done out of band using the SS7 signaling system. The in band trunk
signaling tones were different from the tones known as Touch-Tone
with a triangular matrix being used rather than a square matrix.
See: blue box for more details on the switching tones.

Contents
• 1 History
• 2 Keypad
• 3 DTMF Event Frequencies
• 4 DTMF Waveform and Spectrum
• 5 See also
• 6 External links

Prior to DTMF the phone systems had used a system known as


pulse or loop disconnect (LD) signaling to dial numbers, which works
by rapidly disconnecting and connecting the calling party's phone
line, like flicking a light switch on and off. The repeated
connection and disconnection sounds like a series of clicks. The LD
range was restricted for technical reasons, and placing calls over
longer distances required either operator assistance or the
provision of subscriber trunk dialing equipment.

DTMF was developed at Bell Labs in order to allow dialing


signals to dial long-distance numbers, potentially over non wire
links such as microwave links or satellites. Encoder/decoders were
added at the end offices that would convert the standard pulse
signals into DTMF tones and play them down the line to the remote
end office. At the remote site another encoder/decoder would decode
the tones and perform pulse dialing. It was as if you were connected
directly to that end office, yet the signaling would work over any
sort of link. This idea of using the existing network for signaling
as well as the message is known as in-band signaling.

It was clear even in the late 1950s when DTMF was being
developed that the future of switching lay in electronic switches,
as opposed to the mechanical crossbar systems then in use. In this
case pulse dialing made no sense at any point in the circuit, and
plans were made to roll DTMF out to end users as soon as possible.
Various tests of the system occurred throughout the 1960s where DTMF
became known as Touch Tone. Touch tone phones were introduced to the
public at the 1964 New York World's Fair.

The Touch Tone system also introduced a standardized


keypad layout. After testing 18 different layouts, they eventually
chose the one familiar to us today, with 1 in the upper-left and 0
at the bottom. The adding-machine layout, with 1 in the lower-left
was also tried, but at that time few people used adding machines,
and having the 1 at the "start" (in European language reading order)
led to fewer typing errors. In retrospect, many people consider that
this was a mistake. With the widespread introduction of computers
and bank machines, the phone keyboard has become "oddball", causing
mistakes.

The engineers had also envisioned phones being used to


access computers, and surveyed a number of companies to see what
they would need for this role. This led to the addition of the
number sign (#) and star (*) keys, as well as a group of keys for
menu selection, A, B, C and D. In the end the lettered keys were
dropped from most phones, and it was many years before the # and *
keys became widely used, primarily for certain vertical service
codes such as *67 in the United States to suppress caller ID. Many
non-telephone applications still use the alphabetic keys, such as
amateur radio repeater signaling and control.

Public payphones that accept credit cards use these


additional codes to send the information from the magnetic strip.

The U.S. Military also used the letters, relabeled, in


their now defunct Auto on phone system. Here they were used before
dialing the phone in order to give some calls priority, cutting in
over existing calls if need be. The idea was to allow important
traffic to get through every time. The levels of priority available
were Flash Override (A), Flash (B), Immediate (C), and Priority (D),
with Flash Override being the highest priority. Pressing one of
these keys gave your call priority, overriding other conversations
on the network. Pressing C, Immediate, before dialing would make the
switch first look for any free lines, and if all lines were in use,
it would hang up any non-priority calls, and then any priority
calls.

Present-day uses of the A, B, C and D keys on telephone


networks are few, and exclusive to network control. For example, the
A key is used on some networks to cycle through different carriers
at will (thereby listening in on calls). Their use is probably
prohibited by most carriers.

DTMF tones were also used by some cable television


networks to signal the local cable company to insert a local
advertisement. These tones were often heard during a station ID
preceding a local ad inserts. Terrestrial television stations also
used DTMF tones to shut off and turn on remote transmitters.
Keypad

The DTMF keypad is laid out in a 4×4 matrix, with each row
representing a low frequency, and each column representing a high
frequency. Pressing a single key such as '1' will send a sinusoidal
tone of the two frequencies 697 and 1209 hertz (Hz). The two tones
are the reason for calling it multi frequency. These tones are then
decoded by the switching center in order to determine which key was
pressed.

DTMF keypad frequencies (with sound clips)


1209 Hz 1336 Hz 1477 Hz 1633 Hz
697 Hz 1 2 3 A
770 Hz 4 5 6 B
852 Hz 7 8 9 C
941 Hz * 0 # D

DTMF Event Frequencies

Event Low frequency High frequency


Busy signal 480 Hz 620 Hz
Dial tone 350 Hz 440 Hz
Ring back tone (US) 440 Hz 480 Hz

The tone frequencies, as defined by the Precise Tone


Plan, are selected such that harmonics and inter modulation products
will not cause an unreliable signal. No frequency is a multiple of
another, the difference between any two frequencies does not equal
any of the frequencies, and the sum of any two frequencies does not
equal any of the frequencies. The frequencies were initially
designed with a ratio of 21/19, which is slightly less than a whole
tone. The frequencies may not vary more than ±1.5% from their
nominal frequency, or the switching center will ignore the signal.
The high frequencies may be the same volume or louder as the low
frequencies when sent across the line. The loudness difference
between the high and low frequencies can be as large as 3 decibels
(dB) and is referred to as "twist".
What is DTMF?

DTMF, or dual tone multi frequency, uses two tones to


represent each key on the touch pad. When any key is pressed the
tone of the column and the tone of the row are generated, hence dual
tone. As an example, pressing the '5' button generates the tones
770Hz and 1336Hz.

The frequencies were chosen to avoid harmonics (no


frequency is a multiple of another, the difference between any two
frequencies does not equal any of the frequencies, and the sum of
any two frequencies does not equal any of the frequencies). The
frequencies generated must be with +/- 1.5%, the highest frequency
must be as loud as the lowest frequency and as much as 4db louder.
This level difference is referred to as 'twist'.

The A,B,C and D keys were used for the U S military's


Autovon phone system. They were used for Flash Override - A button,
Flash - B button, Immediate - C button and Priority - D button.
Pressing one of these keys gave your call priority, Flash Override
being the highest. While the Autovon system has been disbanded, yet
many non telephone applications use the keys today.

1 2 3 A 697Hz
4 5 6 B 770Hz
7 8 9 C 852Hz
* 0 # D 941Hz
1209Hz 1336Hz 1477Hz 1633Hz
Sampled at 8kc

Many musical tunes have been transcribed for the touch tone dial.
Some where I have a bunch, when I get time I'll include them.

DTMF Signaling:
The telephone network is designed to carry voice signals.
Nonetheless, it is frequently asked to carry other types of signals.
A simple and ubiquitous example is telephone numbers. Your telephone
has to communicate with the phone company central office the phone
number you are intending to call. It has to do that over circuits
designed to carry voice signals. Moreover, you may connect to a
long-distance carrier distinct from your local service provider
before supplying the phone number you want to call. Or you may
connect to some service that asks you to enter your credit card
number or account number, or asks you to respond to certain
questions by pressing buttons on your telephone keypad.

A system is needed that has the following structure:

It converts sequences of numerical digits into signals


that will easily traverse circuits designed for voice. The
internationally standardized way to do that is DTMF signaling, or
dual-tone, multi-frequency. DTMF signaling converts decimal digits
(and the symbols '*' and '#') into sounds that share enough
essential characteristics with voice to easily traverse circuits
designed for voice.

The sound you hear is the DTMF signal for the number you
entered. The number can include any of the digits {0, 1, ... ,9}
plus the symbols '*' and '#'. The above applet also understands the
special symbol ',' (a comma), which will produce a pause of
approximately one second. All other symbols are ignored.

The DTMF coder is thus a function that maps a phone number


into a voice-like signal. Let Digits = {0, 1, .... 9, '*', '#'} be
the set of digits that a telephone keypad can produce. Let Indices =
{1, ..., N}. An N digit phone number, therefore, is a function

Phone Number: Indices Digits.

Of course, not all sequences of digits are valid phone numbers, so


the set of all valid N digit phone numbers is a subset of the set of
N-digit sequences,

Phone Numbers [Indices Digits].


Recall that sound is

Sound: Time Pressure.

The set of all sounds is the function space

Sounds = [Time Pressure].

Thus, the above system is a function that maps a function Phone


Number into a function Sound. I.e., the DTMF signaling system is a
function

DTMF: Phone Numbers Sounds.

Both the domain and the range of this function are sets of
functions.

Specifically, the way DTMF signaling works is that each digit is


transformed into a pair of tones (hence the name, dual tone, multi-
frequency). The tones are determined from the telephone keypad as
follows:

There are four frequencies associated with the four rows,


and three frequencies associated with the three columns. Each key
then specifies two frequencies. The DTMF signal for that key is the
sum of two sinusoidal waves, one at each frequency. So for example,
the digit '4' translates into a sound with two tones, one at 770 Hz.
and the other at 1209 Hz.

Vous aimerez peut-être aussi