Thursday, January 17, 2013

Dual Tone Multiple Frequency - DTMF

DTMF stands for dual tone multiple frequency. DTMF is a term which used in telephone industry. When any key on telephone or mobile phone is pressed one tone is generated and it is audible which is nothing but a DTMF tone. To decode DTMF tone from mobile phone we need MT8870 DTMF decoder IC, 3.5mm male and female connector.


What is DTMF code..??

When any of the key like "1", "2", "*", "#" etc is pressed particular code is transmitted. This code is consist of two frequency among which one is higher frequency and second one is lower frequency. Following table shows the combination of frequency for respected keys.

1 2 3 697 Hz
4 5 6 770 Hz
7 8 9 852 Hz
* 0 # 941 Hz
1209 Hz 1336 Hz 1447 Hz

According to above table "8" is combination of lower frequency of 852 Hz and higher frequency of 1336 Hz and "#" is of lower frequency of 941 Hz and higher frequency of 1447 Hz. So this is all about DTMF code, now let see about how DTMF code are generated, transmitted and Decoded in mobile phone system. Here i am only talk about GSM system.

Transmission of DTMF code in GSM network

In GSM networks so many channels are available but mainly there is only two channels...
    1) Physical Channels
    2) Logical Channels

DTMF code are transmitted in FACCH i.e. fast associated control channel. Complete hierarchy of FACCH  is given below

  • GSM Channels
    • Logical Channels
      • Signalling Channels
        • Dedicated Control Channels
          • Fast Associated Control Channel

FACCH is a bidirectional channel i.e. uplink and downlink. It is used to transmit and receive emergency controlling signal messages. When any data or message need to be transmitted through this channel, it will replace the voice signal to digital signalling data for very short amount of time.

Decoding DTMF code

When any DTMF code has been received at mobile phone it can be audible through speaker. So to decode this DTMF code speaker output it self can be used. Output of speaker is connected to IC MT8870 which is DTMF decoder IC. (MT8870 Datasheet) It used widely to decode DTMF code. It gives 4-bit digital output q1, q2, q3, and q4 according to the received key. Following table shows the equivalent digital output for each key.

DTMF code table

Connecting mobile phone with MT8870

Our main aim is to connect mobile phone's speaker output to MT8870 so for achieving this we will use aux cable which has 3.5mm male audio jack at both its end as shown in below image. 3.5mm audio jack is a TRS connector which is Tip Riing Sleeve (ground) as shown in below image. Now we will use 3.5mm female audio jack to get mobile phone's speaker output and connect it with MT8870. Go through following images to get clear understanding..

Aux cable
Aux Audio Cable

 3.5mm jack specification
3.5mm Male Jack Specifications

3.5mm female connector
3.5mm Female Jack

Connection Diagram for MT8870

Circuit diagram for decoding DTMF code using MT8870 is given below. In our requirement MT8870 is configured in single-ended input configuration.

Circuit diagram to decode DTMF code using MT8870

As shown in circuit MT8870 needs crystal oscillator of 3.58MHz (Exactly 3.579545 MHz) and 5v Vcc supply to be functional. Crystal is connect in between pin no 7 and 8. Pin no 8 is connected to Vcc and 9 is connected to ground. Now lets talk about pin description of MT8870 but before that take look at internal structure of MT8870.

Courtesy : Mitel

Pin Description of MT8870:

1 IN+ : This pin is input to the non-inverting terminal of internal op-amp.

2 IN- : This pin is input to the inverting terminal of internal op-amp. Input signal from the mobile is applied to this pin using 3.5mm connector pairs and aux cable.

3 GS : Gain selector, This pin provides feedback to the op-amp circuitry. Feedback resistor of appropriate value is connected between this pin and input signal. Value of resistor decides the gain of amplification. 

4 Vref : Reference Voltage, This is output pin. Op-amp is configured in differential amplifier mode and both the inputs are bias in mid-rail range so for that generally Vcc/2 voltage is apply to non-inverting terminal hence Vref is connected to IN+ i.e. pin no 1.

5 INH : Inhibit, This is active high input pin. If you don't want to decode A,B,C,D then connect this pin to Vcc and if you want to decode them then connect it to ground, internally it is pulled down.

6 PD : Power down, This is also active high input pin. Vcc supply (High) at this pin enables the power down mode and in power down mode oscillator and internal filters stops functioning and IC goes to stand by mode.

10 TOE : Three state output enable, This is active high input pin. +Vcc at this pin will allow output Q1, Q2, Q3 and Q4 to latch data from internal latch circuitry. When this pin is connected to ground output Q1 to Q4 will not latch decoded DTMF code. This pin also pulled up internally.

11 to 14 Q1 to Q4 : four output bits, When TOE is connected to Vcc this will represents the DTMF code as per valid DTMF tone and when TOE is connected to ground this pins are remain in high impedance state.

15 StD : Delayed steering, This is output pin. When DTMF tone received, decoded and latched by the output pins Q1 to Q4 then Std will goes high and when voltage on pin no 17 i.e St/Gt falls below threshold voltage Vtst then Std again fall down to low.

16 ESt : Early steering, This is output pin. If valid DTMF tone is received then this pin goes high and remains high till any loss of signal occurs however Loss of signal make this pin to go logic low.

17 St/Gt : This is dual purpose pin and performed bidirectional operation i.e St - Steering input as input and Gt - Guard time as output. When voltage greater Vtst appears at St, it causes latch to register new output data. GT is used to configure time constant of Est pin.

Filters and Detector Section

This circuitry is varies vendor by vendor. But most of the ICs are used two band pass filters one is for low tone group frequency and another one for high tone group frequency. Mostly anti-aliasing and switched capacitor filters are used. Detector sections generally used digital counting techniques to verify the valid DTMF tone and produce output.

Complete process hierarchy is given in below image.

Process of decoding DTMF code using MT8870 from mobile phone

MT8870 IC don't have good noise immunity at output side so to remove this drawback inverter IC can be used which inverts the DTMF code and gives good noise immunity.


If you having any doubt feel free to do comment...

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.