01-29-2009 03:09 PM
Hi,
I should warn you in advance that this is going to be an extremely long introduction to my question. Kindly bear with me. This is with regard to a small problem i have having with the detection of amplitudes of a FFT signal generated from a DTMF input time signal. Let me further clarify the situation. I have a transmitter which generates DTMF tones (a sine signal having 2 different frequencies)for a duration of 750 milliseconds. The design of the transmitter is as follows: 1 DTMF tone for 750 milliseconds, another DTMF tone (which could have another pai of frequency values) and then a 2 second pause. To detect these tones, i have converted the input time signal to its respective FFT and then comparing the amplitude of the expected frequency components to a threshold value.
If the amplitude of a particlar frequency tone is above the threshold value, a set of mathematical operations are carried out, if not, nothing happens.
The problem i am faced with now is that when a tone is received, a particular tone is not detected just once within the 750 milliseconds (as is required), but sometimes twice. This causes a duplicate read of the output. For my deisgn i wish to detect the first freqeuncy pair ONCE within the first 750 milliseconds, the second frequency pair during the second 750 milliseconds and then nothing during the pause.
I have initialized the sound card using "Sound input config.vi" with parameters:
Number of samples per channel: 2 * Sampling rate (8000 S/s) * Tone duration (0.75 s)
Sound format: Sample rate: 8000 S/s ; Number of channels: 1 ; Bits per sample: 16
Do let me know how i could prevent these duplicates from appearing 🙂
01-29-2009 03:51 PM
hello aruntutu,
show us your code...
01-29-2009 05:48 PM
Please find enclosed the code. I have tried to illustrate what the problem is. Please do get back to me if there are any clarifications to be made. I apologize for the complexity of my explanation of the problem being faced.
Many thanks once again for the speedy response and for being ready to help out with the problem.
Regards,
Arun
01-29-2009 06:33 PM
Arun,
I'm not quite sure what you want as an end result but I found this library a while back that might help you. I'd like to give credit to whomever wrote it but I don't have that information.
Hope this helps.
01-30-2009 12:30 AM
Hi GovBob,
Thanks a ton for the DTMF decoder. Well basically this is how my software is to work:
Well i've surprised myself now by making this explaination much simplier than my previous posts. This is for a project we have and hence as a beginner LabVIEW programmer, i am running into a couple of such tiny problems.
Thanks a ton, hoping to hear from you guys soon.
Regards,
Arun
01-30-2009 08:11 AM
Hi Arun,
if you want to acquire .75s worth of data, then you must configure the read VI to read as many samples as 3/4 of the sample rate. Since the sample rate you defined in the first VI is 8000 S/s, then you would want to acquire 6000 samples in the read VI.
I don't quite understand what the 12000 was. That input is simply the size of the input buffer, which you could simply leave alone. Besides 12000 samples would amount to 1.5s of data (does this represent the length of the two consecutive tones?)
I added a little image to show what I mean.
Hope this helps.
Regards,
02-01-2009 02:29 PM
Hi Joseph,
Thank you so much for the timely response and my apologies for the delay in replying as i was on a small 2 day vacation. Anyhow i did try the suggestions you gave by unfortunately i have not been able to detect the signal properly. I therefore resorted to choosing the spound format as having 8000 samples while the number of samples as 6000 (from 8000 samples/sec for .75 seconds) for the Sound input config and i use this same value for the Sound input read. What do you think about this? It seems to be able to recognize the tones but the initial problem still persists. The input signal does not die down immediately and so a peak at a particular frequency value (at the output of the FFT) seems to be recognized twice.
Any hints?? I am lost and not being too good at DSP concepts, i am blank!! 😞 Any suggestions again would be useful.
Thanks a ton,
Arun
02-04-2009 07:15 AM
Hi Arun,
what I would suggest at this point in order to see exactly what is going on, would be to graph the data that you read from the sound port. This way you may be able to understand why the tone is being detected twice, as it would probably give you a better understanding of the timing.
Regards,