You are on page 1of 15

Teachers Assessment Activity

DIGITAL SIGNAL PROCESSING


ECT 354
5th Semester B.Tech. Session-2023-24
Project Report

Title:“Generation of DTMF tones for key input from user as


0,1,2,….8,9,*,#”

Project Group Students:


1. Aditya Sanghi (11, A)
2. Aman Arora (13,A)
3. Ammar Mansuri(15,A)
4. Anurag Jaiswal (16, A)

Course Coordinator
Prof. Vipul S. Lande
Assistant Professor
Electronics and Communication Engineering Department
Ramdeobaba College of Engineering & Management, Nagpur
Contents

1. Introduction Page No. 2

2. Objectives Page No. 2

3. Theoretical Background Page No. 3 to 5

4. Flow chart Page No. 6

5. Code Page No. 7 to 8

6. Results Page No. 8 to 12

7. Applications Page No. 12

8. Limitations and Future scope Page No. 13 to 14

9. References Page No. 14

1
1. Introduction:

In telecommunication, a caller needs to dial the number of the person to which he/she wants to talk
with. The earlier versions of telephones used to have rotary type dials which are now obsolete.
Almost all the landline and mobile phone handsets now use push button keypads as shown in the
figure below.

Before DTMF was created, telephone networks used a system called “Decadic”. This system was
used extensively in telephone networks to dial numbers, it was a very useful system, but limited to the
local exchange connections requiring an operator to connect long distance calls. In the late years of
1950, DTMF was being developed for the purpose of allowing tone signals to dial long distance
numbers, which could potentially be dialed not only via standard wire networks, but also via radio
links . The version of DTMF used for telephone tone dialing is known by the trademarked term
“Touch-Tone”.

“DTMF is a signaling system for identifying the keys or better say the number dialed on a pushbutton
or DTMF keypad”.

2. Objectives:

1)Signal Generation:

Representation of Digits: Create a method to represent and generate audio signals that correspond to
standard telephone keypad digits (0-9) along with additional symbols like '*', '#', etc.
Dual-Tone Encoding: Generate specific combinations of two frequencies (one from a high-frequency
group and one from a low-frequency group) for each digit on a DTMF keypad.

2)Signal Analysis and Processing:

Frequency Analysis: Analyze the frequency components of generated signals using techniques like
Fourier Transform to confirm the presence of the expected frequencies.
Signal Quality: Ensure that the generated signals are within the acceptable amplitude range, exhibit
minimal distortion, and have appropriate durations.

2
3. Theoretical Background:

There is always a possibility that a random sound will be on the similar frequency which will trip up
the DTMF sounds system. It was recommended that if two tones were used to represent a digit, the
probability of a false signal happening is ruled out, thus the name ‘Dual Tone’.
This is the basis of using dual tone in DTMF communication. DTMF dialing uses a keypad with 12 or
16 buttons. Each key pressed on the keypad generates two tones of particular frequencies, so a voice
or a random signal cannot mimic DTMF signaling tones. One tone is generated from a High DTMF
frequency group of tones and the other from Low DTMF frequency group.
• When a button is pressed, both the row and column tones are generated by the telephone or touch
tone instrument.
• These two tones will be distinctive and different from tones of other keys. So there is a low and high
frequency associated with a button, it is essentially the sum of two waves is transmitted.
• This elementary principle can be extended to a range of applications.
The frequencies generated on pressing different phone keys are shown in the figure.
• Each row and column of the keypad corresponds to a certain tone and creates a specific frequency.
Each button lies at the intersection of the two tones.
• When these tones are received in the telephone exchange the DTMF decoder decodes these tones
into a digital code (binary equivalent sequence).
• These binary sequence codes are the address of the destination subscriber; it is read and processed
by a computer and connects the caller to the destination subscriber.
The frequencies generated on pressing different phone keys are shown in the figure.

3
4
A DTMF keypad (generator or encoder) generates a sinusoidal tone which is a mixture of the
row and column frequencies. The row frequencies are low group frequencies. The column
frequencies belong to high group frequencies. This prevents misinterpretation of the
harmonics. Also, the frequencies for DTMF are so chosen that none have a harmonic
relationship with the others and that mixing the frequencies would not produce sum or product
frequencies that could mimic another valid tone. The high-group frequencies (the column
tones) are slightly louder than the low-group to compensate for the high-frequency roll off of
voice audio systems.
The row and column frequencies corresponding to a DTMF keypad have been indicated in the
above figure.
DTMF tones are able to represent one of the 16 different states or symbols on the keypad. This
is equivalent to 4 bits of data, also known as nibble

5
4. Flow chart:

6
5. Code:

% Define the DTMF frequencies for each digit


dtmf_freqs = [697 770 852 941; 1209 1336 1477 1633];
% Get user input for the DTMF digit
digit = input('Enter a DTMF digit (0-9, *, #): ', 's');
% Check if the input digit is valid
valid_digits = '0123456789*#';

if ~ismember(digit, valid_digits)
error('Invalid DTMF digit');
end
% Create a mapping of DTMF digits to their positions in dtmf_freqs
dtmf_mapping = '123A456B789C*0#D';

% Find the position of the input digit in the mapping


idx = strfind(dtmf_mapping, digit);
% Extract the corresponding row and column indices
row = ceil(idx / 4);
col = mod(idx - 1, 4) + 1;
% Set the sampling frequency and duration
fs = 4000; % You can adjust this as needed
duration = 1; % Duration in seconds
% Create a time vector
t = 0:1/fs:duration;
% Generate the DTMF tones
row_freq = dtmf_freqs(1, row);
col_freq = dtmf_freqs(2, col);
dtmf_signal = sin(2*pi*row_freq*t) + sin(2*pi*col_freq*t);
% Normalize the signal to prevent clipping
dtmf_signal = dtmf_signal / max(abs(dtmf_signal));

N = 205;

dtmf_signal_dft = fft(dtmf_signal, N);

k=-fs/2:fs/N:fs/2-fs/N;

% Play the DTMF tone


sound(dtmf_signal, fs);
% Plot the DTMF signal
subplot(2, 1, 1); % Create a subplot with two rows and one column, and
select the first subplot

plot(dtmf_signal(1:200));
xlabel('Time (s)');
ylabel('Amplitude');
title('DTMF Signal');
% Play the DTMF tone
subplot(2, 1, 2); % Select the second subplot
plot(k, fftshift(20*log10(abs(dtmf_signal_dft)))),title('dft'),
xlabel('frequency'), ylabel('magnitude'), grid on;

7
6. Results:

Input Signals:

 Sampling Rate: 8000 Hz


 Duration of Each Signal: 1 second

Description of Output Signals:

DTMF Signals:
 The DTMF signals represent the input digit with a combination of two
frequencies.
 Normalization of the signals prevents amplitude clipping.
 Time-domain plots show the amplitude variation of the DTMF signal over the
1-second duration.

Fourier Transform Responses:

 The Fourier transform plots show the frequency content of the generated
DTMF signals in the frequency domain.
 The x-axis represents frequency while the y-axis displays the magnitude (in
decibels) of the signal components.

Discussion and Explanation:

 DTMF Signal Generation: The code generates DTMF signals based on the user input
digit. Two sinusoidal signals are created, each representing a specific frequency
associated with the input digit according to the DTMF frequency matrix.
 Signal Characteristics: The time-domain plots illustrate the amplitude variations of the
DTMF signals over the 1-second duration. Peaks in the Fourier transform plots
correspond to the frequencies used to compose the DTMF signals.
 Objective Confirmation: The generated DTMF signals align with the expected
frequencies based on the DTMF frequency matrix. The Fourier transform plots
confirm the presence of these frequencies in the generated signals.

8
OUTPUT
digit = 0

digit = 1

digit = 2

9
digit = 3

digit = 4

digit = 5

digit = 6

10
digit = 7

digit = 8

digit = 9

digit = *

11
digit = #

7. Applications:

· DTMF Controlled Home Automation System :

The main objective of this project is to implement a home automation system for achieving the remote-
control operation of home appliances using DTMF (Dual Tone Multi Frequency) technology.

· DTMF Based Electronic Voting Machine:

The main idea of this project is to replace the ballot paper type of voting system and make a convenient
form of electronic voting system by implementing a cell phone-based voting system using DTMF
technology.

· DTMF Based Effective Switching System for Power Efficiency:

In this project, switching operation of various appliances in home and office are controlled in an
effective way using DTMF decoder in the circuit. Along with DTMF decoder, microcontroller unit and
GSM mobile facilitates this type of switching operation.

12
8. Limitations and Future scope:
DTMF (Dual-Tone Multi-Frequency) tone generation is a technology used for sending signals or
commands over telephone lines. It's primarily known for its use in telephony systems, where it's
used to represent digits, symbols, or functions by generating two distinct audio frequencies
simultaneously. DTMF is widely used in applications such as interactive voice response (IVR)
systems, automated attendants, and telephone banking.Here are some limitations and potential
future scope of DTMF tone generation:

Limitations:

1. Accuracy and Noise Sensitivity: DTMF tones can be sensitive to noise and distortion, which
can lead to misinterpretation of the input. In noisy environments or over poor quality
telephone lines, DTMF may not work reliably.

2. Digit Limitation: Traditional DTMF is limited to encoding digits (0-9), the star (*) and pound
(#) symbols, and a few function keys (A, B, C, and D). It may not support more extensive
character sets or multi-language support.

3. Security Concerns: DTMF codes are not very secure because they are easy to intercept or
mimic. This makes them unsuitable for applications requiring strong security.

4. Bandwidth Considerations: DTMF signals require specific bandwidth allocation in voice


communication systems, which can limit the number of simultaneous users.

5. Standardization: DTMF tone generation relies on established standards (e.g., ITU-T


Recommendation Q.23) for encoding digits. Any modifications or expansions may require
consensus and standardization efforts.

Future Scope:

1. Enhanced Security: One potential area of improvement is enhancing the security of DTMF
communication. This can be achieved through encryption or the development of more secure
signaling methods for sensitive applications.

2. Extended Character Sets: Expanding the character set beyond digits and a few symbols could
make DTMF more versatile for a wider range of applications, including text messaging or
data input.

3. Noise Tolerance: Developing improved algorithms for noise cancellation and error correction
could make DTMF more robust in noisy environments.

4. Integration with Modern Communication Technologies: Integrating DTMF with modern


communication technologies like Voice over IP (VoIP) and WebRTC can open up new use
cases and possibilities.
5. AI and Machine Learning Integration: Leveraging AI and machine learning for better DTMF
recognition and response can enhance the user experience and make DTMF more adaptive to
individual users.

13
6. IoT and Home Automation: DTMF technology can be applied to control various devices and
appliances in a smart home or Internet of Things (IoT) environment.

7. Accessibility Features: DTMF can be used to develop accessibility features for individuals
with disabilities, such as those with speech or mobility impairments.

In summary, while DTMF tone generation has been a reliable technology for many years,
there is still room for improvement and expansion in terms of security, character sets, noise
tolerance, and integration with modern communication technologies. Its future scope
depends on evolving user needs and technological advancements.

9. References:
[1] H. K. Aggarwal and A. Majumdar, \Generalized synthesis and analysis prior algorithms
with application to impulse denoising," in Proceedings of the 2014 Indian Conference on
Computer Vision Graphics and Image Process- ing. ACM, 2014, p. 10.
[2] S. Ravishankar and Y. Bresler, \Learning sparsifying transforms," IEEE Transactions on
Signal Processing, vol. 61, no. 5, pp. 1072{1086, 2013.
[3] C. K. Chui, An introduction to wavelets. Academic press, 2014, vol. 1.
[4] http://www.dave40.co.uk/1/VwSlAr.php?id=15.

14

You might also like