>> He didn't say the frequency is constant. > > Actually he started by asking about measuring individual > pulses. =A0I am really skeptical that is going to work. Yes, a single pulse will produce an oscillating pattern in air. >> Thus he could vary the >> frequency of the sine during the mesarument, get the analog >> difference signal, digitize it, and then using math, based on >> many points, calculate the frequency of ZERO PHASE SHIFT. > > It's a little unclear what you are saying, but using multiple frequencies > and measuring the phase delay of each relative to some reference is proba= bly > the best way to measure distance via sound. I meant continuosly varying the frequency with the step 0.1% and catching (calculating) the moment when the received signal will be of the same phase as the reference signal (sent signal). This would mean that the the time to propagate the parth is the whole number of periods for the found frequency plus some constant latency.. The analog difference between the two signals will produce zero signal (teoretically). This moment is much easier to be caught than just trying to figure out the real phase shift at that level of precision . >> ... generated by 100 mHz DAC. > > Huh? =A0100 millihertz is way way too low for the tiny systems the OP was > describing. =A0Think of the size of the transducers you'd need to get any > meaningful amount of air to move when one cycle takes 10 seconds. That was a typo, sorry. I meant that the DAC would be clocked at 100 megahertz. And its output at, say, 1000 steps would be 100 kilohertz sine wave. At the sound path equal to 10 wave lengths the 10% change in the DAC frequency (and also in wave lengh) would produce full period phase shift on the received signal in regard to the reference signal. The change in the distance to the object of 0.1 wavelength would cause the phase shift 0.2 period. To get the phase shift back to full period he would change the number of clocks per DAC period by 20%, that is 200 steps. Thus the 1 step change in number of DAC clocks per period would correspond to 0.1 * 3mm / 200 =3D 0.0015mm change in distance. Also he can fix the number of DAC steps per period and vary the DAC clock frequency. What's better depends on the app specs. The idea, indeed, depends heavily on the speed of sound in the local air, but for measurements of low frequency variations of distance to some object it should work well, say for measurement of vibrations of concrete under heavy truck moving over it. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist