You are on page 1of 3

EE-384: Digital Signal Processing Spring 2022

Laboratory 10: DUAL-TONE MULTIFREQUENCY


Instructor: Mr Ammar Naseer EE UET New Campus

Aims
In this Lab we would aim for practical application of digital signal processing. In DSP, we find numerous
applications in digitizing analog waveforms, speech coding and transmission of data like PCM, AM but
those content are covered in analog and digital communication. Here we are going to focus on the
application based on signal detection known as DUAL-TONE MULTIFREQUENCY (DTMF)

Pre-Lab:
Introduction
DTMF is the generic name for push-button telephone signaling that is equivalent to the Touch Tone system
in use within the Bell System. DTMF also finds widespread use in ATM machines, electronic mail systems
and telephone banking systems in which the user can select options from a menu by sending DTMF signals
from a telephone.

In a DTMF signaling system a combination of a high-frequency tone and a low-frequency tone represent
a specific digit 0-9 or the characters * and #. The seven frequencies are arranged as shown in Figure 11.1
to accommodate a total of 12 characters. When any key is pressed the tone of the column and the tone
of the row are generated. As an example, pressing the '5' button generates the tones 770 Hz and 1336 Hz.

Figure 11.1: DTMF Signal (Row tone+ Col tone)

Page 1
Laboratory 10:Dual Tone Multi Frequency (DTMF) 10.2

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 DTMF tones may be generated either mathematically or from a look-up table. In a hardware
implementation digital samples of two sine waves are generated mathematically, scaled, and added
together. The sum is logarithmically compressed and sent to the codec for conversion to an analog signal.

At the receiving end, the logarithmically compressed, 8-bit digital data words from the codec are received
and logarithmically expanded to their 16-bit linear format. Then the tones are detected to decide on the
transmitted digit. The detection algorithm can be a DFT implementation using the FFT algorithm or a filter
bank implementation. For the relatively small number of tones to be detected, the filter bank
implementation is more efficient. We now describe the use of the Goertzel algorithm to implement the 8
tuned filters.

If the FFT algorithm is used to perform the computation of the DFT, the number of computations (complex
multiplications and additions) is 𝑁𝑙𝑜𝑔2 𝑁. In this case we obtain all N values of the DFT at once. However,
if we desire to compute only M points of the DFT, where 𝑀 < log 2 𝑁, then a direct computation of the
DFT is more efficient. The Goertzel algorithm, which is now described, is basically a linear filtering
approach to the computation of the DFT and provides an alternative to direct computation.

Main Lab
10A: Create a tone generation function that accepts an array containing dialing digits and produces a
signal containing appropriate tones of 0.1-second duration for each digit at 8 kHz sampling frequency.

10B Create a tone decoding function that accepts a DTMF signal and detects the dialing digit.

To validate your function generate a dial-tone using 11A whose dialing digit should be (last digit of your
roll number) and detect the same digit using 11B function.

You might also like