by philba » Wed Apr 11, 2012 12:57 pm
No, it's not as simple as applying power. I'm sure you are familiar with the theory - send out a sound, listen for the echo, measure time and that defines the distance. Lots of details though.
The transducer needs to be driven at it's resonant frequency - typically 40Khz but there are lots of other frequencies. Since it's trying to produce an echo, returned energy is proportional to transmitted energy (everything else held constant). Thus, you want to transmit as much power as possible. You really can't drive the transducer from a 5V (or 3.3V) pin and expect much of an echo. Most transducers that I have looked at can take 30-40VDC so some sort of booster is needed if you want real "punch". One clever design uses a max232 to increase the voltage (and thus the power).
The echo, even with a powerful transmitter, is fairly faint and needs amplification. Typical gains applied are 40-100X. You'll need an opamp that can do this at 40Khz (or what ever frequency). So, pick one with the right gain at your frequency.
If you look at the maxbotix datasheet, they have a schematic that may get you started. iirc, it doesn't have enough detail to build one but should at least point you in the right direction.