> From: Tjaart van der Walt > Have you considered using a *primitive* adaptive filter? Say, for > instance, you transmit sixteen cycles. In your RX amplifier, you > set an AGC to keep the duty cycle of the incoming data at around 50% > (The duty cycle that you transmitted). Shift the incoming data into > two bytes of RAM. Compare (XOR) the databytes with the pattern you > transmitted (in this case 10101010 10101010). This will give you a > score of 1 - 16. At the point of highest score, the measurement is > complete. > > Using a pseudo random pattern will give better results with the > correlation though. > > This will mean that you can get away without the A/D, and that you > should be able to lock onto the carrier phase itself. Using the > longest code you can given your 10Mhz clockrate, the correlation > should reject most noise sources. > > If you decide to give it a try, please let us know how it turned out. This may work with other transducer types, however these units strongly resonate at 40KHz and nothing else. Their bandwidth is very limited (+/- 100Hz) and thus it would be very difficult to make use of any finer level modulation of the signal, since the 200Hz bandwidth translates to a very poor distance resolution. Also, the Tx is very close to the Rx owing to physical constrains - the Rx picks up the initial transmission which is much higher intensity than the reflected pulse. This would tend to swamp the desired signal (unless an appropriate delay line and subtractor was used to cancel this source). I have actually used something similar to your suggestion, but in the field of IR communication. In this case the transmitter sent out a 32-bit pattern (4 of the bits being '1', the rest zero) repetitively. The receiver could tune into the pattern being transmitted, even if other transmitters were in the vicinity (so long as the other transmitters used a different 32-bit code). Regards, SJH Canberra, Australia