Steve Hardy wrote: > > I have recently made a PIC-powered sonar, and thought I might share the > experience. Of course, there are commercial units (e.g. Polaroid), > but then I didn't have one of these in my junk-box... Thanks for sharing this, it was truly informative. :) 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. -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za _____________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | | WASP International http://wasp.co.za | | GSM and GPS value-added applications | | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 | |_____________________________________________________________|