Truncated match.
PICList
Thread
'another post - related to DTMF/tone decoders'
1998\12\18@153710
by
Harrison Cooper
Well, searching thru my saved mail, and URL's, I've found a couple of DTMF
generators using the PIC, but it seems most of the decoders are using
the M8870 DTMF decoders. But I am sure there was some discussion on using a
PIC directly for this. Maybe not. Since I want both DTMF and single tone,
maybe the best route is to have two circuits one for each.
Or, has anyone used a frequency to voltage converter and then read into a PIC
and used a LUT? I'm trying to get this to a single chip solution if I can.
comments?
1998\12\18@160009
by
Scott Dattalo
|
On Fri, 18 Dec 1998, Harrison Cooper wrote:
> Well, searching thru my saved mail, and URL's, I've found a couple of DTMF
> generators using the PIC, but it seems most of the decoders are using
> the M8870 DTMF decoders. But I am sure there was some discussion on using a
> PIC directly for this. Maybe not. Since I want both DTMF and single tone,
> maybe the best route is to have two circuits one for each.
>
> Or, has anyone used a frequency to voltage converter and then read into a PIC
> and used a LUT? I'm trying to get this to a single chip solution if I can.
>
> comments?
John Payson, Mike Keitz, myself and perhaps others have attempted DTMF
decoding with a PIC. John and I are unable to give you any software (we
did not work together) because of the terms under which we developed our
software. However, you can get the gist of the theory from here:
http://www.interstice.com/~sdattalo/technical/theory/dtmf.html
It describes the technique I used. And if I recall correctly, it's the
technique Mike used too.
I don't know about Mike or John, but I found that a 'single-chip' solution
was not possible. In other words, I had to have a little analog signal
processing. However, for your application it sounds like (from an
earlier post) that you're willing to accept some errors. If so then the
'analog signal processing' could be just a simple high pass (passive)
filter.
Scott
1998\12\18@161212
by
Andy Kunz
>Or, has anyone used a frequency to voltage converter and then read into a PIC
>and used a LUT? I'm trying to get this to a single chip solution if I can.
I'm looking for a decent F-to-V circuit.
Anybody have one I can copy?
Andy
==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================
1998\12\18@210049
by
Lynx {Glenn Jones}
Brurr-Brown makes a VFC32 chip which works excelently as either v-f or
f-v.
------------------------------------------------------------------------------
A member of the PI-100 Club:
3.1415926535897932384626433832795028841971693993751
058209749445923078164062862089986280348253421170679
On Fri, 18 Dec 1998, Andy Kunz wrote:
{Quote hidden}> >Or, has anyone used a frequency to voltage converter and then read into a PIC
> >and used a LUT? I'm trying to get this to a single chip solution if I can.
>
> I'm looking for a decent F-to-V circuit.
>
> Anybody have one I can copy?
>
> Andy
>
> ==================================================================
> Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
> ==================================================================
>
1998\12\19@045920
by
Dr. Imre Bartfai
Hi,
theoretically, there is another interesting approach:
one can build a Fourier spectrum analyser and then evaluate the power
spectra. In the Embedded Controller Handbook (AN's) there is one example
for 17C42. Such way, both dual-tone and single-tone can be reliable
detected... I did not tried it but maybe I will do it in the future...
Imre
On Fri, 18 Dec 1998, Harrison Cooper wrote:
{Quote hidden}> Well, searching thru my saved mail, and URL's, I've found a couple of DTMF
> generators using the PIC, but it seems most of the decoders are using
> the M8870 DTMF decoders. But I am sure there was some discussion on using a
> PIC directly for this. Maybe not. Since I want both DTMF and single tone,
> maybe the best route is to have two circuits one for each.
>
> Or, has anyone used a frequency to voltage converter and then read into a PIC
> and used a LUT? I'm trying to get this to a single chip solution if I can.
>
> comments?
>
>
1998\12\19@121356
by
Scott Dattalo
|
On Sat, 19 Dec 1998, Dr. Imre Bartfai wrote:
> Hi,
> theoretically, there is another interesting approach:
> one can build a Fourier spectrum analyser and then evaluate the power
> spectra. In the Embedded Controller Handbook (AN's) there is one example
> for 17C42. Such way, both dual-tone and single-tone can be reliable
> detected... I did not tried it but maybe I will do it in the future...
> Imre
In theory there's not much difference between theory and practice; in
practice though, there is... :)
I would recommend against this method for two reasons:
1) FFT computation in real time for a pic sampling signals at a rate up to
3 or 4kHz is (extremely) difficult. Perhaps the hardware multiplier on the
17C core speeds things up quite a bit. However, I'd be really surprised if
it was done (or doable).
2) One of the 'problems' with FFT's is that the frequency bins are evenly
spaced. However, for DTMF signals they're logarithmically spaced. Ideally,
you'd like the FFT bins to lie directly on top of the DTMF frequencies. At
reasonable sample rates it's impossible to achieve this. Additionally, the
FFT produces much more information than you need. You're really just
interested in the magnitude of the DTMF tones and the total energy in the
signal. The FFT decomposes the signal into many, many frequency bins.
You may wish to look at Analog Devices' DSP apnotes. They discuss this
more thoroughly. Their solution is to compute 16 DFT's: 8 at the DTMF
tones and 8 at the 2nd harmonic of DTMF tones. The second set presumably
allows one to ascertain whether a 'pure' DTMF tone was present or whether
the DTMF energy is a harmonic of some lower frequency present signal. On
comp.dsp I have read that people have found this technique to be flawed.
But I haven't tried it my self (at least not as described here).
Scott
1998\12\19@145648
by
Gerhard Fiedler
At 09:12 12/19/98 -0800, Scott Dattalo wrote:
>You may wish to look at Analog Devices' DSP apnotes. They discuss this
>more thoroughly. Their solution is to compute 16 DFT's: 8 at the DTMF
>tones and 8 at the 2nd harmonic of DTMF tones. The second set presumably
>allows one to ascertain whether a 'pure' DTMF tone was present or whether
>the DTMF energy is a harmonic of some lower frequency present signal. On
>comp.dsp I have read that people have found this technique to be flawed.
>But I haven't tried it my self (at least not as described here).
if the goal is to find out whether a certain filtered band is a base
frequency of a tone or a harmonic of some other, the second harmonic is not
very suitable, because it would be part of both, whether the filtered
frequency is a base frequency or a power of two harmonic of some other
frequency -- unless you can make sure the DTMF tones are pure sine. i'd
guess that is rarely the case.
ge
1998\12\23@142630
by
John Payson
|
> Hi,
> theoretically, there is another interesting approach:
> one can build a Fourier spectrum analyser and then evaluate the power
> spectra. In the Embedded Controller Handbook (AN's) there is one example
> for 17C42. Such way, both dual-tone and single-tone can be reliable
> detected... I did not tried it but maybe I will do it in the future...
> Imre
|I would recommend against this method for two reasons:
|1) FFT computation in real time for a pic sampling signals at a rate up to
|3 or 4kHz is (extremely) difficult.
|2) One of the 'problems' with FFT's is that the frequency bins are evenly
|spaced. However, for DTMF signals they're logarithmically spaced. Ideally,
|you'd like the FFT bins to lie directly on top of the DTMF frequencies.
Using a pair of DFT's (discrete Fourier transform) it is possible
to look for a the existence of any single frequency in a signal
which may also contain other stuff. Performing /N/ DFT's will
take /N/ times as long as performing one, but if you only need a
few, that's not a problem.
An FFT is primarily useful in cases where you want to decompose
a "sample" [e.g. 256 A/D readings taken at an 8192Hz rate] of a
signal into "all" its constituent frequencies; the result of the
FFT will be equivalent to the result of running a pair of DFT's
on every frequency which divides into the sample length. The FFT
will be much faster than running all the DFT's individually, but
will take much longer than running a small handful of DFT's.
Note that when running DFT computations, you may (and almost
certainly should) perform the multiply-accumulate-sum operations
on the fly. Beyond that, there are some gotchas to be aware of:
[1] Multiplies on anything short of a 17Cxx part are going to be
expensive. Rather than using a sinewave as the integrating
waveform, you may use a simpler step wave. My favorite wave-
form for this purpose is 1/3 period at +1, 1/6 at zero, 1/3
at -1, and 1/6 at zero. This waveform has no harmonic content
at multiples of 2 or 3, and its harmonic content drops prop-
ortional to frequency (the first non-zero harmonic is the fifth
harmonic at 1/5 strength).
[2] Another way to simplify your life is to use a zero-crossing
detector rather than an A/D. I've done a DTMF defector using
just the 16C622's comparator and it worked decently. Using an
ADC input is better, but it's more expensive and requires more
math.
[3] Rather than running DFT's on chunks of, e.g. 1/32 of a second
and having them independent, it's better to use sliding-window
filtering and averaging techniques to combine them. This is
especially important if the frequency is not a multiple of the
sample-group length.
|You may wish to look at Analog Devices' DSP apnotes. They discuss this
|more thoroughly. Their solution is to compute 16 DFT's: 8 at the DTMF
|tones and 8 at the 2nd harmonic of DTMF tones. The second set presumably
|allows one to ascertain whether a 'pure' DTMF tone was present or whether
|the DTMF energy is a harmonic of some lower frequency present signal. On
|comp.dsp I have read that people have found this technique to be flawed.
|But I haven't tried it my self (at least not as described here).
A better approach (which I've done on a DSP--it'd be beyond the
abilities of a PIC) is to have two detectors at each frequency,
one of which is more discriminating than the other. Then require
that the more discriminating detector pickup be at least a certain
fraction of the less detecting one. This results in negative sen-
sitivity near the frequency of interest, but a very narrow spike in
sensitivity at the desired frequency. Since more discriminating
filters have slower response times, it's necessary to slow down
the response of the less discriminating filter to match. Using
these techniques, though, can produce outstanding DTMF detection
and false-tone rejection.
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- Today
- New search...