> > [The 'conjecture' is that there exists a DTMF decoding solution simply by > sampling the output of a comparator. A further implied condition, known > as the PICLIST criterion, is that such a solution is implementable on > a PIC microcontroller and that source code is forthcoming...] > > > From: Scott Dattalo > > > > [cut] > > Actually Chuck, I think this is problem that can be solved without > > resorting > > to analog filters. It is true that the phase between the sine waves will > > vary and this will likewise cause the zero crossing points to wiggle > > around. > > However IMO I think you can look at say 10 or 20 milliseconds worth of > > zero crossing information and still extract the high and low tones. Stay > > tuned. > > Something tells me you're going to have a hard time doing this, Scott. > For a start, there are an awful lot of unknowns (including the frequencies). > If you don't know a-priori what the relative signal strengths, phases, noise > and slight errors in frequencies are going to be, there's just too much that > can go wrong with that nice bit stream. > > Another problem: your 'sampling rate' is effectively fixed at an average > of 2 times per cycle - exactly the Nyquist limit. Digital filtering can > oversample thus allowing some tradeoffs to be made. > Generate 4 square waves, and the corresponding quadrature waveforms (shifted 90 degrees) These square waves are at the "row" frequencies. Now, for 1/2 you'r sample period, you do the following for each of these 8 waves. Take each sample bit, multiply by the current value of the square wave, add this to an accumulator (16 bit would be great, 8 bit is probably ok) Now, at the end of the sample period, ideally you want to square both results for each freq , then take the square root. Knocking off the sign bit and adding should be ok tho. Now, look at all of the outputs, one should be a lot higher than the others. This is the "row frequency" active Then do the same for the column freqs. Low 697 770 852 941 high 1209 1336 1477 1633 Right, can anything about these freqs be used? Well, each freq is 10.5% higher than last one normalise 1 1.104 1.222 1.350 1.734 1.916 2.119 2.385 with 1.5% error in freq. Right, so if you get a routine that works for low freqs, it's just a case of altering time constant to get high. How long can we sample, if we assume worst case 1.5% high error Well, 941Hz would be 955Hz. Big errors won't hit till 45 degree phase error (1/8) So we can sample for 9ms or so. This is about 6 cycles of lowest freq, I think this works, the windows are 1/2 as wide as the gaps between freqs. Run this a couple of times, to error check results, will do more working tomorrow, if I remember, get some better numbers. > If you are after a _practical_ solution i.e. doesn't use more registers > than are available in the typical, say, 16C84; and doesn't take more than > 50ms of sampling; and is reasonably immune to all the variables listed above; > then I think real analogue sampling is required. Digital filtering in > some form or another, I would be willing to bet, would be the most robust > method. > > One of the most important properties of a practical decoder would be the > ability to determine when there is _not_ a DTMF signal. Digital filtering > can easily determine this situation, whereas your zero-xing solution (if > one exists) would have more difficulty e.g. it is fundamentally insensitive > to the amplitude of the incoming signal. > > Regards and good luck, > SJH > Canberra, Australia > -- Ian Stirling. | http://web.students.stir.ac.uk/~is06 AKA Caeser, Bolonewbie. | Pretty sad at the moment, should get | better tho.