EmbeddedRelated.com
Forums

Software DTMF /tone detection

Started by Sagaert Johan January 6, 2006
Hi

Is  it possible to do some software DTMF /Tone detection on an ARM (LPC21xx)
?

I need some links to existing code to implement this kind of DSP techniques.
(i am no expert in DSP techniques ) if this type of controller can handle
this.

Johan


Hello Johan,

> Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) > ?
With ease. But that would be like going to the grocery store in a Ferrari Testarossa.
> > I need some links to existing code to implement this kind of DSP techniques. > (i am no expert in DSP techniques ) if this type of controller can handle > this. >
Go to TI's site and check the app notes for the MSP430. The one at the bottom of the list is from 1997 and shows how it's done. Includes generation as well. With an ARM you have a lot more horsepower so you could forego the coefficient stinginess the author was forced to do. Regards, Joerg http://www.analogconsultants.com
On Sat, 7 Jan 2006 01:48:46 +0100, "Sagaert Johan" <sagaert.j  AT
belgacom.net> wrote:

>Hi > >Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) >? > >I need some links to existing code to implement this kind of DSP techniques. >(i am no expert in DSP techniques ) if this type of controller can handle >this.
Here ya go ... http://www.embedded.com/story/OEG20020819S0057 -- Rich Webb Norfolk, VA
Sagaert Johan wrote:
> > Is it possible to do some software DTMF /Tone detection on an > ARM (LPC21xx) ? > > I need some links to existing code to implement this kind of DSP > techniques. (i am no expert in DSP techniques ) if this type of > controller can handle this.
It is certainly possible. 35 years ago I developed a DTMF detection system, with the intent of cramming it all into a single chip of the densities feasible in 1970. I did the development with a few cmos small scale chips (gates, 4 bit counters, etc) and a processor with about a 2 to 5 microsec execution time. The analog section was a band-splitting filter and two Schmidt triggers, with their hysteresis levels controlled by the peak amplitude in the other channel (i.e. a single diode into a capacitor). This enforced the 20db? maximum level difference. After that the processing was measuring periods in the two channels and accumulating a moving average. From this I could detect all tones, insert guard bands between tones, etc. The system was very reliable, in that it was extremely hard to induce false signal detection. I described it at a meeting of the IEEE about 1971, and shortly after that had a violent disagreement with the firm. About two years later they wanted me to sign a patent application, which was illegal because over one year had passed since the publication, and I refused to sign. As a result I have very little detailed memory of the system, and there are certainly no handy references. However, I can be hired to reinvent it :-) -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/>
In article <q7Gvf.42684$dO2.519@newssvr29.news.prodigy.net>, 
notthisjoergsch@removethispacbell.net says...
> Hello Johan, > > > Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) > > ? > > > With ease. But that would be like going to the grocery store in a > Ferrari Testarossa.
..but it's a Ferrari for less than 5 bucks. --Gene
Sagaert Johan wrote:
> Hi > > Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) > ? > > I need some links to existing code to implement this kind of DSP techniques. > (i am no expert in DSP techniques ) if this type of controller can handle > this. > > Johan
Well I've never tried this, but I've heard from people who seem pretty knowledgeable about this that you can just count the zero crossings for a fixed period of time and get a pretty good idea of what button was being pressed. You may want to do a bit of analog filtering. Current standards require recognizing the tone within about 50 mSec. The trick I'm told is to require longer tone duration than that. If you are trying to decode machine generated dtmf signals this might not be a good technique, but if there's a human on the other end it might work fine. If there is some feedback to the user that the keypress was recognized, you could take a fairly long time to recognize it. I've heard of folks implementing this technique on a pretty small PIC and getting it to work, so doing it on an ARM should be a breeze. And the math should be pretty simple :-) Mark
Sagaert Johan wrote:
> Hi > > Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) > ? > > I need some links to existing code to implement this kind of DSP techniques. > (i am no expert in DSP techniques ) if this type of controller can handle > this. > > Johan
Well I've never tried this, but I've heard from people who seem pretty knowledgeable about this that you can just count the zero crossings for a fixed period of time and get a pretty good idea of what button was being pressed. You may want to do a bit of analog filtering. Current standards require recognizing the tone within about 50 mSec. The trick I'm told is to require longer tone duration than that. If you are trying to decode machine generated dtmf signals this might not be a good technique, but if there's a human on the other end it might work fine. If there is some feedback to the user that the keypress was recognized, you could take a fairly long time to recognize it. I've heard of folks implementing this technique on a pretty small PIC and getting it to work, so doing it on an ARM should be a breeze. And the math should be pretty simple :-) Mark
Sagaert Johan wrote:
> Hi > > Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) > ? > > I need some links to existing code to implement this kind of DSP techniques. > (i am no expert in DSP techniques ) if this type of controller can handle > this. > > Johan
Well I've never tried this, but I've heard from people who seem pretty knowledgeable about this that you can just count the zero crossings for a fixed period of time and get a pretty good idea of what button was being pressed. You may want to do a bit of analog filtering. Current standards require recognizing the tone within about 50 mSec. The trick I'm told is to require longer tone duration than that. If you are trying to decode machine generated dtmf signals this might not be a good technique, but if there's a human on the other end it might work fine. If there is some feedback to the user that the keypress was recognized, you could take a fairly long time to recognize it. I've heard of folks implementing this technique on a pretty small PIC and getting it to work, so doing it on an ARM should be a breeze. And the math should be pretty simple :-) Mark
On Sat, 7 Jan 2006 01:48:46 +0100, "Sagaert Johan" <sagaert.j  AT
belgacom.net> wrote:

>Hi > >Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) >? > >I need some links to existing code to implement this kind of DSP techniques. >(i am no expert in DSP techniques ) if this type of controller can handle >this. >
The ARM is probably fast enough to do a FFT on a number of analog samples of the DTMF signal. It should then be easy to check at which frequencies the peak energy of the signal are. Regards Anton Erasmus
On Mon, 09 Jan 2006 13:59:09 +0200, Anton Erasmus
<nobody@spam.prevent.net> wrote:

>On Sat, 7 Jan 2006 01:48:46 +0100, "Sagaert Johan" <sagaert.j AT >belgacom.net> wrote: > >>Hi >> >>Is it possible to do some software DTMF /Tone detection on an ARM (LPC21xx) >>? >> >>I need some links to existing code to implement this kind of DSP techniques. >>(i am no expert in DSP techniques ) if this type of controller can handle >>this. >> > >The ARM is probably fast enough to do a FFT on a number of analog >samples of the DTMF signal. It should then be easy to check at which >frequencies the peak energy of the signal are.
Is that really computationally efficient ? I would simply generate the I and Q waveforms for the eight (4+4) tones, multiply with the input waveform, square the result for each frequency, add them together (to get the magnitude) and perform some comparisons. Paul