DSPRelated.com
Forums

1800Hz Detection

Started by O-Zone January 23, 2004
Hi all,
i'm new to DSP so consider that before reply me :-)

I have PCM data from a Voice Modem and i need to dectect if is a 1800Hz
tone. I think that i need to use FFT (fftw, for precision) but i can't be
able to understand nothing.

Someone can help me with C code example ?

Thanks in advance, Oz
Hi all,
i'm new to DSP so consider that before reply me :-)

I have PCM data from a Voice Modem and i need to dectect if is a 1800Hz
tone. I think that i need to use FFT (fftw, for precision) but i can't be
able to understand nothing.

Someone can help me with C code example ?

Thanks in advance, Oz
Hey Oz,

You don't necessarily need to use FFTW...  That is just a faster method of
doing it.  A standard FFT could do the trick... It all has to do with your
sample rate and the speed of your platform...

If you just want to check if it is 1800Hz and don't care about any other
frequencies, you can do a simple check for a single frequency (like doing a
DFT at a specific frequency):
multiply the input by a sine wave at 1800Hz and add the multiplication
results together into one accumulator (acc1)
multiply the input by a cosine wave at 1800Hz and add the multiplication
results together into another accumulator (acc2)
Do this for a fixed period of time (~10ms-50ms, preferably a multiple of
1/1800Hz), and then find (acc1^2+acc2^2)^(-2).  If the result is significant
then you have 1800Hz on your input!

I have no idea how accurate you need your results...  You haven't really
specified it in your post!

Cheers,

Chris

"O-Zone" <o-zone@zerozone.it> wrote in message
news:pan.2004.01.23.05.49.33.880322@zerozone.it...
> Hi all, > i'm new to DSP so consider that before reply me :-) > > I have PCM data from a Voice Modem and i need to dectect if is a 1800Hz > tone. I think that i need to use FFT (fftw, for precision) but i can't be > able to understand nothing. > > Someone can help me with C code example ? > > Thanks in advance, Oz