On Sat, 20 May 2000, Russell McMahon wrote: > Just a thought - > > The fact that the original software worked poorly where there was an > amplitude difference in the two tones suggests that the higher amplitude > tone predominated in its control of the zero crossing points (makes sense). > > Just maybe you could improve results with two zero crossing inputs with a > high pass and low pass filter feeding each. As the tone pairs are in two > frequency groups one input would be biased towards detecting zero crossings > in each group. The filters' cross-over point would be intermediate between > the two tone groups. The hardware for this would be very simple - possibly > as simple as two RC networks and at worst a one transistor low pass and high > pass 2 pole filter. Also a second zero crossing detector. Still a fairly > minimal hardware solution. Precisely! The caveat is that now your signal has been split in two - a high and a low frequency portion. This means that the algorithm (at least my version of it) has to run twice. Btw, for an extra cap, you can get a third order filter. In other words, one opamp is sufficient for a third order filter. Two opamps can give you a 5'th. A quad opamp can give you a 5th order low-pass and a 5th order high pass. The quality of the opamp doesn't have to be too good either. There other factors to consider as well. For example, if you wish to remove the dial tone too, then a third order high pass elliptic file with a pole at 440hz can be implemented. Also, if you wish to avoid aliasing then you also have to consider filtering out high frequencies as well. For my case (whose details I can't fully disclose), I used a combination of these analog techniques. And guess what, it STILL isn't 100% (when you take into account the full specification which specifies the dynamic range of the incoming signals, their twist, and the relative strength of "noise" (e.g. voices) present. But, there is one more really simple analog trick that I'll dangle out there for you to ponder, but I can't tell. But it's so non-obvious that even if I did tell, you wouldn't believe! But a couple of LM324's with a handful of resistors and capacitors and of course a pic can perform wonderfully. I'd still recommend that you use a dedicated DTMF decoder unless you're trying to minimize cost. Designing a robust decoder using the techniques I describe (and hint at) is not trivial. Scott