DSPRelated.com
Forums

DTMF decoder

Started by ivan September 5, 2006

ivan wrote:
>>>The one bit quantization (comparator) is usually good enough to decode >>>the DTMF. Especially if you put the simplest RC bandpass in the front of >> >>it. > > > Do you mean: > a) 2 RC bandpass filters to separate the two groups of (high and low) > frequency.
No. Just a simplest bandpass with two resistors and two capacitors. BW ~ 0.5...1.7kHz
> b) Or maybe is enough to sample the wave as it comes in and the filter is > used only for noise reduction.
Yes. The power frequency is the main concern.
> > if (a) then how do you deal with speech-rejection?
In the appnotes, there is bullshit about the second harmonics. Ignore it, use the simple logic: 1. Find the three max. amplitudes: A0 > A1 > A2. 2. A0 and A1 must belong to the different frequecy groups. 3. A2/A1 must be lower then the threshold. This perfectly works. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Joerg wrote:

>>> Not in 1970. The only things available then were based on big iron >>> cores and brute force narrow band filters. >> >> > > There was another way to do it but in telco this was not well > understood: Mix up to a few ten kHz and filter there. Much easier.
It is difficult to believe that it was easier to get the required Q and stability at those frequencies. Or, perhaps, you could use crystals as the filters?
>> Still the uA741 was already invented that time, right?
> Sure, I did it with uA709 in those days. But: Look at it from a > manufacturer's point of view. In the 70's you could get 1% resistors > but they cost much more than today. However, you could not buy 1% > capacitors unless you paid a prohibitive price. The early microprocessors were available also (?), so the digital DTMF decoder could be built. Too expensive at that time, perhaps.
>> The other solution is the line of the synchronous detectors which >> should not be the problem at that time either.
It seems to be the simplest solution which should work without the need for adjustment. Using the discrete logic, it would take about 15 ICs to build the decoder.
> > Then in the 80's switch-cap filter chips came. Unfortunately the mfgs > kept their prices so high that engineers used them only if they > absolutely had to. Consequently many these wonderful filter chips fell > from grace and vanished :-(
I wasn't impressed with the sw cap technology. A dynamic range and the S/N of the filters seemed to be way too low. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
>>>> Not in 1970. > The early microprocessors were available also (?), so the digital > DTMF decoder could be built.
Early DTMF-decoders ( Mostek ) in the 70ies had the the bandsplitfilters done as OP-AMP RC-filters. Usually trimmed hybrids. Followed by a simple digital circuit that decided on the DTMF-signal based on the two digital bitstreams. Next generation was replacing the analog filters by SC-filter-ICs. Next generation ( about 1979 ) combining filter and digital logic to a single CMOS-IC. MfG JRD
Hi Vladimir,

I have another doubt now... I have 10 freqs (2 more for the handshaking), if
I add all the periods for each freq I get about 9ms, this is the time needed
to scan all tones once for one period only. Each DTMF tone last 50ms, this
means that I can scan each tones max 5 times. But I have two square waves to
scan (sin/cos), hence I can only scan each tone for 2 periods only. Would
this be enough to get sensible results?

Thanks
ivan


Vladimir Vassilevsky wrote:
> Joerg wrote: > >>>> Not in 1970. The only things available then were based on big >>>> iron cores and brute force narrow band filters. >> >> There was another way to do it but in telco this was not well >> understood: Mix up to a few ten kHz and filter there. Much easier. > > It is difficult to believe that it was easier to get the required > Q and stability at those frequencies. Or, perhaps, you could use > crystals as the filters? > >>> Still the uA741 was already invented that time, right? > >> Sure, I did it with uA709 in those days. But: Look at it from a >> manufacturer's point of view. In the 70's you could get 1% >> resistors but they cost much more than today. However, you >> could not buy 1% capacitors unless you paid a prohibitive price. > > The early microprocessors were available also (?), so the digital > DTMF decoder could be built. Too expensive at that time, perhaps. > >>> The other solution is the line of the synchronous detectors which >>> should not be the problem at that time either. > > It seems to be the simplest solution which should work without the > need for adjustment. Using the discrete logic, it would take about > 15 ICs to build the decoder.
If you look back at my posting <44FE2537.34FEFF80@yahoo.com> (somebody has removed the necessary attributions) you will see I could do it with only 3 packages, at the time (1970). You also can't use filters with excessive Q, because there are tolerances on the generated frequencies. There is a simple cure for availability of 1% capacitors - incoming selection. All the 5% caps can be used by choosing the appropriate resistors, which were relatively cheap. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net>
"ivan" <wolfsafety@wolfsafety.it> wrote in message
news:edpd7l$g6n$1@news.flashnet.it...
> Hi Vladimir, > > I have another doubt now... I have 10 freqs (2 more for the handshaking),
if
> I add all the periods for each freq I get about 9ms, this is the time
needed
> to scan all tones once for one period only. Each DTMF tone last 50ms, this > means that I can scan each tones max 5 times. But I have two square waves
to
> scan (sin/cos), hence I can only scan each tone for 2 periods only. Would > this be enough to get sensible results?
It sounds like you're expecting to do the tone searches sequentially. I don't think that's what is intended. I expect that for an input you multiply by sin *and* cos and accumulate the two results. With the same data input to the same with sin and cos for the other frequencies too. At the end a sampling period you make a determination of the energies in each frequency (at least notionally by using the sum of squares of the sin and cos accumulators) making sure only one from each band is strong. Only if you run out of time would you consider filtering sequentially. Peter
"Peter Dickerson" <first{dot}surname@tesco.net> ha scritto nel messaggio
news:dXWLg.11442$8V4.6380@newsfe5-win.ntli.net...
> "ivan" <wolfsafety@wolfsafety.it> wrote in message > news:edpd7l$g6n$1@news.flashnet.it... > > Hi Vladimir, > > > > I have another doubt now... I have 10 freqs (2 more for the
handshaking),
> if > > I add all the periods for each freq I get about 9ms, this is the time > needed > > to scan all tones once for one period only. Each DTMF tone last 50ms,
this
> > means that I can scan each tones max 5 times. But I have two square
waves
> to > > scan (sin/cos), hence I can only scan each tone for 2 periods only.
Would
> > this be enough to get sensible results? > > It sounds like you're expecting to do the tone searches sequentially. I > don't think that's what is intended. I expect that for an input you
multiply
> by sin *and* cos and accumulate the two results. With the same data input
to
> the same with sin and cos for the other frequencies too. At the end a > sampling period you make a determination of the energies in each frequency > (at least notionally by using the sum of squares of the sin and cos > accumulators) making sure only one from each band is strong. Only if you
run
> out of time would you consider filtering sequentially. > > Peter > >
Ok! I see what you mean... thanks!
CBFalconer wrote:

> Vladimir Vassilevsky wrote: > >>Joerg wrote: >> >> >>>>>Not in 1970. The only things available then were based on big >>>>>iron cores and brute force narrow band filters. >>> >>>There was another way to do it but in telco this was not well >>>understood: Mix up to a few ten kHz and filter there. Much easier. >> >>It is difficult to believe that it was easier to get the required >>Q and stability at those frequencies. Or, perhaps, you could use >>crystals as the filters? >> >> >>>>Still the uA741 was already invented that time, right? >> >>>Sure, I did it with uA709 in those days. But: Look at it from a >>>manufacturer's point of view. In the 70's you could get 1% >>>resistors but they cost much more than today. However, you >>>could not buy 1% capacitors unless you paid a prohibitive price. >> >>The early microprocessors were available also (?), so the digital >>DTMF decoder could be built. Too expensive at that time, perhaps. >> >> >>>>The other solution is the line of the synchronous detectors which >>>>should not be the problem at that time either. >> >>It seems to be the simplest solution which should work without the >>need for adjustment. Using the discrete logic, it would take about >>15 ICs to build the decoder. > > > If you look back at my posting <44FE2537.34FEFF80@yahoo.com> > (somebody has removed the necessary attributions) you will see I > could do it with only 3 packages, at the time (1970). You also > can't use filters with excessive Q, because there are tolerances on > the generated frequencies. > > There is a simple cure for availability of 1% capacitors - incoming > selection. All the 5% caps can be used by choosing the appropriate > resistors, which were relatively cheap. >
That is an expensive proposition, plus you have to sell all the ones between 1% and 5% on the gray market. Selecting resistors is a labor intense job, I would have never been allowed to spec in something like that. What we did with Hilbert shifters and stuff like this was passive (and sometimes active) laser trim. But we tried our darndest to avoid any of that. -- Regards, Joerg http://www.analogconsultants.com
Joerg wrote:
> > CBFalconer wrote: >
... snip ...
>> >> There is a simple cure for availability of 1% capacitors - incoming >> selection. All the 5% caps can be used by choosing the appropriate >> resistors, which were relatively cheap. > > That is an expensive proposition, plus you have to sell all the ones > between 1% and 5% on the gray market. Selecting resistors is a labor > intense job, I would have never been allowed to spec in something like > that. What we did with Hilbert shifters and stuff like this was passive > (and sometimes active) laser trim. But we tried our darndest to avoid > any of that.
I was talking about selecting caps, not resistors. For those you could (this is 1970, remember) buy the appropriate values. Besides, IIRC, the active filter calculations for the band-splitting filter didn't require better than 5% components anyhow. Cap selection requires a jig. Place cap on jig, read, dump in appropriate bin. Even with manual labor it is hard to see more than 10 seconds per cap, triple that to 30 sec to allow for breaks, bathroom time, chatting time, etc. Building the jig requires some ingenuity. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net>
Joerg wrote: 
> CBFalconer wrote: >
... snip ...
>> >> There is a simple cure for availability of 1% capacitors - incoming >> selection. All the 5% caps can be used by choosing the appropriate >> resistors, which were relatively cheap. > > That is an expensive proposition, plus you have to sell all the ones > between 1% and 5% on the gray market. Selecting resistors is a labor > intense job, I would have never been allowed to spec in something like > that. What we did with Hilbert shifters and stuff like this was passive > (and sometimes active) laser trim. But we tried our darndest to avoid > any of that.
I was talking about selecting caps, not resistors. For those you could (this is 1970, remember) buy the appropriate values. Besides, IIRC, the active filter calculations for the band-splitting filter didn't require better than 5% components anyhow. Cap selection requires a jig. Place cap on jig, read, dump in appropriate bin. Even with manual labor it is hard to see more than 10 seconds per cap, triple that to 30 sec to allow for breaks, bathroom time, chatting time, etc. Building the jig requires some ingenuity. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. XX-Mozilla-Status: 8018.att.net>