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...

Share With Others

Subscribe Social Profiles To Stay Updated


  1. what kind of problem are you facing..??

  2. what problem you are getting...??

  3. when call is in progress, and you press any key on your cell phone.. you will hear one tone for every key press..that is nothing but a DTMF tone..

  4. kunal kashalkar4/23/13, 11:38 AM

    i checked my cell phone keypad gives dtmf output, i connrcted led at output of mt8870 with their cathode ground, but when any key pressed none led glows

  5. kunal kashalkar4/23/13, 11:50 AM

    i am using 4 pin 3.5 mm audio connector, here is pinout

    1 tip, 2 ring(left channel), 3 ring(right channel), 4 sleeve

  6. can you tell me which mobile phone are you using...?

  7. kunal kashalkar4/23/13, 4:41 PM

    HTC desire c

  8. kunal kashalkar4/23/13, 5:27 PM

    i connect led between tip & ring 2 led's cathode at ring & led'd anode at tip, when i pressed any key of cell phone keypad led glows, i think i succesfully pass dtmf tone to mt8870, but not getting output, can u suggest me some solution to solve these problem

  9. kunal kashalkar4/23/13, 5:40 PM

    can u post assembled circuit image

  10. http://pinoutsguide.com/HeadsetsHeadphones/htc_hd2_headphone_pinout.shtml

    look at the link i given..and now connect either pin no 1 or 2 of your hands free with pin no 2 of MT8870 IC and pin no 3 of your hands free with ground..

    Passing DTMF tone to MT8870 is little bit crucial task..try this one and if it wont work then tell me how you are passing DTMF tone to MT8870

  11. kunal kashalkar4/24/13, 11:31 AM


    i connect the circuit as mention ur dtmf tutorial, but still not getting output, connected either pin no 1 or 2 of hands free with pin no 2 of MT8870 IC through (in series of 0.1uF & 100K(or 47K)resistor) and pin no 3 of your hands free with ground

  12. It should work now..you may be doing something wrong..use female jack connector..as it shown in the image above..connect wires to female jack connector and then connect those wires to MT8870 IC..actually i don't have internal image of female jack connector otherwise i will upload it for you..

  13. gaurang patel4/26/13, 1:09 PM

    i was able to get output for fewer time then suddenly it stops functioning.
    output which i was getting at std pin was around 2.0 to 2.3 V which
    micro controller was not able to detect out how can i improve that part?

  14. Use 74LS04 IC which is of inverter in between microcontroller and outputs of MT8870 IC..but keep in mind that all your DTMF code are then get inverted..

  15. kunal kashalkar4/29/13, 1:20 PM

    hello niral,
    can u explain me how u send dtmf tone to mt8870 decoder circuit from ur receiver phone

  16. Look at the image..hope it will helpful..
    Tell me if you have still any doubt..

  17. kunal kashalkar5/3/13, 11:34 AM

    hi niral,

    if i connect mt8870 output directly connect to motor driver not using 74LS04 & also not using pull up resistor at output of mt8870
    will circuit work fine?

  18. If you get proper voltage level at output of MT8870 then you can connect it directly to motor driver..

  19. kunal kashalkar5/8/13, 2:34 PM

    hi niral,

    can u share me how u send dtmf tone from cell phone to dtmf decoder circuit, using making phone call from another cell phone to attached cell phone or just pressing cell phone's keypad key.

  20. kunal kashalkar5/8/13, 2:36 PM

    hi niral,
    how i can check wheather cell phone sending dtmf tone or not.

  21. kunal kashalkar5/8/13, 4:58 PM

    hi niral,
    how i can send dtmf tone from cell phone to dtmf decoder circuit

  22. visit this link : http://en.wikipedia.org/wiki/File:DTMF_dialing.ogg

    if you can listen this kind of tone in your mobile phone that is keypad tones that means mobile phone is sending DTMF code correctly..

  23. disqus_Ycc27yIOMn5/11/13, 12:27 PM

    hi, may i know what kind of handphone brand and its model that can produce DTMF code?

  24. headphone is not responsible phone DTMF tone..DTMF tone and DTMF code both are different things..

  25. headphone is not responsible for generating DTMF tone..DTMF tone and DTMF code both are different things..

  26. disqus_Ycc27yIOMn5/12/13, 10:49 AM

    i has done the wiring as http://www.youtube.com/watch?v=OF3SfGyvgbg and use 3 pin 3.5mm audio connector and also use nokia expresmusic 5800. But the Led not ON when the keypad 1, 2,3 etc was pressed.

  27. it is difficult to say anything without circuit diagram..
    post circuit diagram if you can

  28. disqus_Ycc27yIOMn5/12/13, 4:58 PM

    The circuit diagram as below. Thanks for help me.

  29. Circuit diagram is okay..you might be missing something..try to follow the steps which i mentioned above..Decoding DTMF code is little bit difficult and it is all depend on how you feed DTMF tone from your phone to DTMF decoder IC i.e MT8870..

    and please do not create new thread for every comment..

  30. Abubakar Khan5/18/13, 11:56 AM

    how value of resistors and capacitors are selected? and why resistors and capacitors are applied? and these capacitors are polarised or non-polar?

  31. Abubakar Khan5/24/13, 1:20 PM

    can i use buffer, instead of an inverter?

  32. yes you can..but it depends on two thing first one is where you connect your output from MT8870 as an input and second one is what amount of voltage you getting at output terminals..

    If you want to connect your output to any microcontroller then i would suggest you to use inverter...

  33. kunal kashalkar6/12/13, 12:12 PM

    is there any difference between MT8870 & MT8870DE

  34. There is no difference..Circuit connection remains same for both..

  35. kunal kashalkar6/12/13, 6:26 PM

    i try many time by dissembling circuit & changing resistor value or changing capacitor value, but not getting MT8870DE's output

  36. kunal kashalkar6/20/13, 11:21 AM

    hi niral,

    what is the difference between using aux cable & using directly connect headphone to circuit.

  37. kunal kashalkar6/26/13, 3:25 PM

    hi niral,
    finaly my dtmf decoder circuit work, but now problem is i assembled circuit on breadboard it works fine & when i make pcb & soldered all component it gives me output after more than one type, will u suggest me some solution for that.

  38. Finallyyy...!!! happy to hear that...Circuit diagram provided in that link is for decoding DTMF code from telephone line..And you are using mobile phone..so that may be the one problem or else you have done some wrong connections in your PCB..like unwanted shorts and all..

  39. why DTMF is called Dual tone???????

  40. DTMF use two frequency for transmitting one key input which is an audible tone..So it is called Dual Tone..In Short when any key is pressed it generate an audible tone which is consisting of two frequency..

    Look at the block diagram of MT8870 IC..It uses two digital circuitry which are digital detection algorithm and code converter...this two circuitry needs clock inputs..So oscillator is used for that purpose..

  41. hi...
    I made this circuit via mobile phone and in first try, iI tested it on berd_bord and it worked well.But now,I made it via Pcb and when I testing that never works well.each that I test its Led's will be on by random.and it isn't the true Dtmf cod that I pressed. in your oppinion what is the problem.
    my circuit is similar to this link but may input capacitor isn't 10uf, it is 0.47uf.

  42. Your Circuit diagram is well..There would be some other issues like shorts of connection or copper track on your PCB..and another problem would be your DTMF signal from phone may not be properly transfer to decoder IC..

  43. thanks for your answer.
    before I read your answer, I repeat the circuite testing and it worked well.but nowI see that dtmf's decoded cods are sending to my input ports of my micro controler(atmega8),but i dont recive the out put cods that sends from atmega8 to driver(L293d)...
    i didn't use any crystal to my atmega8....in your oppion is this my problme??

  44. Which Atmega8 Chip are you using..???

  45. hi..plz help me..i used the below ckt but it is not working..is it correct ckt or nt

  46. i made the same circuit as you have shown in your link but it isn’t working.
    can you plz help



Social Profiles

Receive latest updates about Articles, Tutorials and Projects in your inbox

Enter your email address:

Do Not Copy