[Company Logo Image]

Home Up Feedback Contents Search

Theory Electrical Mechanical Limitations Results Applications


[Under Construction]



The Mega163 is not a specialized DSP unit, thus the simple autocorrelation peak detection algorithm is used to determine the period. As the absolute position of the peaks depends somewhat on the phase of sampling, there is some degree of error in calculating the frequency when it falls between integer frequencies. If the unit were able to sample more and faster, it might be able to ameliorate these effects. There are two reasons why this cannot be done, however.

Limited Memory The Mega163 cannot interface with external SRAM on the board, as the Analog port (Port A) is used in this design. The SRAM requires PortA.

Limited Speed The ADC requires a certain amount of time to operate, and the algorithm itself uses O(n) (char -> integer) multiplications, but the largest constraint is to output through the UART. For some reason unknown to us, a delay of 50us is needed after outputting to the UART in order for the message to go through as desired, rather than as a string of unintended ASCII characters. In a final implementation the UART would be unnecessary, but for the purposes of testing, the output is very helpful.

All of the data is collected and analyzed before output of a final conclusion to the UART, so the UART constraint does not affect the frequency range over which detection is possible, but the rate at which it comes to conclusions. A faster conclusion cycle may make some averaging of periods (and hence frequencies) feasible, though.

The system at present works best between frequencies of 400 to 800 Hz, well within the audio range. As expected, the distance to which it is effective depends greatly upon the volume from the speaker. Preliminary tests indicate that it is possible to detect a barely-audible signal (subjectively speaking) only a few cm away from the microphone, and a signal that can be heard easily over the background noise of the lab can be detected at least a meter away.



Home ] Up ]

Send mail to zag2@cornell.edu with questions or comments about this web site.
Last modified: May 01, 2002